posts - 15,comments - 29,trackbacks - 0
          導(dǎo)出導(dǎo)入之前的準(zhǔn)備 

           

          1.連接數(shù)據(jù)庫 conn system/password@//192.168.1.100:1521/dbcms

           

          2.創(chuàng)建用戶 create user newuser identified by password;


          3.授權(quán) GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,DBA,CONNECT,RESOURCE,CREATE SESSION to newuser  


          導(dǎo)出命令,任選其一:
           

           1 將數(shù)據(jù)庫TEST完全導(dǎo)出,用戶名system 密碼manager 導(dǎo)出到D:\daochu.dmp中

             exp system/manager@TEST file=d:\daochu.dmp full=y

           2 將數(shù)據(jù)庫中system用戶與sys用戶的表導(dǎo)出

             exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)

           3 將數(shù)據(jù)庫中的表inner_notify、notify_staff_relat導(dǎo)出

              exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat) 

           4 將數(shù)據(jù)庫中的表table1中的字段filed1以"00"打頭的數(shù)據(jù)導(dǎo)出

             exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"



          導(dǎo)入命令,任選其一:
           

          1 將D:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 TEST數(shù)據(jù)庫中。

             imp system/manager@TEST  file=d:\daochu.dmp

             imp aichannel/aichannel@HUST full=y  file=file= d:\data\newsmgnt.dmp ignore=y

             上面可能有點(diǎn)問題,因?yàn)橛械谋硪呀?jīng)存在,然后它就報(bào)錯(cuò),對該表就不進(jìn)行導(dǎo)入。

             在后面加上 ignore=y 就可以了。

           2 將d:\daochu.dmp中的表table1 導(dǎo)入

           imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1)


           

          posted on 2008-11-18 14:30 流腥魚 閱讀(272) 評論(0)  編輯  收藏 所屬分類: 數(shù)據(jù)庫

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 镇原县| 迁西县| 东光县| 彭山县| 潢川县| 盐源县| 罗源县| 甘孜县| 从江县| 乐陵市| 莱州市| 乌拉特前旗| 高碑店市| 盐城市| 九龙城区| 孝昌县| 兴海县| 马山县| 方山县| 堆龙德庆县| 西丰县| 望江县| 太保市| 肇东市| 仁怀市| 齐河县| 手机| 阜阳市| 湛江市| 南投市| 香港| 龙山县| 马关县| 龙井市| 巢湖市| 扬中市| 博客| 察隅县| 卢氏县| 石门县| 吉安县|