CNCnetPDM.zip initially automatically creates an empty file named connect.udl which can be setup with information about your database, for example:
[oledb] ; Everything after this line is an OLE DB initstring Provider=SQLOLEDB.1;Persist Security Info=False; Data Source=(local)
This means that CNCnetPDM assumes that you’re using MS SQL SERVER (Provider=SQLOLEDB.1), Username and password should not be stored (Persist Security Info=False) and your database is at the local PC (Data Source=(local)). To setup your database connection, proceed as follows. The procedures for MS SQL Server Oracle, MySQL and MariaDB are slightly different.
MS SQL SERVER
For Microsoft SQL Server please make sure that you have setup your database with 'SQL Server and Windows Authentication mode' enabled. Otherwise CNCnetPDM will not be able to connect to your database if you run it as background service with no user logged in. Double click on file connect.udl, click on tab ‘Provider’ (1), select the provider you want to use to connect to your database (2).
FIG 1: Select provider for database connection (UDL file)
Click on tab ‘Connection’ (3), enter information that describes your database. Under ‘Select or enter a server name’ (4) enter or select the database you’re using. If you use an instance simply append \INSTANCENAME to the server name.
FIG 2: Setup database connection information (UDL file)
Under ‘Enter information to log on to the server’ (5) select either ‘Use Windows NT Integrated security’ or ‘Use a specific user name and password’. If you plan to use CNCnetPDM as a background service it is highly recommended that you use the second option as the service normally is executed under the ‘local system’ account and should be able to run without any user logged on. In this case please also check ‘Allow saving password’ (6). Finally select the database on the server that contains the required tables (7), here MDA. Clicking on button ‘Test Connection’ should return ‘Test connection succeeded’. Click OK, you’re done.
Oracle has 2 different types of database clients, one for 64 and one for 32 bit Operating Systems (OS). As CNCnetPDM is a 32 bit program please install the 32 bit version of the client tools even if you’re working with a 64 bit OS. To configure the database connection for CNCnetPDM on a PC with 64 bit OS proceed as follows, do NOT double click the .udl file.
Open a 32 bit command line: %SystemRoot%\syswow64\cmd.exe
Navigate to the directory where CNCnetPDM is installed: cd DIRECTORYNAME
Type in the name of the .udl file: connect.udl
A dialog opens, click on tab ‘Provider’ (1), select the provider you’re going to use for your database connection (2).
FIG 3: Select provider for database connection (UDL file)
Next, click on tab ‘Connection’ (3) to enter information required to access your database.
FIG 4: Setup database connection information (UDL file)
Under ‘Enter the data source and/or location of the data’ (4) enter the Data Source name of the database you’re using, here TNS name ORCL2 is used. Tip: You can also use a so called ‘TNS less’ connection. In this case please enter data similar to the following into this field:
IPOFHOST = IP Address of the PC with the database PORTOFSERVICE = Port of the service, typical 1521 SERVICEID = ID of the service, e.g. VIS
Under ‘Enter information to log on to the server’ (5) enter the username and password into the appropriate fields. If you plan to use CNCnetPDM as a background service it is highly recommended that you check ‘Allow saving password’ (6) as the service normally is executed under the ‘local system’ account and should be able to run without any user logged on. Click on tab ‘All’ and make sure that ‘Persist security Info’ is set to ‘True’. Clicking on button ‘Test Connection’ in tab ‘Connection’ should return ‘Test connection succeeded’. Click OK, you’re done.
MySQL and MariaDB have 2 different types of database clients, one for 64 and one for 32 bit Operating Systems (OS). As CNCnetPDM is a 32 bit program please install the 32 bit version of the ODBC Connector even if you’re working with a 64 bit OS. To configure the database connection for CNCnetPDM on a PC with 64 bit OS proceed as follows, do NOT simply double click the .udl file.
If not already done, create a database, in this example database MDA ist used. At a Linux PC or via SSH open a Terminal with root privileges and connect to your MySQL or MariaDB database:
mysql -u root -p /* Connect to database, enter password */
CREATE DATABASE MDA;
USE MDA;
GRANT ALL PRIVILEGES ON *.* TO 'username'@'IP or DNS name' IDENTIFIED BY 'password' WITH GRANT OPTION; /* Create user */
FIG 5: Create MySQL or MariaDB database MDA and a database user