Generic Database Service (DBS)

It is possible to set up a generic database service and customize it, using the DBS folder in the Services directory in the CygNet source folder. A generic database service uses the same engine as the other database services and can utilize the associated features such as backup, logging, auditing, and replication. To use the service you will need to define a schema and then program it to gather data, etc.

Note: This service type, Database Service (DBS), will not appear in the CygNet Explorer service hierarchy unless it has been specifically set up.

To Configure a Generic Database Service

  1. Copy and paste the DBS folder from the Services directory from the CygNet source into your CygNet\Services directory.
  2. In the CygNet\Services\DBS folder on your host server, open the Dbs.cfg file in a text editor.
  1. Replace all instances of XXX with your site name.
  2. Change the value of the SERVICE keyword in the Dbs.cfg file to "<yoursitename >.<newservicetype>".
  3. Configure any other options desired in the Dbs.cfg file. The only required keywords are ACS, TRS, MSS, DBS_MAIN_SEC_EVENT, SVC_PORT, and ACS_ID.
  4. Save the configuration file and add the new DBS to the ARS and RSM of your site.
  1. Create the DDL File for your service:
  2. Note: Designing a new DDL file is at the discretion of the user and beyond the scope of CygNet.

  1. Create a new file in your new DBS directory called “<newservicetype>.DDL”.
  2. Open the new DDL file and add the definitions to be used. To do this you must know the data types and sizes of the elements to bring into the database. For example, you can use the DDS Transaction Viewer Utility to view XML data for a device or view another service’s DDL file to find data type(s) to fill the table(s).
  3. Save the DDL file, go to the CygNet\Utilities directory on the host server, and run the ReIndex ESE command-line utility. If the file has not been properly configured, ReIndexEse will return errors. Carefully review any errors and correct them. If no errors are detected, the database file will be reindexed.
  1. Start the new DBS by right-clicking the service in CygNet Explorer and selecting Service Control > Start.
  2. Perform the following to add the new DBS to the SERVICES group in the ACS.
  1. In the ACS, select the Groups tab or right-click in the white space of the service pane and click View Groups.
  2. Double-click any entry in the SERVICES group. By default, the SVC_DBS group is the best choice. The Group Member Properties dialog box displays.
  3. Click the View Group… button. The Properties for Group SERVICES (CygNet Services) dialog box displays.
  4. Click New and in the Type field of the Group Member Properties dialog box, select US – User from the drop-down menu.
  5. In the User field, type the name of the new service.
  6. Click OK twice.
  1. Perform the following to add the appropriate permissions to the new DBS using CygNet Explorer.
  1. In the ACS, select the Permissions page, right-click in the service window, and select New App. The New Application dialog box opens.
  2. Enter the type of the new service (DBS) in the Application field and a description of your choosing in the Description field. For example, if your service is called "TEST.GENDBS", then the description would be "GENDBS".
  3. In the Events section, click New. The New Event dialog box displays.
  4. Enter ACCESS in the Event field and a description of your choosing in the Description field and click OK.
  5. In the Permissions section of the New Application dialog box, click New. The Permission Properties dialog box opens.
  6. In the Type field, select US – User from the drop-down menu.
  7. In the User field, enter the name of your CygNet admin account.
  8. In the Access Level field, select 5-Admin from the drop-down menu and click OK.
  9. In the Events section of the New Application dialog box, click New. The New Event dialog box displays.
  10. Enter ODBC in the Event field and a description of your choosing in the Description field and click OK.
  11. In the Permissions section of the New Application dialog box, click New. The Permission Properties dialog box opens.
  12. In the Type field, select US – User from the drop-down menu.
  13. In the User field, enter the name of your CygNet admin account.
  14. In the Access Level field, select 5-Admin from the drop-down menu and click OK twice.
  1. Create the script to load the data into the new service, taking into account the DDL file created above.
  2. Note: The right data types must be placed into the database for the service to work as designed.

Other Resources

See these other resources for generic database support:

Back to top