学习笔记五(maintaining the control file)

本文主要围绕Oracle Control File展开,介绍了其是定义物理数据库当前状态的二进制文件,阐述了其丢失需恢复、在挂载阶段读取等特性,还说明了其内容、多路复用步骤、使用OMF管理的条件、获取信息的方法以及备份方式等信息技术相关内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

身体有点不舒服,可是还是很想听听课...

maintaining the control file

[@more@]

--6maintaining the control file
control file
the control file is a binary file(二进制文件)that defines the

current state of the physical database
1.loss of the control file requires recovery
2.is read at mount stage
3.is required to operate(在任何情况下control file是可用的)
4.is linked to a single database
5.should be multiplexed
6.maintains integrity of database (维护的是database 的完整性)
7.sized initially by create database
/
control file contents
1.databse name and indentified(database 名称and 标示)
2.time stamp of database creation
3.tablespace names
4.names and locations of data files and redo log files
5.current redolog file sequence number
6.checkpoint information
7.begin and end of undo segments
8.redo log archive information
9.backup information
详细解释
1.sql>set wrap off
sql〉set linesize 200
sql>select * from v$database;
可以看见db name, create time ,db id,resetlogs等等这些信息记录在

control file 里面
2.sql>select * from v$tablespace;
3.sql>select * from v$logfile;(日志文件信息)
5.sql>select * from v$log;(当前日志的顺序号current的号码)
9.sql>select * from v$backup
sql>alter tablespace users bengin backup;
然后sql>select * from v$bakcup ;(那些档案进行了backup)
8.sql>select * from v$archived_log;(当前系统里有哪些已经归档的日

志)
sql>alter tablespace users end bakcup;
/
multiplexing the control file using spfile(做多功的步骤)
sql>select * from v$controlfile;
1.sql>alter system set control_files=

('d:oraclecontrol01.ctl','d:oraclecontrol02.ctl','d:oraclec

ontrol03.ctl','d:oraclecontrol04.ctl') scope=spfile;
2.sql>shutdown immediate
3.copy existing  control file to a new name and location and

rename to control04.ctl
4.startup
sql>select * from v$controlfile;可见新增完成了
/
multiplexing the control file using init.ora
1.sql〉shutdown immediate
2.copy existing  control file to a new name and location and

rename to control04.ctl
3.add the new control file name and to init.ora
4.startup pfile=pathinit.ora
/
managing control files with OMF(条件)
1.Control files are OMF created if the CONTROL_FILES parameter is

not specified(没有指定control_files参数)
2.OMF control files are located at DB_CREATE_ONLINE_LOG_DEST_N(

指定了相关路径DB_CREATE_ONLINE_LOG_DEST_N下)
3.Control file names are uniquely generated and displayed in the

alterSID.log file when the files are created.
这个过程只在生成Oracle Control file的时候有效
control file 的建立一个是在create database 的时候自动建立一个是在

database 启动在nomount 状态然后用create controlfile的脚本建立后一

种方法少用
/
obtaining control file information
1.sql>select * from v$controlfile;
2.sql>select * from v$parameter where name like 'control%';
3.sql>show parameter control;
4.sql>select * from v$controlfile_record_section;(纪录控制文件可

以改变的信息)
/
control file's backup
1.关掉database copy一份
2.sql>alter database backup controlfile to trace;
or sql>alter database backup controlfile to 'c:control.bak' 备份

成一个二进制文件

待续

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/202861/viewspace-796334/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/202861/viewspace-796334/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值