Live Database Import Agent (Microsoft SQL)

<< Click to Display Table of Contents >>

Navigation:  Live > Agents > Other Agents >

Live Database Import Agent (Microsoft SQL)

The Database Import Agent is a Live agent/report available in EQuIS Live (in EarthSoft.Live.Reports.dll) for importing data from Microsoft SQL Server databases (EQuIS or not) into EQuIS Live.


Also see ODBC Import Agent, for importing data from database management systems (DBMS) into EQuIS Live, using Open Database Connectivity (ODBC).



Importing Data


The Database Import Agent can be run as a scheduled EQuIS Information Agent (EIA), at the desired frequency, to automatically import data as often as needed. Or it can be run outside of EQuIS Enterprise, as a Windows Service, using the Agent Service.


The Database Import Agent has the following input parameters.




Connection Name

DT_LOGGER.LIVE_DATA_SOURCE is set to 'EarthSoft.Live.Reports.DatabaseImportAgent: ' plus this value.



Connection Name = ABC

DT_LOGGER.LIVE_DATA_SOURCE = EarthSoft.Live.Reports.DatabaseImportAgent: ABC

Database Type

Database type from which this agent will be importing data.


Only SQL Server is supported at this time.

Connection String

Connection string to the database from which this agent will be importing data.


Example: Data; User ID=live.logger; Password=your.password; Database=DBNAME; Connection Timeout=600;


SQL SELECT statement used to import data from the database.


Example: SELECT logger_name as logger_code, sensor_name as series_name, sensor_desc as series_desc, value_date as datum_utc_dt, value_num as datum_value, value_flag as datum_qualifier FROM table WHERE value_date > @dt


where @dt is ... for each of the loggers that match the LIVE_DATA_SOURCE for this Connection Name, get the most recent DT_LOGGER_DATUM.DATUM_UTC_DTs for each of their series, @dt is the oldest of them.


Note: The SQL SELECT statement can also be encapsulated within a table-valued SQL function. For example:

SELECT * FROM equis.live_data(@dt)

where equis.live_data is an SQL function that takes a datetime parameter as input.

UTC Data Offset(s)

The UTC offset, in hours, used to convert from a local database source date time to the UTC date time in the EQuIS Live database (in DT_LOGGER_DATUM.DATUM_UTC_DT).


Example: -5 for Eastern Standard Time (EST).

SAVE changes to database?

Check this box to save the imported data to the EQuIS Live database, or uncheck it to display a summary of the imported data without saving it.