Oracle Database 控制文件管理
发布时间:2020-12-12 13:33:09 所属栏目:百科 来源:网络整理
导读:移动控制文件 SQL?set?line?200SQL?col?name?for?a60SQL?select?status,name?from?v$controlfile;STATUS????????????????NAME---------------------?------------------------------------------------------------??????????????????????/u01/app/oracle/or
移动控制文件
SQL>?set?line?200 SQL>?col?name?for?a60 SQL>?select?status,name?from?v$controlfile; STATUS????????????????NAME ---------------------?------------------------------------------------------------ ??????????????????????/u01/app/oracle/oradata/king/control01.ctl ??????????????????????/u01/app/oracle/flash_recovery_area/king/control02.ctl SQL>?alter?system?set?control_files= '/u01/app/oracle/oradata/king/control01.ctl','/u02/app/oracle/oradata/king/control02.ctl'?scope=spfile; SQL>?shutdown?immediate???????????????????????????????? Database?closed. Database?dismounted. ORACLE?instance?shut?down. SQL>?quit [[email?protected]?~]$?cp?/u01/app/oracle/oradata/king/control01.ctl?/u02/app/oracle/oradata/king/control02.ctl [[email?protected]?~]$?sqlplus?/?as?sysdba SQL>?startup ORACLE?instance?started. Total?System?Global?Area?1068937216?bytes Fixed?Size??????????????????2220200?bytes Variable?Size?????????????289410904?bytes Database?Buffers??????????771751936?bytes Redo?Buffers????????????????5554176?bytes Database?mounted. Database?opened. SQL>?set?line?200 SQL>?col?name?for?a60 SQL>?select?status,name?from?v$controlfile; STATUS????????????????NAME ---------------------?------------------------------------------------------------ ??????????????????????/u01/app/oracle/oradata/king/control01.ctl ??????????????????????/u02/app/oracle/oradata/king/control02.ctl SQL>?host?rm?-rf?/u01/app/oracle/flash_recovery_area/king/control02.ctl 重建控制文件 SQL>?show?parameter?user_dump_dest NAME?????????????????????????????????TYPE??????????????????????????????VALUE ------------------------------------?---------------------------------?------------------------------ user_dump_dest???????????????????????string????????????????????????????/u01/app/oracle/diag/rdbms/kin ???????????????????????????????????????????????????????????????????????g/king/trace ??????????????????????????????????????????????????????????????????????? SQL>?alter?session?set?tracefile_identifier='trace_control'; SQL>?alter?database?backup?controlfile?to?trace; SQL>?shutdown?immediate Database?closed. Database?dismounted. ORACLE?instance?shut?down. SQL>?host?rm?-rf?/u01/app/oracle/oradata/king/control01.ctl SQL>?host?rm?-rf?/u01/app/oracle/oradata/king/control02.ctl SQL>?startup?nomount ORACLE?instance?started. Total?System?Global?Area?1068937216?bytes Fixed?Size??????????????????2220200?bytes Variable?Size?????????????289410904?bytes Database?Buffers??????????771751936?bytes Redo?Buffers????????????????5554176?bytes SQL>?CREATE?CONTROLFILE?REUSE?DATABASE?"KING"?NORESETLOGS??ARCHIVELOG ????????MAXLOGFILES?16 ????????MAXLOGMEMBERS?3 ????????MAXDATAFILES?100 ????????MAXINSTANCES?8 ????????MAXLOGHISTORY?292 ????LOGFILE ??????GROUP?1?'/u01/app/oracle/oradata/king/redo01.log'??SIZE?50M?BLOCKSIZE?512,??????GROUP?2?'/u01/app/oracle/oradata/king/redo02.log'??SIZE?50M?BLOCKSIZE?512,??????GROUP?3?'/u01/app/oracle/oradata/king/redo03.log'??SIZE?50M?BLOCKSIZE?512 ????--?STANDBY?LOGFILE ????DATAFILE ???????'/u01/app/oracle/oradata/king/system01.dbf',???????'/u01/app/oracle/oradata/king/sysaux01.dbf',???????'/u01/app/oracle/oradata/king/users01.dbf',???????'/u01/app/oracle/oradata/king/tpcc01.dbf',???????'/u01/app/oracle/oradata/king/tpcc02.dbf',???????'/u01/app/oracle/oradata/king/undotbs02.dbf' ?????CHARACTER?SET?AL32UTF8; ????? SQL>?shutdown?immediate ORA-01109:?database?not?open Database?dismounted. ORACLE?instance?shut?down. SQL>?startup ORACLE?instance?started. Total?System?Global?Area?1068937216?bytes Fixed?Size??????????????????2220200?bytes Variable?Size?????????????289410904?bytes Database?Buffers??????????771751936?bytes Redo?Buffers????????????????5554176?bytes Database?mounted. Database?opened. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |