This post is the third post in a five-post set intended to help show you how to integrate SCCM data with ServiceNow. Here I will show you how to create a SQL Server account for the ServiceNow data source, how to use the integration SCCM 2016 plugin to import data to ServiceNow, how to schedule the import of SCCM data and how to clean out the default “sample” data.
Originally, I created this blog post set around ServiceNow and SCCM in order to help our customers import Warranty Information Reporting (WIR) and Enhansoft Reporting (ER) details into the ServiceNow Configuration Management Database (CMDB). Below are the steps I took to integrate SCCM with ServiceNow.
Steps to Integrate SCCM Data with ServiceNow
The sequence of activities, at a high level, that I took to setup a development environment in order to integrate SCCM with ServiceNow are as follows:
1. Create an Account with ServiceNow.
2. Request a ServiceNow Developer Instance.
3. Logon to the ServiceNow Instance.
4. Activate the SCCM Plugin.
5. Create the User Account for the ServiceNow MID Server.
6. Install a ServiceNow MID Server in Your Organization.
7. Validate Communication Between the ServiceNow MID Server and ServiceNow.
8. Create a SQL Server Account for the ServiceNow Data Source.
9. Use the Integration SCCM 2016 Plugin to Import Data to the ServiceNow CMDB.
10. Schedule the Import of SCCM Data.
11. Clean Out the Default “Sample” Data.
12. Create the Data Source to Import Custom SCCM Data.
13. Import Custom SCCM Data.
14. Confirm the Custom SCCM Data in ServiceNow.
15. View Imported Data from SCCM.
16. Create a Transform for Warranty Information Reporting’s Data.
17. Run the Transform.
18. Confirm Computers Are Linked to Their Warranty Data.
19. Edit the Form Layout.
In this post, How to Integrate SCCM Data with ServiceNow, I’ll show you how to perform steps eight through eleven. To review steps five through seven, please see the post, How to Setup a ServiceNow MID Server for Use with SCCM. To review steps one through four, please see the post, How to Request a ServiceNow Developer Instance to Integrate with SCCM.
Creating a SQL Server Account for the ServiceNow Data Source
A SQL Server user account is required in order to connect the MID Server to the SCCM database for use with the ServiceNow data sources. Without this account the MID Server will not be able to access the SCCM database. Keep in mind that there is no direction telling you to create a SQL Server user account in the ServiceNow documentation. This crucial step is missing!
Launch SQL Server Management Studio (SSMS).
Ensure that the Server type field says Database Engine. Then, in the Server name field, choose your SCCM SQL Server. Click Connect.
Expand Security. Right-click on Logins. Select New Login…
On the General node ensure that SQL Server authentication is selected. Next, provide values for the Login name, Password and Confirm password fields. Clear the Enforce password policy check box. Beside the Default database field click on the drop-down list. Select the SCCM database. In my case it’s CM_CB1.
Select the User Mapping node and then select the SCCM database (CM_CB1). Next, in the Database role membership for: CM_CB1 area, select db_datareader. Finally click OK. Your SQL Server account is created!
Use the Integration SCCM 2016 Plugin to Import Data to the ServiceNow CMDB
Back on the ServiceNow website, in the Filter navigator, type SCCM. Press Enter.
Under Integration-Microsoft SCCM 2016, click on Setup. Provide values for the Database Server, Database Name, Database User ID, and Database User Password fields. Beside the MID Server field, click on the browse button and select the appropriate ServiceNow MID Server. Click Save.
Note: This will configure all data sources for the Integration-Microsoft SCCM 2016 plugin to import data.
Under Related Links, click on Test data source connections.
Ensure that the Completion code says Success. Click on the Scheduled Import link.
You are now configuring the import from the first data source called SCCM 2016 Computer Identity. This is also shown by the name beside the Data source field. Click Execute Now.
Under Integration-Microsoft SCCM 2016 click on Progress. Next, make sure to sort the data by clicking on the Created field.
Notice that the import was triggered for the following set of data. This means that the SCCM data was imported into ServiceNow.
Creating Import set: Imp_sccm2016_removed_sw_aI
Creating Import set: Imp_sccm2016_software
Creating Import set: Imp_sccm2016_network
Creating Import set: Imp_sccm2016_removed_sw
Creating Import set: Imp_sccm2016_disk
Creating Import set: Imp_sccm2016_processor
Creating Import set: Imp_sccm2016_os
Creating Import set: Imp_sccm2016_computer_id
You can also see in the Message field the number of imported (inserts) records (Processed: 1, inserts: 1, updates: 0, errors: 0). This is my second import, so only one new record was imported. Your results will obviously vary, but the number of records imported the first time should be close to the number of computers found within SCCM.
Now let’s review what was imported into the ServiceNow database by first looking at what is in SCCM. I’ll confirm the number of computers in my SCCM lab environment by launching the System Center Configuration Manager (SCCM) Console.
Click on Assets and Compliance. Browse to your collection which shows all computers. Notice in the status area (see the screenshot above) that there are 33 items. This is the number of computers found in my lab.
Now I’ll compare this number to what I find in ServiceNow. Under Integration – Microsoft SCCM 2016, expand Import Set Data. Select Computer Identity and scroll to the bottom of the form. Notice in the screenshot above that it lists 161 records. If I only have 33 computers, than why the discrepancy? ServiceNow developer instances come with sample data! Eventually I will need to clean this out, but first things first, since I’m still within SeviceNow, I’ll show you how to schedule when SCCM data is imported.
How to Schedule the Import of SCCM Data
In the Filter navigator type SCCM and press Enter. Under Integration – Microsoft SCCM 2016, select Scheduled Import. Under Run the following imports when complete, click on SCCM 2016 Operating System.
Ensure that the Active field is selected and then set the time. I selected this import to run every three hours.
Note: The default is to run the import every 24 hours.
Clean Out the Default “Sample” Data
When you create a developer instance, ServiceNow automatically imports sample data. It does this in order to make the instance useful. In my case, I was looking at an additional 128 records! Cleaning-up this sample data will make your data easier to view and more manageable. How do you clean out the sample data? Keep reading.
Login to the ServiceNow developers portal. Click on Manage->Instance.
Click on the Action drop-down button. Select Remove demo data.
As indicated, the process will take approximately 20-30 minutes.
Refresh the page to view the updated status. Notice in the screenshot above that it says that the instance is Online (Removing demo data in progress). The action items under Action will become available again when this process is completed.
Refresh the page after 30-minutes. Notice that the Remove demo data action is now available and the instance is simply Online? This means that the demo data was removed!
An email will also be sent out to you confirming that the demo data was in fact removed.
In my next blog post, I’ll show you how to create a custom data source and you can see how I imported Warranty Information Reporting SCCM data into the ServiceNow CMDB (steps 12 through 15). In my last post of this set, I’ll show you how I tested and customized the imported data using transforms and how I updated the ServiceNow computer view in order to display my imported warranty data (steps 16 through 19).
If you have any questions about how to integrate SCCM data with ServiceNow, please feel free to contact me at @GarthMJ.