oracle导库需要删除原始库,导入dmp文件时,需要删除原有ORACLE数据库实例
導(dǎo)入dmp文件時(shí),對(duì)于已存在的數(shù)據(jù)庫(kù)實(shí)例及表處理方式:刪除實(shí)例。
1.以管理員身份登錄
sqlplus / as sysdba
2.停止實(shí)例
shutdown abort;
執(zhí)行結(jié)果:ORACLE instance shut down.
3.啟動(dòng)實(shí)例
獨(dú)占啟動(dòng)的選項(xiàng)是exclusive,表示只允許一個(gè)例程使用該數(shù)據(jù)庫(kù);
共享啟動(dòng)的參數(shù)是shared,表示允許多個(gè)例程并行使用該數(shù)據(jù)庫(kù),即將數(shù)據(jù)庫(kù)裝入多個(gè)現(xiàn)場(chǎng)。
startup mount exclusive;
執(zhí)行結(jié)果:
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; 執(zhí)行結(jié)果:
System altered.
5.刪除實(shí)例
drop database;
執(zhí)行結(jié)果:
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服務(wù)命令,oracle安裝和配置都沒有問題的話:
#su - oracle $sqlplus / as sysdba >startup >exit $lsnrctl start $ps -ef|grep oracle
總結(jié)
以上是生活随笔為你收集整理的oracle导库需要删除原始库,导入dmp文件时,需要删除原有ORACLE数据库实例的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DNF搬砖工作室电脑配置?
- 下一篇: SparkSQL 内置函数的使用(JAV