=======
control file
=======
bash-2.05b$ sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Apr 17 21:16:03 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the OLAP option
JServer Release 9.2.0.4.0 - Production
SQL> select * from v$controlfile;
STATUS
-------
NAME
--------------------------------------------------------------------------------
/tmp/controlfile.ctl
/oracle/oradata/group/controlfile02.ctl
SQL> !df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 262144 221292 16% 1613 2% /
/dev/hd2 3145728 1505696 53% 29694 4% /usr
/dev/hd9var 262144 197508 25% 573 1% /var
/dev/hd3 524288 289568 45% 220 1% /tmp
/dev/hd1 262144 239248 9% 101 1% /home
/proc - - - - - /proc
/dev/hd10opt 12320768 3344708 73% 28876 1% /opt
/dev/oracleinstall 16777216 9158312 46% 18219 1% /oracle
/dev/archivelog 31457280 17602220 45% 137 1% /archivelog
SQL> alter system set control_files='/tmp/controlfile.ctl','/oracle/oradata/group/controlfile02.ctl','/archivelog/controlfile03.ctl' scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !cp /oracle/oradata/group/controlfile02.ctl /archivelog/controlfile03.ctl
SQL> startup
ORACLE instance started.
Total System Global Area 1779928496 bytes
Fixed Size 744880 bytes
Variable Size 1107296256 bytes
Database Buffers 671088640 bytes
Redo Buffers 798720 bytes
Database mounted.
Database opened.
SQL> select * from v$controlfile
2 ;
STATUS
-------
NAME
--------------------------------------------------------------------------------
/tmp/controlfile.ctl
/oracle/oradata/group/controlfile02.ctl
/archivelog/controlfile03.ctl
SQL>
SQL> alter database backup controlfile to '/tmp/temp_controlfile_0417.ctl'; <<< 二进制备份
Database altered.
SQL> alter database backup controlfile to trace as '/tmp/temp_controlfile_0417.sql'; <<< 备份成create controlfile脚本
Database altered.
controlfile 维护
最新推荐文章于 2021-04-14 17:02:04 发布