Link to home
Create AccountLog in
Oracle Database

Oracle Database

--

Questions

--

Followers

Top Experts

Avatar of ouestque
ouestqueπŸ‡ΊπŸ‡Έ

Oracle/Toad: Connection String
Any of you guys use TOAD to connect to an Oracle database? When starting a new connection you need to enter the following data:

*Host
*Port
*Service Name
*UserId/Password
Β *Oracle driver (12g, 8i etc.,)

I am assuming there is a connection string being formed in the back end. Do you know what that is?

I have a sample connection string below that has all these components except the Oracle driver being used. Do you know what the connection string would look like if using 12g_Home?


Example:
Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=???)(PORT=???)))(CONNECT_DATA=(SERVICE_NAME=???)(SERVER=DEDICATED)));User Id=???;Password=???;

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of Sean StuberSean Stuber

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

SOLUTION
Avatar of sarabandesarabandeπŸ‡±πŸ‡Ί

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Avatar of Alex [***Alex140181***]Alex [***Alex140181***]πŸ‡©πŸ‡ͺ

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Avatar of Alex [***Alex140181***]Alex [***Alex140181***]πŸ‡©πŸ‡ͺ

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of Alex [***Alex140181***]Alex [***Alex140181***]πŸ‡©πŸ‡ͺ

sdstuber, no problem, I didn't take it that way ;-)
But, yes, you're right, regarding the Toad stuff, this won't help much...

Avatar of ouestqueouestqueπŸ‡ΊπŸ‡Έ

ASKER

My ultimate goal is to create a connection string that does not require Windows ODBC setup or putting an entry in TNSNames.

The connection string I provided above seems to do that. I think... The big problem with it though is that it uses the Β 10g driver by default instead of 12g. Anyway to adjust the connection string so that it uses 12g? or to somehow set 12g as default in Windows? or to set 12g in VBA or another language when opening it?

SOLUTION
Avatar of Alex [***Alex140181***]Alex [***Alex140181***]πŸ‡©πŸ‡ͺ

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Here's an example, Β I select the TNS tab (not DIRECT, not LDAP)

I fill in the database field with my tns description

I choose my client (in this case I'm using my 18c client, but you choose whatever you want from your installed clients.)


User generated image


While this does work, it is NOT how I generally use Toad though.
I have approximately 1000 databases I support, I use LDAP and tnsnames to do simple lookups from names, rather than trying to construct a specific connection description every time.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of ouestqueouestqueπŸ‡ΊπŸ‡Έ

ASKER

I was just using TOAD to help describe what I'm doing. With the concept of "Hey If TOAD does it, why can't I do it in VBA or C# etc.," I apologize as I described it poorly.

I am trying to connect to an Oracle database via code without setting up ODBC, editing TSNAMES and WITHOUT TOAD.

In my case preferably VBA. My connection string above works flawlessly sometimes. Nonetheless now it stopped working and I think it is because it defaults to using the Oracle driver 10g instead of 12g. I am wondering if there is a way to do one of the following via code not TOAD.

*Adjust the connection string so it always looks at the 12g driver

*Adjust the VBA code so it always looks at the 12g driver

*Adjust Windows settings to always use the 12g driver as default.

please close this question as it appears to have been answered.

and open a new question with your real requirements

Avatar of ouestqueouestqueπŸ‡ΊπŸ‡Έ

ASKER

Thanks everyone!

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of johnsonejohnsoneπŸ‡ΊπŸ‡Έ

So, this is just a duplicate of this question.

Avatar of ouestqueouestqueπŸ‡ΊπŸ‡Έ

ASKER

Same objective, but it went in a different direction than I was hoping for. (I.e., TOAD) An expert requested I close this so I closed both questions and started a new one with clearer details.
Oracle Database

Oracle Database

--

Questions

--

Followers

Top Experts

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.