on 2021 Feb 04 7:30 AM
Hi,
I am trying to connect with the SAP ODBC driver to the running instance of SAP ASE 16.
Both are running on the same Linux maxchine (not VM).
Here is some info:
[code]
igor@IgorReinCloud ~/dbhandler/Debug $ cat /etc/unixODBC/odbcinst.ini
[ODBC]
Trace=yes
TraceFile=/tmp/sql.log
[Sybase]
Description=Native Sybase Driver
Driver=/opt/sap/DataAccess64/ODBC/lib/libsybdrvodb-sqllen8.so
#Driver=/opt/sap/DBISQL-16_0/bin/libdbodbc16_r.so
#Driver=/opt/sap/DataAccess/ODBC/lib/libsybdrvodb.so
FileUsage=1
[Postgres]
Description=Postgres ODBC Driver
Driver=/usr/lib64/psqlodbcw.so
FileUsage=1
[/code]
[code]
igor@IgorReinCloud ~/dbhandler/Debug $ cat /etc/unixODBC/odbc.ini
[Sybase16]
Driver=Sybase
Description=Sybase 16 Native Driver
Trace=Yes
Server=REINCLOUD
Database=draft
TraceLog=/tmp/sql.log
Port=5000
UserID=sa
[postgres]
Driver=Postgres
Description=Postgres ODBC Driver
UserId=postgres
Password=wasqra
Servername=192.168.1.209
Database=draft
Port=5432
[/code]
And here is the log:
[code]
[ODBC][684][1612428302.021117][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/__handles.c][460]
Exit:[SQL_SUCCESS]
Environment = 0x555555bdb4a0
[ODBC][684][1612428302.021236][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c][189]
Entry:
Environment = 0x555555bdb4a0
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = 0
[ODBC][684][1612428302.021278][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c][381]
Exit:[SQL_SUCCESS]
[ODBC][684][1612428302.021320][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555bdb4a0
[ODBC][684][1612428302.083091][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][684][1612428302.083221][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555bdb4a0
[ODBC][684][1612428302.083581][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][684][1612428302.083639][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555bdb4a0
[ODBC][684][1612428302.083851][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][684][1612428302.083909][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c][220]
Entry:
Handle Type = 1
Input Handle = 0x555555bdb4a0
[ODBC][2966][1612428463.420810][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/__handles.c][460]
Exit:[SQL_SUCCESS]
Environment = 0x555555bc9ea0
[ODBC][2966][1612428463.420919][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c][189]
Entry:
Environment = 0x555555bc9ea0
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = 0
[ODBC][2966][1612428463.420961][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c][381]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428463.421004][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555bc9ea0
[ODBC][2966][1612428463.479052][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428463.479189][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555bc9ea0
[ODBC][2966][1612428463.479558][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428463.479615][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555bc9ea0
[ODBC][2966][1612428463.479822][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428463.479880][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c][220]
Entry:
Handle Type = 1
Input Handle = 0x555555bc9ea0
[ODBC][2966][1612428478.091316][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/__handles.c][460]
Exit:[SQL_SUCCESS]
Environment = 0x555555ae8a00
[ODBC][2966][1612428478.091431][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c][189]
Entry:
Environment = 0x555555ae8a00
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = -6
[ODBC][2966][1612428478.091474][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c][381]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428478.091516][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLAllocHandle.c][377]
Entry:
Handle Type = 2
Input Handle = 0x555555ae8a00
[ODBC][2966][1612428478.091602][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLAllocHandle.c][493]
Exit:[SQL_SUCCESS]
Output Handle = 0x555555acb000
[ODBC][2966][1612428500.511345][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][122]
Entry:
Environment = 0x555555ae8a00
[ODBC][2966][1612428500.511789][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c][323]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428629.087465][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetConnectAttrW.c][332]
Entry:
Connection = 0x555555acb000
Attribute = SQL_ATTR_LOGIN_TIMEOUT
Value = 0x5
StrLen = 0
[ODBC][2966][1612428629.087582][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetConnectAttrW.c][623]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612428642.597571][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDriverConnectW.c][290]
Entry:
Connection = 0x555555acb000
Window Hdl = 0x555555af2260
Str In = [DSN=Sybase16;sa;wasqra;Driver=Sybase;UID=sa;PWD=wasqra][length = 54 (SQL_NTS)]
Str Out = 0x555555cf2100
Str Out Max = 1024
Str Out Ptr = 0x7fffffff8bb8
Completion = 0
UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'
[ODBC][2966][1612428642.960398][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDriverConnectW.c][699]
Exit:[SQL_ERROR]
[ODBC][2966][1612428715.454145][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][516]
Entry:
Connection = 0x555555acb000
Rec Number = 1
SQLState = 0x7fffffff8730
Native = 0x7fffffff86e4
Message Text = 0x7fffffff8760
Buffer Length = 1024
Text Len Ptr = 0x7fffffff86dc
[ODBC][2966][1612428715.454290][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][563]
Exit:[SQL_SUCCESS]
SQLState = [01S00]
Native = 0x7fffffff86e4 -> 30011
Message Text = [[SAP][ASE ODBC Driver]Invalid port number]
[ODBC][2966][1612429099.519901][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][516]
Entry:
Connection = 0x555555acb000
Rec Number = 2
SQLState = 0x7fffffff8730
Native = 0x7fffffff86e4
Message Text = 0x7fffffff8760
Buffer Length = 1024
Text Len Ptr = 0x7fffffff86dc
[ODBC][2966][1612429099.520093][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][563]
Exit:[SQL_NO_DATA]
[ODBC][2966][1612429136.445542][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetConnectAttrW.c][236]
Entry:
Connection = 0x555555acb000
Attribute = 1209
Value = 0x7fffffffb118
Buffer Length = 0
StrLen = 0x7fffffffb110
[ODBC][2966][1612429136.445670][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetConnectAttrW.c][325]Error: 08003
[ODBC][2966][1612429136.445778][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][516]
Entry:
Connection = 0x555555acb000
Rec Number = 1
SQLState = 0x7fffffffac90
Native = 0x7fffffffac44
Message Text = 0x7fffffffacc0
Buffer Length = 1024
Text Len Ptr = 0x7fffffffac3c
[ODBC][2966][1612429136.445844][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][563]
Exit:[SQL_SUCCESS]
SQLState = [08003]
Native = 0x7fffffffac44 -> 0
Message Text = [[unixODBC][Driver Manager]Connection not open]
[ODBC][2966][1612429136.445909][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][516]
Entry:
Connection = 0x555555acb000
Rec Number = 2
SQLState = 0x7fffffffac90
Native = 0x7fffffffac44
Message Text = 0x7fffffffacc0
Buffer Length = 1024
Text Len Ptr = 0x7fffffffac3c
[ODBC][2966][1612429136.445987][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c][563]
Exit:[SQL_NO_DATA]
[ODBC][2966][1612429136.446035][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c][290]
Entry:
Handle Type = 2
Input Handle = 0x555555acb000
[ODBC][2966][1612429136.446118][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c][339]
Exit:[SQL_SUCCESS]
[ODBC][2966][1612429136.446163][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c][220]
Entry:
Handle Type = 1
Input Handle = 0x555555ae8a00
[/code]
I have unixODBC 2.3.5.
Does anyone have an idea?
Thank you.
Request clarification before answering.
avinash_kothare64 ,
I'm not using isql - I'm running my software.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good.
In that case can you check & verify if the host + port is correctly responding
to isql (from SAP/Sybase) and specifying the interfaces file you have ?
If you get 1> prompt, it will confirm that server (host + port) are working as expected.
And if that succeeds, try other (i.e. non SAP/Sybase) "isql" to see if your ODBC set up is correct.
If both work as expected then ASE & ODBC set up is correct and focus will be your program/code.
Avinash
User | Count |
---|---|
76 | |
21 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.