Tuesday, December 06, 2011


I had to put a database into archivelog mode today. The problem when I do this is that I can never remember if the database has to be mounted or not. The answer is that it does. If it isn't, you get an ORA-01507:

ORACLE10 > sqlplus / as sysdba
SQL*Plus: Release - Production on Tue Dec 6 15:23:22 2011
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area  176160768 bytes
Fixed Size                  2028688 bytes
Variable Size             134220656 bytes
Database Buffers           33554432 bytes
Redo Buffers                6356992 bytes
SQL> alter database archivelog
  2  /
alter database archivelog
ERROR at line 1:
ORA-01507: database not mounted
SQL> alter database mount
  2  /
Database altered.
SQL> alter database archivelog
  2  /
Database altered.
SQL> alter database open
  2  /
Database altered.
SQL> select log_mode from v$database
  2  /

No comments: