We are getting error while trying to connect UFT with Redshift:
Dim dbConnection
Srvname = "Driver={Amazon Redshift (x64)};Server=serverName; Database=DBName; UID=****; PWD=****; Port=****;"
Set dbConnection = CreateObject("ADODB.Connection")
dbConnection.Open Srvname
Error coming as:
Datasource name not found and no default driver specified.
But with all same credential we can able to connect redshift with "SQL Workbench".
SQL Workbench is using a different Connector (most probably JDBC or some other technology). The ADODB.Connection Object is trying uses the ODBC Drivers installed for the Operating System, so first things frist you need to install the ODBC Driver.
After this is don, depending on your credential management policy, you may need to simply use the proper Connection String or configure stuff in the ODBC wizard of Microsoft Windows.
SQL Workbench uses Amazon Redshift JDBC compatible driver. Try downloading ODBC driver. Follow the below link
Related
I am using Python3.6 and pyodbc to try and connect to Teradata. I need this for a script I want to hand off to an end user to update from data. I would prefer that each user not have to be instructed to setup their own DSN connection with a specific name I hard encode into the script.
I think I have the driver correct now as well as the server and DB name. What I can't figure out is how to get the connection string to not require a username and password.
Helpful info:
This is for windows OS. When I go to ODBC connections in windows, connection mechanism is listed as LDAP and i can connect through the Teradata program as well.
What does work:
Connection directly through the Teradata program (showing Teradata itself knows who I am)
Using DSN="DSN_name" where DSN_Name is the name under ODBC connections found in windows. Showing I can connect via DSN.
-Looking at ODBC Data Source Admin shows Driver matches what I have. "Server Name or ID" matches "servername" below.
Tried:
connect_string = 'Driver={Teradata Database ODBC Driver
16.20};DBCName=servername;Database=db_name;MechanismName=LDAP;UseIntegratedSecurity=1;'
con = pyodbc.connect(connect_string)
which gives:
pyodbc.Error: ('HY000', '[HY000] [Teradata][ODBC] (11210) Operation not allowed during the transaction state. (11210) (SQLExecDirectW)')
connect_string = 'Driver={Teradata Database ODBC Driver
16.20};DBCName=servername;Database=db_name;MechanismName=LDAP;'
con = pyodbc.connect(connect_string)
or
connect_string = 'Driver={Teradata Database ODBC Driver
16.20};DBCName=servername;Database=db_name;Authentication=LDAP;'
con = pyodbc.connect(connect_string)
which gives:
pyodbc.InterfaceError: ('28000', '[28000] [Teradata][ODBC Teradata Driver] (2) Unable to logon with Authentication Mechanism selected. (2) (SQLDriverConnect)')
I have also tried a few other suggested authentication mechanisms in addition to LDAP, but this is the one listed in Teradata and ODBC connections.
In SQL_Server I use something like trusted_connection=yes to achieve the same effect I desire which doesn't seem to work in the above examples.
error:
pyodbc.OperationalError: ('08001', '[08001] [Teradata][ODBC] (10380) Unable to establish connection
with data source. Missing settings: {[Password] [Username]} (10380) (SQLDriverConnect)')
I have a legacy VB6 application, which is making ODBC connections to a proprietory 3rd party database using ODBC.
Dim con As Object ' New ADODB.Connection
Set con = CreateObject("ADODB.Connection")
con.Open ("DB64bitDSN")
It used to work until now. Recently they have installed 64 bit version of the 3rd party database. The 3rd party database automatically creates a 64 bit ODBC DSN during installation, and the same is working when I connect using Excel's Data Connection Wizard, and using ODBC DSN as the data source.
But my code is giving error:
Error Description: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
Error Source: Microsoft OLE DB Provider for ODBC Drivers
How should I change my code to make it work? Do I need to add a reference to any library and modify my code?
Thanks.
You do not need to change the code. You need to ask "them" to create a 32-bit ODBC DSN. VB6 requires this in order to connect.
There is more information on this Microsoft page.
Extract from the page
To manage a data source that connects to a 32-bit driver under 64-bit
platform, use c:\windows\sysWOW64\odbcad32.exe.
How do I set up a connection using MySQL ODBC Connector 5.3 within the Informatica Powercenter Workflow Manager?
Under Connections -> Relational, I can create a new ODBC connection, but the only place I can specify something is within the Connect String, and it is not as obvious what to put in here.
Connect string = ODBC DSN Name
Data source must be defined in ODBC Data Source Administator in windows' Administrative Tools
Can we connect from excel (excel-VBA) to oracle(in a remote server) without
installing oracle client in the client system... I tried all the options
below but it is throwing error as oracle client should be installed.
below is the connectionstring i have used
1)strConnection = "Provider=OraOLEDB.Oracle;Data Source=SourceName;User Id=Username;
Password=password;"
2)strConnection = "Provider=MSDAORA;Data Source=SourceName;UserId=Username;
Password=password;"
3)strConnection = "Provider=MSDAORA.1;User ID=Username/password;Data
Source=SourceName;Persist Security Info=False"
4)strConnection = "Driver={Microsoft ODBC for Oracle};SERVER=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)(PORT=1521)
)(CONNECT_DATA (SERVICE_NAME=SERVICEName)));uid=Username;
pwd=password;Uid=Username;Pwd=password;"
5)strConnection = "SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)
(PORT=1521))(CONNECT_DATA =(SERVICE_NAME=SERVICEName)));
uid=Username;pwd=password;"
You need some form of client to connect to an Oracle database, local or remote.
You have two choices:
Install an Oracle SQL*Net client. If your server is Oracle 10g or higher you don't need the full-blown client: you can use the more lightweight Instant Client.
Buy an n-tier ODBC driver which supports generic connectivity. OpenLink is one, there are others.
".can we not connect to the oracle
database with only the Drivers or
providers present in our OS(Windows
XP).."
Think of it this way: the ODBC drivers do not connect to the database, they connect to SQLNet. Then SQLNet connects to the database.
"what is the difference between
Drivers,providers with the client. "
The Oracle provided drivers are better tuned for Oracle than the ones MS provides, but in this context they are the same: both require the presence of an Oracle client to work.
I've never used a JDBC connection before, and am familiar with only ODBC connections. We have a vendor who will only support JDBC. They consider ODBC 'Open Source', and therefore do not support connections to their DB through an ODBC connection. Does anyone know if it is possible to create an SSIS connection via JDBC? I am not getting any hits on this from my initial research online.
No, SSIS does not have the java interface necessary to do this. You would have to use an ADO.Net or OLEDB driver, or the OLEDB provider for ODBC to connect to a database.
You could write a java program that extracted the data to a file, and then read the data from that file. You can execute a process from SSIS, which could be used to run the Java program.