HP NonStop ODBC/MX Client Drivers UserGuide for SQL/MX Release 3.2.1HP Part Number: 734873-002Published: November 2013Edition: J06.16 and subsequent J
1 OverviewThe following ODBC/MX client drivers enable ODBC applications running on various platforms,to access a NonStop SQL/MX database:• Linux 32–bi
Figure 1 ArchitectureODBC/MX Client(Linux or HP-UX System)Nonstop SystemA - TDM_Default_Data SourceB - Data Source BDB - SQL/MX DatabaseApplicationApp
MXODSN file, and for the OSS driver in the ODBCDSN file. Use the Microsoft ODBC Data SourceAdministrator to configure the parameters for the Windows d
Data sourcesData sources are logical groupings of connections to the SQL/MX database. There are two typesof data sources.• Client data source, commonl
TracingHP-UX, Linux 32 and Linux 64The trace information is captured in a log file. You can enable or disable tracing and specifythe trace file name i
Table 1 Unsupported ODBC APIsUnsupported APIsCategoryInstaller – Data Sources• SQLManageDataSources• SQLRemoveDefaultDataSource• SQLConfigDataSource•
The following are the considerations and limitations for the Windows Unicode driver:• You cannot execute DDL statements with character set qualifiers
2 Installing the driversThe hardware and software requirements for the drivers are described in the softdoc or READMEfile delivered with the products,
1. Download the driver from NonStop system to the HP–UXia64 workstation in binary mode(You can use FTP utility for downloading). The driver is package
3. Go to download directory, and enter the following command to extract the files:nltar -xvf LODBC64The files are extracted to 64Linux_ODBC_321 direct
© Copyright 2013 Hewlett-Packard Development Company, L.P.Confidential computer software. Valid license from HP required for possession, use or copyin
10. You can retain the default or provide a different Program Folder on the following screen:Click Next.11. You can see the installation progress in t
12. Click Finish.NOTE:• HP recommends that you restart the PC before you use the ODBC/MX client interface.• When the installation is complete, delete
• /usr/lib/libmxodbc_l_drvr.so.3• /usr/lib/libmxodbc_l_drvr.so.3.2.1• /usr/lib/libhpsecClient.so• /etc/hpodbc/MXODSNThe checksum of the shared librari
1. Log in to the HP-UXia64 workstation as a root user.2. Go to the HPUXia64_ODBC_64 directory.3. To uninstall the driver, enter the following command:
3 Configuring data sourcesThis chapter describes the various procedures to configure the SQL/MX data sources.• “Configuring a client data source”• “Co
3. Select the data source name that you want to configure and click Configure.4. Each tab in the configuration view displays different fields in the d
Configuring the drivers for IPv6HP-UX, Linux 32 and Linux 64You can directly enter the IPv6 address instead of IPv4 address in the MXODSN or odbc.ini(
1. Log on as super.super.2. Enter the following command to change to the NonStop SSL directory:$SYSTEM STARTUP 1> volume $system.znsssl3. Enter the
1. Download the $SYSTEM.ZNSSSL.PROXYEXE file in binary format and rename it toPROXY.EXE.2. Run PROXY.EXE to start the RemoteProxy installation program
DataSource configuration in Windows driverDataSource configuration in Windows driver 29
ContentsAbout this document...5Intended audience...
MXODSN and ODBCDSN file formatsThe following table describes the various sections in the MXODSN and ODBCDSN files.Table File sectionsDescriptionFile S
Table 4 MXODSN and ODBCDSN attributes (continued)DescriptionAttributesFile Section1, tracing is on. By default, tracing isoff.TraceFlags indicates the
Table 4 MXODSN and ODBCDSN attributes (continued)DescriptionAttributesFile Sectionseconds. SQLIntervalBehaviourhas two values, SYSTEM_DEFAULT andMSDN_
[ODBC]TraceFlags = 6TraceStart = 0TraceFile = trlog[ODBC Data Sources]TDM_Default_DataSource = NonStop ODBC/MX 3.xDS1 = NonStop ODBC/MX 3.xDS2 = NonSt
WindowsTo add a new data source or configure an existing data source, see “Configuring a client datasource”.Perform the following steps to delete a cl
Using connection string without DSNYou can set AUTOCOMMIT as part of the Connection string.“AutoCommit=ON/OFF/SERVER_DEFAULT”.Example 2 Depicting AUTO
If you select the ODBC standard trace DLL (odbctrac.dll from the Windows Systemfolder), only the driver manager is traced; additional trace options th
4 Compatibility and considerationsThe drivers are compatible with the following:• ODBC 3.5• SQL-92 features supported by SQL/MXFor more information ab
Table 5 Considerations (continued)ConsiderationItemThis API does not support pattern value arguments for table names, andreturns an optimal set of col
Table 6 ODBC Data Types (continued)Supported by the driver?SQL/MP data TypeSQL/MX data TypeODBC data typeNoNot supportedNot supportedTINYINT UNSIGNEDY
Partial DATE or TIME values...40Microsoft escape cla
Table 7 Behavior of unsigned data typesBehaviorODBC versionUNSIGNED SMALLINT is promoted to SIGNED INT andUNSIGNED INT is promoted to BIGINT.2.0All un
Table 8 SQL/MP to ODBC/MX Date/Time Mappings (continued)ODBC/MX data typeSQL/MP data typeSQL_TIMESTAMPDATETIME MINUTE TO FRACTIONSQL_TIMEDATETIME SECO
Table 10 Transaction and cursor behaviorApplication actionSQL/MX behaviorAUTOCOMMITNot applicableWhen any open statement reachesend of data or end of
Table 11 Sample values inserted from an application and expected values in microsecond (continued)Expected value in the column ofSQL/MX tableColumn ty
Table 12 Sample values inserted from an application and expected values in nanoseconds (continued)Expected value in the column ofSQL/MX tableColumn ty
Table 13 Values retrieved by the application for SYSTEM_DEFAULT setting (continued)Fraction value retrieved by theapplicationColumn typeValue in the c
Table 14 Sample values retrieved by the application (continued)Fraction value retrieved by theapplicationColumn typeValue in the column of the SQL/MXT
If not specified, the default is SYSTEM_DEFAULT.Set the SQL Interval Behaviour property using the MXODSN property.• The following example describes wh
SQL Datetime Retrieval propertyThe SQL Datetime Retrieval specifies how the SQL/MP Datetime data type is retrieved fromthe drivers. The SQL Datetime R
5 Error messagesTable 17 lists the driver error codes and error messages.Table 17 Error codes and error messagesError messagesError codesGeneral Warni
About this documentThis manual describes how to install, configure and use the ODBC/MX client drivers. These driversallow HP-UX, Linux32, Linux64, OSS
Table 17 Error codes and error messages (continued)Error messagesError codesCardinality violation; insert value list does not match columnlist.21001Ca
Table 17 Error codes and error messages (continued)Error messagesError codesThe stored procedure required to complete this operationcould not be found
Table 17 Error codes and error messages (continued)Error messagesError codesFetch type out of range.S1106Row value out of range.S1107Concurrency optio
A Sample ODBC applicationCompiling and linking the sample applicationHP-UXUse the g++ compiler to compile the application with the header files that a
-c ThreadODBCTestAppl.c -o ThreadODBCTestAppl.oThe following is a sample compilation command for a 64–bit application:OSS> c89 -g -Winspect -Wexten
//// Copyright 2007//// HP CONFIDENTIAL: NEED TO KNOW ONLY//// Copyright Hewlett-Packard Development Company, L.P.// Protected as an unpublished work.
memset (szBuf,'\0',600); if (hStmt) st = SQLGetDiagRec(SQL_HANDLE_STMT,hStmt,1,Err->szSqlState, Err->pfNativeError, Err-&
scanf("%s", Password); strcpy(CreateTable,"create table GGTest(c1 int)"); sprintf(InsertTable, "%s %d %s", "
} else printf("Connection 2 Successful\n"); st = SQLConnect(hdbc2,(SQLCHAR*)serverName,SQL_NTS,(SQLCHAR*)UserID, SQL_NTS,
else printf("Row(s) affected %d\n", RowCount); st = SQLExecDirect(hstmt,(SQLCHAR *) SelectTable,strlen(SelectTable)); if (st
Italic LettersItalic letters, regardless of font, indicate variable items that you supply. Items not enclosed inbrackets are required. For example:fil
printf("Insert Successful : %d\n", val); strcpy(SelectTable,"select * from GGTest" ); st = SQLExecDirect(hstmt1,(SQLCHAR
GlossaryDriver ManagerThe ODBC component that manages access to Database Management System (DBMS)drivers for ODBC applications. The driver manager loa
IndexAAutoCommit, 42BBIGINT data type, 39BINARY data type, 39BIT data type, 38CCatalog and schemaconsideration, 37CHAR data type, 38Client data source
{, sql-expression}...An ellipsis immediately following a single syntax item indicates that you can repeat that syntaxitem any number of times. For exa
• Installation guidesDescribes how to plan for install and upgrade an SQL/MX database.SQL/MX Installation andUpgrade GuideDescribes how to manage an S
• Application development guidesDescribes how to embed SQL/MX statements in ANSI C and COBOL programs.SQL/MX Programming Manualfor C and COBOLDescribe
Komentáře k této Příručce