Oracle Data Guard : standby server untuk reporting (4)

28 Feb

16. standby server untuk reporting (server standby)
yaitu dengan cara mengubah menjadi READ ONLY, tetapi tidak bisa READ WRITE

a. periksa standby server dalam mode apa ? (server standby)
SQL> select database_role, open_mode from v$database;
DATABASE_ROLE OPEN_MODE
—————- ———-
PHYSICAL STANDBY MOUNTED

b. ubah dari mode recovery ke read only (server standby)
SQL> alter database recover managed standby database cancel;
SQL> alter database open read only;
SQL> select database_role, open_mode from v$database;
DATABASE_ROLE OPEN_MODE
—————- ———-
PHYSICAL STANDBY READ ONLY

c. test untuk report, tidak dapat digunakan write (server standby)
SQL> conn scott/tiger;
SQL> select * from dept;
DEPTNO DNAME LOC
———- ————– ————-
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON

SQL> insert into dept values(41,’IT’,’SBY’);
insert into dept values(41,’IT’,’SBY’)
*
ERROR at line 1:
ORA-16000: database open for read-only access

d. primary server menambahkan record [41,’IT’,’SBY’] (server primary)
SQL> conn scott/tiger;
SQL> insert into dept values(41,’IT’,’SBY’);
SQL> commit;
SQL> conn / as sysdba
SQL> alter system switch logfile;
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/prmr11g
Oldest online log sequence 18
Next log sequence to archive 19
Current log sequence 20

e. ubah mode ke recovery (server standby)
SQL> conn / as sysdba
SQL> alter database close;
SQL> alter database recover managed standby database disconnect;
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/stby11g
Oldest online log sequence 18
Next log sequence to archive 0
Current log sequence 20

f. apakah data dari primary sudah ditransfer ke standby [41,’IT’,’SBY’] ? (server standby)
SQL> alter database recover managed standby database cancel;
SQL> alter database open read only;
SQL> conn scott/tiger;
SQL> select * from dept;
DEPTNO DNAME LOC
———- ————– ————-
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
41 IT SBY

1. oracle data guard pengertian

2. demo oracle data guard physical standby database

3. oracle data guard test pengiriman logfile

4. oracle data guard standby server untuk reporting

5. oracle data guard active data guard 11g

6. oracle data guard switchover failover

7. oracle data guard test switchover failover

8. oracle data guard lampiran initora

One Response to “Oracle Data Guard : standby server untuk reporting (4)”

  1. Jack Nickolson May 4, 2010 at 8:43 pm #

    In Oracle 10g, If you execute startup command on standby database then it will be opening readonly mode automatically.

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: