Beruflich Dokumente
Kultur Dokumente
by
Faizan Momin
[Type text]
Mudassir Khan
Page 0
This document makes the following assumptions: Primary Server is up and running. Database is up and running in archive mode and started from spfile on Primary Server. Secondary Server is up and running. Oracle Software (same version/patchset as that of primary) is installed on Secondary Server. Network is configured between primary and secondary servers. RMAN is used to duplicate Primary database on secondary
Overview
Type Hostname IP Address Oracle SID DB_UNIQUE_NAME TNS Service Name SERVICE_NAMES Primary Server(INDIA) india.oracle.com 192.168.246.171 india india INDIA india.oracle.com Standby Server(JAPAN) japan.oracle.com 192.168.246.172 india japan JAPAN japan.oracle.com
Remember The SID has to be same on both sides but DB_UNIQUE_NAME must be different
[oracle@india ~]$ vi /etc/hosts # Do not remove the following line, or various programs # that require network function ality will fail. 127.0.0.1 localhost.localdomain localhost 192.168.246.171 india.oracle.com india 192.168.246.172 japan.oracle.com japan
Page 1
3. Enable Force Logging on the database, so that there are no problems with no logging in future.
SQL> ALTER DATABASE FORCE LOGGING; Database altered. Force Logging enables bulk redo log entries
Page 2
Page 3
Page 4
Page 5
Page 6
Recovery Manager: Release 10.2.0.1.0 - Production on Sat Sep 10 00:32:43 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: INDIA (DBID=2938478455) RMAN> configure controlfile autobackup format for device type disk to '/u01/app/oracle/backup/india/ctl_auto_%F'; Device type used here is disk it can also be tape RMAN> backup database format '/u01/app/oracle/backup/india/full_%d_%I_%T_%u' include current controlfile for standby plus archivelog format '/u01/app/oracle/backup/india/archive_%d_%I_%T_%u'; Format clause in rman sends the backup to the desired location
Page 7
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> startup nomount
Page 9
Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = india.oracle.com)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = india.oracle.com))) OK (40 msec) [oracle@japan ~]$ tnsping japan TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 10-SEP-2011 02:26:17 Copyright (c) 1997, 2005, Oracle. All rights reserved. Used parameter files: /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = japan.oracle.com)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = japan.oracle.com))) OK (10 msec)
Page 10
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> ALTER DATABASE OPEN READ ONLY; Database altered. SQL> SHU IMMEDIATE Database closed. Database dismounted. ORACLE instance shut down. SQL> STARTUP NOMOUNT; ORACLE instance started. Total System Global Area 608174080 bytes Fixed Size 1220820 bytes Variable Size 167776044 bytes Database Buffers 432013312 bytes Redo Buffers 7163904 bytes SQL> CREATE SPFILE FROM PFILE;
Page 11
If both the values are the same Congratulation!!!!!! You have successfully configured 10g Dataguard
Page 12