一、數(shù)據(jù)庫導(dǎo)出
1.登錄服務(wù)器
ssh root@localhost
在內(nèi)網(wǎng)中常常有弱口令oracle /oracle
2.在ssh中執(zhí)行
exp oracle_username/oracle_password file=/tmp/oracledatabasename.dmp owner=databasename
exp:
exp mydb_ec/888888 file=/tmp/mydb.dmp owner=mydb_ec
二、數(shù)據(jù)庫導(dǎo)入
在windows時安裝是默認(rèn)創(chuàng)建想導(dǎo)入的數(shù)據(jù)庫名稱。
1.執(zhí)行sqlpuls
sqlpuls /nolog
2.以dba進(jìn)行連接
conn /as sysdba;
3.創(chuàng)建欲導(dǎo)入的表空間
create tablespace spms
datafile ='d:\app\administrator\oradata\spms.dbf'
size 50m
autoextend on;
4.創(chuàng)建用戶
create user dbms identified by 888888;
5.授予權(quán)限
grant create user,drop user,alter user ,create any view ,drop any view,exp_full_database,imp_full_database,dba,connect,resource,read,write,create session to dbms;
7.導(dǎo)入數(shù)據(jù)庫
imp? dbms/888888@dbms full=y file=d:\dbms.tmp ignore=y
linux下導(dǎo)入導(dǎo)出可以參考文章鏈接:http://blog.csdn.net/Cow_cz/article/details/70229929