導入dmp文件時,需要刪除原有ORACLE數據庫實例


導入dmp文件時,對於已存在的數據庫實例及表處理方式:刪除實例。

1.以管理員身份登錄

    sqlplus / as sysdba

2.停止實例

   shutdown abort;

執行結果:ORACLE instance shut down.

3.啟動實例

獨占啟動的選項是exclusive,表示只允許一個例程使用該數據庫;

共享啟動的參數是shared,表示允許多個例程並行使用該數據庫,即將數據庫裝入多個現場。

startup mount exclusive;

執行結果:

ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2215064 bytes
Variable Size             335545192 bytes
Database Buffers          188743680 bytes
Redo Buffers                7958528 bytes
Database mounted.

4.讓oracle 處於RESTRICTED模式,即受限模式

 

 alter system enable restricted session;

如果需要取消
alter system disable restricted session;

需要注意的是RESTRICTED模式以后 除了管理員都不能登錄,如果需要非管理員登錄,必須
GRANT restricted session to test;

執行結果:

 

System altered.

5.刪除實例

 drop database;

執行結果:

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

注:

linux 開啟oracle服務命令,oracle安裝和配置都沒有問題的話:

#su - oracle
$sqlplus / as sysdba
>startup
>exit
$lsnrctl start
$ps -ef|grep oracle


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM