您好,登錄后才能下訂單哦!
寫在前面:聯系環境,之前操作換存儲備份的時候,所有的文件已經遷移到新的磁盤,并且原目錄的文件已經刪除,今天再次啟動數據庫,報錯
SQL> startup
ORACLE instance started.
Total System Global Area 413372416 bytes
Fixed Size 2253784 bytes
Variable Size 327158824 bytes
Database Buffers 79691776 bytes
Redo Buffers 4268032 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/ooradata/test1/system01.dbf'
這是啥問題呢,啟動老是去原位置去找,查看數據文件在哪
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/ooradata/test1/system01.dbf
/ooradata/test1/sysaux01.dbf
/ooradata/test1/undotbs01.dbf
/ooradata/test1/users01.dbf
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/ooradata/test1/control01.ctl
/u01/app/oracle/fast_recovery_area/test1/control02.ctl
數據文件在原位置,控制文件也在原位置,肯定是參數文件的問題,
先生成一個pfile看看控制文件位置。
SQL> create pfile='/home/oracle/cs/qq.txt' from spfile;
create pfile='/home/oracle/cs/qq.txt' from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file '?/dbs/spfile@.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
這說明現在數據庫啟動不是以新的spfile起的,指定一下spfile
SQL> create pfile='/home/oracle/cs/qq.txt' from spfile='/u01/app/oracle/product/11.2/db_1/dbs/spfiletest1.ora';
File created.
查看qq.txt
vi qq.txt
控制文件已經是新的目錄了。于是啟動的時候只要制定新的pfile
SQL> shutdown immediate
SQL> create spfile from pfile='/home/oracle/cs/qq.txt';
File created.
SQL> startup
ORACLE instance started.
Total System Global Area 413372416 bytes
Fixed Size 2253784 bytes
Variable Size 327158824 bytes
Database Buffers 79691776 bytes
Redo Buffers 4268032 bytes
Database mounted.
Database opened.
解決
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。