oracle schema name in the connection string

I am connecting to an Oracle database. In order to target the schema associated with the database I am having to specify the database name (as the user id)  in the connection string as well as the password.

Is there anyway to specify the schema name without specifying the password?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
To connect to the database you need a password.

You "can" set up OS authentication to connect to the database as the OS user but that opens up security problems.

You can also set up authentication via LDAP/Active Directory or a few other methods if you wish.  BUT, you must authenticate in some way.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark GeerlingsDatabase AdministratorCommented:
This portion of the example looks incorrect to me:


I would say that should be:


If you have SQL Server experience, maybe you use the word "database" with the meaning it can have in the SQL Server world (where it means something more like the word "schema" in Oracle).

And as slightwv indicated, in Oracle, to connect to the "database" (which in Oracle means to the entire system) you have to provide a username *AND* a password one way or another.  After you log in, that doesn't mean you can see or change things in the entire system.  You will only have access to those parts of the system/database that your Oracle username allows you to see and/or work in.
Geert GOracle dbaCommented:
in a development environment ...
read the connection string and if the password is not supplied, ask the user for it
paste that into the in-memory connection string and use this new connectionstring to login to the oracle

can you login to oracle without a password,
well yes, single sign on, ... but it requires a lot more work than just supplying the password
slightwv (䄆 Netminder) Commented:
>>can you login to oracle without a password,  well yes, single sign on

Semantics.  If you replace "password" with "authentication" then no, you still cannot connect without it.  Oracle needs some method to "authenticate" the connection.
Geert GOracle dbaCommented:
without providing it manually ...
better ?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.