ORA-16139: media recovery required

27 Feb

Pada awalnya karena sesuatu hal primary server “rusak”, sedangkan
standby server belum siap untuk di switch over ke primary server,
akhirnya standby server diubah menjadi primary server timbul error
ORA-16139: media recovery required

1. status awal server
SQL> select database_role, open_mode from v$database;
DATABASE_ROLE OPEN_MODE
—————- ———-
PHYSICAL STANDBY READ ONLY

2. diubah ke server primary
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
*
ERROR at line 1:
ORA-16139: media recovery required

3. error diatasi dengan cara
a. alter database recover managed standby database finish;
SQL> alter database recover managed standby database finish;
alter database recover managed standby database finish
*
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-16171: RECOVER…FINISH not allowed due to gap for thr 1, seq 40-41

b. alter database commit to switchover to physical primary;
SQL> alter database commit to switchover to physical primary;
Database altered.

4. error sudah dapat diatasi
SQL> shutdown;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

SQL> startup;
ORACLE instance started.

Total System Global Area 422670336 bytes
Fixed Size 1300352 bytes
Variable Size 364906624 bytes
Database Buffers 50331648 bytes
Redo Buffers 6131712 bytes
Database mounted.
Database opened.

5. status server sekarang
SQL> select database_role, open_mode from v$database;
DATABASE_ROLE OPEN_MODE
—————- ———-
PRIMARY READ WRITE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: