oracle基本的操作命令,oracle命令基本操作
--創(chuàng)建表空間
create tablespace TBS_OTHERS datafile 'G:\APP\ORCL\ORADATA\ORCL\TBS_OTHERS01.dbf' size 1000m;
-- 創(chuàng)建用戶
create user C##JHGL identified by jhgl default tablespace TBS_OTHERS
create user C##YJYJHGL identified by jhgl default tablespace TBS_OTHERS
create user C##WCJHGL identified by jhgl default tablespace TBS_OTHERS
grant dba,resource,connect to C##JHGL,C##YJYJHGL,C##WCJHGL
grant dba,connect to C##WCJHGL
-- Drop tablespace TBS_OTHERS;
drop user C##JHGL cascade;
drop user C##YJYJHGL cascade;
drop user C##WCJHG cascade;
--刪除session
--查詢session對(duì)應(yīng)的sid,serial#
select saddr,sid,serial#,paddr,username,status from v$session where username is not null;
--kill session
alter system kill session 'sid,serial#' ;
導(dǎo)出命令 后創(chuàng)建
創(chuàng)建邏輯目錄,該命令不會(huì)在操作系統(tǒng)創(chuàng)建真正的目錄,最好以system等管理員創(chuàng)建。
create directory dpdata1 as 'd:\test\dump';
按用戶導(dǎo)
expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp DIRECTORY=dpdata1;
還原數(shù)據(jù)
1)導(dǎo)到指定用戶下
impdp scott/tiger DIRECTORY=dpdata1 DUMPFILE=expdp.dmp SCHEMAS=scott;
impdp user/password directory=dpdir dumpfile=logontab.dmp table_exists_action=replace
logfile=implogontab.log
able_exists_action選項(xiàng):{skip 是如果已存在表,則跳過并處理下一個(gè)對(duì)象;append是為表增加數(shù)據(jù);truncate是截?cái)啾?#xff0c;然后為其增加新數(shù)據(jù);replace是刪除已存在表,重新建表并追加數(shù)據(jù)}
總結(jié)
以上是編程之家為你收集整理的oracle命令基本操作全部?jī)?nèi)容,希望文章能夠幫你解決oracle命令基本操作所遇到的程序開發(fā)問題。
如果覺得編程之家網(wǎng)站內(nèi)容還不錯(cuò),歡迎將編程之家網(wǎng)站推薦給程序員好友。
本圖文內(nèi)容來源于網(wǎng)友網(wǎng)絡(luò)收集整理提供,作為學(xué)習(xí)參考使用,版權(quán)屬于原作者。
總結(jié)
以上是生活随笔為你收集整理的oracle基本的操作命令,oracle命令基本操作的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转载] 纯函数和函数柯里化
- 下一篇: [转载] public static v