How to create a task that runs a SQL script and then a Data Connector import rule
search cancel

How to create a task that runs a SQL script and then a Data Connector import rule

book

Article ID: 181774

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

 How to create a task that runs a SQL script and then a Data Connector import rule

Resolution

A task can be created in the Symantec Management Platform Console that can run a SQL script and then run a Data Connector import rule. This can be useful if the SQL script is needing to be ran before the import rule runs, which in itself, through its data source, could run additional SQL scripts. This procedure can be used as a workaround as well for the data source change introduced in Data Connector 7.5, which is discussed in the following article:

  1. In the Symantec Management Platform Console, click on the Manage button > Jobs and Tasks.
  2. Right click on the System Jobs and Tasks folder > New > Server Job.
  3. Click on the New Server Job name and change this to a new name. For example "Run a SQL Script and then an Import Rule".
  4. Click on the New button > Task.
  5. Near the bottom of the task list, locate and select Run SQL Query on Server.
  6. In the Sql Command box, type the SQL script to run.
    SET NO COUNT ON
    UPDATE RM_Resource Computer
    SET Name = 'New Name'
    WHERE GUID = '<GUID>'

     
  7. Click on the OK button.
  8. Click on the New button > Task.
  9. Locate and select, from the Server Tasks folder, Run Connector Rule.
  10. Click in the "Connector rule" drop-down list and select the Data Connector import rule to use. If this does not exist yet, cancel this, save the in-progress task, and create a Data Connector data source and import rule to use. For more information on how to use Data Connector, refer to the following article:

    How to import data into the Symantec Management Platform database using Data Connector
    https://knowledge.broadcom.com/external/article?articleId=181160


    SELECT *
    FROM RM_Resource Computer
     
  11. Click on the OK button.
  12. Click on the "Save changes" button.
  13. Click on the New Schedule button. Run the task manually now, or, schedule this to run at a specified time.