Testing Data Guard [message #558524] |
Sat, 23 June 2012 09:38 |
|
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 |
|
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 |
John Watson
Messages: 8964 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;
|
|
|
|
|
|
|