News CNCnetPDM About us Support  
       
  

DATABASE CONNECTIVITY | CNCNETPDM MANUAL

To connect to a database CNCnetPDM uses a Universal Data Link (.udl) file that contains information about your database.

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. TOP

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).

Select database provider

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. TOP

Enter database connection parameters

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.

In section [Connect] of your CNCnetPDM.ini file enter the name of the UDL file right to UDL_DATEI =
Use DB_TYPE = 1 for MS SQL Server. TOP

ORACLE

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.

  1. Open a 32 bit command line: %SystemRoot%\syswow64\cmd.exe
  2. Navigate to the directory where CNCnetPDM is installed: cd DIRECTORYNAME
  3. 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).

Select database provider (Oracle)

FIG 3:  Select provider for database connection (UDL file)

Next, click on tab ‘Connection’ (3) to enter information required to access your database. TOP

Enter database connection parameters (Oracle)

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: TOP

(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=IPOFHOST)(PORT=PORTOFSERVICE)))(CONNECT_DATA=(SID=SERVICEID)(SERVER=DEDICATED)))

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.

In section [Connect] of your CNCnetPDM.ini file enter the name of the UDL file right to UDL_DATEI =
Use DB_TYPE = 2 for Oracle. TOP

MYSQL & MARIADB

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 TOP

Create an new System DSN, name it MariaDB:

FIG 6: Create a new System DSN
  • Select TCP/IP (1), enter the IP Address or DNS Hostname of your database PC (2), use Port 3306 (3).
  • Enter the User name and password of a user with appropriate rights for the database (4).
  • Click [Test DSN] (5).
  • Select MDA as database (6)
  • Click [OK] TOP

Setup an UDL file for CNCnetPDM:

  • Navigate to the folder where CNCnetPDM is installed.
  • Create a new text file, name it mariadb.udl, accept the warning.
  • 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: mariadb.udl
  • Click on tab provider, select 'Microsoft OLE DB Provider for ODBC Drivers', click [Next>>].

CNCnetPDM UDL file for MySQL or MariaDB

FIG 7: Configure CNCnetPDM UDL file for MySQL or MariaDB
  • In tab Connection under 'Use data source name' select MariaDB (1).
  • Under 'Enter information to log on to the server' enter the User name and password of the System DSN User (2).
  • Check 'Allow saving password' (3).
  • Click [Test Connection] (4).
  • Select MDA as the initial catalog to use.
  • Click [OK] 

TOP

Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy. 

https://www.inventcom.net/support/cncnetpdm-manual/database-connectivity

Support | CNCnetPDM Manual | Overview

Version 7.0.0.2 User Manual | Here you can find everything you need to install, setup and... [read more]
Overview

Support | CNCnetPDM Manual | Setup

This section describes the steps to install CNCnetPDM. EXTRACT FILES Create a folder for CNCnetPDM on your PC or at a server. Due to Windows UAC please do... [read more]
Setup

Support | CNCnetPDM Manual | Foreground Program

This section describes the steps to start CNCnetPDM as a foreground program. After extracting the files it is possible and save to immediately start CNCnetPDM. If you like to... [read more]
Foreground Program

Support | CNCnetPDM Manual | Background Service

This section shows the steps to install and start CNCnetPDM as a background service. CNCnetPDM is able to and, in a production environment, usually runs as a windows background... [read more]
Background Service

Support | CNCnetPDM Manual | Instances

This section describes the steps to setup and run multiple instances of CNCnetPDM on a single PC. In case you would like or have to work with different parameters for specific... [read more]
Instances

Support | CNCnetPDM Manual | CNCnetPDM INI File

This section describes the steps to adjust CNCnetPDM via it's INI file according to your needs. CNCnetPDM.ini contains all information needed to control the functions of the... [read more]
CNCnetPDM INI File

Support | CNCnetPDM Manual | OPC UA Server

The CNCnetPDM Standard OPC UA Server enables to add OPC UA Server functionality to any controller type (e.g. Fanuc, Mitsubishi, Heidenhain, PLCs) supported by CNCnetPDM. It... [read more]
OPC UA Server

Support | CNCnetPDM Manual | MTConnect Overview

The CNCnetPDM MTConnect Adapter enables you to access machine controllers connected to CNCnetPDM from within your applications or any MTConnect compatible program like an... [read more]
MTConnect Overview

Support | CNCnetPDM Manual | MTConnect Getting Started

Here you can find everything you need to know to get started with the CNCnetPDM MTConnect adapter. This section shows all necessary steps to setup CNCnetPDM, use the MTConnect... [read more]
MTConnect Getting Started

Support | CNCnetPDM Manual | MTConnect Standard Agent 1.3

This document describes setup of the MTConnect Standard Agent Version 1.3 it’s usage and test with the CNCnetPDM MTConnect Adapter. CNCNETPDM SETUP | AGENT... [read more]
MTConnect Standard Agent 1.3

Support | CNCnetPDM Manual | SQL Server Database Tables

This section describes the steps to setup an MS SQL Server database and required as well as optional tables for CNCnetPDM. Note: Starting with CNCnetPDM Ver. 6.3.3.1 the names of... [read more]
SQL Server Database Tables

Support | CNCnetPDM Manual | Oracle Database Tables

This section describes the steps to setup required and optional database tables for CNCnetPDM in case you're using an Oracle database. Note: Starting with CNCnetPDM Ver.... [read more]
Oracle Database Tables

Support | CNCnetPDM Manual | MySQL MariaDB Database Tables

This section describes the steps to setup required and optional database tables for CNCnetPDM in case you're using a MySQL or MariaDB (Version >= 5.5!)  database.... [read more]
MySQL MariaDB Database Tables

Support | CNCnetPDM Manual | Database Output

For both, MS SQL-Server and Oracle databases CNCnetPDM writes data acquired from devices to table RawDataTable (default MTH_RAW_DATA) and/or... [read more]
Database Output

Support | CNCnetPDM Manual | Licensing

When you start the program or service the first time without a license CNCnetPDM automatically creates a license key for your copy. Without a purchased license key initially this... [read more]
Licensing
Modified: 2018-07-21