简体   繁体   中英

How to open oracle database?

I have 2 databases.(mydb1, mydb2) I know how to open the oracle database, I used SQL plus with ALTER DATABASE OPEN;

select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
mydb1            OPEN

But I can't open the database mydb2. How can open the instance named mydb2?

I started the instance with the command: $ srvctl start database -db mydb2 -startoption mount

don't specify "-startoption mount" as that will not completely open the database. It puts the database in a state where files are "mounted" by the database, but explicitly not opened. This is a state used for some configuration changes and for DR operations and such.

You need to connect to that instance before starting it.

SET ORACLE_SID=SID

and then

sqlplus / AS SYSDBA

then open one instance.

Now, repeat the steps for second instance(the second instance must have different SID)

See oracle reference for this scenario: oracle doc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM