This error message comes if you are trying to perform an operation that needs database to be in mount state, however, the current state of the database in NOMOUNT. To explain further, if you are executing a statement that can only be run if database is in MOUNT state, or could either be in MOUNT or OPEN state, but database is only in nomount state, ORA-01507 will be returned. Following are a few examples where you can see ORA-01507 is being returned. And after mounting the database, error no longer appears.
SQL> startup nomount ORACLE instance started.
Total System Global Area 1644167168 bytes Fixed Size 3046272 bytes Variable Size 872416384 bytes Database Buffers 754974720 bytes Redo Buffers 13729792 bytes
SQL> alter database noarchivelog; alter database noarchivelog * ERROR at line 1: ORA-01507: database not mounted
SQL> alter database backup controlfile to trace; alter database backup controlfile to trace * ERROR at line 1: ORA-01507: database not mounted
SQL> select database_role from v$database; select database_role from v$database * ERROR at line 1: ORA-01507: database not mounted |
The solution is to MOUNT database and retry the execution of the statement(s)
SQL> alter database mount;
Database altered.
SQL> alter database noarchivelog;
Database altered.
SQL> select database_role from v$database;
DATABASE_ROLE ---------------- PRIMARY
SQL> alter database backup controlfile to trace;
Database altered.
SQL> |
No comments:
Post a Comment