Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 10.0.16, 10.0.17
-
Fix Version/s: 10.0
-
Component/s: Storage Engine - Connect
-
Labels:None
-
Environment:CentOS release 6.5 (X86_64)
Description
I want to make a CONNECT table to a PureData table on a remote server.
I am using theNetezza ODBC driver from IBM.
isql is working fine but the CREATE TABLE command is going in an error at the moment.
I want to know if this is MariaDB problem or problem of the driver.
vi .bashrc
export PATH=$PATH:/usr/local/nz/bin64 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/nz/lib:/usr/local/nz/lib64 export ODBCINI=/etc/odbc.ini export NZ_ODBC_INI_PATH=/etc
odbcinst.ini
[ODBC Drivers] NetezzaSQL = Installed [NetezzaSQL] #Driver = /usr/local/nz/lib/libnzodbc.so Driver = /usr/local/nz/lib64/libnzodbc.so #Setup = /usr/local/nz/lib/libnzodbc.so Setup = /usr/local/nz/lib64/libnzodbc.so APILevel = 1 ConnectFunctions = YYN Description = Netezza ODBC driver DriverODBCVer = 03.51 DebugLogging = false LogPath = /tmp UnicodeTranslationOption = utf8 CharacterTranslationOption = all PreFetch = 256 Socket = 16384
odbc.ini
[NZSQL] ;Path of a driver used for database connection #Driver = /usr/local/nz/lib/libnzodbc.so Driver = /usr/local/nz/lib64/libnzodbc.so ;A decription used to identify the database connection properties. #Description = NetezzaSQL ODBC Description = NetezzaSQL ;The name of a machine or IP address where the database is located. #Servername = 127.0.0.1 Servername = 172.15.123.135 ;The port number to connect. Port = 5480 ;The name of a database. #Database = dev Database = some_db ;The name of a valid user. #Username = guest Username = some_user ;The password for the user. #Password = password Password = some_password ;Only Select SQL statements will be allowed if this field is checked. ReadOnly = false ;When set to true, system tables will be included in the available table list. ShowSystemTables = false ;When set to true, use old (2.5) functionality for returning schemas in SQLTables. LegacySQLTables = false ;Specifies login timeout in seconds. LoginTimeout = 0 ;Specifies query timeout in seconds. QueryTimeout = 0 ;Specifies date format as follows - ; 1: YMD ; 2: MDY ; 3: DMY DateFormat = 1 ;When selected, driver treats SQL_C_NUMERIC buffers as SQL_C_CHAR buffers. NumericAsChar = false ;Return SQL_BIT as "1"/"0" when char. SQLBitOneZero = false ;When enabled, replaces all occurences of CRLF, CR and LF with a single space. StripCRLF = false ;Specifies level of security on the system securityLevel = preferredUnSecured ;Name of the Root CA certificate. caCertFile = ;Specifies maximum errors allowed. 0 value means no limit on loadMaxErrors value. ;loadMaxErrors = 1 ;If value is true, it rounds the data of numeric columns whose precision exceeds the precision defined. ;loadRoundFraction = 0 [ODBC] IANAAppCodePage=4 InstallDir=/opt/odbc32v51 Trace=0 TraceDll=/opt/odbc32v51/lib/odbctrac.so TraceFile=odbctrace.out UseCursorLib=0
checking isql
[root@kc1060 mysql]# isql NZSQL +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
making a CONNECT table
[root@sms003 ~]# mysql -u root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 106 Server version: 10.0.16-MariaDB-log MariaDB Server Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> use test; Database changed MariaDB [test]> create table odbc_test engine=connect table_type=ODBC tabname='some_table' connection='DSN=NZSQL'; ERROR 1105 (HY000): [unixODBC]Server and/or port attributes are empty
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I seems difficult for me to answer this, not having the same platform and ODBC driver. The message looks like a standard ODBC error message and is not a CONNECT message.
Could you try the connection by SQLConnect using a Predefined DSN?
This is done by specifying in the option list the Boolean option “UseDSN” as yes or 1. In addition, string options “user” and “password” can be specified in the option list if required.
When doing so, the connection string just contains the name of the predefined Data Source. For instance:
CREATE TABLE tlite ENGINE=CONNECT TABLE_TYPE=ODBC tabname='lite'
CONNECTION='SQLite3 Datasource'
OPTION_LIST='UseDSN=Yes,User=me,Password=mypass';
Note: the connection data source name (limited to 32 characters) should not be preceded by “DSN=”.