用
Oracle Database Configuration Assistant
創(chuàng)建好數(shù)據(jù)庫(kù)
A(
在開如菜單里
)
在
DOS
環(huán)境下
,
打入
Sqlplus/nolog
Connect system/system as sysdba
Create user smile identified by smile;//
Grant dba to smile with admin option;
導(dǎo)入數(shù)據(jù)進(jìn)入
A,imp smile/smile@A file=c:\bb.bmp
?imp system/manager@TEST? file=d:\daochu.dmp ?
full=y
?
數(shù)據(jù)
導(dǎo)
出:
?1
將數(shù)據(jù)
庫(kù)
TEST
完全
導(dǎo)
出
,
用
戶
名
system
密
碼
manager
導(dǎo)
出到
D:\daochu.dmp
中 ?? exp system/manager@TEST file=d:\daochu.dmp full=y ?2 將數(shù)據(jù)
庫(kù)
中
system
用
戶
與
sys
用
戶
的表
導(dǎo)
出
?? exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys) ?3
將數(shù)據(jù)
庫(kù)
中的表
table1
、table2
導(dǎo)
出
?? exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)? ?4
將數(shù)據(jù)
庫(kù)
中的表
table1
中的字段filed1以00打
頭
的數(shù)據(jù)
導(dǎo)
出
?? exp system/manager@TEST file=d:\daochu.dmp tables=(table1)?query=\ where filed1 like 00%\ ? ????
上面是常用的
導(dǎo)
出,
對(duì)
于
壓縮
我不太在意,用
winzip
把dmp文件可以很好的
壓縮
。
????????????????????
不
過
在上面命令后面
加上 compress=y? 就可以了 數(shù)據(jù)的
導(dǎo)
入
?1
將D:\daochu.dmp 中的數(shù)據(jù)
導(dǎo)
入
TEST
數(shù)據(jù)
庫(kù)
中。
?? imp system/manager@TEST? file=d:\daochu.dmp ??
上面可能有點(diǎn)
問題
,因
為
有的表已
經(jīng)
存在,然后它就
報(bào)錯(cuò)
,
對(duì)該
表就不
進(jìn)
行
導(dǎo)
入。
??
在后面加上 ignore=y 就可以了。 ?2 將d:\daochu.dmp中的表table1
導(dǎo)
入
?imp system/manager@TEST? file=d:\daochu.dmp? tables=(table1)? ? ?基本上上面的
導(dǎo)
入
導(dǎo)
出
夠
用了。
不少情況我是將表
徹
底
刪
除,然后
導(dǎo)
入。
?
注意:
?
你要有足
夠
的
權(quán)
限,
權(quán)
限不
夠
它會(huì)提示你。
?
數(shù)據(jù)
庫(kù)時(shí)
可以
連
上的。可以用
tnsping TEST
來
獲
得數(shù)據(jù)
庫(kù)
TEST
能否
連
上。