將數據庫TEST完全導出,用戶名system 密碼manager 導出到D:/daochu.dmp中
exp system/manager@TEST file=d:/daochu.dmp full=y
將數據庫中system用戶與sys用戶的表導出
exp system/manager@TEST file=d:/daochu.dmp owner=(system,sys)
將數據庫中的表inner_notify、notify_staff_relat導出
exp aichannel/aichannel@TESTDB2 file= d:/data/newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
將數據庫中的表table1中的字段filed1以"00"打頭的數據導出
exp system/manager@TEST file=d:/daochu.dmp tables=(table1) query=/" where filed1 like '00%'/"
2.數據導入 imp
將D:/daochu.dmp 中的數據導入 TEST數據庫中。
imp aichannel/aichannel@HUST full=y file= d:/data/newsmgnt.dmp ignore=y
將d:/daochu.dmp中的表table1 導入
imp system/manager@TEST file=d:/daochu.dmp tables=(table1)
從用戶A到用戶B
imp username/pwd@db_server file=d:/back.dmp fromuser =A touser =B
3.獲取登陸用戶的主機名
select sys_context('userenv','host') from dual;
4 獲取登陸用戶的IP地址
select sys_context('userenv','ip_address') from dual;