Home » SQL & PL/SQL » Client Tools » Connecting directly to required database(not test database) (oracle 10g)
Connecting directly to required database(not test database) [message #543857] Fri, 17 February 2012 04:23 Go to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
Hi Everybody , I am struck with a problem that we have a production database 'X'. Now i have created a test database 'T' and did'nt configured another listener to it!
The issue is when i cam connecting to oracle through sqlplus i am directly connecting to Test database 'T' but not the production database 'X'----ofcourse i can login to production DB afterwards. but initially i want to access the production database 'X'. Can anyone guide me ?
Re: Accesing directly the production database(not test database) [message #543864 is a reply to message #543857] Fri, 17 February 2012 04:47 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From which tool? SQL*Plus?
From which server (database or client)?
Are both database on the same server or not?

Regards
Michel

[Updated on: Fri, 17 February 2012 04:47]

Report message to a moderator

Re: Accesing directly the production database(not test database) [message #543865 is a reply to message #543864] Fri, 17 February 2012 04:50 Go to previous messageGo to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
Both databases on the same server.
and from sql* plus
when i connect to sql* plus as ---- / as sysdba and after connecting if i check select * from v$instance then the instance_name would be test 'T' database but not production DB ... So i want to login as production initially from the start onwards.

[Updated on: Fri, 17 February 2012 04:52]

Report message to a moderator

Re: Accesing directly the production database(not test database) [message #543876 is a reply to message #543865] Fri, 17 February 2012 05:54 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So set ORACLE_SID to the default value you want in your OS profile.

Regards
Michel
Re: Accesing directly the production database(not test database) [message #543877 is a reply to message #543876] Fri, 17 February 2012 05:55 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Be the way, having a test and a production database on the same server is not wery wise.

Regards
Michel
Re: Accesing directly the production database(not test database) [message #543879 is a reply to message #543877] Fri, 17 February 2012 06:01 Go to previous messageGo to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
YEs i have set my oracle_sid also ...but it is'nt working
Re: Accesing directly the production database(not test database) [message #543881 is a reply to message #543879] Fri, 17 February 2012 06:04 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So you didn't do it correctly.

Regards
Michel
Re: Accesing directly the production database(not test database) [message #543942 is a reply to message #543881] Sat, 18 February 2012 01:12 Go to previous messageGo to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
no i have done it in the corect way...
Or else Can you say me the correct way?

i gone to command prompt and gave the following command
set oracle_sid=orcl
Please guide me

and now will i get any issues if i delete test database??

[Updated on: Sat, 18 February 2012 01:15]

Report message to a moderator

Re: Accesing directly the production database(not test database) [message #543943 is a reply to message #543942] Sat, 18 February 2012 01:25 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Or else Can you say me the correct way?


The one that allows you to do what you want.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Especially point that says SHOW US.

Regards
Michel
Re: Accesing directly the production database(not test database) [message #543944 is a reply to message #543943] Sat, 18 February 2012 01:26 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
will i get any issues if i delete test database??


Other than you can't access the test database? No.

Regards
Michel
Re: Accesing directly the production database(not test database) [message #543945 is a reply to message #543944] Sat, 18 February 2012 01:40 Go to previous messageGo to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
./fa/9856/0/This is the screen shot what i have done!..[Sad] help me dude!./fa/9856/0/
  • Attachment: show.jpg
    (Size: 43.44KB, Downloaded 139 times)
Re: Accesing directly the production database(not test database) [message #543946 is a reply to message #543945] Sat, 18 February 2012 01:41 Go to previous messageGo to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
Please correct me Michel!
Re: Accesing directly the production database(not test database) [message #543947 is a reply to message #543946] Sat, 18 February 2012 01:45 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The first part (in balck) is in a DOS windows, the second one (in white) is from a Windows window. There is NO relation between them.

Do ALL of this in DOS box using sqlplus.exe and you will see;
Also, before calling sqlplus, post the result of "SET".

Regards
Michel
Re: Accesing directly the production database(not test database) [message #543949 is a reply to message #543947] Sat, 18 February 2012 02:29 Go to previous messageGo to next message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
Yes the first part is in dos prosmpt .. but the second one (in white) is from sql*plus window.
and i have tried on dos window ..yes after setting the oracle_sid there i am able to connect to prod database.. but i want the same from sql*plus tooooo....
Re: Accesing directly the production database(not test database) [message #543953 is a reply to message #543949] Sat, 18 February 2012 02:46 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Both are SQL*Plus (and I should add in 11g you have ONLY the DOS one).
Windows SQL*Plus settings are defined in the registry (HKLM\Software\Oracle\<your home>), you can set there the default ORACLE_SID.

Regards
Michel

[Updated on: Sat, 18 February 2012 02:47]

Report message to a moderator

Re: Accesing directly the production database(not test database) [message #543955 is a reply to message #543953] Sat, 18 February 2012 03:07 Go to previous message
sarma.shp
Messages: 111
Registered: February 2012
Senior Member
Hey Michel the above one worked for me..Thank you very much buddy!!... Michel Smile have a good day!
Previous Topic: How to work with SQL from home PC
Next Topic: iSQL*Plus
Goto Forum:
  


Current Time: Wed Oct 01 17:48:03 CDT 2014

Total time taken to generate the page: 0.16756 seconds