备份控制文件
[oracle@cat1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Mon May 2 22:20:21 2005
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> alter database backup controlfile to trace;
Database altered.
SQL> select tracefile from v$process where addr in (
2 select paddr from v$session where sid = (select sid from v$mystat where rownum = 1));
TRACEFILE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/whs1/whs11/trace/whs11_ora_47143.trc
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
查看备份内容
[oracle@cat1 trace]$ more /u01/app/oracle/diag/rdbms/whs1/whs11/trace/whs11_ora_47143.trc
Trace file /u01/app/oracle/diag/rdbms/whs1/whs11/trace/whs11_ora_47143.trc
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Build label: RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417
ORACLE_HOME: /u01/app/oracle/product/19.3.0/db_1
System name: Linux
Node name: cat1
Release: 3.10.0-957.el7.x86_64
Version: #1 SMP Thu Oct 4 20:48:51 UTC 2018
Machine: x86_64
Instance name: whs11
Redo thread mounted by this instance: 1
Oracle process number: 71
Unix process pid: 47143, image: oracle@cat1 (TNS V1-V3)
*** 2005-05-02T22:49:15.238056+08:00 (CDB$ROOT(1))
*** SESSION ID:(411.21562) 2005-05-02T22:49:15.238086+08:00
*** CLIENT ID:() 2005-05-02T22:49:15.238090+08:00
*** SERVICE NAME:(SYS$USERS) 2005-05-02T22:49:15.238094+08:00
*** MODULE NAME:(sqlplus@cat1 (TNS V1-V3)) 2005-05-02T22:49:15.238097+08:00
*** ACTION NAME:() 2005-05-02T22:49:15.238100+08:00
*** CLIENT DRIVER:(SQL*PLUS) 2005-05-02T22:49:15.238102+08:00
*** CONTAINER ID:(1) 2005-05-02T22:49:15.238105+08:00
-- The following are current System-scope REDO Log Archival related
-- parameters and can be included in the database initialization file.
--
-- LOG_ARCHIVE_DEST=''
-- LOG_ARCHIVE_DUPLEX_DEST=''
--
-- LOG_ARCHIVE_FORMAT=%t_%s_%r.dbf
--
-- DB_UNIQUE_NAME="whs1"
--
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
-- LOG_ARCHIVE_MAX_PROCESSES=4
-- STANDBY_FILE_MANAGEMENT=MANUAL
-- FAL_CLIENT=''
-- FAL_SERVER=''
--
-- LOG_ARCHIVE_DEST_1='LOCATION=+DATA1'
-- LOG_ARCHIVE_DEST_1='MANDATORY NOREOPEN NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH AFFIRM NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='NOREGISTER'
-- LOG_ARCHIVE_DEST_1='NOALTERNATE'
-- LOG_ARCHIVE_DEST_1='NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'
-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'
-- LOG_ARCHIVE_DEST_STATE_1=ENABLE
--
-- Below are two sets of SQL statements, each of which creates a new
-- control file and uses it to open the database. The first set opens
-- the database with the NORESETLOGS option and should be used only if
-- the current versions of all online logs are available. The second
-- set opens the database with the RESETLOGS option and should be used
-- if online logs are unavailable.
-- The appropriate set of statements can be copied from the trace into
-- a script file, edited as necessary, and executed when there is a
-- need to re-create the control file.
--
-- Set #1. NORESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "WHS1" NORESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '+DATA1/WHS1/ONLINELOG/group_1.262.1057318081' SIZE 200M BLOCKSIZE 512,
GROUP 2 '+DATA1/WHS1/ONLINELOG/group_2.263.1057318081' SIZE 200M BLOCKSIZE 512,
GROUP 3 '+DATA1/WHS1/ONLINELOG/group_3.270.1057318741' SIZE 200M BLOCKSIZE 512,
GROUP 4 '+DATA1/WHS1/ONLINELOG/group_4.271.1057318743' SIZE 200M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'+DATA1/WHS1/DATAFILE/system.257.1057317971',
'+DATA1/WHS1/DATAFILE/sysaux.258.1057318005',
'+DATA1/WHS1/DATAFILE/undotbs1.259.1057318021',
'+DATA1/WHS1/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.265.1057318247',
'+DATA1/WHS1/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.266.1057318247',
'+DATA1/WHS1/DATAFILE/users.260.1057318021',
'+DATA1/WHS1/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotb
............................