ITPub博客

首页 > IT职业 > IT生活 > 学习笔记五(maintaining the control file)

学习笔记五(maintaining the control file)

原创 IT生活 作者:playwawa 时间:2005-04-18 21:58:35 0 删除 编辑

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

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    105
  • 访问量
    1173053