1、在Linux下切换:
export ORACLE_SID=xxx1
sqlplus "/as sysdba" //进入sql
startup //启动数据库实例1
exit
export ORACLE_SID=xxx2 //启动数据库实例2
sqlplus "/as sysdba" //进入sql
startup
lsnrctl start //启动监听
2、在Windows下切换:
set ORACLE_SID=xxx1
sqlplus "/as sysdba" //进入sql
exit
set ORACLE_SID=xxx2
sqlplus "/as sysdba" //进入sql