Ingresar
Debates recientes
Respuestas recientes
Estadísticas del Foro
- Usuarios registrados
- 11.271
- Foros
- 38
- Debates
- 919
- Respuestas
- 60
- Etiquetas de debate
- 51
Inicio › Foros › Base de Datos › Administración (Database) › Logical Standby Oracle 9.2.0.x
- Este debate tiene 0 respuestas, 1 mensaje y ha sido actualizado por última vez el hace 17 años, 10 meses por acaballeroa.
-
AutorEntradas
-
-
02/09/2007 a las 8:24 AM #2120acaballeroaParticipante
Quisiera por favor que me validen el procedimiento para volver a repetirlo:
EN EL PRIMARIO
==============
1.SQL> ALTER DATABASE FORCE LOGGING;
2.SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1=’LOCATION=d:oracleoradataoracle9iArchive MANDATORY’ SCOPE=BOTH;
3.SQL> ALTER SYSTEM SET LOG_PARALLELISM=1 SCOPE=SPFILE;
4.SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;
5.SQL> SELECT DISTINCT OWNER,TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED ORDER BY OWNER,TABLE_NAME;
6.SQL> SELECT COLUMN_NAME,DATA_TYPE FROM DBA_LOGSTDBY_UNSUPPORTED
WHERE OWNER=’OE’ AND TABLE_NAME = ‘CUSTOMERS’;
7.SQL> SELECT OWNER, TABLE_NAME,BAD_COLUMN FROM DBA_LOGSTDBY_NOT_UNIQUE WHERE TABLE_NAME NOT IN (SELECT TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED);
8.SQL> ALTER TABLE mytab ADD PRIMARY KEY (id, name) RELY DISABLE;
9.SQL> SELECT SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI FROM V$DATABASE;
10.SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS;
11.SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
12.SQL> SELECT SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI FROM V$DATABASE;
13.SQL> CREATE TABLESPACE logmnrts DATAFILE ‘d:oracleoradataoracle9ilogmnrts.dbf’ SIZE 25M AUTOEXTEND ON MAXSIZE UNLIMITED;
SQL> EXECUTE DBMS_LOGMNR_D.SET_TABLESPACE(‘logmnrts’);
14.SQL> SELECT NAME FROM V$DATAFILE;
15.SQL> SHUTDOWN IMMEDIATE;
16.Con el explorador de Windows copiar desde:
d:oracleoradataoracle9isystem01.dbf hacia d:oracleoradatastdbysystem01.dbf
…..
17.SQL> STARTUP MOUNT;
18.SQL> ALTER DATABASE BACKUP CONTROLFILE TO ‘d:tempcontrol01.ctl’;
19.SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
20.SQL> ALTER DATABASE OPEN;
SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
21.SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
22.SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
23.SQL> SELECT NAME FROM V$ARCHIVED_LOG
WHERE (SEQUENCE#=(SELECT MAX(SEQUENCE#) FROM V$ARCHIVED_LOG
WHERE DICTIONARY_BEGIN = ‘YES’ AND STANDBY_DEST= ‘NO’));
Tomar nota, para luego usarlo en standby.
24.SQL> CREATE PFILE=’d:tempinit.ora’ FROM SPFILE;
25.Backup datafiles and control.
Latest archived redo log
Database initialization parameter
EN EL STANDBY
=============
26. INIT.ORA
db_name=oracle9icompatible=9.2.0.1.0
control_files=’d:oracleoradatastdbycontrol01.ctl,d:oracleoradatastdbycontrol02.ctl,d:oracleoradatastdbycontrol03.ctl’
instance_name=stdby
log_archive_start=TRUE
log_archive_format=%d_%t_%s.arc
log_archive_dest_1=’LOCATION=d:oracleoradataoracle9iarchive’
log_parallelism=1
parallel_max_servers=9
standby_archive_dest=’d:oracleoradatastdbyarchive’
# The following parameter is required only if the primary and standby databases
# are located on the same system.
lock_name_space=stdby
27.d:> oradim -NEW -SID stdby -STARTMODE auto
28.d:> lsnrctl stop
d:> lsnrctl start
29.SQLNET.ORA
SQLNET.EXPIRE_TIME=230.Crear entradas en el TNSNAMES.ORA
31.SQL> STARTUP MOUNT PFILE=’d:oracleadminstdbypfileinit.ora’;
32.SQL> ALTER DATABASE RENAME FILE ‘d:oracleoradataoracle9isystem01.dbf’
TO ‘d:oracleoradatastdbysystem01.dbf’;
SQL> ALTER DATABASE RENAME FILE ‘d:oracleoradataoracle9iundotbs01.dbf’
TO ‘d:oracleoradatastdbyundotbs01.dbf’;
SQL> ALTER DATABASE RENAME FILE ‘d:oracleoradataoracle9icwmlite01.dbf’
TO ‘d:oracleoradatastdbycwmlite01.dbf’;
…..
33.SQL> ALTER DATABASE GUARD ALL;
SQL> ALTER DATABASE OPEN RESETLOGS;
34.SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT PFILE=’d:oracleadminstdbypfileinit.ora’;
35.d:>set ORACLE_SID=stdby
d:>nid TARGET=SYS/oracle DBNAME=stdby
d:>del d:oracleora92databasePWDstdby.ora
d:>orapwd file=d:oracleora92databasePWDstdby.ora password=oracle entries=5
36.Modificar Init.ora (standby)
…
db_name=stdby
…
37.SQL> SHUTDOWN IMMEDIATE;
SQL> CREATE SPFILE FROM PFILE=’d:oracleadminstdbypfileinit.ora’;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE OPEN RESETLOGS;
38.SQL>SELECT * FROM V$TEMPFILE;
SQL>ALTER DATABASE TEMPFILE ‘d:oracleoradatastdbytemp01.dbf’ DROP;
SQL>SELECT TABLESPACE_NAME FROM DBA_TABLESPACES WHERE CONTENTS =’TEMPORARY’;
SQL>ALTER TABLESPACE TEMP ADD TEMPFILE ‘d:oracleoradatastdbytemp01.dbf’ SIZE 40M REUSE;
39.SQL> ALTER DATABASE REGISTER LOGICAL LOGFILE
‘d:oracleoradatastdbyarchivexxxxx.dbf’;
40.SQL> ALTER DATABASE START LOGICAL STANDBY APPLY INITIAL;
41.SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;
EN EL PRIMARIO
==============
42.SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2=’SERVICE=STDBY’ SCOPE=BOTH;
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=BOTH;
43.SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
-
-
AutorEntradas
- Debes estar registrado para responder a este debate.