oracle 11.2.0.1.0(startup oracle instance): any alternative solution for "set oracle_sid = xx" and "set oracle_home=xxx"

hello all,

i would like to access on oracle database "tester" from a remote computer.

before i call the connection, everytime i need to do following step manually:

1. cmd->dos windows

2. >set oracle_sid=tester (tester is the name of database, it is also the name of user, which has right to access the tester database)

3. >set oracle_home=C:\path_to_oracle_home

4. >sqlplus /nolog

5. sql>connect sys as sysdba
          password: ***

6. sql> startup;

7. sql>connect tester
          password: ***

after these 7 steps on computer A which oracle database runs, i could connect to this oracle database from another computer B. If i don't do this, the connection will be failed.

the question is: what should i do to make this setting automaticly, because i don't wanna to run this 7 steps manually when i restart my computer.

thanks,
wantime
wantimeAsked:
Who is Participating?
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.

OP_ZaharinCommented:
- you can create a new entry in the Environment Variables (Computer> properties > Advanced System Settings > System Variable) .. (also accessible from Control Panel) for the following variable:
1- ORACLE_HOME and the value is C:\path_to_oracle_home
2- ORACLE_SID and the value is tester

- then you can skip setting the oracle_home and oracle_sid step.
0
Wasim Akram ShaikCommented:
there are many options one of them is to create a batch job which runs everytime you restart the system.

the job will do that necessary steps for you..

alternatively you can create environmental variables with names ORACLE_SID and ORACLE_HOME for the same.

Right Click on MyComputer-->Properties
Click on Advanced Tab
Click on Environmental Variables
Click on new variables and create them and point their path to respective directories(C:\xxxxx etc.,)

which will get set automatically along with your personal settings on your logon.

This should solve your problem.
0

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
Praveen Kumar ChandrashekatrDatabase Analysist Senior Commented:
Also check the oracle services is set to automatic, so that while you restart your system it will start the services

Control Panel -> System and Security -> Administrative Tools -> Services.msc

check for OracleServicetestter and see that it is set to automatically.

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

wantimeAuthor Commented:
thanks, if i have more than one oracle database, how do i set their oracle_sid as environmental variables?
0
slightwv (䄆 Netminder) Commented:
Mentioned above: Check the service for the instance is set to Automatic.
0
wantimeAuthor Commented:
i mean that if there are two database "tester01" and "tester02",  how do i set both as environment variable?

do you mean i could set them like:

Name: ORACLE_SID
Value: tester01, tester02

?
0
slightwv (䄆 Netminder) Commented:
Why do you think you need to manually startup these databases?

I run several instances on Windows.  You just need to set the service to Automatic.  Oracle knows how to start them.
0
Wasim Akram ShaikCommented:
incase of two environment variables , first one gets set by default... you have to do a set for the second one...

ofcourse if you want to startup the database then this can be achieved via services.msc as said above..
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.