Query to get details from Maintenance plans

Hi All,
Could some one please let me know, if there is any way to check whether
all  databases option is selected under the maintenance plan other than using GUI. Below is the print screen for reference.
Maintenance plan includes rebuild Index, checkdb and  update statistics steps, I have to check whether the All databases option is selected for each individual task.
I have a requirement wherein, I have to check this thing on around 5000 servers.
It would be great if someone lets me know the script to check this setting, so that it will save my time.
I have used below queries and tables to get the data, but they don't have the information which i'm looking for
 sysdbmaintplan_databases
Contains one row for each database that has an associated upgraded database maintenance plan.
sysdbmaintplan_history
    Contains one row for each upgraded database maintenance plan action performed.
sysdbmaintplan_jobs
    Contains one row for each upgraded database maintenance plan job.
sysdbmaintplans
    Contains one row for each upgraded database maintenance plan
    select * from sysdbmaintplan_jobs
    SELECT name,subplan_name,subplan_description
    FROM msdb.dbo.sysmaintplan_plans AS s
    INNER JOIN msdb.dbo.sysmaintplan_subplans AS sp ON sp.plan_id=s.id
    Order by name,subplan_name
 SELECT s.name AS MaintenancePlanName,
sp.subplan_name AS SubplanName,
subplan_description AS SubplanDescription,
sj.name AS JobName,
sj.enabled AS JobStatus,
ss.name AS ScheduleName
FROM msdb.dbo.sysmaintplan_plans AS s
LEFT JOIN msdb.dbo.sysmaintplan_subplans AS sp ON sp.plan_id = s.id
LEFT JOIN msdb.dbo.sysjobs AS sj ON sj.job_id = sp.job_id
LEFT JOIN msdb.dbo.sysschedules AS ss ON sp.schedule_id = ss.schedule_id
ORDER BY s.name,
sp.subplan_name
Thanks in Advance.
Regards, Kranthi

On a different note,  i think you can script the maintenance plan - ssis package and then insert into sysssiscatalog table and i think this will create the ssis - maintenance plan on the server. not sure ..this is just thought.... they can be compatibility
issue.
also, you can use the history - maintenance plans to get the data you need. but the caveat is the maintenance plan should have and history should exist and 'extended log  information' must be checked on the plan. this can be done - checking a text box
 in the plan properties.
try this query.. i used top 1 ..so, you can try... if all databases are used in the plan..it will just show all  but if only some are used, i split that into multiple rows,(you might not need this)..there are some many other combinations possible,,
such selecting on some tables etc...  you can query all that information from history tables, 
try this query 
use msdb
go
select top 1 @@SERVERNAME [servername],case when d.Succeeded=1 then 'Success' when d.succeeded=0 then 'Failed' End as Result,
name,b.subplan_name,D.line1,D.line2,replace(D.line3,'Databases: ','') as [DBs],D.line4,D.line5,D.start_time,D.end_time,D.command,d.Succeeded
into #test
from sysmaintplan_plans a inner join sysmaintplan_subplans b on a.id=b.plan_id
inner join sysmaintplan_log c on c.plan_id=b.plan_id and c.Subplan_id=b.subplan_id
inner join sysmaintplan_logdetail d on d.task_detail_id=c.task_detail_id
ORDER BY D.start_time DESC
GO
SELECT [ServerName],name,subplan_name,line2,
Split.a.value('.', 'VARCHAR(100)') AS String
FROM (SELECT [ServerName],name,subplan_name,line2,
CAST ('<M>' + REPLACE([DBs], ',', '</M><M>') + '</M>' AS XML) AS Dbs
FROM #test) AS A CROSS APPLY Dbs.nodes ('/M') AS Split(a);
drop table #test
anyways, on a side note, if you really have 5000 sql servers, you should looking at some tool or scripts to do this maintanence tasks than the builtin maintenance tasks as they provide better managebility. also, it is highly likely that you have multiple version,
which makes it even harder to script out....
Hope it Helps!!

Similar Messages

  • Calling external services from maintenance plans

    How to assign service packages to framework order?How the value limit is assigned in the framework order?
    How to create a settlement order?

    Hi
    I think you are looking for directly calling services (Calling Service entry Sheet) from maintenance plan.
    For that you have to create a purchase order or framework order with account assignment category as U or F and item category as D. Here you can assign your services directly in frame work order.
    Settlement Order you can create as normal order IW31 purpose is to capture the cost on order for all the services.
    Then you  can create a Maintenance plan and after scheduling a service entry sheet will be called directly from the maintenance plan as per your cycles.
    Hope its as per your requirement.
    Shail

  • Create PM Sub order from maintenance plan

    Hi all,
    Scenario is:
    Right now client is making seperate order for related equipments like for motor,pump.and issuing the permits for them seperately.
    But is there any way to generate order and related sub orders from maintenance plan for these related equipments,so that they can issue permit in single main order for all the related equipments using sub orders.
    Is there any user exit for generating sub order from maintenance plan.
    Thanks
    Rachit Bhutani

    Hiii
    You can also use the path as follows.
    Open the order in change (IW32 Transaction code) for which you want to create the sub-order.
    Then follow the path as Order -
    > Create Special -
    > Suborder.
    This will bring you on suborder creation screen (IW36) there superior order is copied from the order for which you have entered on this screen.
    Regards

  • Sql query to get numbers from 0 to 99

    How can we write an sql query to get values from 0 to 99 ... this shouldn't be coming from any table

    Bawer wrote:
    Result: (quickly replied by oracle)
    SQL-Error: ORA-30009 (Not enough memory for connect by - 1GB reserved for oracle on VirtualBox)Oracle version? Takes about 8 seconds on my:
    SQL> select * from v$version
      2  /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Elapsed: 00:00:00.14
    SQL> select count(*) from (
      2  SELECT LEVEL - 1
      3  FROM DUAL
      4  CONNECT BY LEVEL <= 10000000
      5  )
      6  /
      COUNT(*)
      10000000
    Elapsed: 00:00:07.76
    SQL> SY.

  • OSLC Query to get requirements from a RequirementCollection on DOORS NG

    Hi,
    I'm using DOORS NG (V5.0.2) and I'm trying to get requirements referenced by a RequirementCollection using OSLC.
    I tried the query given on:
    https://jazz.net/library/article/1197
    which is:
    &oslc.prefix=rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns%23>,dcterms=<http://purl.org/dc/terms/>&oslc.select=*&oslc.where=rdf:type=<http://open-services.net/ns/rm%23Requirement>
    But this query only returns the RequirementCollection itself.
    So, is the query correct?

    Hello Jim,
    In fact, as you say, that query returns all requirements on a project. I was wrong with the query that I posted and the correct one is the query that you posted, i.e.:
    &oslc.prefix=oslc_rm=<http://open-services.net/ns/rm%23>,dcterms=<http://purl.org/dc/terms/>&oslc.select=oslc_rm:uses&oslc.where=dcterms:identifier=1
    However, this query only returns the RequirementCollection whose identifier is 1 and it does not return its requirements.
    The solution that I found and it was supported by Jazz forum (https://jazz.net/forum/questions/200343/oslc-query-for-getting-requirements-from-a-requirement-collection) is to get the RequirementCollection and using the "uses" attributes (links to the associated requirements), which contain the requirement URL, we access to requirement info. by using REST commands.
    I do not have better answer than this one. If someone has a better idea, I would appreciate.
    Cordially,
    Carlos

  • Automatic Material PR generation from Maintenance Plan/Order

    Dear All,
    I required some setting related with Automatic Material PR generation from Preventive Maintenance Plan/Order.
    Query:  how can i set the non stock material so that when my maintenance plan gets generated then system will automatically generate the material PR for that Non stock material mention in task list.
    Thanks
    Sushant

    Operations & Components can be defined only in task list, not in Maintenance Plan. While defining components in task list, you have no option to select the Item category.
    So, define BoM for the Equipment with appropriate Item category, select those materials in task list, so that you can get the PR for components from Maintenance Order.
    Instead, you can define the components directly in PM Order as well.

  • Copy GOS attachment from maintenance plan to order

    Hello,
    we use maintenance plans to create maintenance orders.
    The idea is to attach checklists and other documents (excel, word, pdf) to the maintenance plan and this should be copied to each maintenance order. We attach att the moment this documents using GOS.
    Is there a standard way to copy document attachments from plan to order?
    Or has one of you realized a solution for this requirement?
    Thanks a lot.
    Kind regards
    Manfred

    Hi,
    PRT is Production Resources / Tools.
    PRT can be an equipment or a material or document or even a free text.
    Simply, it is an object/item that is required to carry a particular application.
    There are other benefits os PRT as well.
    Comprehensive documentation is available online.
    You can attach a document as a PRT by:
    1. Select the task list operation & click on PRT push button below operation list.
    2. On PRT selection dialog box, select "Document" push button.
    3. You will get relevant fields for selecting a document from DMS.
    4. Select your document & save.
    Regards,
    Vijay

  • How do I create Notifications automatically from Maintenance plans

    Hi folks
    I have a new requirement from a client.
    They would like some of their Maintenance plans to automatically create Notifications which can later be converted to maintenance orders.
    Please let me know what configuration chnages i need to carry out.
    Thanks, Felix

    HI
    goto SPRO>Plant Maintenance and Customer Service>Maintenance Plans, Work Centers, Task Lists and PRTs>Maintenance Plans>Set Maintenance Plan Categories-->
    new entries , enter PM notification slect call object as 2 notification and ref obj100 or copy existing from NC.
    tehn at the time of creating plan IP42, slect this and yu get option to enter the notification tyrpa nd other deatisl
    -ashok

  • Error in getting details from Bapi BAPI_ALM_ORDER_GET_DETAIL

    Hi,
    I have created Maintenance order by using the bapi BAPI_ALM_ORDER_MAINTAIN.I have used BAPI_ALM_ORDER_GET_DETAIL to get the created maintenance order details.
    i have given the Maintenance order no(4000030) as input for this BAPi(BAPI_ALM_ORDER_GET_DETAIL ).I got the error as "Error reading the 4000030 order in the document table".
    Please any one give me the solution for this and how to get the details for the created maintenance order.
    Thanks,
    guru.

    Hi ,
    In my case the problem is the data is not saving into SAP.I have used customized bapi.
    I think it will be  the same problem for you.Afterusing  this Bapi BAPI_ALM_ORDER_GET_DETAIL you need to commit it inorder to save the data into SAP.So you have to use BAPI_TRANSACTION_COMMIT.
    If you are calling the BAPi BAPI_ALM_ORDER_GET_DETAIL from  xMII , the data will not save in SAP even though you use COMMIT bapi.In that case you need to use Customized Bapi.
    Thanks
    guru.

  • Query to get details of CollaboratorName and his Score in RFx Scoring

    Hi Experts,
    I m writing a query to get the scores given by collaborators in RFx Scoring.I got a report "RFx Response Analysis", where we can get the details of questions and the scores given by vendors to that questions.I m trying to get the details of Collaborators and the scores given by them in the below order.But i m facing problem to get details of Score given by collaborator.
    | Question |  Response | SupplierName |  CollaboratorName | ScoreByCollaborator |          
    Any turn arounds or ideas wud be gr8!
    Regards,
    Uday

    Hi Uday,
    Please let me know, how we can get Vendors scores and collobarators scores from the query.
    Thanks in advance
    Regards
    Natarajan

  • Query for getting address from RA_CUSTOMER_TRX_ALL.REMIT_TO_ADDRESS_ID

    Some one please provide query for getting REMIT TO ADDRESS details by using the column RA_CUSTOMER_TRX_ALL.REMIT_TO_ADDRESS_ID

    try
    select ct.remit_to_address_id,
           raa_remit_ps.party_site_number,
           raa_remit_loc.state,
           ft_remit.territory_short_name,
           ct.*
      from ra_customer_trx_all    ct,
           hz_cust_acct_sites_all raa_remit,
           hz_party_sites         raa_remit_ps,
           hz_locations           raa_remit_loc,
           fnd_territories_vl     ft_remit
    where 1 = 1
       and ct.remit_to_address_id = raa_remit.cust_acct_site_id(+)
       and raa_remit.party_site_id = raa_remit_ps.party_site_id(+)
       and raa_remit_loc.location_id(+) = raa_remit_ps.location_id
       and raa_remit_loc.country = ft_remit.territory_code(+)

  • Single query to get data from different databases

    i need to capture certain fields from certain tables in database 1 and certain fields from certain tables in database 2 into one file using a single SQL statement.
    i tried searching on the net
    i found that dblinks can help
    but iam not sure if ill be able to create dblinks in my situation which is:
    i need to get data from oracle to be copied to mysql
    this is not a replication acitivity, but i need certain fields from one database and certain from the other
    so what iwas thinking is, if i use an sql query to get all the fields (i need around 40) from the different oracle databases and create a singlefile with one insert per select, i can then read that file into mysql
    instead of creating multiple sql queries for each table and creating separate files and eventually separate tables in mysql.
    can anyone help me here?
    or maybe suggest another approach.
    thanks

    Hi,
    I think dblink is the only option available to get data from different databases. It will work for your case too.
    CREATE DATABASE LINK db_link CONNECT TO user_name IDENTIFIED BY  password USING 'instance_name'you must have the system privilege 'create database link' to create db links. This way you can get the required data and put it in a table in oracle. But i dont know how to put this data from oracle table to Mysql.
    HTH
    Muneer

  • Calibration Order from maintenance plan

    Hi All,
    We have assigned inspection point 300 in task list. And inspection type 14 is assigned to the order type.
    When I create the order manually by IW31 then I am getting the inspection lot but when creating the Maintenance Plan with the same order type and task list, the lot is not generated.
    Pls suggest  is there any QM or PM setting missing ??
    Thanks,
    Sanjay

    Dear Sanjay,
    Make sure you have assigned the inspection characteristic and sampling procedure for your individual task list operations.
    Please do confirm the same and do reply.
    Regards,
    Chintan

  • Help to write query to get records from specified time TO specified time?

    I have a table which has large data and the table is updated every min,
    Suppose the Table comp(timeid date,sessions varchar2,sid varchar2)
    Here time needs to be checked
    So now i have to write a query which displays records that have been in the table
    for every 5 mins
    default timeframe is sysdate-5 then the lower and upper bound is multiple of 5 i.e
    Suppose now Time and sysdate: 12-sep-2007 1:22:00pm
    From sysdate: 12-sep-2007 1:15:01pm TO sysdate: 12-sep-2007 1:20:00pm
    So i need a query to get the records from 1:15:01pm to 1:20pm.
    Message was edited by:
    user594721

    Explanation is not clear.Please give sample data and expected o/p.
    If you need the data of previous five minutes, do like this...
    SQL> select id, to_char(time,'dd/mm/yyyy hh:mi:ss') time
      2  from test;
            ID TIME
             1 13/09/2007 10:29:55
             1 13/09/2007 10:29:22
             1 13/09/2007 10:20:28
    SQL> select id, to_char(time,'dd/mm/yyyy hh:mi:ss') time,
      2             to_char(sysdate,'dd/mm/yyyy hh:mi:ss') current_time
      3  from test
      4  where time between (sysdate - (5/24/60)) and sysdate;
            ID TIME                CURRENT_TIME
             1 13/09/2007 10:29:55 13/09/2007 10:32:45
             1 13/09/2007 10:29:22 13/09/2007 10:32:45                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Generate order from Maintenance Plan

    Hi Experts,
    We use maintenance plan type PM that will generate maintenance order during maintenance call. It work fine for some time. The initial config for the order has Plant Section as mandatory. However when we changed the config to make the Plant Section not mandatory (as input only), we hit error during maintenance call. Any ideas how to get around this issue? Thank you for your help.

    Hi,
    Your Plan was created earlier so the call is in backdate when plant section was mandatory.
    Generate a new call it should  not give error.
    Ramesh

Maybe you are looking for

  • How to get number of rows and columns in a two dimensional array ?

    Hello, What would be the simplest way to get number of rows and columns in a two dimensional array represented as integers ? I'm looking for another solution as For...Each loop in case of large arrays. Regards, Petri

  • Extended Accounting - Configuration info

    Hi all, My understanding is that the file '/etc/acctadm.conf' is created / changed, whenever extended accounting is enabled / changed. I noticed that this file is not getting created when extended accounting is enabled. Also is there a function which

  • How to display a multiple-page html file

    My program has a multiple-page help file, which is an html file, that I would like to display page by page. My code presently doesn't even display anything, even though I put my "help.html" into two places, where I have my .java files and where I hav

  • TypeError props.width has no properties. WHAT DO?!? Help ASAP, thanks.

    I've attempted to add a photo gallery using that not-so-user-friendly jquery stuff... which keeps messing up, mind you. According to them it's just 'click click' and voila, but according to a sane and unfortunately not so code-savvy individual, it ju

  • HTTP Client, URL Encoding

    Hi there, got a bit of a problem here and hoping that someone might have an idea. 2 servers, Web AS 6.20 SP45 (Java and ABAP) same Kernel releases, DB releases, patch levels, components and everything. Same program (transported from one to the other)