Sei sulla pagina 1di 7

EJEMPLOS DE LOG DE ORACLE

RECONOCIMIENTO DE LOS ELEMENTOS

Reconocimiento de Datafiles:
oracle@MyjpServer ~]$ export ORACLE_SID=SOURCE [oracle@MyjpServer ~]$ [oracle@MyjpServer ~]$ sqlplus / as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jul 28 18:34:39 2012 Copyright (c) 1982, 2008, Oracle. All rights reserved.

Connected to: Oracle Database 11g Release 11.1.0.7.0 - 64bit Production With the Real Application Clusters option SQL> select file_name from dba_data_files; FILE_NAME ------------------------------------------------------------------------------/home/oracle/SOURCE/users01.dbf /home/oracle/SOURCE/undotbs01.dbf /home/oracle/SOURCE/sysaux01.dbf /home/oracle/SOURCE/system01.dbf

Reconocimiento de Tempfiles:
SQL> select file_name from dba_temp_files; FILE_NAME ------------------------------------------------------------------------------/home/oracle/SOURCE/temp01.dbf

Reconocimiento de Controlfiles:
SQL> show parameters control_files NAME TYPE VALUE ------------------------------------ ----------- ----------------------------control_files string /home/oracle/SOURCE/control01.

ctl, /home/oracle/SOURCE/contr ol02.ctl, /home/oracle/SOURCE/ control03.ctl SQL> SQL> select NAME from v$controlfile; NAME --------------------------------/home/oracle/SOURCE/control01.ctl /home/oracle/SOURCE/control02.ctl /home/oracle/SOURCE/control03.ctl SQL>

Reconocimiento de Redo Log files:


SQL> select GROUP#, MEMBER from v$logfile; GROUP# ---------3 2 1 MEMBER --------------------------------/home/oracle/SOURCE/redo03.log /home/oracle/SOURCE/redo02.log /home/oracle/SOURCE/redo01.log

----------------------------------------------------------------------------------------------------------------------------------RMAN> backup as copy database format '+DATA'; Starting backup at 06-08-2012 00:05:43 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile file number=00001 name=/home/oracle/SOURCE/system01.dbf output file name=+DATA/source/datafile/system.270.790560345 tag=TAG20120806T000543 RECID=7 STAMP=790560348 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 channel ORA_DISK_1: starting datafile copy input datafile file number=00002 name=/home/oracle/SOURCE/sysaux01.dbf output file name=+DATA/source/datafile/sysaux.277.790560351 tag=TAG20120806T000543 RECID=8 STAMP=790560353 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03 channel ORA_DISK_1: starting datafile copy input datafile file number=00003 name=/home/oracle/SOURCE/undotbs01.dbf output file name=+DATA/source/datafile/undotbs1.278.790560355 tag=TAG20120806T000543 RECID=9 STAMP=790560354 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting datafile copy copying current control file output file name=+DATA/source/controlfile/backup.279.790560355 tag=TAG20120806T000543 RECID=10 STAMP=790560355

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting datafile copy input datafile file number=00004 name=/home/oracle/SOURCE/users01.dbf output file name=+DATA/source/datafile/users.280.790560357 tag=TAG20120806T000543 RECID=11 STAMP=790560356 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 06-08-2012 00:05:57 channel ORA_DISK_1: finished piece 1 at 06-08-2012 00:05:58 piece handle=+DATA/source/backupset/2012_08_06/nnsnf0_tag20120806t000543_0.281. 790560357 tag=TAG20120806T000543 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 06-08-2012 00:05:58 RMAN>

----------------------------------------------------------------------------------------------------------------------------------RMAN> recover database; Starting recover at 06-08-2012 00:10:33 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=143 device type=DISK starting media recovery archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/ flash_recovery_area/SOURCE/archivelog/2012_08_06/o1_mf_1_2_81yqsdbo_.arc archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/ flash_recovery_area/SOURCE/archivelog/2012_08_06/o1_mf_1_3_81yqsfhn_.arc archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/ flash_recovery_area/SOURCE/archivelog/2012_08_06/o1_mf_1_4_81yqsgck_.arc archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/ flash_recovery_area/SOURCE/archivelog/2012_08_06/o1_mf_1_5_81yqshh4_.arc archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/ flash_recovery_area/SOURCE/archivelog/2012_08_06/o1_mf_1_6_81yqsjlq_.arc archived log file name=/u01/app/oracle/flash_recovery_area/SOURCE/archivelog/2012_08_06/ o1_mf_1_2_81yqsdbo_.arc thread=1 sequence=2 archived log file name=/u01/app/oracle/flash_recovery_area/SOURCE/archivelog/2012_08_06/ o1_mf_1_3_81yqsfhn_.arc thread=1 sequence=3 archived log file name=/u01/app/oracle/flash_recovery_area/SOURCE/archivelog/2012_08_06/ o1_mf_1_4_81yqsgck_.arc thread=1 sequence=4 media recovery complete, elapsed time: 00:00:01

Finished recover at 06-08-2012 00:10:34

-----------------------------------------------------------------------------------------------------------------------------------

Estado actual de la BBBD: abierta.


rman target / Recovery Manager: Release 11.1.0.7.0 - Production on Sat Jul 28 18:49:07 2012 Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: SOURCE (DBID=2908208036) RMAN> backup spfile format '/home/oracle/SOURCE/MySpfileBackup.ora'; Starting backup at 28-07-2012 18:49:11 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=147 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 28-07-2012 18:49:12 channel ORA_DISK_1: finished piece 1 at 28-07-2012 18:49:13 piece handle=/home/oracle/SOURCE/MySpfileBackup.ora tag=TAG20120728T184911 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 28-07-2012 18:49:13 RMAN> ------------------------------------------------------------------------[oracle@MyjpServer ~]$ rman target / Recovery Manager: Release 11.1.0.7.0 - Production on Sun Aug 5 23:56:07 2012 Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: SOURCE (DBID=2908920228)

RMAN> run { BACKUP AS BACKUPSET SPFILE; 2> RESTORE SPFILE TO '+DATA/SOURCE/spfilesource.ora'; 3> } Starting backup at 05-08-2012 23:57:45 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=140 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 05-08-2012 23:57:46 channel ORA_DISK_1: finished piece 1 at 05-08-2012 23:57:47 piece handle=+FRA/SOURCE/backupset/2012_08_05/o1_mf_nnsnf_TAG20120805T235746_81 yq6tkl_.bkp tag=TAG20120805T235746 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 05-08-2012 23:57:47 Starting restore at 05-08-2012 23:57:47 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: restoring SPFILE output file name=+DATA/SOURCE/spfilesource.ora channel ORA_DISK_1: reading from backup piece +FRA/SOURCE/backupset/2012_08_05/ o1_mf_nnsnf_TAG20120805T235746_81yq6tkl_.bkp channel ORA_DISK_1: piece handle=+FRA/SOURCE/backupset/2012_08_05/ o1_mf_nnsnf_TAG20120805T235746_81yq6tkl_.bkp tag=TAG20120805T235746 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:03 Finished restore at 05-08-2012 23:57:50 RMAN>

----------------------------------------------------------------------------------------------------------------------------------[oracle@MyjpServer ~]$ . oraenv ORACLE_SID = [TEST] ? +ASM The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/asm1 is /u01/app/ oracle [oracle@MyjpServer ~]$ [oracle@MyjpServer ~]$ asmcmd ASMCMD> ASMCMD> cd data ASMCMD> ASMCMD> cd source ASMCMD> ASMCMD> ls -lt Type Redund Striped Time Sys Name N ONLINELOG/ N CONTROLFILES/ Y CONTROLFILE/ N spfilesource.ora => +DATA/ DB_UNKNOWN/PARAMETERFILE/SPFILE.261.790559869 ASMCMD>

----------------------------------------------------------------------------------------------------------------------------------D:\Oracle\Product\10.2.0\db10g\database>more initlab.ora audit_trail=db audit_sys_operations=true background_dump_dest='d:\oracle\product\10.2.0\admin\lab\bdump'

compatible='10.2.0.2.0' control_files='d:\oracle\product\10.2.0\admin\lab\ctl\lab01.ctl','d:\orac le\product\10.2.0\admin\lab\ctl\lab02.ctl' core_dump_dest='d:\oracle\product\10.2.0\admin\lab\cdump' db_cache_size=200M db_block_size=16384 db_file_multiblock_read_count=16 DB_FILES=1500 db_flashback_retention_target=0 db_name='lab' java_pool_size=25M large_pool_size=200M job_queue_processes=20 log_archive_dest='D:\Oracle\Product\10.2.0\admin\lab\archives' log_archive_max_processes=2 open_cursors=300 optimizer_index_cost_adj=50 parallel_execution_message_size=65535 parallel_max_servers=64 parallel_min_servers=2 parallel_threads_per_cpu=1 pga_aggregate_target=1063256064 processes=400 query_rewrite_enabled='true' remote_login_passwordfile='EXCLUSIVE' shared_pool_size=200M undo_management='AUTO' undo_tablespace='UNDOTBS' undo_retention=300 utl_file_dir=e:\ewq user_dump_dest='d:\oracle\product\10.2.0\admin\lab\udump' query_rewrite_enabled=true recyclebin=OFF sort_area_size=524288

sort_area_retained_size=65536 -------------------------------------------------------------------------------------------------------------Dump file /opt/app/oracle/admin/demo/udump/demo_ora_515.trc Oracle7 Server Release 7.3.2.3.0 - Production Release With the distributed, replication and Spatial Data options PL/SQL Release 2.3.2.3.0 - Production ORACLE_HOME = /opt/app/oracle/product/7.3.2 System name: SunOS Node name: cartan Release: 5.5 Version: Generic Machine: sun4m Instance name: demo Redo thread mounted by this instance: 1 Oracle process number: 7 Unix process pid: 515, image: oracledemo

Fri May 15 11:41:19 1998 Fri May 15 11:41:19 1998 *** SESSION ID:(6.2035) 1998.05.15.11.41.19.000 # The following commands will create a new control file and use it # to open the database. # No data other than log history will be lost. Additional logs may # be required for media recovery of offline data files. Use this # only if the current version of all online logs are available. STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "DEMO" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 2 MAXDATAFILES 30 MAXINSTANCES 1 MAXLOGHISTORY 100 LOGFILE GROUP 1 '/export/home/oradata/demo/redodemo01.log' SIZE 2M, GROUP 2 '/export/home/oradata/demo/redodemo02.log' SIZE 2M, GROUP 3 '/export/home/oradata/demo/redodemo03.log' SIZE 2M DATAFILE '/export/home/oradata/demo/system01.dbf', '/export/home/oradata/demo/rbs01.dbf', '/export/home/oradata/demo/rbs02.dbf', '/export/home/oradata/demo/rbs03.dbf', '/export/home/oradata/demo/temp01.dbf', '/export/home/oradata/demo/tools01.dbf', '/export/home/oradata/demo/users01.dbf' ; # Recovery is required if any of the datafiles are restored backups, # or if the last shutdown was not normal or immediate. RECOVER DATABASE # Database can now be opened normally. ALTER DATABASE OPEN;

Potrebbero piacerti anche