Querying SCSM CMDB for CI info

Hi,
Currently working on a project to utilize the SCSM CMDB using the connectors for AD, SCOM, and SCCM to populate and then feed another CMDB solution that is tied to our ticketing system. Our goal is to maintain the CMDB in SCSM and then sync those changes
to the other CMDB daily. When writing the query we can get the OS and Hardware information using the views from MTV_Computer and MTV_Microsoft$SystemCenter$Windows$* in the ServiceManager database. We're we are running into issues is we cannot find any views
or tables to pull the Status of the CI or Users associated with the Computer under the CI Information in the form. Hoping someone can point me in the right direction on finding these items?
Also, anyone else doing anything similar? There doesn't seem to be a unique identifier to query against in the views to get all of the associated objects. So we're making use of the server names to pull in these items. Is this standard practice or there
better solutions?
Thanks,

The supported method for querying the Service Manager CMDB is to use the SDK with C#.
http://msdn.microsoft.com/en-us/library/hh965050.aspx
Here's a survival guide with a lot of good information and starting points for using the SDK
http://social.technet.microsoft.com/wiki/contents/articles/13472.system-center-2012-service-manager-developer-s-survival-guide.aspx
Another supported method would be to query the datawarehouse.
Now, having said that, if you absolutely have to use SQL then let me first give you a quick primer on the Service Manager object structure. Remember, if your queries break anything, Microsoft won't support it. Also, never update or create records in the
SQL database directly. It will break Service Manager eventually. The SQL database is hands-off..you can look (select) but don't touch (update/delete) :)
Objects in Service Manager are nothing more than records in SQL tables. Relationships between those objects are defined by "Relationship Types" (which are stored in the "RelationshipType" SQL table). The relationships that exist between
two objects in Service Manager are also objects themselves..which means they're stored in a single table, the "Relationship" table. Another tip that should help..virtually everything in the SQL DB is identified with a unique Guid (BaseManagedEntityId
for objects, RelationshipTypeId for relationship types, ManagedTypeId for classes, etc).
As for CI Status; Status and other properties like it are Enumeration properties (or list properties). These enumerations are defined by a management pack and represent a specific set of values that an object property can have. So, the column in the sql
table that represents an enumeration value is, you guessed it, a Guid. Enumerations are stored in the EnumType table. For instance, if you look at the MTV_Computer view, you'll find the "ObjectStatus_blahblahblah" column (which is the CI status)
is nothing but guids. Join it to the EnumType table to get a human-readable status.
Now let me give you a quick sample query that highlights how you can query for computer objects and their related primary user objects.
select computer.DisplayName, usr.DisplayName
from mtv_computer computer with (nolock)
left outer join relationship rel with (nolock) on rel.SourceEntityId=computer.BaseManagedEntityId
and rel.RelationshipTypeId='AAF7ADEB-920C-3D3F-2184-1DE2A2CBA5A0' --System.ComputerPrimaryUser
and rel.IsDeleted=0
left outer join MTV_System$Domain$User usr with (nolock) on rel.TargetEntityId = usr.BaseManagedEntityId
inner join BaseManagedEntity bmeComp with (nolock) on computer.BaseManagedEntityId = bmeComp.BaseManagedEntityId
and bmeComp.IsDeleted=0
left outer join BaseManagedEntity bmeUser with (nolock) on usr.BaseManagedEntityId = bmeUser.BaseManagedEntityId
and bmeUser.IsDeleted=0
where computer.ObjectStatus_4AE3E5FE_BC03_1336_0A45_80BF58DEE57B='ACDCEDB7-100C-8C91-D664-4629A218BD94' --System.ConfigItem.ObjectStatusEnum.Active
and (usr.ObjectStatus_4AE3E5FE_BC03_1336_0A45_80BF58DEE57B='ACDCEDB7-100C-8C91-D664-4629A218BD94' --System.ConfigItem.ObjectStatusEnum.Active
or usr.DisplayName is null)
The guids have comments that indicate what they are. The AAF7... relationship type is the System.ComputerPrimaryUser relationship type. ACDC... is the System.ConfigItem.ObjectStatusEnum.Active enumeration (it represents the "Active" CI Status)
The overall purpose of this particular sample is to display all windows computers (mtv_computer) in the database and also display the related "primary user" if such a user exists (otherwise, the second column will be null)
The first two joins tie the computer together with its related primary user through the relationship table.
The second two joins tie each object to the BaseManagedEntity table which is a repository for every class based object in the CMDB. That table maintains various information about the object, including whether it's deleted or not.
(Note there are two forms of "deleted". There's "Pending Delete" on a CI which puts the object in the Deleted Items folder in the console. This is a "business logic" status. The other deleted is "IsDeleted", which is
an SCSM framework status which tells the underlying workflow engine to completely eliminate the object and its history from the CMDB in 2 days. These objects are not visible in the console at all.)
Notice that I use "with (nolock)" on all the tables. This helps ensure that your reads won't interfer with Service Manager while it talks to the database (through the workflow engine, stored procedures, etc etc).
I'm going to say it one more time..messing around in the sql database is unsupported!
Hopefully, though, this post will give you some insight on a couple different ways you can get info out of Service Manager

Similar Messages

  • An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'dsPriority'. (rsErrorExecutingCommand)

    click report error:
    log file:
    processing!ReportServer_0-2!104c!04/27/2015-19:15:21:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing.
     ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'dsPriority'.
     ---> Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException: Query (26, 25) The ALLMEMBERS function expects a hierarchy expression for the  argument. A member expression was used.
       at Microsoft.AnalysisServices.AdomdClient.AdomdDataReader..ctor(XmlReader xmlReader, CommandBehavior commandBehavior, AdomdConnection connection)
       at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.ReportingServices.DataExtensions.AdoMdCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQuery()
       --- End of inner exception stack trace ---
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQuery()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.Process()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeParameterDataSet.Process()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.ProcessConcurrent(Object threadSet)
       --- End of inner exception stack trace ---
    open http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx?op=ProcessWarehouse click Invoke:
    System.Web.Services.Protocols.SoapException: TF221029: Reporting for Team Foundation Server does not have any warehouse jobs defined. Use the Team Foundation Administration Console to rebuild the reporting. : 2015-04-27T19:30:29:782 ---> System.InvalidOperationException:
    TF221029: Reporting for Team Foundation Server does not have any warehouse jobs defined. Use the Team Foundation Administration Console to rebuild the reporting. at Microsoft.TeamFoundation.Warehouse.WarehouseAdmin.QueueJobs(String collectionName, String jobName)
    at Microsoft.TeamFoundation.Warehouse.WarehouseControlWebService.ProcessWarehouse(String collectionName, String jobName) --- End of inner exception stack trace --- at Microsoft.TeamFoundation.Warehouse.WarehouseControlWebService.ProcessWarehouse(String collectionName,
    String jobName)

    Hi shelman,
    I'd like to know whether you configured TFS reporting service properly, and if you can get the report normally before. From the error message, you might has wrong data source or the parameters of the dataset 'dsPriority'. You can check whether the data source
    for your report is available, try to use windows authentication. Or check the parameters of dataset 'dsPriority' make sure the query works when you execute it manually.
    To process the TFS data warehouse and analysis services cube, I'd like to know which operation you selected before clicking Invoke button. Please follow the instructions on this
    page to process TFS data warehouse and analysis service cube manually. You can also refer the James's last reply in this
    thread or this
    blog to check if the solutions work for you.
    Another option is run TFS best practice analyzer to check if there any configure issues on your TFS server machine. And check event logs to see if there any useful information, elaborate more details about your scenario including reproduce steps if the problem
    persists.
    Best regards,

  • Query execution failed for data set

    Hi,
    We are using SQL 2005 server for generating reports.When we ran the reports it taking so much time after some time it shows this error:---
     ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set  ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command.  The results, if any, should be discarded.
    Can you help me out.
    Thanks,
       --Amit

    My team is also facing similar problem. The RS trace logs report:
    w3wp!processing!13!9/26/2007-15:31:23:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'msdb'., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'msdb'. ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command.  The results, if any, should be discarded.
    Operation cancelled by user.
    In our system, Report Server and Database are on different machines. Report Server access database using a service account who has stored proc execute permissions on database.
    Problem comes only if the query execution time exceeds 5 mins. Otherwise the report gets generated successfully.
    I suspected this to be some timeout issue. But I have checked that all timeout settings in rs config files are as default.
    Any pointers?
    Thanks
    puns
    [email protected]

  • Number Ranges for Purchasing Info Record

    Dear Guru's
    Number range  interval for Purchase info record  can be  created and assign to group and there are two group for Stock and Non Stock materials.
    Now my query is how the system pick the number range ??? Since we don't have any assignment like PR,PO
      My requirement is we have 3 company code - I need to have different number ranges for purchase Info  record for each company . Guide me to achieve ...
    Thanks in advance
    Regards
    Anand

    SAP has provided only Two standard document Types for Pur. Info Records.
    IL for Stock Material ( with matl No.)
    IN For material Group (w/o MMR).
    By default, if you enter Matl No. in the initial screen, system automatically picks the doc. type IL and the no. range assigned to it.
    If you're not entered matl. no. in the initial screen, and proceed the Transaction further, system picks the doc. type IN and prompts you to enter Matl Group.
    In the second case, the system picks up the no. range as per assignment.
    Here in your case, you want create a new no. range and assign to your IL/ IN.
    For this, you go to the transaction Define No. Ranges in Inforecord, from menu bar, choose Group-> maintain. Here you maintain your new no. range with a name. Now your new group is created with your required no. range.
    Then select your new group ( Check box), select, IL, and click assign button and save.. Your IL is assigned to your new group and system picks the new No. Range when you are creating a Inforecord with Mat No. Similarly, you can change No. range for IN also.
    or one more option you have.
    In the first screen of No. Ranges Transaction, select change intervals tab button, you'll be goto intervals screen. There, from Menu bar, choose Interval-> change current No. Then you reset your current no. to Zero, save it. The again choose Change Interval, then in that screen, change the Interval with your new no. range.
    Here in the second case, u need not maintain new groups. Just changing the Interval for the existing group.
    You can adopt any one of these options.

  • BW Query as datasource for generic extractor...

    Hi,
    I want to use a BW Query as DataSource for a generic extractor, the objective is fill an InfoCube from the result of that query. It is possible? If can it be done, how?
    Thanks.
    Enrique.

    Hi Enrique,
    You can achieve this with the APD. See this for more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Hope this helps...

  • Query regarding BT having incorrect info

    Hi there
    Im currently a Sky broadband customer after moving properties im intrested in getting Infinity - when I had my original line activated the BT engineer confirmed that the cabinet im connected to does indeed have fibre hardware - however every checker I put my details in said no.
    After having another engineer out a second time to fix a line fault I queried this with him again and he confirmed that the old block of flats that were here before used to be connected to a differnt cabinet and the new flats details havent been upgraded by BT to reflect this. I have checked and found the green cabinet in question too!
    How do I go about recifying this? The service im getting with Sky isnt amazing and id obviously like more speed! It will just mean ending the contract with Sky early! Erk - wonder how much that is going to cost!!
    Any help appreciated 
    JC

    Thanks for the info Im actually pretty au fait with the technology and its definately a fibre cabinet (sad but ive actually watched the openreach training video http://www.youtube.com/watch?v=53NcsctuxV0)
    PMing the mods and seeing what they can do if anything anyway! Just hope the engi wasnt pulling my leg!
    Thanks JC

  • Wild Cards are not allowed for this info object

    Hello Experts,
    I am getting some problem, when I trying to find the some selections for info object in variable selection screen; it giving some error like u201CWILD CARDS" are not allowed  for this info object.
    I am trying to find the search item like this: TELENOR*
    When I click on find button it is giving error.
    Please any body help me in this matter.
    Thanks & Regards
    Prathap.

    Hi,
    You need to create a selections option variable on the characteristic that needs to be filtered.
    After doing this, when you run the query, select the * from the dropdown box,and give the value.
    Hope this helps u..!!
    -Pradnya

  • Querying The Hub for the external IP address withi...

    As a programming challenge I'm trying to get the dynamic, external IP address of my broadband connection.
    route -n -> returns routing information including the 192.168.1.254 gateway
    nslookup "gateway" returns:
    server: 192.168.1.254
    address: 192.168.1.254#53
    254.1.168.192.in-addr.arpa name BTHomehub.home.
    254.1.168.192.in-addr.arpa name btbroadband.home.
    254.1.168.192.in-addr.arpa name api.home.
    using nslookup api.home (or any of the others) returns:
    server: 192.168.1.254
    address: 192.168.1.254#53
    I want the external address not the internal. Can anyone help? I don't want to just use an ip finder website to get the address.
    Thank You,
    JvH

    Thx for your help. Yes, I can login (via web page) and find the hubs external IP address but wanted to do it from within a script and wondered if it was possible without having to go down that road (login credentials, accessing right page, parsing the output).
    route -n and looking for "G" under flags returns the gateway(s) and this gives me 192.168.1.254 which is the IP of the homehub, not my machine, so I'm querying the right device.
    The annoying thing is; this used to work. I was running under Ubuntu 10, upgrading to 12 and it doesn't anymore. U12 has dnsmasq server  which provides local DNS caching. I thought maybe this was the problem (it was handling the query from within the network and not asking the hub for the info) so I switched it off.
    I'm going to try and create a USB boot drive with Ubuntu 10 on it (if I can) and see if the script still works from within that.
    Finally, I'm not an expert and am happy for any useful criticism and advice. Tnx guys

  • Hi I got iPhone 4 been getting apps today went to get an app and won't let me even free ones have to sign in then sign in again for billing info it's all correct but still won't download apps had problem before fixed it but won't work again

    iPhone has previously downloaded apps but go to do today and won't keeps asking for billing info which is in there and correct but then says plz update you payment there is a billing problem with your previous purchase it's done before to me so reset and erased everything and worked did that Again and still doesn't work  info is all correct have to re enter Ccv number still doesn't work driving me nuts I want my apps

    If you had money in your account when you purchased a paid app and Apple didn't claim on the payment to your bank until after the download it maybe that there was insufficient balancce in your account to complete the purchase and therefore you'll need to wait until you have the funds to make the payment, when you have billing issues it won't even let you download free apps.
    If that isn't the case then give iTunes store a call or email them and they can tell you exactly what is wrong with the account

  • How to query opening balance for all customer or Vendor for an speci. date

    Hi,
    How to query opening balance for all customer or Vendor for an specific date?
    Example:
    put any date and query will show all customer/ Vendor  that date opening/current balance.
    Regards,
    Mizan

    Hi mizan700 ,
    Try this
    SELECT T0.[DocNum] As 'Doc No.', T0.[CardCode] As 'Customer Code',
    T0.[CardName] As 'Customer Name',(T0.[DocTotal]-T0.[PaidSys]) As 'O/S Balance'
    FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    INNER JOIN OCRG T2 on T1.GroupCode = T2.GroupCode
    INNER JOIN INV1 T3 ON T0.DocEntry = T3.DocEntry
    WHERE T0.[DocStatus] ='O'
    AND
    (T0.[DocDate] >='[%0]' AND T0.[DocDate] <='[%1]')
    Regards:
    Balaji.S

  • Just did the iTunes update that iTunes said was available now iTunes won't open, keep getting Runtime Error message.  R6034 An application has made an attempt to load the C runtime library incorrectly.  Please contact the apps support team for more info.

    Just did the iTunes update that iTunes said was available, now iTunes won't open.  I just keep getting a Runtime Error message. 
    R6034
    An application has made an attempt to load the C runtime library incorrectly.  Please contact the apps support team for more info.
    Is anyone else having this problem?
    I tried to re-install and got the following message:  iTunes was not installed correctly.  Please reinstall iTunes.  Error 7 (Windows error 1114)
    Does this mean I have now lost everything?

    I just had the same error: 
    R6034
    An application has made an attempt to load the C runtime library incorrectly.  Please contact the apps support team for more info.
    I went to http://support.apple.com/kb/ht1925 and did a complete removal and reinstallation of iTunes. You MUST follow the directions here exactly...it's more than just iTunes that must be removed, and it MUST be done in the order in which the support article says.  I followed the exact instructions, and iTunes is back on my machine (no more C runtime error) and you do NOT lose your music...it's all in my library, as it was before.
    Good luck!

  • TS3297 I recently started my apple I'd account and used my wife's bank card for payment info. I then loaded $75 from iTunes gift cards on the account. I was able to make in app purchases, now its telling me to contact iTunes Store support to complete now?

    I recently started my apple I'd account and used my wife's bank card for payment info. I then loaded $75 from iTunes gift cards on the account. I was able to make in app purchases, now its telling me to contact iTunes Store support to complete now? Help

    Do what it told you to do.
    Contact itunes support
    http://www.apple.com/support/itunes/contact/

  • Why won't App Store let me download free apps it asks for billing info?

    It asks for my billing info when downloading a free app and there's no way I can sort it out it shouldn't ask for billing info if it's free!!!!!!!!

    Is this a new account, and if so how did you create it ? If it is new then unless you follow the instructions on this page when creating an account : http://support.apple.com/kb/HT2534
    then card details will need to be entered before you will be able to use the account to download any item from the store (paid-for or free).

  • My wife and i share a computer. when she looks for her info in mycloud my info appears in her account.

    my wife and i share a computer. when she looks for her info in her cloud acct on the desktop my info appears in her account. Cannot understand why her info from her phone would appear to be nowhere and mine is in her account. Help us understand this please?

    On the shared computer click on System Preferences -> iCloud -> Account Details verify that each individual account is configured correctly. By default, the Apple ID used to install the computer the first time is used for all accounts on the computer, unless it is changed.
    Please start here - http://www.apple.com/support/icloud/account/
    This might also be helpful - http://www.ilounge.com/index.php/articles/comments/syncing-multiple-icloud-data- with-a-family-mac/

  • SSRS Error : Query execution failed for dataset 'dataSet'. (rsErrorExecutingCommand) Semantic query execution failed. Invalid object name 'RPT.*********'. (rsSemanticQueryEngineError)

    I am new to SSRS and I am trying to migrate reports from 2008 to 2012. As I have so many reports to migrate, I simply got the back up of ReportServer,
    ReportServerTempDB, and Encryption Key and restored them to test environment. I made necessary configuration from RS configuration tool. I am able to see the reports now when I browse //hostname/reports. But when I open any particular report I am getting some
    error.
    · An error has occurred during report processing.
    (rsProcessingAborted)
    Query execution       failed for dataset 'dataSet'.
          (rsErrorExecutingCommand
    Semantic query        execution failed. Invalid object name
           'RPT. ******'. (rsSemanticQueryEngineError)
    ****** - I am assuming this is a custom data class.
    Does anyone have insight on this? or any better way that I can migrate the reports to new server with less efforts.
    I don’t have the reports solution file to deploy the reports, so I have followed backup and restore process.

    Hi Kishore237,
    According to your description, you migrated some reports from Reporting Services (SSRS) 2008 to 2012. Now you get error when accessing the reports on SSRS 2012. Right?
    In this scenario, did you modify the report data source in database after migration? You can try to open the report in Report Builder or Report designer and check the report dataset. If you can preview the report in Report builder or Report designer,
    please try to redeploy the report to Report Server. If it is still not working, please try to restore the database from backup. And for migrating reports, please follow the "Content-Only Migration" in the link below:
    http://msdn.microsoft.com/en-us/library/ms143724(v=sql.110).aspx
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

Maybe you are looking for

  • Can I have my new iCloud email address be the default instead of my Apple ID?

    My apple ID is based on an old @mac.com account that no longer works. My new iCloud account has given me a new @me.com account but I can't use it as the default and all email going out from iPhone apps, i.e.: news articles, etc., is being sent from t

  • Get_Payslip Function

    Dear All I have used Get_Payslip Function Module to get Pay Slip in Internal table from that we are sending pay slip through email.. Problem is recently we have change the Pay slip Design. While i am tiring for new pay slip design with GET_PAYSLIP fu

  • Printing problem after acrobat upgrade

    Hi, I am running Mac OSX 10.8.5 and have recently updated my Acrobat to 11.0.04. Since doing this I am experiencing problems printing my pdf files to my desktop printer, which is a Xerox phaser 7500 duplex printer. When sending the file across it jus

  • Flash 10.0.2 Air Setting Dialog Doesn't Appear

    I can't seem to get the Air Setting dialog window to appear (Flash 10.0.2 with Adobe AIR 1.5) . All I see if the SWF exporting window which runs and disappears. However, I tested this on another machine (mac) which is running Flash 10.0 and Adobe AIR

  • Problem with codepage

    Hello! Please help me. How I can set codepage in jco connection.