I am new to ODBC and trying to make a DSN in Windows ODBC administrator to call it from R using "RODBC" or similar R-packages.
I am able to find the "server name" and "database name" for anything on "SQL Server" driver. However, "SAS" driver does not let me find explicit names for server and database names. All I know is the URI where the data set is stored, also I can get the host name of the SAS server that stores the databases and its port. Is there a way to add it as a DSN or even call it directly from R? I have tried several permutations of these name and addresses but I constantly get the same error that odbc connection was not successful.
For example, after I followed the steps to add SAS server in ODBC administrator, and I used RODBC package in R, I got this result
odbcConnect("mydbname")
[1] -1
Warning message:
In RODBC::odbcDriverConnect("DSN=mydbname") : ODBC connection failed
Related
I am using an ODBC driver of MarkLogic instance which I am using in Power BI to access MarkLogic database files.
I am using 64 bit ODBC driver and have set up the connection and tested the connection successfully. I have also accessed the MarkLogic files under Documents Database.
But today when I tried to connect from Power BI, it gives me this error:
Could not translate hostname "myhostname" to address : Unknown host
The same error is thrown when I am trying to test the connection in ODBC set up.
The driver used is Marklogic SQL.
MarkLogic is up and running, and there have been no changes done in any connection properties so far.
I have installed Firebird ODBC driver on my computer and I have entered data for the new connection inside Microsoft Windows "ODBC Data Source Administrator (64-bit)" and "Test Connection" was successful and I can also use this DSN (Data Source Name) from Power BI Desktop.
But now I am trying to use Firebird ODBC driver from other application (custom M Language connector, that works atop Firebird ODBC driver and that I develop to enable DirectQuery access mode in Power BI Desktop, ODBC drivers natively does not support DirectQuery access mode) and there I am required to provide ODBC connection string as one string.
I have formed (more or less intuitively) such string, e.g.:
User=SYSDBA;Password=masterkey;Database=D:\DB\ERP.FDB;DataSource=192.168.1.3;Port=3050;Dialect=3;Charset=UTF8;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;Initial Catalog=test;
But this string is rejected by Power BI Desktop with error message:
Unable to connect
We encountered an error while trying to connect.
Details: "ODBC: ERROR [08004] [ODBC Firebird Driver]connection lost to database
ERROR [01S00] [ODBC Firebird Driver]Invalid connection string attribute
ERROR [01S00] [ODBC Firebird Driver]Invalid connection string attribute"
My intention and wish is to grab already existing ODBC connection string that sits inside "ODBC Data Source Administrator (64-bit)" and use it for my connection, but the problem is that "ODBC Data Source Administrator (64-bit)" does not provide easily accessible way to get such fully formatted connection string from DSN entry.
So, my question is: how to read connection string from "ODBC Data Source Administrator (64-bit)" DSN entry. Specifically, how to do it from page that is used for Firebird ODBC driver.
You should read https://firebirdsql.org/file/documentation/html/en/refdocs/fbodbc20/firebird-odbc-driver-20-manual.html#fbodbc205-connection
If you already have configured DSN, you don't need anything else, just use "DSN=xxxx;".
My program uses ADO to connect to SQL Server in Visual C++ 2008. Now it seems that ADO is out-dated and MS recommends to use ODBC again.
Therefore, I now study how to use ODBC to connect to SQL Server. I see there is a class CDatabase that can do that. However, there are no good article in introducing how to use CDatabase to connect to SQL Server via ODBC.
Basd on my research, it seems one can connect to SQL Server via ODBC in the following way:
Via a direct connection string like this one:
Driver={SQL Server Native Client 11.0};Server=myServerAddress;
Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Using ODBC administrator to create a DSN(Data Source Name), and then connect with DSN.
THen if 1 works, why do we need to create DSN?
You don't need a ODBC DSN. A DSN simply allows one to externalize the ODBC configuration such that server name, driver. etc. can be configured in a common way for all ODBC applications.
It is not a requirement to use a DSN when you store connection string in an external file so that environment-specific values can be configured without code changes. Regardless of the technique used, be sure to protect secrets rather than storing as clear text.
I've been trying really hard for the past few hours to connect my Qt software to a MySQL database that I've hosted using a website that hosts small MySQL databases for free. I can connect to it using phpMyAdmin, but I'm really having trouble getting my software to connect to it.
This is the error message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified QODBC3: Unable to connect".
Can somebody explain to me what this means, and how to fix it?
You need to headers, libraries & client dll from MySQL
Compile Qt/MySQL driver
Provide path to mysql client library in PATH environment
I'm attempting to connect a ColdFusion application to a DB2 ODBC DSN.
Here's my error message:
Connection verification failed for data source: <DSN NAME>
java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
I've installed DB2 client tools on the server ColdFusion runs on. I've verified the credentials are correct.
I'm not a DB2 guy, but have you seen the Coldfusion DB2 Universal Driver doc located here?
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=datasources_ADV_MJS_07.html
Based on your comments, you're using ODBC Socket instead. So while this isn't 1 to 1 what you're asking, it might have something useful: Configure Solaris to DB2 ODBC
http://kb2.adobe.com/cps/171/tn_17188.html
The other thing to keep in mind is that DB2 is only supported in CF Enterprise and Developer Editions. http://www.adobe.com/products/coldfusion/systemreqs/
http://kb2.adobe.com/cps/801/80121c8.html
This CFMX doc ended up being what we went with to get it working.
Thanks to SO for pointing us in the right direction.