Database tab
Figure: "Database" tab
The following buttons and labels are displayed on this panel:
-
DBs: Displays all databases currently configured for the DBLogger. Only those available here can be assigned under tables.
-
New: Creates a new MySQL, MS SQL-Server or Oracle database for the DBLogger. (This identifies to the DBLogger a DB to be used. The actual creation of a DB is performed with the relevant administration tools.)
MySQL and Oracle are supported for creating a DB under Linux! Oracle is only supported in combination with unixODBC on Linux.
-
Delete:This button can be used to delete a DB. Only those DBs that are not used in any archive group can be deleted. (Databases are obviously not really deleted, they are just no longer recognized by the DBLogger.)
-
DB name:The current database name.
-
DB type:The type of this database. At present, MySQL, MS SQL-Server and Oracle are available.
-
Path:Specifies where the database is located in the system.
-
User and password: User and password used to access the database. The user must have write permissions (incl. permissions to create tables).Note:
OS Authentication for connecting to the database is not supported.
-
Alive period:This setting is used for a database monitoring function (see Internal tables - DBL_Alive).
-
Commit:Forced termination of write actions in the database. This setting can be made in seconds (periodic) or records (based on quantity). The settings are additive!
-
Redundancy settings: When configuring a redundant project choose the option Write active and passive if a separate DB exists on the computer for both hosts. Deactivate this check box if an external DB is used by both hosts. The button ? shows help for this setting.
Note the following when using one DB on both hosts:
After changing the configuration of a database on the "Table" tab copy the changed database to the other host. Therefore, stop the script "DBL_Control.ctl" temporary on both hosts and restart it after the copy process.
When using an external database to which the both hosts write, data is lost (a gap in the logged data) if the connection to the active host is lost!
When one DB is used on both hosts the databases are not synchronized via WinCC OA when a project is restarted. This means that if a redu partner does not run data is lost (a gap in the logged data). The other running host writes further into the database.
-
Apply:TheApplybutton must be clicked after creating a new database or after any change.
-
Help:Link to the Online Help.
Advanced functions of the main panel and the Database tab are described in the chapter Advanced functions.
Creating a new MS SQL-Server database
Figure: Creating a new MS SQL-Server database for the DBLogger
Select MS SQL-Server as database type.
Figure: Defining the name of the data source (for MySQL, MS SQL-Server and Oracle databases)
Give the name of the data source (enter an ODBC data source). ODBC is used to communicate with the database. You can see if a connection to a data source exists under
on the System DSN tab. You must then enter this name of this connection as the name of the data source.If you cannot see a name for an ODBC data source on this System DSN tab, then you will have to create an MySQL, MS SQL-Server or Oracle database and establish a connection to this. Note that the ODBC and database name has to be the same when using MS SQL-Server!
Figure: Creating a MS SQL-Server database for the DBLogger
Now the SQL server database can be configured.
Creating a new Oracle database
When using an Oracle DB, the following entry must be made in the Oracle registry (Software/Oracle/HOME0) on the computer where the WinCC OA CTRL script for the DBLogger is running:
Code string "NLS_DATE_FORMAT", value "DD.MM.YYYY HH24:MI:SS". Otherwise there will be a problem with the date format and writing date values in the Oracle DB.
Follow the same procedure as for the MS SQL-Server for identifying a MySQL or Oracle DB to the DBLogger.
Note that the configuration of a MySQL resp. Oracle DB under Linux requires the setting of further parameters in the panel (because you cannot configure a connection for ODBC data sources via a tab under Linux). These parameters are the host name/server, where the DB is located, and the port number (this setting is optional). Enter these parameters in the text field Path. By default the local host name and the default port number is used while creating a DB. Further information, how the connection to relational databases is established under Windows/Linux, you will find in the chapter ADO and Qt.
You can only make subsequent changes to the Alive and Commit parameters. The "Apply" button automatically modifies both functions.