controlfile 维护

=======
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.





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值