2011-08-04 157 views
2

我想創建使用Oracle 11g R2在Windows 2008 Server數據庫,當我運行的腳本來創建數據庫實例,我會收到以下錯誤消息數據庫無法打開

ERROR at line 1: ORA-01109: database not open

grant select on ALL_MVIEW_DETAIL_PARTITION to public with grant option *

ERROR at line 1: ORA-01109: database not open

身份登錄administrator.`

感謝, usermma

回答

0

你是如何創建腳本的?它有什麼作用?有沒有理由不使用數據庫配置助手來做到這一點?這可能是根本不具有經由oradim.

4

登錄創建到Oracle實例的服務與根

su - oracle 
sqlplus/as sysdba 
create user username identified by password; 
Exception : ORA-01109 Database not open 

要解決此我TRIE下面的步驟,併成功創建了模式的問題。

  1. 請覈實ORA_HOMEPATH/DBS/sgadef.dbf
  2. 製作保證關閉Oracle服務器,如果您輸入以下命令

    ps -ef | grep ora_ | grep DBName(sid) 
    
  3. 找到機上運行的任何服務後如果您發現任何使用kill命令,則終止進程

    kill -9 PID 
    
  4. 請檢查下面的文件存在於上述路徑中;如果不是請創建。

    ORACLE_HOMEPATH/dbs/lk<sid> 
    
  5. start mount;如果服務器開始使用接近即時

    SQL> alter database close; 
    
    Database altered. 
    
    SQL> shutdown immediate 
    ORA-01109: database not open 
    
    Database dismounted. 
    ORACLE instance shut down 
    
    SQL> startup mount 
    ORACLE instance started. 
    
    Total System Global Area 126951228 bytes 
    Fixed Size     454460 bytes 
    Variable Size    109051904 bytes 
    Database Buffers   16777216 bytes 
    Redo Buffers     667648 bytes 
    Database mounted. 
    
    SQL> select open_mode from v$database; 
    
    OPEN_MODE 
    ---------- 
    MOUNTED 
    
    SQL> alter database open; 
    
    Database altered. 
    
  6. 現在你可以創建自己的模式作爲數據庫打開

    SQL> create user schemaname identified by password; 
    
    SQL> grant resource,connect to schema name; 
    
    grant permission succeded. 
    

我已經做了以上步驟在數據庫未打開時創建模式。

2

執行以下命令按順序....

> sqlplus 

用戶名/密碼= SYS/*******

SQL> shutdown immediate; 
SQL> startup mount; 
SQL> recover database; 
SQL> alter database open;