上次在數據庫服務沒有啟動的情況下把Oracle數據文件給刪除了,那是我在E盤下面建的一個表空間下的多個數據庫文件SALES_DATA01,再次啟動服務后,用sqlplus / as sysdba登錄不上,試了很多辦法,才找到一個能登錄的辦法,就是用sqlplus sys/tanm as sysdba或者sqlplus/nolog conn sys/tanm as sysdba,但是又出現了新的問題,我想把scott用戶的權限更改使其能有DBA權限登錄,alter user scott account unlock進行解鎖,提示database not open數據庫不能打開,用select file_name from dba_data_files進行查詢,出現錯誤ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
查了一下資料:(使用了如下段方法)
SQL> select * from all_users;
select * from all_users
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed
tables/views only
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL>
To open the database for normal access, we can alter the database again.
SQL> alter database open;
Database altered.
The shutdown proccess is the simply opposite of the startup.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
運行 SQL> alter database open;
ERROR at line 1:
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: 'E:\SALES_DATA01.DBF'
依次使用
alter database datafiel 'E:\SALES_DATA01.DBF' offline drop;
alter database datafiel 'E:\SALES_DATA02.DBF' offline drop;
等方法把數據文件全部脫機刪除,再運行SQL>alter database open;就可以了
posted on 2007-12-15 19:26
譚明 閱讀(521)
評論(0) 編輯 收藏 所屬分類:
Oracle