隨筆-28  評論-15  文章-81  trackbacks-0
                 上次在數據庫服務沒有啟動的情況下把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 譚明 閱讀(522) 評論(0)  編輯  收藏 所屬分類: Oracle
          主站蜘蛛池模板: 彭州市| 蕉岭县| 电白县| SHOW| 巩留县| 清徐县| 紫金县| 毕节市| 江津市| 景泰县| 汪清县| 桂林市| 章丘市| 涿州市| 天水市| 新邵县| 西青区| 芜湖市| 龙胜| 厦门市| 南投县| 潍坊市| 大新县| 安平县| 松溪县| 衡山县| 盘锦市| 尉氏县| 晋宁县| 禄丰县| 绿春县| 鹤庆县| 达州市| 蒙自县| 田阳县| 开化县| 新野县| 山西省| 共和县| 永川市| 五大连池市|