隨筆-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
          主站蜘蛛池模板: 惠水县| 伊通| 万全县| 富阳市| 德昌县| 子洲县| 余姚市| 东阳市| 缙云县| 吉林市| 伊金霍洛旗| 周宁县| 托克托县| 阿图什市| 桂林市| 武川县| 奉节县| 宜兰市| 阳西县| 洛南县| 怀化市| 罗平县| 商都县| 莲花县| 攀枝花市| 龙江县| 永安市| 汝阳县| 南川市| 盐津县| 镇雄县| 嘉峪关市| 肥乡县| 汉沽区| 山西省| 八宿县| 营山县| 龙江县| 苗栗市| 正阳县| 凉城县|