controlfile-备份&恢复-005
1.备份数据库
SQL>alter database backup controlfle to trace;
备份文件默认存放路径:
E:\oracle\product\10.1.0\admin\orcl\udump
2.E:\oracle\product\10.1.0\oradata\orcl
删除controlfie文件
开启数据库时出错信息:
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
ORA-00205: error in identifying controlfile, check alert log for more info
3.运行备份文件中的运行脚本,从新创建CONTROLO1.CTL文件:
--可以把脚本保存为control.sql
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 454
LOGFILE
GROUP 1 'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO01.LOG' SIZE 10M,
GROUP 2 'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO02.LOG' SIZE 10M,
GROUP 3 'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO03.LOG' SIZE 10M
-- STANDBY LOGFILE
DATAFILE
'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF',
'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF',
'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF',
'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF',
'E:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\EXAMPLE01.DBF'
CHARACTER SET ZHS16GBK
;
4.恢复步骤:
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
ORA-00205: error in identifying controlfile, check alert log for more info
--使用脚本control.sql,从新创建CONTROLO1.CTL文件:
SQL> @f:\control.sql;
Control file created.
SQL> alter database open;
Database altered.
--查看数据库可以运行
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 164M
sga_targe
相关新闻>>
- 发表评论
-
- 最新评论 更多>>