I am trying to set up an ODBC connection on RHEL to connect to a redshift cluster. I have installed the latest Redshift ODBC driver, and modified the odbc.ini file to include the necessary details:
[ODBC Data Sources]
Redshift_Connection=Amazon Redshift (x64)
[Redshift_Connection]
Driver=/u01/redshift/lib/64/libamazonredshiftodbc64.so
#Driver=/u01/redshift/lib/32/libamazonredshiftodbc32.so
Description=Amazon Redshift ODBC Driver (64-bit) DSN
Server=****
Port=****
Database=****
locale=en-US
When trying to connect - I get the following error:
{error} STATE=42704, CODE=34772055228426,
MSG=[Amazon][Amazon Redshift] (10) Error occurred while trying to connect:
[SQLState 42704] FATAL: unrecognized configuration parameter "driver_version"
However, 'driver_version' is not a configuration parameter the odbc.ini file. There is additionally an odbcinst.ini file , but that also does not contain it.
I have tried setting a new parameter 'driver_version' and setting it the version of the Redshift ODBC, however that doesn't work either, as well as tried the 32bit driver (that was a hail mary).
Is there any other location that this 'driver_version' parameter could be coming from? Am stuck until I can get this connection working.
The ODBC driver version is 1.4.20, direct from AWS website
Redshift is PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.22169
It appears that in the com.amazon.redshift.core.v3.ConnectionFactoryImpl.getParametersForStartup there is a parameter that is passed in to load the driver version parameters. This ConnectionFactoryImpl utilizes the com.amazon.redshift.util.DriverInfo class, which pulls the version from this file: redshift_jdbc_driver.properties or sets it by default to the version that you are using. These parameters look to be encoded and passed along, which seem to be the cause of the failure.
You could try to create your own Datasource by setting the properties you want, however that did not work for me.
Edit - For me I am using Spring Boot, I had to remove the #Configuration annotation from the Configuration class, in order to bypass these extra settings.
Related
I'm attempting to follow the guide here which shows how to link an azure cosmos-db as a linked server via ODBC. I have created the ODBC links to the remote cosmos-db in both x64 and x86 flavours. These appear to connect without issue when checking from within the ODBC Admin console and I can even see the data when setting up a schema, however I am unable to create a working linked server as I get the following error when testing the connection ..
"[microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
I Believe this is maybe because I have SQL Express installed and the "Providers" folder is missing from the "Linked Server" folder. I am therefore assuming that I do not have the necessary providers installed on the SQL Server Instance running locally.
I have attempted to install both the OLE DB Driver and the ODBC Driver, however these have not helped.
I have an IIS web application which connects to a SQL Server like this:
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open("DRIVER={SQL Server};SERVER=servername;DATABASE=dbname;UID=username;PASSWORD=pwd)
Recently I started getting the following error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error
When I asked my server admin what this meant, he said that they had recently removed TLS 1.0 from the IIS server my web application is mounted on. He made sure the new SQL ODBC 13 drivers were installed on the web server, but it did not help.
Although the web app has never had a DSN before, we created one for it using the ODBC 13 driver. When I tried connecting like this:
objConn.Open "DSNname"
I got the following error:
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
I looked up ConnectionStrings.com to see if there were a way of specifying a different driver. I tried this:
objConn.Open("DRIVER={SQL Server Native Client 13.0};SERVER=servername;DATABASE=dbname;UID=username;PASSWORD=pwd)
And this is the error message that was produced:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Don't know what else to do. Any ideas?
We had to update 3 servers that are running several Classic ASP websites. The main reason was we need to implement Twillio API SMS messaging wich required TLS 1.0 and TLS 1.1 to be disabled/removed.
It took several days and we had the websites go up and down through the process.
I wrote a blog post to document the process for other team members. I hope it helps.
https://dhali.com/programming/tls-1-2-with-classic-asp/
Here are the outlined steps:
https://www.ssllabs.com/ssltest to get the current TLS Configuration
Using IISCrypto Tool we updated the Registry Files on the server
Ran https://www.ssllabs.com/ssltest to prove TLS 1.0 and 1.1 removed
Update ODBC to the latest ver supports TLS 1.2 [Microsoft® ODBC Driver 13.1 for SQL Server]
Update the connection string to use the current ODBC SQL 13 driver
The specified DSN contains an architecture mismatch between the Driver and Application
You can create either a 32bit DSN or a 64bit DSN. You need to create one matching the bitness of your program. Probably 32-bit.
I installed the CData ODBC Driver for MongoDB to make the application that can access SQL Server connect to mongodb.
According to the official document,I have configured the system DSN.
Then I modified the config file 'CData.ODBC.MongoDB.Remoting.ini' config file screenshot:-
,in which the users and passwords was the same as what I typed in DSN.
I started CData.ODBC.MongoDB.Remoting.exe and the console printed
Test connection successful. CData ODBC Driver For MongoDB 2015
remoting server starts.Local port :3309.
But when I created a linked server from SQL Server Management Studio linked server info
,it showed that the user 'noobwulei' login failed.
I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
Based on the console output, looks like the remoting service isn't running on the expected port:
... Local port :3309.
According to the Help documentation (http://cdn.cdata.com/help/DGB/odbc/pg_cli.htm) the executable runs the MySQL daemon by default.
In order to run the TDS daemon, you will need to run the executable from the command line and pass TDS as the protocol option (-t):
\> CData.ODBC.MongoDB.Remoting.exe -t TDS
I'm trying to move my TeamCity instance to SQL Server. I followed the instructions in the docs for Setting up an External Database.
Now I'm going through Migrating to an External Database and running the maintainDb command:
.\maintainDB.cmd migrate -A c:\users\jkodroff\.buildserver -T C:\Users\jkodroff\.BuildServer\config\database.properties
And I get this output:
Java executable is found: 'C:\Program Files\Java\jdk1.6.0_35\bin\java.exe'.
Using logs directory C:\TeamCity\logs
TeamCity maintenance tool. Copyright 2013 JetBrains s.r.o. All Rights Reserved.
Command line arguments: migrate -A c:\users\jkodroff\.buildserver -T C:\Users\jkodroff\.BuildServer\config\database.properties
Using TeamCity data directory: C:\Users\jkodroff\.BuildServer
Using database settings from the TeamCity data directory for source database: C:\Users\jkodroff\.BuildServer\config\database.properties
Using source database
database type: MSSQL
connection string: jdbc:jtds:sqlserver://localhost:1433/teamcity
Cannot proceed with 'migrate' command: A driver for the source database not found. Please ensure you have driver jars in C:\Users\jkodroff\.BuildServer\lib\jdbc.
Critical error has occurred during command execution.
I've verified that both sqljdbc.jar and sqljdbc4.jar are in the directory indicated, so what gives?
The fact that you have sqljdbc.jar and sqljdbc4.jar indicates that you are using the Microsoft SQL Server JDBC Driver, but the connection string is for the jTDS driver. Make sure you use the correct connection string for the Microsoft SQL Server JDBC or that you use the jTDS JDBC driver instead.
Second: you should use either sqljdbc.jar (which is for Java 5) or sqljdbc4.jar (which is for Java 6 and later), not both; loading both might lead to unexpected behavior due to classloading order etc!
Actually my job is take a backup data from a mysql data table to a SQL Server table.
So I created a DTS package in SQL Server 2000. When I manually run the the package, it runs successfully without any errors, and the data got transfered from MySQL to SQL Server.
But when I run the package using schedule jobs I got below error
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart:
DTSStep_DTSDataPumpTask_1 DTSRun OnError: DTSStep_DTSDataPumpTask_1,
Error = -2147467259 (80004005) Error string: [Microsoft][ODBC
Driver Manager] Data source name not found and no default driver
specified Error source: Microsoft OLE DB Provider for ODBC Drivers
Help file: Help context: 0
Error Detail Records:
Error: -2147467259 (80004005); Provider Error: 0 (0)
Error string: [Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified
Error source: Microsoft OLE DB Provider for ODBC Drivers
Help file: Help context: 0
DTSRun OnFinish: DTSStep_DTSDataPumpTask_1 DTSRun: Package execution
complete.
So please help me on this.....
As the commenter mentioned, it could be a data source configuration problem - if you've set up your MySQL DSN as a user DSN rather than a system DSN, you'll need to change that. Open the ODBC configuration tool and go to the "System" table, rather than "User" (where it defaults) and create your data source there.
It could also be ax x64 problem - if the version of Windows you're using is x64, then the ODBC panel that opens by default shows x64 data sources. If you're using the x86 version of SQL Server (SQL 2000 has both), then you'll need to create the data source in the x86 ODBC administrator, which can be launched from:
C:\Windows\SysWOW64\odbcad32.exe
Once they're launched, they look exactly the same, so it can be hard to tell which one you've got open. A general indicator is that x64 driver list is usually way shorter - on my machine, there are about 25 drivers in the x86 version and only 3 in the x64 version. Keep in mind that if you're using SQL 2000 x86, you'll also need to install the x86 version of the MySQL driver, even if your server is x64.