新聞中心
//創(chuàng)建臨時表空間

創(chuàng)新互聯(lián)是專業(yè)的秀嶼網站建設公司,秀嶼接單;提供成都網站設計、做網站、成都外貿網站建設公司,網頁設計,網站設計,建網站,PHP網站建設等專業(yè)做網站服務;采用PHP框架,可快速的進行秀嶼網站開發(fā)網頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網站,專業(yè)的做網站團隊,希望更多企業(yè)前來合作!
- create temporary tablespace test_temp
- tempfile 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf'
- size 32m
- autoextend on
- next 32m maxsize 2048m
- extent management local;
//創(chuàng)建數(shù)據(jù)表空間
- create tablespace test_data
- logging
- datafile 'E:\oracle\product\10.2.0\oradata\testserver\test_data01.dbf'
- size 32m
- autoextend on
- next 32m maxsize 2048m
- extent management local;
//創(chuàng)建用戶并指定表空間
- create user testserver_user identified by testserver_user
- default tablespace test_data
- temporary tablespace test_temp;
//給用戶授予權限
- grant connect,resource to testserver_user;
//數(shù)據(jù)導出:
- //1 將數(shù)據(jù)庫TEST完全導出,用戶名system 密碼manager 導出到D:daochu.dmp中
- exp system/manager@TEST
- file=d:/daochu.dmp full=y
- //2 將數(shù)據(jù)庫中system用戶與sys用戶的表導出
- exp system/manager@TEST file=d:daochu.dmp owner=(system,sys)
- //3 將數(shù)據(jù)庫中的表inner_notify、notify_staff_relat導出
- exp aichannel/aichannel@TESTDB2 file= d:datanewsmgnt.dmp tables=(inner_notify,notify_staff_relat)
- //4 將數(shù)據(jù)庫中的表table1中的字段filed1以"00"打頭的數(shù)據(jù)導出
- exp system/manager@TEST file=d:daochu.dmp tables=(table1) query=" where filed1 like '00%'"
//上面是常用的導出,對于壓縮,既用winzip把dmp文件可以很好的壓縮。
//也可以在上面命令后面 加上 compress=y 來實現(xiàn)。
//數(shù)據(jù)的導入
//1 將D:daochu.dmp 中的數(shù)據(jù)導入 TEST數(shù)據(jù)庫中。
imp system/manager@TEST full=y file=d:daochu.dmp
imp aichannel/aichannel@HUST full=y file=d:datanewsmgnt.dmp ignore=y
//上面可能有點問題,因為有的表已經存在,然后它就報錯,對該表就不進行導入。
//在后面加上 ignore=y 就可以了。
2 將d:daochu.dmp中的表table1 導入
//imp system/manager@TEST file=d:daochu.dmp tables=(table1)
本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/lstrue/archive/2009/02/04/3862378.aspx
名稱欄目:Oracle創(chuàng)建用戶表空間和導入導出數(shù)據(jù)舉例
URL網址:http://m.5511xx.com/article/dhjohpp.html


咨詢
建站咨詢
