Convert an oracle database from READ-ONLY MODE to READ-WRITE MODE
--------------------------------------------------------------------
A look into the trial and error we obtained while trying to open the database from READ-ONLY mode to READ-WRITE MODE
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 2421825536 bytes
Fixed Size 2230752 bytes
Variable Size 587204128 bytes
Database Buffers 1828716544 bytes
Redo Buffers 3674112 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open read only;
Database altered.
SQL> set serveroutput on
declare
v_return boolean;
begin
v_return:= dbms_tdb.check_db('Microsoft Windows x86 64-bit');
end;
/SQL> 2 3 4 5 6
PL/SQL procedure successfully completed.
SQL> declare
v_return boolean;
begin
v_return:= dbms_tdb.check_external;
end;
/
2 3 4 5 6 The following external tables exist in the database:
SH.SALES_TRANSACTIONS_EXT
The following directories exist in the database:
SYS.SUBDIR, SYS.SS_OE_XMLDIR, SYS.TMP_DIR, SYS.MEDIA_DIR, SYS.LOG_FILE_DIR,
SYS.DATA_FILE_DIR, SYS.XMLDIR, SYS.DATA_PUMP_DIR, SYS.ORACLE_OCM_CONFIG_DIR
The following BFILEs exist in the database:
PM.PRINT_MEDIA
PL/SQL procedure successfully completed.
SQL>
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01531: a database already open by the instance
SQL> alter database open read write;
alter database open read write
*
ERROR at line 1:
ORA-01531: a database already open by the instance
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database read write;
alter database read write
*
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL>
SQL> shu abort
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 2421825536 bytes
Fixed Size 2230752 bytes
Variable Size 587204128 bytes
Database Buffers 1828716544 bytes
Redo Buffers 3674112 bytes
Database mounted.
Database opened.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>
No comments:
Post a Comment