Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

0 votes
1 answers
600 views
Connecting to SAP ASE fails
ALL, igor@IgorReinCloud ~ $ 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 igor@IgorReinCloud ~ $ cat /etc/unixODBC/odbcinst.ini [ODBC] Trace=yes TraceFile=/tmp/sql.log [Sybas...
ALL, igor@IgorReinCloud ~ $ 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 igor@IgorReinCloud ~ $ cat /etc/unixODBC/odbcinst.ini [ODBC] Trace=yes TraceFile=/tmp/sql.log [Sybase] Description=Native Sybase Driver Driver=/opt/sap/DataAccess/ODBC/lib/libsybdrvodb.so FileUsage=1 igor@IgorReinCloud ~ $ ls -la /opt/sap/DataAccess/ODBC/lib/ total 8388 drwxrwxr-x 3 root root 4096 Nov 15 17:46 . drwxrwxr-x 6 root root 4096 Nov 15 17:46 .. -rwxr-xr-x 1 root root 4691399 Aug 28 2017 libsapcrypto.so -rwxr-xr-x 1 root root 416329 Aug 28 2017 libslcryptokernel.so -rwxr-xr-x 1 root root 166 Aug 28 2017 libslcryptokernel.so.sha256 -rwxr-xr-x 1 root root 3459940 Aug 28 2017 libsybdrvodb.so drwxrwxr-x 5 root root 4096 Nov 15 17:46 locales igor@IgorReinCloud ~ $ isql Sybase16 sa [ISQL]ERROR: Could not SQLConnect igor@IgorReinCloud ~ $ cat /tmp/sql.log [ODBC][1609181009.277918][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/__handles.c] Exit:[SQL_SUCCESS] Environment = 0x55eac5c98a00 [ODBC][1609181009.278029][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLAllocHandle.c] Entry: Handle Type = 2 Input Handle = 0x55eac5c98a00 [ODBC][1609181009.278075][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLAllocHandle.c] Exit:[SQL_SUCCESS] Output Handle = 0x55eac5c99b90 [ODBC][1609181009.278132][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLConnect.c] Entry: Connection = 0x55eac5c99b90 Server Name = [Sybase16][length = 8 (SQL_NTS)] User Name = [sa][length = 2 (SQL_NTS)] Authentication = [******][length = 6 (SQL_NTS)] UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE' [ODBC][1609181009.281022][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLConnect.c]Can't open lib '/opt/sap/DataAccess/ODBC/lib/libsybdrvodb.so' : file not found [ODBC][1609181009.281164][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Entry: Handle Type = 2 Input Handle = 0x55eac5c99b90 [ODBC][1609181009.281215][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Exit:[SQL_SUCCESS] [ODBC][1609181009.281259][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Entry: Handle Type = 1 Input Handle = 0x55eac5c98a00 I don't understand this error. File does exist, it has read/execute permissions and AFAIU, I don't need to set sybase environment to get an ODBC connection from unixODBC isql. Connecting with SAP DBISQL works fine. Could someone please help? Thank you. EDIT: After fixing couple of bugs in my code, here is the odbc log file after running my code. I'm trying to connect to SAP ASE 16 instance. [ODBC][1612492650.771991][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/__handles.c] Exit:[SQL_SUCCESS] Environment = 0x564ee933ab90 [ODBC][1612492650.772100][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c] Entry: Environment = 0x564ee933ab90 Attribute = SQL_ATTR_ODBC_VERSION Value = 0x3 StrLen = 0 [ODBC][1612492650.772141][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c] Exit:[SQL_SUCCESS] [ODBC][1612492650.772187][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Entry: Environment = 0x564ee933ab90 [ODBC][1612492650.782200][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Exit:[SQL_SUCCESS] [ODBC][1612492650.782328][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Entry: Environment = 0x564ee933ab90 [ODBC][1612492650.782809][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Exit:[SQL_SUCCESS] [ODBC][1612492650.782879][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Entry: Environment = 0x564ee933ab90 [ODBC][1612492650.783125][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Exit:[SQL_SUCCESS] [ODBC][1612492650.783171][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Entry: Handle Type = 1 Input Handle = 0x564ee933ab90 [ODBC][1612492666.505105][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/__handles.c] Exit:[SQL_SUCCESS] Environment = 0x564ee9426000 [ODBC][1612492666.505220][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c] Entry: Environment = 0x564ee9426000 Attribute = SQL_ATTR_ODBC_VERSION Value = 0x3 StrLen = -6 [ODBC][1612492666.505261][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetEnvAttr.c] Exit:[SQL_SUCCESS] [ODBC][1612492666.505302][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLAllocHandle.c] Entry: Handle Type = 2 Input Handle = 0x564ee9426000 [ODBC][1612492666.505348][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLAllocHandle.c] Exit:[SQL_SUCCESS] Output Handle = 0x564ee9236e00 [ODBC][1612492666.505390][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Entry: Environment = 0x564ee9426000 [ODBC][1612492666.505718][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDataSourcesW.c] Exit:[SQL_SUCCESS] [ODBC][1612492666.505785][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetConnectAttrW.c] Entry: Connection = 0x564ee9236e00 Attribute = SQL_ATTR_LOGIN_TIMEOUT Value = 0x5 StrLen = 0 [ODBC][1612492666.505828][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLSetConnectAttrW.c] Exit:[SQL_SUCCESS] [ODBC][1612492666.505875][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDriverConnectW.c] Entry: Connection = 0x564ee9236e00 Window Hdl = 0x564ee9268260 Str In = [DSN=Sybase16;Driver=Sybase;UID=sa;PWD=*redacted*][length = 44 (SQL_NTS)] Str Out = 0x564ee947d5a0 Str Out Max = 1024 Str Out Ptr = 0x7fffced2eb98 Completion = 0 UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE' [ODBC][1612492666.522916][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLDriverConnectW.c] Exit:[SQL_ERROR] [ODBC][1612492666.523100][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Entry: Connection = 0x564ee9236e00 Rec Number = 1 SQLState = 0x7fffced2e710 Native = 0x7fffced2e6c4 Message Text = 0x7fffced2e740 Buffer Length = 1024 Text Len Ptr = 0x7fffced2e6bc [ODBC][1612492666.523238][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Exit:[SQL_SUCCESS] SQLState = [01S00] Native = 0x7fffced2e6c4 -> 30011 Message Text = [[SAP][ASE ODBC Driver]Invalid port number] [ODBC][1612492666.523381][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Entry: Connection = 0x564ee9236e00 Rec Number = 2 SQLState = 0x7fffced2e710 Native = 0x7fffced2e6c4 Message Text = 0x7fffced2e740 Buffer Length = 1024 Text Len Ptr = 0x7fffced2e6bc [ODBC][1612492666.523429][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Exit:[SQL_NO_DATA] [ODBC][1612492670.055754][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetConnectAttrW.c] Entry: Connection = 0x564ee9236e00 Attribute = 1209 Value = 0x7fffced310f8 Buffer Length = 0 StrLen = 0x7fffced310f0 [ODBC][1612492670.055861][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetConnectAttrW.c]Error: 08003 [ODBC][1612492670.055930][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Entry: Connection = 0x564ee9236e00 Rec Number = 1 SQLState = 0x7fffced30c70 Native = 0x7fffced30c24 Message Text = 0x7fffced30ca0 Buffer Length = 1024 Text Len Ptr = 0x7fffced30c1c [ODBC][1612492670.055998][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Exit:[SQL_SUCCESS] SQLState = Native = 0x7fffced30c24 -> 0 Message Text = [[unixODBC][Driver Manager]Connection not open] [ODBC][1612492670.056064][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Entry: Connection = 0x564ee9236e00 Rec Number = 2 SQLState = 0x7fffced30c70 Native = 0x7fffced30c24 Message Text = 0x7fffced30ca0 Buffer Length = 1024 Text Len Ptr = 0x7fffced30c1c [ODBC][1612492670.056107][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLGetDiagRecW.c] Exit:[SQL_NO_DATA] [ODBC][1612492670.056158][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Entry: Handle Type = 2 Input Handle = 0x564ee9236e00 [ODBC][1612492670.056209][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Exit:[SQL_SUCCESS] [ODBC][1612492670.056253][/var/tmp/portage/dev-db/unixODBC-2.3.5-r1/work/unixODBC-2.3.5/DriverManager/SQLFreeHandle.c] Entry: Handle Type = 1 Input Handle = 0x564ee9426000 Asking around I've been told that I need to modify the interfaces file so that the clients will not be using it but instead will be using ODBC interface. This is my interfaces file: REINCLOUD master tcp ether localhost 5000 query tcp ether localhost 5000 REINCLOUD_BS master tcp ether localhost 5001 query tcp ether localhost 5001 REINCLOUD_XP master tcp ether localhost 5002 query tcp ether localhost 5002 REINCLOUD_JSAGENT master tcp ether localhost 4900 query tcp ether localhost 4900 Sorry for such a huge post. Could anyone explain what is going on and why I can't connect neither with isql, nor with my program?
Igor (247 rep)
Dec 28, 2020, 06:47 PM • Last activity: May 6, 2025, 03:04 AM
1 votes
1 answers
18258 views
unixODBC - [IM002][unixODBC][Driver Manager] Data source name not found and no default driver specified
Folks, We installed unixODBC-2.3.7 on Aix 7.1 to connect to Oracle 11g. After setup odbc.ini and odbcinst.ini files and tried to connect with isql, we had the following error: # isql -v ORACLE [IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified [ISQL]ERROR: Co...
Folks, We installed unixODBC-2.3.7 on Aix 7.1 to connect to Oracle 11g. After setup odbc.ini and odbcinst.ini files and tried to connect with isql, we had the following error: # isql -v ORACLE [IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified [ISQL]ERROR: Could not SQLConnect Before execute the isql command, we ran the following export commands: export ODBCSYSINI=/usr/local/etc export PATH=$PATH:/usr/local/bin export TNS_ADMIN=/u01/app/oracle/product/11.2.0.4/client_1/network/admin export ODBCINI=/usr/local/etc/odbc.ini export LIBPATH=/u01/app/oracle/product/11.2.0.4/client_1/lib:/usr/local/lib:/u01/app/oracle/product/11.2.0.4/client_1 export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0.4/client_1/lib:/usr/local/lib:/u01/app/oracle/product/11.2.0.4/client_1 And odbcinst -j command too: unixODBC 2.3.7 DRIVERS............: /usr/local/etc/odbcinst.ini SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources USER DATA SOURCES..: /usr/local/etc/odbc.ini SQLULEN Size.......: 4 SQLLEN Size........: 4 SQLSETPOSIROW Size.: 2 Illegal instruction(coredump) Our /usr/local/etc/odbc.ini file is: [ODBC Data Sources] ORACLE = Oracle ODBC Test [ORACLE] Application Attributes = T Attributes = W BatchAutocommitMode = IfAllSuccessful BindAsFLOAT = F CloseCursor = F DisableDPM = F DisableMTS = T Driver = Oracle11gdriver DSN = ORACLE EXECSchemaOpt = EXECSyntax = T Failover = T FailoverDelay = 10 FailoverRetryCount = 10 FetchBufferSize = 64000 ForceWCHAR = F Lobs = T Longs = T MaxLargeData = 0 MetadataIdDefault = F QueryTimeout = T ResultSets = T ServerName = ORAODBC.customer.com SQLGetData extensions = F Translation DLL = Translation Option = 0 DisableRULEHint = T UserID = user Password = pass StatementCache=F CacheBufferSize=20 UseOCIDescribeAny=F And our /usr/local/etc/odbcinst.ini is [Oracle11gdriver] Description = Oracle ODBC driver for Oracle 11g Driver = /u01/app/oracle/product/11.2.0.4/client_1/lib/libsqora.so Finally, our tnsnames.ora is: ORAODBC = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = customer.com.br)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORAODBC.customer.com) ) ) Any idea what is going on?
Nati
Sep 17, 2018, 09:55 PM • Last activity: Feb 22, 2025, 02:01 AM
-3 votes
2 answers
393 views
ODBC Connection to Remote server
Would I require an internet to establish an ODBC connection between an on-premises Linux server and cloud DB(e.g. Azure)?
Would I require an internet to establish an ODBC connection between an on-premises Linux server and cloud DB(e.g. Azure)?
rfm_369 (1 rep)
Jul 10, 2023, 07:31 PM • Last activity: Jul 11, 2023, 04:04 AM
1 votes
1 answers
2232 views
Oracle ODBC client configuration missing variable
I'm trying to configure an ODBC connection for an Oracle DB using unixODBC drivers. For that I followed [this Oracle's guide][1]. First, I successfully installed the ODBC client and driver. # dnf install unixODBC oracle-instantclient-sqlplus oracle-instantclient-odbc Odbcinst shows the driver defaul...
I'm trying to configure an ODBC connection for an Oracle DB using unixODBC drivers. For that I followed this Oracle's guide . First, I successfully installed the ODBC client and driver. # dnf install unixODBC oracle-instantclient-sqlplus oracle-instantclient-odbc Odbcinst shows the driver defaults correctly. # odbcinst -j unixODBC 2.3.7 DRIVERS............: /etc/odbcinst.ini SYSTEM DATA SOURCES: /etc/odbc.ini FILE DATA SOURCES..: /etc/ODBCDataSources USER DATA SOURCES..: /root/.odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8 Then, the guide suggests to configure ODBC with the odbc_update_ini.sh script. # find / -name "odbc_update_ini.sh" /usr/lib/oracle/21/client64/bin/odbc_update_ini.sh For that, I should input the as the first argument. Usage: odbc_update_ini.sh [ ] It happens that this script cannot find the INI file. # /usr/lib/oracle/21/client64/bin/odbc_update_ini.sh "/usr/local" *** INI file not found. Driver Manager not installed! It seems there should be an $ODBCDM_Home environment variable set, but it does not exist, and Oracle's guide does not instruct us on how to set it. # cat /usr/lib/oracle/21/client64/bin/odbc_update_ini.sh (...) # Check whether Driver Manager is installed or not if [ ! -f $ODBCDM_HOME/etc/odbc.ini -o ! -f $ODBCDM_HOME/etc/odbcinst.ini ] then echo " *** INI file not found. Driver Manager not installed!" exit fi (...) I could not find meaninful information about this issue for now. I'm at a loss now. Any idea on how to proceed?
markfree (131 rep)
Sep 16, 2022, 02:31 PM • Last activity: Sep 25, 2022, 03:25 AM
0 votes
0 answers
1076 views
Can't use ODBC to connect to MariaDB
Linux Mint 20 (Ubuntu 20). MariaDB version: "mariadb Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2" LibreOffice 6.4.7.2. I want to run LibreOffice Base as the front end, using ODBC. I previously had MySQL installed in this OS and managed to get ODBC working for Li...
Linux Mint 20 (Ubuntu 20). MariaDB version: "mariadb Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2" LibreOffice 6.4.7.2. I want to run LibreOffice Base as the front end, using ODBC. I previously had MySQL installed in this OS and managed to get ODBC working for LibreOffice Base. Now I have removed MySQL and installed MariaDB. **Incidentally, I am now beginning to wonder whether this a LibreOffice glitch. Wouldn't be the first. Any successful experience of getting ODBC to work with MariaDB (specifically) in Linux could be helpful. Though in fact I seem possibly to have got it working in fact (see below: isql with my configured DSN works!).** I have tried to follow the MariaDB instructions here . I have put the file libmaodbc.so in /usr/lib64/. I believe this is the main connector file. I have made a file /etc/odbcinst.ini as follows: [MariaDB] Description=MariaDB Connector/ODBC v.3.0 Driver=/usr/lib/libmaodbc.so Driver64=/usr/lib64/libmaodbc.so UsageCount=1 and a file /etc/odbc.ini as follows: [localdb] Description = MariaDB connection to database Driver = MariaDB Database = localdb Server = localhost User = user_mike Password = user_mike Port = 3306 Socket = /var/run/mysqld/mysqld.sock When I try to connect using LO Base, this ODBC entry "localdb" is seen. But then when I test out the connection I get: > [unixODBC][Driver Manager]Data source name not found, and no default driver specified "Data source name"? But I *chose* the DSN. "default driver"? How might I specify that, I wonder! Anyone know what I should do? My theory is that the odbc.ini file references the odbcinst.ini file, which in turn drives the libmaodbc.so file. NB if I go as far as trying to actually make the connection, i.e. to get a list of tables in the database in LO Base, I get > The connection to the data source "xxx"* could not be established
[ma-3.1.15]Can't connect to local server through socket '/var/run/mysqld/mysqld.sock' (13) \* i.e. the LO Base filename minus the ".odb" extension. I found this answer . This led me to check my .cnf file(s), NB under /etc/mysql... And also to check my socket (with the MariaDB service running): mike@M17A:~/MariaDB_files$ netstat -ln | grep mysql unix 2 [ ACC ] STREAM LISTENING 263752 /var/run/mysqld/mysqld.sock ... interesting: seems to suggest that the socket is alive and well. Also I **can** connect using isql localdb from the CLI: doesn't this suggest things are set up OK? So what might be the issue?
mike rodent (111 rep)
Apr 1, 2022, 12:00 PM • Last activity: Apr 4, 2022, 06:59 PM
2 votes
1 answers
341 views
Incompatibility between unixODBC and Firebird ODBC driver
I'm currently developing a application based in Rcode, ODBC and Firebird. For that, first I've installed firebird server and unixODBC (both 64 bits since my machine OS is 64-bits). I tried with 32-bits software aswell since Ubuntu multiarch allow it, but that caused another problem (doesnt matter in...
I'm currently developing a application based in Rcode, ODBC and Firebird. For that, first I've installed firebird server and unixODBC (both 64 bits since my machine OS is 64-bits). I tried with 32-bits software aswell since Ubuntu multiarch allow it, but that caused another problem (doesnt matter in this subject). Created database, using firebird isql function (/opt/firebird/bin/isql), and made some fake tables with integer, float, text columns. I can connect to it using unixODBC isql function (after properly programming DSN and Driver in odbc.ini / odbcinst.ini), but theres a problem: **I can't select tables containing text columns, it gives error std::bad_alloc** After some research, I've discovered *slencheck* function from unixODBC, using it on my driver returns slencheck: sizeof(SQLLEN) == 4 slencheck: driver manager and driver differ!!! **How can I modify unixODBC SQLLEN so it became compatible with 64-bits Firebird ODBC driver**? I can't select text columns because of SQLLEN or there's more to this? I think this odbc's github issue is related to mine
dwenzel (63 rep)
Jan 24, 2020, 08:17 PM • Last activity: Feb 3, 2020, 12:27 PM
0 votes
1 answers
494 views
BCP via Linux Centos 7, cannot connect to Azure SQL
I installed sqlcmd, bcp and odbc 17 for microsoft. then I connected to Azure SQL with SQLCMD - it worked OK then I tried to import some data with BCP and i got an error I use: bcp schema.table_name in "path to csv file" -S example.database.windows.net -U user_name -P "password" -d schema -c -t ',' S...
I installed sqlcmd, bcp and odbc 17 for microsoft. then I connected to Azure SQL with SQLCMD - it worked OK then I tried to import some data with BCP and i got an error I use: bcp schema.table_name in "path to csv file" -S example.database.windows.net -U user_name -P "password" -d schema -c -t ',' SQLState = 28000, NativeError = 18456 Error = [unixODBC][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user 'user_name'. SQLState = 01S00, NativeError = 0 Warning = [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute My passwords contaains ] % ; , is it could be a problem? **Update:** The issue is that when I use SQLCMD unixODBC uses {} to escape password and it works OK, but when BCP uses unixODBC password is not escaped. **SQL CMD** [ODBC][1530961370.439037][SQLDriverConnectW.c] Entry: Connection = 0x1b56e20 Window Hdl = (nil) Str In = [DRIVER={ODBC Driver 17 for SQL Server};SERVER={example.database.windows.net};UID={user_name};PWD={password};WSID={ADCSrv...][length = 145 (SQL_NTS)] Str Out = (nil) Str Out Max = 0 Str Out Ptr = (nil) Completion = 0 UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE' **BCP** [ODBC][1530962482.429621][SQLDriverConnect.c] Entry: Connection = 0xcb4ef0 Window Hdl = (nil) Str In = [DRIVER={ODBC Driver 17 for SQL Server};server=example.database.windows.net;UID=user_name;PWD=password][length = 109 (SQL_NTS)] Str Out = 0x7fff5397ce70 Str Out Max = 2048 Str Out Ptr = (nil) Completion = 0 UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE' How to fix that? I think about creating a DNS
Vadzim Nemchenko (88 rep)
Jul 7, 2018, 11:02 AM • Last activity: Jul 8, 2018, 08:30 AM
5 votes
1 answers
7397 views
installed SQL Server on RHEL7 and received - Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2AF9
I installed SQL Server on RHEL7 VM msodbcsql-13.1.1.0-1.x86_64 mssql-server-14.0.100.187-1.x86_64 mssql-tools-14.0.2.0-1.x86_64 # ls -al /opt/ total 4 drwxr-xr-x. 5 root root 52 Jan 13 08:31 . drwxr-xr-x. 17 root root 4096 Jan 13 07:55 .. drwxr-xr-x. 3 root root 22 Jan 13 08:31 microsoft drwxr-xr-x....
I installed SQL Server on RHEL7 VM msodbcsql-13.1.1.0-1.x86_64 mssql-server-14.0.100.187-1.x86_64 mssql-tools-14.0.2.0-1.x86_64 # ls -al /opt/ total 4 drwxr-xr-x. 5 root root 52 Jan 13 08:31 . drwxr-xr-x. 17 root root 4096 Jan 13 07:55 .. drwxr-xr-x. 3 root root 22 Jan 13 08:31 microsoft drwxr-xr-x. 4 root root 26 Jan 13 08:14 mssql drwxr-xr-x. 4 root root 28 Jan 13 08:31 mssql-tools systemctl says SQL server up and running / green # systemctl status mssql-server mssql-server.service - Microsoft(R) SQL Server(R) Database Engine Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled) Active: active (running) since Fri 2017-01-13 08:16:52 EST; 18min ago Main PID: 8413 (sqlservr) CGroup: /system.slice/mssql-server.service ├─8413 /opt/mssql/bin/sqlservr └─8423 /opt/mssql/bin/sqlservr Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.33 spid17s SQL Server is now ready for client connections. This is an informational message; no user action is required. Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.54 spid6s Starting up database 'tempdb'. Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.65 spid6s The tempdb database has 1 data file(s). Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.65 spid20s The Service Broker endpoint is in disabled or stopped state. Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.66 spid20s The Database Mirroring endpoint is in disabled or stopped state. Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.67 spid20s Service Broker manager has started. Jan 13 08:16:55 example.novalocal sqlservr: 2017-01-13 13:16:55.67 spid5s Recovery is complete. This is an informational message only. No user action is required. Jan 13 08:21:58 example.novalocal sqlservr: 2017-01-13 13:21:58.06 spid51 Using 'dbghelp.dll' version '4.0.5' Jan 13 08:22:02 example.novalocal sqlservr: 2017-01-13 13:22:02.41 spid51 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required. Jan 13 08:22:02 example.novalocal sqlservr: 2017-01-13 13:22:02.44 spid51 Using 'xplog70.dll' version '2016.140.100' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required. I can't login # sqlcmd -S localhost -U SA Password: Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2AF9. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. No firewall rules # iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Connectivity working fine # ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=51 time=9.80 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=51 time=9.94 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=51 time=9.63 ms ^C --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 9.633/9.793/9.941/0.126 ms also with other name, doesn't work # sqlcmd -S tcp:example,1433 -U SA Password: Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2AF9. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Processes running # ps -ef | grep sql mssql 8416 1 0 08:16 ? 00:00:00 /opt/mssql/bin/sqlservr-telemetry /var/opt/mssql/.system mssql 8948 1 0 08:35 ? 00:00:00 /opt/mssql/bin/sqlservr mssql 8950 8948 3 08:36 ? 00:00:06 /opt/mssql/bin/sqlservr root 9103 1217 0 08:39 pts/0 00:00:00 grep --color=auto sql here the logs # grep sqlservr messages Jan 13 08:16:52 localhost sqlservr: This is an evaluation version. There are days left in the evaluation period. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.39 Server Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64) Jan 13 08:16:54 localhost sqlservr: Dec 10 2016 02:51:11 Jan 13 08:16:54 localhost sqlservr: Copyright (C) 2016 Microsoft Corporation. All rights reserved. Jan 13 08:16:54 localhost sqlservr: on Linux (Red Hat Enterprise Linux Server 7.0 (Maipo)) Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.39 Server UTC adjustment: 0:00 Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.39 Server (c) Microsoft Corporation. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.39 Server All rights reserved. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.39 Server Server process ID is 4116. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.39 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.40 Server Registry startup parameters: Jan 13 08:16:54 localhost sqlservr: -d C:\var\opt\mssql\data\master.mdf Jan 13 08:16:54 localhost sqlservr: -l C:\var\opt\mssql\data\mastlog.ldf Jan 13 08:16:54 localhost sqlservr: -e C:\var\opt\mssql\log\errorlog Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.41 Server SQL Server detected 1 sockets with 4 cores per socket and 4 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.41 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.41 Server Detected 6260 MB of RAM. This is an informational message; no user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.42 Server Using conventional memory in the memory manager. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.49 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033) Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.59 Server Buffer pool extension is already disabled. No action is necessary. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.69 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.69 Server Implied authentication manager initialization failed. Implied authentication will be disabled. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.74 Server The maximum number of dedicated administrator connections for this instance is '1' Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.74 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.75 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.75 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.76 Server Query Store settings initialized with enabled = 1, Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.77 spid5s Starting up database 'master'. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.78 Server In-Memory OLTP initialized on lowend machine. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.81 Server Software Usage Metrics is disabled. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.87 spid5s 8 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.87 spid5s 0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.88 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.92 spid5s Buffer pool extension is already disabled. No action is necessary. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.92 spid5s Resource governor reconfiguration succeeded. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.92 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.92 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.96 spid5s SQL Trace ID 1 was started by login "sa". Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.96 spid5s Server name is 'xxx-sqlser'. This is an informational message only. No user action is required. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.97 spid17s Password policy update was successful. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.98 spid5s Starting up database 'msdb'. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.98 spid6s Starting up database 'mssqlsystemresource'. Jan 13 08:16:54 localhost sqlservr: 2017-01-13 13:16:54.99 spid6s The resource database build version is 14.00.100. This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.01 spid6s Starting up database 'model'. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.08 spid5s 7 transactions rolled forward in database 'msdb' (4:0). This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.09 spid5s 0 transactions rolled back in database 'msdb' (4:0). This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.09 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.11 spid6s 7 transactions rolled forward in database 'model' (3:0). This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.11 spid6s 0 transactions rolled back in database 'model' (3:0). This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.12 spid6s Recovery is writing a checkpoint in database 'model' (3). This is an informational message only. No user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.22 spid6s Polybase feature disabled. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.22 spid6s Clearing tempdb database. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.31 spid17s A self-generated certificate was successfully loaded for encryption. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.32 spid17s Server is listening on [ 0.0.0.0 1433]. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.32 Server Server is listening on [ 127.0.0.1 1434]. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.33 Server Dedicated admin connection support was established for listening locally on port 1434. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.33 spid17s SQL Server is now ready for client connections. This is an informational message; no user action is required. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.54 spid6s Starting up database 'tempdb'. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.65 spid6s The tempdb database has 1 data file(s). Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.65 spid20s The Service Broker endpoint is in disabled or stopped state. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.66 spid20s The Database Mirroring endpoint is in disabled or stopped state. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.67 spid20s Service Broker manager has started. Jan 13 08:16:55 localhost sqlservr: 2017-01-13 13:16:55.67 spid5s Recovery is complete. This is an informational message only. No user action is required. Jan 13 08:21:58 localhost sqlservr: 2017-01-13 13:21:58.06 spid51 Using 'dbghelp.dll' version '4.0.5' Jan 13 08:22:02 localhost sqlservr: 2017-01-13 13:22:02.41 spid51 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required. Jan 13 08:22:02 localhost sqlservr: 2017-01-13 13:22:02.44 spid51 Using 'xplog70.dll' version '2016.140.100' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required. Jan 13 08:35:59 localhost sqlservr: 2017-01-13 13:35:59.43 spid5s SQL Server is terminating in response to a 'stop' request from Service Control Manager. This is an informational message only. No user action is required. Jan 13 08:36:00 localhost sqlservr: 2017-01-13 13:36:00.15 spid20s Service Broker manager has shut down. Jan 13 08:36:00 localhost sqlservr: 2017-01-13 13:36:00.24 spid5s SQL Server shutdown has been initiated Jan 13 08:36:00 localhost sqlservr: 2017-01-13 13:36:00.24 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required. Jan 13 08:36:00 localhost sqlservr: This is an evaluation version. There are days left in the evaluation period. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.78 Server Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64) Jan 13 08:36:02 localhost sqlservr: Dec 10 2016 02:51:11 Jan 13 08:36:02 localhost sqlservr: Copyright (C) 2016 Microsoft Corporation. All rights reserved. Jan 13 08:36:02 localhost sqlservr: on Linux (Red Hat Enterprise Linux Server 7.0 (Maipo)) Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.78 Server UTC adjustment: 0:00 Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.79 Server (c) Microsoft Corporation. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.79 Server All rights reserved. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.79 Server Server process ID is 4116. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.79 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.79 Server Registry startup parameters: Jan 13 08:36:02 localhost sqlservr: -d C:\var\opt\mssql\data\master.mdf Jan 13 08:36:02 localhost sqlservr: -l C:\var\opt\mssql\data\mastlog.ldf Jan 13 08:36:02 localhost sqlservr: -e C:\var\opt\mssql\log\errorlog Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.81 Server SQL Server detected 1 sockets with 4 cores per socket and 4 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.81 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.81 Server Detected 6260 MB of RAM. This is an informational message; no user action is required. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.81 Server Using conventional memory in the memory manager. Jan 13 08:36:02 localhost sqlservr: 2017-01-13 13:36:02.89 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033) Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:02.99 Server Buffer pool extension is already disabled. No action is necessary. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.09 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.09 Server Implied authentication manager initialization failed. Implied authentication will be disabled. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.14 Server The maximum number of dedicated administrator connections for this instance is '1' Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.14 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.15 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.15 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.16 Server Query Store settings initialized with enabled = 1, Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.17 spid5s Starting up database 'master'. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.17 Server In-Memory OLTP initialized on lowend machine. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.21 Server Software Usage Metrics is disabled. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.41 spid5s Buffer pool extension is already disabled. No action is necessary. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.41 spid5s Resource governor reconfiguration succeeded. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.41 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.42 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.47 spid5s SQL Trace ID 1 was started by login "sa". Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.50 spid5s Server name is 'xxx-sqlser'. This is an informational message only. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.51 spid5s Starting up database 'msdb'. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.51 spid6s Starting up database 'mssqlsystemresource'. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.52 spid6s The resource database build version is 14.00.100. This is an informational message only. No user action is required. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.54 spid6s Starting up database 'model'. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.69 spid17s A self-generated certificate was successfully loaded for encryption. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.69 spid6s Polybase feature disabled. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.69 spid6s Clearing tempdb database. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.70 spid17s Server is listening on [ 0.0.0.0 1433]. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.70 Server Server is listening on [ 127.0.0.1 1434]. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.70 Server Dedicated admin connection support was established for listening locally on port 1434. Jan 13 08:36:03 localhost sqlservr: 2017-01-13 13:36:03.70 spid17s SQL Server is now ready for client connections. This is an informational message; no user action is required. Jan 13 08:36:04 localhost sqlservr: 2017-01-13 13:36:04.01 spid6s Starting up database 'tempdb'. Jan 13 08:36:04 localhost sqlservr: 2017-01-13 13:36:04.25 spid6s The tempdb database has 1 data file(s). Jan 13 08:36:04 localhost sqlservr: 2017-01-13 13:36:04.25 spid20s The Service Broker endpoint is in disabled or stopped state. Jan 13 08:36:04 localhost sqlservr: 2017-01-13 13:36:04.25 spid20s The Database Mirroring endpoint is in disabled or stopped state. Jan 13 08:36:04 localhost sqlservr: 2017-01-13 13:36:04.26 spid20s Service Broker manager has started. Jan 13 08:36:04 localhost sqlservr: 2017-01-13 13:36:04.28 spid5s Recovery is complete. This is an informational message only. No user action is required. edit after first comment # sqlcmd -S xxx-sqlser -U sa Password: Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2AF9. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. # netstat -tupan | grep 1433 tcp 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN 8950/sqlservr tcp 0 0 127.0.0.1:43245 127.0.0.1:1433 ESTABLISHED 8950/sqlservr tcp 0 0 127.0.0.1:1433 127.0.0.1:43245 ESTABLISHED 8950/sqlservr new error # sqlcmd -S tcp:127.0.0.1,1434 Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : SSPI Provider: No Kerberos credentials available. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Cannot generate SSPI context. can't run simple SQL statements. Why does here the login work? # sqlcmd -S tcp:127.0.0.1,1434 -U SA Password: 1> Select @@version; 2> SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), 3> SERVERPROPERTY ('edition'); 4> The -A option doesn't exists. Firewall-CMD is not installed on my VM (minimal installation) and I followed the troubleshooting guide. # sqlcmd -A -S tcp:127.0.0.1,1434 -U SA Sqlcmd: 'A': Unknown Option. Enter '-?' for help. # sqlcmd -? Microsoft (R) SQL Server Command Line Tool Version 13.0.0001.0 Linux Copyright (c) 2012 Microsoft. All rights reserved. usage: sqlcmd [-U login id] [-P password] [-S server or Dsn if -D is provided] [-H hostname] [-E trusted connection] [-N Encrypt Connection][-C Trust Server Certificate] [-d use database name] [-l login timeout] [-t query timeout] [-h headers] [-s colseparator] [-w screen width] [-a packetsize] [-e echo input] [-I Enable Quoted Identifiers] [-c cmdend] [-q "cmdline query"] [-Q "cmdline query" and exit] [-m errorlevel] [-V severitylevel] [-W remove trailing spaces] [-u unicode output] [-r[0|1] msgs to stderr] [-i inputfile] [-o outputfile] [-k[1|2] remove[replace] control characters] [-y variable length type display width] [-Y fixed length type display width] [-p[1] print statistics[colon format]] [-R use client regional setting] [-K application intent] [-M multisubnet failover] [-b On error batch abort] [-D Dsn flag, indicate -S is Dsn] [-X[1] disable commands, startup script, environment variables [and exit]] [-x disable variable substitution] [-? show syntax summary] here the error log. No coredumps and SQL dumps. # sqlcmd -S tcp:127.0.0.1,1434 -U SA Password: 1> PRINT "Length: 5"" 7'"; 2> GO Length: 5" 7' 1> Select @@version; 2> GO ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64) Dec 10 2016 02:51:11 Copyright (C) 2016 Microsoft Corporation. All rights reserved. on Linux (Red Hat Enterprise Linux Server 7.0 (Maipo)) (1 rows affected)
Sybil (2578 rep)
Jan 13, 2017, 01:57 PM • Last activity: May 28, 2017, 08:59 AM
4 votes
1 answers
1405 views
supplementary characters in FreeTDS
I have a C++ application that connects to SQL Server 2008 through `FreeTDS unixODBC` on an RHEL box. However, i am unable to insert supplementary characters to the database through FreeTDS unixODBC. `[FreeTDS][SQL Server]Error converting characters into server's character set. Some character(s) coul...
I have a C++ application that connects to SQL Server 2008 through FreeTDS unixODBC on an RHEL box. However, i am unable to insert supplementary characters to the database through FreeTDS unixODBC. [FreeTDS][SQL Server]Error converting characters into server's character set. Some character(s) could not be converted This is the query that my application is hitting INSERT INTO mytable (SAMPLE) VALUES(N'乕乭𠁄𠁉乺丕') == version details == unixODBC version - 2.3.0 freeTDS version - 0.95 I can successfully insert the characters in BMP. This characters are inserted perfectly fine. INSERT INTO mytable (SAMPLE) VALUES(N'乕乭乺丕') While using Microsoft SQL Server Native Client for Linux, the supplementary characters are inserted properly. == freetds conf == [mysever.mydomain.com] host = mysever.mydomain.com port = 1433 tds version = 7.3 debug flags = 0xffff dump file = /tmp/dump.log dump file append = no client charset = UTF-16 use utf-16 = yes unixODBC v2.3.0 has been built with ./configure --prefix=/usr/local/ --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE FreeTDS v0.95 has been built with ./configure --prefix=/usr/local --sysconfdir=/usr/local/etc --with-tdsver=7.3
D3XT3R (83 rep)
Feb 27, 2016, 03:04 PM • Last activity: Jan 14, 2017, 04:03 PM
3 votes
0 answers
1928 views
ORA-28545 (Net8) error when connecting Oracle 12c on Centos 7 to SQL Server 2014
I have installed Oracle 12c on Centos 7 and I wanted to connect SQL Server 2014 using freeTDS. So, I installed the following: 1. FreeTds. 2. unixODBC. Next, I configured ODBC on the Linux server so that, when I run `isql dsn username password`, I can connect to the MSSQL successfully and `tnsping` a...
I have installed Oracle 12c on Centos 7 and I wanted to connect SQL Server 2014 using freeTDS. So, I installed the following: 1. FreeTds. 2. unixODBC.
Next, I configured ODBC on the Linux server so that, when I run isql dsn username password, I can connect to the MSSQL successfully and tnsping also succeed but when I run: select * from ItemTbl@MSSQL; I get this error: ERROR at line 1: ORA-28545: error diagnosed by Net8 when connecting to an agent Unable to retrieve text of NETWORK/NCR message 65535 ORA-02063: preceding 2 lines from MSSQL freetds.conf: [SQLSERVERADDRESS] host = 192.168.1.102 # MsSQL Server IP Address port = 1433 # MsSQL Server Port tds version = 8.0 # Tds version for SQL Server 2008 odbc.ini: [SQLDSN] Description = SQLDSN CONNECTION Driver = /usr/local/freetds/lib/libtdsodbc.so Servername = SQLSERVERADDRESS Database = Cafe11 [ODBC Data Sources] SQLDSN=FreeTDS initSQLDSN.ora: HS_FDS_CONNECT_INFO = SQLDSN HS_FDS_TRACE_LEVEL = 0 HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so HS_LANGUAGE = AMERICAN_AMERICA.WE8ISO8859P9 set ODBCINI=/etc/odbc.ini listener.ora: LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oracle.gorannet.net)(PORT = 1521)) ) ) SID_LIST_LISTENER = (SID_DESC = (SID_NAME=SQLDSN) (ORACLE_HOME=$ORACLE_HOME) (PROGRAM=/u01/app/oracle/product/12.1.0/db_1/bin/dg4odbc) tnsnames.ora: GORANNET = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.140)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = gorannet) ) ) SQLDSN = (DESCRIPTION = (ADDRESS = (PROTOCOL=TCP) (HOST=192.168.10.140) (PORT = 1521) ) (CONNECT_DATA = (SID = SQLDSN) ) (HS = OK) ) (ENVS= LD_LIBRARY_PATH=/usr/lib64:/usr/local/freetds/lib:$ORACLE_HOME/lib) ) ) tnsping result: [oracle@oracle ~]$ tnsping SQLDSN TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 20-JUN-2015 23:52:01 Copyright (c) 1997, 2013, Oracle. All rights reserved. Used parameter files: /u01/app/oracle/product/12.1.0/db_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL=TCP) (HOST=192.168.10.140) (PORT = 1521)) (CONNECT_DATA = (SID = SQLDSN)) (HS = OK)) OK (0 msec) isql result: [root@oracle ~]# isql SQLDSN cf11 cf11 +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> select count(*) from ItemTbl; +------------+ | | +------------+ | 136 | +------------+ SQLRowCount returns 1 1 rows fetched database link: CREATE PUBLIC DATABASE LINK "MSSQL" CONNECT TO "cf11" IDENTIFIED BY VALUES ':1' USING 'SQLDSN';
danarj (169 rep)
Jun 20, 2015, 08:57 PM • Last activity: Nov 28, 2016, 12:47 PM
0 votes
2 answers
6344 views
Connecting to SQL Server from R which is Running on Remote UNIX Machine
We have a UNIX machine which includes R engine on it and installed SQL Server ODBC Driver 11. We need to connect R to SQL Server. SQL Server currently works on another machine, so we tried to connect R to SQL Server with the code below. library(RODBC) dbhandle Warning messages: 1: In odbcDriverConne...
We have a UNIX machine which includes R engine on it and installed SQL Server ODBC Driver 11. We need to connect R to SQL Server. SQL Server currently works on another machine, so we tried to connect R to SQL Server with the code below. library(RODBC) dbhandle Warning messages: 1: In odbcDriverConnect("driver=ODBC Driver 11 for > SQL Server;server=10.XXX.XX.XX:1663;") : > > [RODBC] ERROR: state HYT00, code 0, message [unixODBC][Microsoft][ODBC > Driver 11 for SQL Server]**Login timeout expired** 2: In > odbcDriverConnect("driver=ODBC Driver 11 for SQL > Server;server=10.XXX.XX.XX:1663;") : > > [RODBC] ERROR: state 08001, code 87, message > [unixODBC][Microsoft][ODBC Driver 11 for SQL Server]**A network-related > or instance-specific error has occurred while establishing a > connection to SQL Server.** Server is not found or not accessible. Check > if instance name is correct and if SQL Server is configured to allow > remote connections. For more information see SQL Server Books Online. > 3: In odbcDriverConnect("driver=ODBC Driver 11 for SQL > Server;server=10.XXX.XX.XX:1663;") : > > [RODBC] ERROR: state 08001, code 87, message > [unixODBC][Microsoft][ODBC Driver 11 for SQL Server]SQL Server Network > Interfaces: Connection string is not valid . 4: In > odbcDriverConnect("driver=ODBC Driver 11 for SQL > Server;server=10.XXX.XX.XX:1663;") : ODBC connection failed If I run telnet to SQL Server from UNIX machine, it works perfectly. I mean there is a healthy connection between these two machine. How can we connect R to SQL Server without using DSN?
neverwinter (111 rep)
Mar 9, 2016, 09:24 AM • Last activity: Mar 11, 2016, 07:16 AM
1 votes
0 answers
499 views
floating point exception in isql with mariadb
I have this problem in my Debian server : $ isql -v asterisk-connector [1] 13397 floating point exception isql -v asterisk-connector I already checked logs `/` google and got nothing Distributor ID: Debian Description: Debian GNU/Linux 8.3 (jessie) Release: 8.3 Codename: jessie mysql Ver 15.1 Distri...
I have this problem in my Debian server : $ isql -v asterisk-connector 13397 floating point exception isql -v asterisk-connector I already checked logs / google and got nothing Distributor ID: Debian Description: Debian GNU/Linux 8.3 (jessie) Release: 8.3 Codename: jessie mysql Ver 15.1 Distrib 10.1.11-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 unixODBC 2.3.1 This configuration works on other non Debian servers but now I have this problem only on Debian even calling unixODBC 3 $ isql -3 -v asterisk-connector 13464 floating point exception isql -3 -v asterisk-connector If I missed any information require for debugging let me know
Arash Shams (11 rep)
Feb 7, 2016, 10:57 AM • Last activity: Feb 7, 2016, 11:14 AM
7 votes
3 answers
14599 views
Easy path to REST on SQL Server?
At work, one of our primary databases is running on MS SQL Server. I think it's 2008. I'm currently hitting it via UnixODBC and FreeTDS from a Linux host. Unfortunately, the UnixODBC/FreeTDS are not supported by our admins, so it falls on me. For a long-term strategy I want to move off ODBC and swit...
At work, one of our primary databases is running on MS SQL Server. I think it's 2008. I'm currently hitting it via UnixODBC and FreeTDS from a Linux host. Unfortunately, the UnixODBC/FreeTDS are not supported by our admins, so it falls on me. For a long-term strategy I want to move off ODBC and switch to HTTP, using either SOAP or REST calls. The installation is a lot easier with HTTP and most languages understand it, at least Perl, Python and Ruby, which I develop in. We've got a decent amount of SOAP calls set up on the database for some Java processes, so we can probably switch to that pretty easily. We were discussing REST also, which I like because it's lighter-weight. Our DBAs don't have any REST interfaces set up, so I was wondering if there is a plugin or tool for SQL Server that can do simple REST mappings of the tables to get us jump-started. I've considered writing something in Ruby's Sinatra but that'd be one more thing on my plate. I searched for "SQL Server + rest" but it's pretty obvious that the Googles will do the wrong thing with the word "REST" and, as a consequence, didn't find anything worth while. So, if you have experience with something providing REST and felt it was a good tool then chime in.
the Tin Man (243 rep)
Feb 5, 2011, 07:30 AM • Last activity: Nov 11, 2015, 09:10 PM
0 votes
1 answers
5125 views
SQL Server to MySQL sync, using Workbench, FreeTDS, and iODBC on 10.9
I've been struggling to get the MySQL Workbench to behave properly to complete the following: With Mavericks (OS X 10.9), connect to a SQL Server and create a migration job to a MySQL server. The main issue seems to be with ODBC drivers. iODBC was deprecated with 10.8, and the header files removed c...
I've been struggling to get the MySQL Workbench to behave properly to complete the following: With Mavericks (OS X 10.9), connect to a SQL Server and create a migration job to a MySQL server. The main issue seems to be with ODBC drivers. iODBC was deprecated with 10.8, and the header files removed complete in 10.9 (Some discussion on this here . More in-depth discussion here ). Despite my best efforts, this is the farthest I have gotten in Workbench, when trying to Test the connection to a SQL Server on a local subnet: > The ODBC driver that was selected for the source connection was not found by the ODBC manager. > Ensure that you have the proper ODBC driver installed and retry. > > Error Text: Error("('00000', ' [iODBC][Driver Manager]dlopen({FreeTDS}, 6): image not found (0) (SQLDriverConnect)')"): error calling Python module function DbMssqlRE.connect Here is what I have done up to this point: * installed FreeTDS .92.XX from their site (homebrew install of FreeTDS wasn't acceptable, as it uses .91. Apparently .92 or greater is required, according to the Docs I have been following on MySQL, located here * Installed the latest iODBC files I could find on iodbc.org (seemingly forgotten since 10.6) * Using homebrew, installed unixODBC, just in case that provided some alternative, which did not seem to be of any use either, * installed ODBC Administrator App, v 1.1.0 from Apple Has anyone successfully connected to a SQL Server database as a source, using the Workbench on Mac OS 10.9? About to give up and opt for the Windows app, because this iODBC stuff is becoming pretty frustrating 5+ hours in :( **Edits** It seems that PuTTY is showing simple telnet and ssh commands over ports 3606 and 22 are not accepted either. The firewall is completely open on Windows, from what I can tell. Private, Public, and Corporate settings allow for all inbound and outbound traffic. root and users with a wildcard host are not working either :-/
CDD (143 rep)
Jan 14, 2014, 08:54 PM • Last activity: Aug 2, 2015, 09:45 AM
4 votes
1 answers
1447 views
How to make iSQL/FreeTDS behave like a normal client?
I have a third-party Sybase database, which my users would like to connect to and query from a Linux box, using [iSQL](http://isql.sourceforge.net/). I have installed [UnixODBC](http://www.unixodbc.org/) and [FreeTDS](http://www.freetds.org/). As it is third-party database however, I am not able to...
I have a third-party Sybase database, which my users would like to connect to and query from a Linux box, using [iSQL](http://isql.sourceforge.net/) . I have installed [UnixODBC](http://www.unixodbc.org/) and [FreeTDS](http://www.freetds.org/) . As it is third-party database however, I am not able to perform any GRANTs. The query fails with iSQL on Linux: [unixODBC][FreeTDS][SQL Server]ASA Error -121: Permission denied: you do not have permission to use the "CREATE PROCEDURE" statement It appears that the actual SQL that is getting sent by iSQL is CREATE PROCEDURE AS . I have read the iSQL and FreeTDS manpages but there is no hint in there about how to disable this behavior. This works OK in Python: >>> import Sybase >>> db = Sybase.connect('host:port', 'user', 'password', 'db') >>> c = db.cursor() >>> c.execute('select table_name from systable') >>> len(c.fetchall()) 570 So I believe I have installed the Sybase client libraries correctly. Before I recommend this solution instead, can I as a DBA do anything about fixing iSQL?
Gaius (11238 rep)
Jan 11, 2011, 05:25 PM • Last activity: Aug 23, 2011, 08:06 PM
Showing page 1 of 15 total questions