- 最后登录
- 2017-5-4
- 在线时间
- 81 小时
- 威望
- 999
- 金钱
- 2391
- 注册时间
- 2013-9-11
- 阅读权限
- 150
- 帖子
- 1124
- 精华
- 5
- 积分
- 999
- UID
- 1220
|
2#
发表于 2017-4-13 20:34:41
[oracle@tbserver ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on 星期六 9月 13 15:49:11 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> conn /as sysdba;
已连接到空闲例程。
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 8351150080 bytes
Fixed Size 2243120 bytes
Variable Size 5083497936 bytes
Database Buffers 3254779904 bytes
Redo Buffers 10629120 bytes
数据库装载完毕。
ORA-01147: SYSTEM 表空间文件 7 处于脱机状态
ORA-01110: 数据文件 7: '/kjydb01/oradata/system02.dbf'
SQL> select file_name from dba_data_files;
select file_name from dba_data_files
*
第 1 行出现错误:
ORA-01219: 数据库未打开: 仅允许在固定表/视图中查询
SQL> alter database datafile 7 online;
alter database datafile 7 online
*
第 1 行出现错误:
ORA-01157: 无法标识/锁定数据文件 7 - 请参阅 DBWR 跟踪文件
ORA-01110: 数据文件 7: '/kjydb01/oradata/system02.dbf'
SQL> recover database;
ORA-00283: 恢复会话因错误而取消
ORA-00264: 不要求恢复
转移数据文件至新目录后变更路径都报错,如下
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 8351150080 bytes
Fixed Size 2243120 bytes
Variable Size 5083497936 bytes
Database Buffers 3254779904 bytes
Redo Buffers 10629120 bytes
数据库装载完毕。
SQL> alter database rname file '/kjydb01/oradata/svc_data01.dbf' to '/databak1/kjydb01/oradata/svc_data01.dbf';
alter database rname file '/kjydb01/oradata/svc_data01.dbf' to '/databak1/kjydb01/oradata/svc_data01.dbf'
*
第 1 行出现错误:
ORA-02231: ALTER DATABASE 选项缺失或无效
SQL> alter database rname file '/kjydb01/oradata/svc_index01.dbf' to '/databak1/kjydb01/oradata/svc_index01.dbf';
alter database rname file '/kjydb01/oradata/svc_index01.dbf' to '/databak1/kjydb01/oradata/svc_index01.dbf'
*
第 1 行出现错误:
ORA-02231: ALTER DATABASE 选项缺失或无效
SQL> alter database rname file '/kjydb01/oradata/system02.dbf' to '/databak1/kjydb01/oradata/system02.dbf';
alter database rname file '/kjydb01/oradata/system02.dbf' to '/databak1/kjydb01/oradata/system02.dbf'
*
第 1 行出现错误:
ORA-02231: ALTER DATABASE 选项缺失或无效
SQL> alter database rname file '/kjydb01/oradata/svc_data02.dbf' to '/databak1/kjydb01/oradata/svc_data02.dbf';
alter database rname file '/kjydb01/oradata/svc_data02.dbf' to '/databak1/kjydb01/oradata/svc_data02.dbf'
*
第 1 行出现错误:
ORA-02231: ALTER DATABASE 选项缺失或无效
现在数据库能正常打开查询了
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/u01/app/11.2.0/oradata/kjydb/system01.dbf
/u01/app/11.2.0/oradata/kjydb/sysaux01.dbf
/u01/app/11.2.0/oradata/kjydb/undotbs01.dbf
/u01/app/11.2.0/oradata/kjydb/users01.dbf
/databak1/kjydb01/oradata/svc_data01.dbf
/databak1/kjydb01/oradata/svc_index01.dbf
/databak1/kjydb01/oradata/system02.dbf
/databak1/kjydb01/oradata/svc_data02.dbf
已选择8行。
SQL> select file_name from dba_temp_files;
FILE_NAME
--------------------------------------------------------------------------------
/u01/app/11.2.0/oradata/kjydb/temp01.dbf
/kjydb01/oradata/svc_temp01.dbf
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/11.2.0/oradata/kjydb/redo01.log
/u01/app/11.2.0/oradata/kjydb/redo02.log
/u01/app/11.2.0/oradata/kjydb/redo03.log
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/11.2.0/oradata/kjydb/control01.ctl
/u01/app/11.2.0/fast_recovery_area/kjydb/control02.ctl
|
|