Home » Server Options » Data Guard » Testing Data Guard (Windows 2008 server / Windows 2003 Server / 11gR2)
Testing Data Guard [message #558524] Sat, 23 June 2012 09:38 Go to next message
patb
Messages: 4
Registered: June 2012
Junior Member
I have been trying to setup a test data guard environment to become more familiar with it, but so far I have been unsuccessful. I have been using the guide located at docs.oracle.com/cd/B19306_01/server.102/b14239/create_ps.htm for the steps I am following.

Right now, I'm just trying to get a non-production physical standby configured and working. I have kept kind of a running summary of the commands I have run so far, and would like to paste them below and see if I am missing anything obvious. If necessary, I can post a pfile from both servers to see if maybe I am missing something in the parameters.

I have verified that both instances can be connected to via sqlplus from the opposite server.

Any help or guidance is appreciated.
--------
ALTER DATABASE FORCE LOGGING;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 10 ('c:\app\pbbesadmin\oradata\primary\standby01.log') SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 ('c:\app\pbbesadmin\oradata\primary\standby02.log') SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 12 ('c:\app\pbbesadmin\oradata\primary\standby03.log') SIZE 50M;

ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=c:\app\pbbesadmin\oradata\primary\ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=standby LGWR ASYNC VALID_FOR=(ONlINE_LOGFILES,PRIMARY_ROLES) DB_UNIQUE_NAME=standby';
ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='%t_%s_%r.arc' SCOPE=SPFILE;
ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=7;

ALTER SYSTEM SET FAL_SERVER=standby;
ALTER SYSTEM SET FAL_CLIENT=primary;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;

Backup the database:
rman target primary
BACKUP DATABASE PLUS ARCHIVELOG;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'c:\download\backup\standby.ctl';
ALTER DATABASE OPEN;
create pfile='c:\download\backup\initprimary.ora' from spfile;

On Standby:
Create instance
Configure net service names and tested from both servers
modify pfile from primary to suit the standby (if you set the convert params, do not have to use run block)
copy standby control file to correct locations

CREATE SPFILE FROM PFILE='initstandby.ora';
rman target /
STARTUP MOUNT;

catalog backuppiece 'c:\download\backup\2012_06_22\*.bkp'
restore database;
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

on the primary server instance:
ALTER SYSTEM SWITCH LOGFILE;

on the standby server instance:
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
no rows selected
-----
Re: Testing Data Guard [message #558527 is a reply to message #558524] Sat, 23 June 2012 09:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>on the standby server instance:
>SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
>no rows selected

decent first post!
do NOT take the following as criticism; just general guidance

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/


post tail end (50 - 100 or so lines)from both PRIMARY & STANDBY alert log file

[Updated on: Sat, 23 June 2012 09:50]

Report message to a moderator

Re: Testing Data Guard [message #558534 is a reply to message #558524] Sat, 23 June 2012 10:55 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Quote:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=standby LGWR ASYNC VALID_FOR=(ONlINE_LOGFILES,PRIMARY_ROLES)
You have a typo here, according to the docs this should read
ONLINE_LOGFILES,PRIMARY_ROLE

I've never tried with PRIMARY_ROLES. Do please use [code] tags described here How to use [code] tags and make your code easier to read it makes such mistakes much easier to see.
Probably, your remote archive destination is in error state. Check it with
select dest_name,status,error from v$archive_dest;
and correct it with
alter system set log_archive_dest_state_2=enable;

Re: Testing Data Guard [message #558535 is a reply to message #558534] Sat, 23 June 2012 11:07 Go to previous messageGo to next message
patb
Messages: 4
Registered: June 2012
Junior Member
No criticism taken, as far as I'm concerned any help or advice I receive is welcome. Here's some info I left out from my initial post according to the faq:

Database version:11.2.0.0 (plain vanilla r2)

I think I know what to do after reviewing the alert logs from the two servers. I am working on recreating the password files for the two instances. I know that I configured the passwords to be the same, but for some reason this is what I am getting:

Primary Alert:
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 1031.
Sat Jun 23 10:09:47 2012
Thread 1 cannot allocate new log, sequence 67
Private strand flush not complete
  Current log# 3 seq# 66 mem# 0: C:\APP\PBBESADMIN\ORADATA\PRIMARY\REDO03.LOG
Thread 1 advanced to log sequence 67 (LGWR switch)
  Current log# 1 seq# 67 mem# 0: C:\APP\PBBESADMIN\ORADATA\PRIMARY\REDO01.LOG
Sat Jun 23 10:09:56 2012
Archived Log entry 10 added for thread 1 sequence 66 ID 0x60cdfd77 dest 1:
Sat Jun 23 10:11:55 2012
Error 1031 received logging on to the standby
Errors in file c:\app\pbbesadmin\diag\rdbms\primary\primary\trace\primary_arc2_4056.trc:
ORA-01031: insufficient privileges
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 1031.
Sat Jun 23 10:17:57 2012
Error 1031 received logging on to the standby
Errors in file c:\app\pbbesadmin\diag\rdbms\primary\primary\trace\primary_arc2_4056.trc:
ORA-01031: insufficient privileges
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 1031.
Sat Jun 23 10:22:59 2012
Error 1031 received logging on to the standby
...


Standby:
Fri Jun 22 21:28:51 2012
Error 1031 received logging on to the standby
FAL[client, MRP0]: Error 1031 connecting to PRIMARY for fetching gap sequence
Errors in file c:\app\pbbesadmin\diag\rdbms\standby\standby\trace\standby_mrp0_3804.trc:
ORA-01031: insufficient privileges
Errors in file c:\app\pbbesadmin\diag\rdbms\standby\standby\trace\standby_mrp0_3804.trc:
ORA-01031: insufficient privileges
Fri Jun 22 21:29:01 2012
Error 1031 received logging on to the standby
FAL[client, MRP0]: Error 1031 connecting to PRIMARY for fetching gap sequence
Errors in file c:\app\pbbesadmin\diag\rdbms\standby\standby\trace\standby_mrp0_3804.trc:
ORA-01031: insufficient privileges
Errors in file c:\app\pbbesadmin\diag\rdbms\standby\standby\trace\standby_mrp0_3804.trc:
ORA-01031: insufficient privileges
Fri Jun 22 21:29:11 2012
FAL[client]: Failed to request gap sequence
 GAP - thread 1 sequence 60-61
 DBID 1624124791 branch 786642103
FAL[client]: All defined FAL servers have been attempted.
-------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
-------------------------------------------------------------
Fri Jun 22 21:41:27 2012
db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Re: Testing Data Guard [message #558536 is a reply to message #558534] Sat, 23 June 2012 11:13 Go to previous messageGo to next message
patb
Messages: 4
Registered: June 2012
Junior Member
Also, I verified that log_archive_dest_2 and _1 are enabled on both systems
standby:
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_1             string      enable

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2             string      enable

primary:
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_1             string      enable

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2             string      enable
Re: Testing Data Guard [message #558537 is a reply to message #558536] Sat, 23 June 2012 11:28 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
use the "orapwd" utility to create the password file on the PRIMARY & then do OS file copy to place it on STANDBY
SOLVED Re: Testing Data Guard [message #558538 is a reply to message #558537] Sat, 23 June 2012 11:46 Go to previous message
patb
Messages: 4
Registered: June 2012
Junior Member
SOLVED

Instead of using orapwd, I just copied the existing pwdfile from primary to standby and restarted the primary then the secondary instance.

Thanks to all for assistance! Next step, try to convert to logical standby Smile

SEQUENCE# FIRST_TIM NEXT_TIME
---------- --------- ---------
        60 22-JUN-12 22-JUN-12
        61 22-JUN-12 22-JUN-12
        62 22-JUN-12 22-JUN-12
        63 22-JUN-12 22-JUN-12
        64 22-JUN-12 23-JUN-12
        65 23-JUN-12 23-JUN-12
        66 23-JUN-12 23-JUN-12
        67 23-JUN-12 23-JUN-12
        68 23-JUN-12 23-JUN-12
        69 23-JUN-12 23-JUN-12
Previous Topic: What is the best way will I choose for DG solution?
Next Topic: Dataguard switchover
Goto Forum:
  


Current Time: Thu Mar 28 08:02:05 CDT 2024