Home » RDBMS Server » Server Utilities » Backup of Two Different Databases
Backup of Two Different Databases [message #72101] Sat, 08 March 2003 04:59 Go to next message
Ashwani Kumar Mathur
Messages: 1
Registered: March 2003
Junior Member
I have installed two oracle databases on one server. Now when I uses Imp, Exp command for export dump and import purpose, it will always connects to the last database created. While both databases are in work. Both of these commands also do not have database selection option. Please suggest me the way of choosing / setting another database as default database. There must be some way of setting this in oracle configuration file. I did not find any help from internet on this topic.
Re: Backup of Two Different Databases [message #72103 is a reply to message #72101] Sun, 09 March 2003 06:43 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
check your ORACLE_SID.
everytime you want to connect specifically to use a particular instance (if you have more than one database in the same machine), then your ORACLE_SID should be set.
this will pain if you have many databases.
so use connect strings!!.
let db1 = prod 
    db2 = test
then make db2 as ur primary database.
export the  ORACLE_SID=db2 and its ORACLE_HOME in your profile ( in windows  machines this is the environment variable).
NOW by default when u connect u will be connected to db2 (if you dont use a connecString).
edit   db2's $ORACLE_HOME/network/admin/tnsnames.ora and and tnsentries for coonecting to db1
and db2 (self).

to connect to db2:
sqlplus userName/passCode@db2

to connect to db1:
sqlplus userName/passCode@db1

the same policy applies to all tools. 
use userName/passCode@connectString

Previous Topic: Oracle Redunduncy
Next Topic: Specify a number of records to be exported
Goto Forum:
  


Current Time: Wed May 15 08:17:34 CDT 2024