Configuring Microsoft SQL Server Tasks

<< Click to Display Table of Contents >>

Raynet One Data Hub > 14.0 > Administration and User Guide > Tasks > Creating or Editing Tasks > Configuration 

Configuring Microsoft SQL Server Tasks

Microsoft SQL Server tasks require only the full query. You can use all syntax and language constructs accepted by the target SQL Server, against which the query will be executed by the agent. The query can be written manually into the editor, or uploaded from a local .sql file by using the BROWSE FOR A FILE... button.

 

Tasks_AddNewTask_ConfigurationMSSQL

 

warning1

WARNING

Raynet One Data Hub uses a loose structure of the data and does not enforce any particular security and access rights in terms of what the reporting queries are doing. Since temporary tables are sometimes necessary and may be deleted afterwards, commands such as "delete", "drop", "update" are permitted. Thus, improper use can lead to data loss in the database source. Make sure that the query does not damage other reporting data by only removing or changing the tables owned by the report.
 
This only applies to the reporting data. Raynet One Data Hub uses a separate database to keep track of its settings, users, reports etc. which are separated and cannot be adjusted or damaged this way.

 

Outputting Multiple Tables from a Single Query

Since Raynet One Data Hub 12.6, Microsoft SQL Server connector can produce multi-table output. To use this functionality:

 

1.Break down your script statement into sections, each section delivering a single table

2.Before returning the results of each table, use the following statement:
 
PRINT 'Table=<table-name>'

 

For example, the following SQL query:

 

PRINT 'Table=MyDevices'

SELECT * FROM ActiveDirectoryDevices

 

PRINT 'Table=MyUsers'

SELECT * FROM ActiveDirectoryUsers

 

Produces two tables MyDevices and MyUsers, each having a carbon copy of another table.