on 06-22-2016 12:51 AM
Hi Experts ,
I am trying to connect from my HANA box to MS SQL server 2012 using unixODBC and MS SQL SERVER Drivers getting message
"
[unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLDriverConnect
"
when I run isql -v SGF user passowrd
I am able to connect from another HANA database , so my unixODBC is working .
below is the odbc.ini file
[SGF]
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
Server=myserver.com,1433
Database=SGF
I am able to connect to the database using sqlcmd
sqlcmd -S servername.com,1433 -d <database> -U username -P password
The above command works and able to query the database
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried the same steps still not working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried placing the odbc.ini file in home directory of sidadm it did not work , any other suggestions please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you following the similar steps in the below blog ? This has been tested in multiple environment and worked fine.
Configuring Remote Source connection (SDA) from HANA to MSSQL
Your DNS name in odbc.ini should match the drive name that you are creating in HANA studio.
Place the .odbc.ini file in the home directory for the <sid>adm user (that's the user HANA uses to connect to linux and get the unixODBC details).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sriram,
Your DNS is not identifying properly. You need to keep your .obc.ini file in Home directory.
As HANA requires the .odbc.ini file for communicating with remote source MSSQL. Hence, we need to create .odbc.ini file in $HOME directory.
1. Login with sidadm user and create .odbc.ini file -> vi .odbc.ini file
2. Create DSN as MSSQL
3. Server=nave of the server you want to connect and port number
4. Driver = Location of the ODBCsql driver.
P.S: your .odbc.ini file should look like above
5. Goto Home directory and open .sapenv.sh file and add the below line (Update the LD_LIBRARY_PATH)
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/microsoft/msodbcsql/lib64
6. Restart SAP HANA
Have you checked the blog
Regards,
Pavan Gunda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I tried that , it did not work , then I changed the env variables to point to /etc/odbc.ini
below is odbcinst -j putput as sidadm
odbcinst -j
unixODBC 2.3.0
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /etc/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Hi Sriram,
Have you already installed the SQL Server ODBC driver and made test connection to remote SQL Server as per note 1644499 - Database connectivity from Linux to SQL Server?
Regards,
Ning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.