Hi all,
am trying to set up the DG,
have followed all the necessary steps, but yet not able to configure it,
steps followed
check if db are in archive log more or not
------------------------------------------
archive log list;
alter database archivelog;
alter database noarchivelog;
details about the database
--------------------------------------
select name from v$database;
select name from v$datafile;
select name from v$tempfile;
select name from v$controlfile;
select member from v$logfile;
sho parameter spfile;
sho parameter unique;
Enable force loging
--------------------------
alter database force logging;
make sure the password is same for both the db's
make use of orapwd utility
creating standby redolog files for increased availability and protection
--------------------------------------------------------------------------
alter database add standby logfile group 4/5/6 '<path>/redo04/5/6.log' size 512M; --size same as others
enable archive log
-----------------------
alter database archivelog;
archive log list;
edit the pfile for physical database
-----------------------------------------
changed :
log_archive_format string ARC%S_%R.%T
log_archive_max_processes integer 4
to :
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
and few more added
startup nomount pfile='G:\pdb\pdbarc\pfilepdb.ora';
create spfile from pfile='G:\pdb\pdbarc\pfilepdb.ora';
shutdown;
startup;
--check if the changes are done
now for the standby database
----------------------------
create a standby control file for sdb from pdb in mount state
---------------------------------------------------------------
shutdown;
startup mount;
alter database create standby controlfile as 'G:\pdb\pdbarc\sdb.ctl';
alter database open;
now backup of the primary to standby location after making primary down
now copy the pfile from primary to standby database and edit that pfile setting according to requirement.
db_unique_name='sdb'
db_name='pdb'
*.control_files='','','' --copied controlfile
*.db_create_file_dest='' --new standby datafile to create
*.fal_server='pdb'
*.fal_client='sdb'
*.LOG_ARCHIVE_DEST_1=''
*.LOG_ARCHIVE_DEST_2=''
etc..,
configure the listner,tnsnames for the standy and check
make sure the password for both are same --use orapwd utility for this
orapwd file=orapwsdb password=oracle force=y
make the primary db up and then in the secondary database startup using new pfile,
----------------------------------------------------------------------------------
startup nomount pfile='G:\sdb\sdbarc\pfilepdb.ora';
create spfile from pfile'G:\sdb\sdbarc\pfilepdb.ora'; -check once you crete the spfile
shutdown
startup mount --after start check if the spfile is correct
perform recovery
------------------
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
error in primary database(pdb) alert log is
***********************************************************************
Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=sdb)(CID=(PROGRAM=g:\app\sony\product\11.2.0\dbhome_1\bin\ORACLE.EXE)(HOST=SONY-VAIO)(USER=SYSTEM))))
VERSION INFORMATION:
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production
Time: 14-JUN-2012 17:13:39
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Error 12514 received logging on to the standby
Errors in file g:\app\sony\diag\rdbms\pdb\pdb\trace\pdb_arc1_9160.trc:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
PING[ARC1]: Heartbeat failed to connect to standby 'sdb'. Error is 12514.
before this i had error as,
"ORA-01031: insufficient privileges
PING[ARC1]: Heartbeat failed to connect to standby 'sdb'. Error is 1031."
for which i have created the password files again for both the db.
restarted the database.
and
Now in the standby database(sdb) i have started it in mount stage(shutdown;startup nomount;alter database mount standby database;),
and gave "ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION"
but am getting the error as
ARCs: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC5: Becoming the heartbeat ARCH
Completed: alter database mount standby database
Thu Jun 14 17:16:22 2012
ARCt started with pid=49, OS id=10236
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_arc2_10980.trc:
ORA-01017: invalid username/password; logon denied
ARCt: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
------------------------------------------------------------
FAL[client, ARC2]: Error 16191 connecting to pdb for fetching gap sequence
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_arc2_10980.trc:
ORA-16191: Primary log shipping client not logged on standby
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_arc2_10980.trc:
ORA-16191: Primary log shipping client not logged on standby
Thu Jun 14 17:16:33 2012
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
Thu Jun 14 17:16:33 2012
MRP0 started with pid=50, OS id=10352
started logmerger process
Thu Jun 14 17:16:38 2012
Managed Standby Recovery not using Real Time Apply
Thu Jun 14 17:16:38 2012
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_dbw0_10944.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_dbw0_10944.trc:
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: 'G:\PDB\PDB\SYSAUX01.DBF'
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_dbw0_10944.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: 'G:\PDB\PDB\UNDOTBS01.DBF'
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_dbw0_10944.trc:
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: 'G:\PDB\PDB\USERS01.DBF'
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
MRP0: Background Media Recovery terminated with error 1110
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_pr00_9240.trc:
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
Slave exiting with ORA-1110 exception
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_pr00_9240.trc:
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
Recovery Slave PR00 previously exited with exception 1110
Errors in file g:\app\sony\diag\rdbms\sdb\sdb\trace\sdb_mrp0_10352.trc:
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'G:\PDB\PDB\SYSTEM01.DBF'
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
result of lsnrctl status
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sony-VAIO)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sony-VAIO)(PORT=8080))(Presentation=
HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "pdb" has 1 instance(s).
Instance "pdb", status READY, has 1 handler(s) for this service...
Service "pdbXDB" has 1 instance(s).
Instance "pdb", status READY, has 1 handler(s) for this service...
Service "rnd" has 1 instance(s).
Instance "rnd", status READY, has 1 handler(s) for this service...
Service "rndXDB" has 1 instance(s).
Instance "rnd", status READY, has 1 handler(s) for this service...
Service "sdb" has 1 instance(s).
Instance "sdb", status READY, has 1 handler(s) for this service...
The command completed successfully
am able to ping both the db(pdb and sdb)
please help me how to proceed..,
did i make any mistakes..,
regards,
harish