How to get Oracle DB connection string - oracle

I need to connect my Microsoft Report Builder to Oracle DB but I could not seem to find the correct connection string for Oracle.
I tried:
Specifying username and password
Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;
but it returned:
Is it saying that I need to download the Oracle driver? Or should I get the connection string for Oracle DB?

If you don't already have it, you will need the Oracle Client installed. It will include an ODBC driver. ODBC is a wrapper for the Oracle Client, not a replacement. When setting up your connection you will also need to get the connection properties from the DBA (e.g. hostname/ip address, port, service name, username and password).
See documentation here:
https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/odbc-driver.html
https://www.oracle.com/database/technologies/releasenote-odbc-ic.html

Related

How to structure Oracle in OraClient11g_home1 connection string with host, service-name and port

In Oracle, I have a 32-bit driver to connect in my 32-bit ODBC Oracle in OraClient11g_home1.
I want to connect using host, port, service-name, uid, pwd (as I do in Oracle SQL Developer). But the only versions of connection string that I can find use TNSNames.ora, which I can't modify.
For example I found this connection string:
Driver={Oracle in OraClient11g_home1};Dbq=myTNSServiceName;Uid=myUsername;Pwd=myPassword;
But dbq here is a TNS name. How can I modify this connection string to include host, port, and service-name?
Edit:
I also tried this:
"Driver={Oracle in OraClient11g_home1};SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=myUsername;pwd=myPassword;"
But I got an error:
[RODBC] ERROR: state HY000, code 12560, message [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error
Please try this:
'DRIVER={Oracle in OraClient11g_home1};DBQ=x.x.x.x:MyPort/MySID;UID=username;PWD=password'
First SQL Developer connect via JDBC not ODBC.
Are you using SID or service name to connect?
DB Version? Os?
You are using an old terrible (32bit) and unsupported version anymore as far as i know full of bugs.
Try to think about it but in any case try to replace SERVER= with CONNECTSTRING= or SERVICE_NAME with SID

Powershell Oracle DB connection using Encrypted Credentials

I was able to get connected to Oracle using the ManagedDataAccess (.net) connection for Oracle, but is there a way to use OracleCredential instead of the string password in the connection string?

Connect to Oracle using ADO

I'm trying to connect to an Oracle Server using ADO and Oracle Wallet,
First of all, my wallet IS working. I have tested it using
SQLPLUS /#DDKTEST
If I provide username and password in my connection string it works fine:
Provider=MSDAORA;Password=<my password>;User ID=<My user ID>;Data Source=DDKTEST;Persist Security Info=True
But I'm stoked when I need to make a Connection String for Oracle Waller
I've tried the following:
Provider=MSDAORA;Data Source=DDKTEST;Persist Security Info=True
But it doesn't work.
So in short: I need a connection string for ADO, in order for connection to Oracle using my Wallet.
The connection string that we are using with wallets is:
Provider=OraOLEDB.Oracle;Data Source=TNSName;OSAuthent=1;
We use this successfully with TADOConnection in Delphi (first XE5, now 10).
Where TNSName is an alias as defined in TNSNames.ora. I must note that we use a different provider (reflected in the provider name, OraOLEDB.Oracle), and I don't know if this will also work with the outdated and deprecated MSDAORA.
We did use MSDAORA before, but switched to OraOLEDB before we started using the wallets. I do remember that it was quite primitive and didn't even support BLOBs, so I'm not very confident it will support wallets at all.

Export Database connection to Oracle Developer

I have a database Connection established in odbcad and Microsoft Access (aswell as working in Excel) via ODBC and want to also get it working in Oracle SQL developer.
It is a Windows SQL Server as far as i know and I have tried several Settings, of which None works. I have also installed Driver for ODBC. I would like to Import Settings into SQL developer as applied in MS Access, is there any possibility?
No, SQL Developer is a Java application and uses a JDBC driver.
But if you look at the odbc properties for your connection, those should largely translate to what you need to define a basic connection.
Oracle:
Server name or IP address of the DB, port # for the listener, and the name of the SID or Service, plus a valid username and password is all you need to connect to Oracle.
What error do you get when you try to connect?
Show us what you're trying.
Update:
You're trying to connect to SQL Server but you're getting"
Native SSPI library not loaded
You're trying to use OS Authentication for your connection. For this to work with the jTDS driver, you need to copy a DLL file named ntlmauth.dll (which is for NT authentication) under the jtds-x.x.x-dist\x86\SSO\ or jtds-x.x.x-dist\x64\SSO\, to any directories in the PATH environment.
Please update your question such that's it's clear you're connecting to SQL Server and share the error message so others can find it.
I imagine this question is a duplicate of many previous iterations of the same challenge.

Oracle odbc connection

I'm trying to connect using different ODBC clients (Advanced query tools and ODBC Query Tool) to my remote Oracle database but every time getting the following error : ORA-12560: TNS:protocol adapter error
my connection settings are:
Driver={Microsoft ODBC for Oracle};dbq=192.168.10.11:1521/TEST_DB;Uid=username;Pwd=password;
Could you please explain what is wrong in my connection settings or am I need to configure something else?
Somewhere in your connection string, the Oracle SID or Service Name needs to be specified. The following are two examples, with one specifying SERVICE_NAME and the other specifying SID:
Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=199.199.199.199)(PORT=1523))(CONNECT_DATA=(SID=dbName)));Uid=myUsername;Pwd=myPassword;
Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=199.199.199.199)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=dbName)));Uid=myUsername;Pwd=myPassword;
Check your driver documentation to make sure you are including all of the required connection options. I believe the minimum required details are server, port, SID or SERVICE Name, UID, and PWD.
Tony Hall
Driver={Microsoft ODBC for Oracle};
CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server)(PORT=7001))(CONNECT_DATA=(SERVICE_NAME=myDb)));
Uid=myUsername;Pwd=myPassword;

Resources