Oracle全庫匯出和特定使用者匯入
Oracle全庫匯出和特定使用者匯入
1 建立新使用者並插入資料
C:\Users\Administrator> sqlplus system/oracle
SQL> create user haishu identified by haishu;
SQL> grant connect, resource to haishu;
SQL> conn haishu/haishu;
SQL> create table test_table (id number);
SQL> insert into test_table values(1);
SQL> commit;
SQL> exit;
2 用system使用者匯出全庫
C:\Users\Administrator> exp system/oracle file=e:\fulldb.dmp log=e:\fulldb_exp.log full=y
3 刪除haishu.test_table
C:\Users\Administrator> sqlplus haishu/haishu;
SQL> drop table test_table;
SQL> exit
4 匯入haishu.test_table
C:\Users\Administrator> imp system/oracle file=e:\fulldb.dmp log=e:\fulldb_imp.log fromuser=haishu touser=haishu tables=(test_table)
匯入過程會有很多警告,但不影響資料的匯入。
5 驗證
C:\Users\Administrator> sqlplus haishu/haishu;
SQL> select * from test_table;
6 注意
資料庫匯入匯出儘量不要使用sys使用者。若不慎誤用了sys使用者,匯入匯出語句應該像下面這樣:
C:\Users\Administrator> exp \"/ as sysdba\" file=e:\fulldb.dmp log=e:\fulldb_exp.log full=y
C:\Users\Administrator> imp \"/ as sysdba\" file=e:\fulldb.dmp log=e:\fulldb_imp.log fromuser=haishu touser=haishu tables=(test_table)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29485627/viewspace-1792655/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle資料庫匯入匯出。imp匯入命令和exp匯出命令Oracle資料庫
- Oracle資料泵的匯入和匯出Oracle
- Oracle 資料匯入匯出Oracle
- Oracle資料匯入匯出Oracle
- SQL資料庫的匯入和匯出SQL資料庫
- Oracle 12c expdp和impdp匯出匯入表Oracle
- oracle資料匯出匯入(exp/imp)Oracle
- AWR跨庫匯出與匯入
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- ASP.NET 開源匯入匯出庫Magicodes.IE 完成Csv匯入匯出ASP.NET
- Mysql 資料庫匯入與匯出MySql資料庫
- kxcel, 方便匯入和匯出 ExcelExcel
- Access 匯入 oracle 資料庫Oracle資料庫
- MySQL入門--匯出和匯入資料MySql
- java使使用者EasyExcel匯入匯出excelJavaExcel
- NPOI匯出和匯入Excel,Word和PDFExcel
- [Docker核心之容器、資料庫檔案的匯入匯出、容器映象的匯入匯出]Docker資料庫
- 資料庫 MySQL 資料匯入匯出資料庫MySql
- DB2 匯入和匯出 命令列和客戶端匯出DB2命令列客戶端
- 然後再全庫匯入排除view資料庫在impdp匯入View資料庫
- IDEA 匯出和匯入jar包教程IdeaJAR
- 匯入和匯出AWR的資料
- 如何使用 JavaScript 匯入和匯出 ExcelJavaScriptExcel
- Activity 流程模型匯入匯出-activity流程模型匯入匯出模型
- 【SQL】Oracle BLOB 批量匯入匯出圖片語句SQLOracle
- Mysql匯入&匯出MySql
- doris匯入匯出
- esayExcel匯入匯出Excel
- mysqldump匯出匯入所有庫、某些庫、某些表的例子MySql
- 前端實現Excel匯入和匯出功能前端Excel
- Navicat如何匯入和匯出sql檔案SQL
- ClickHouse 資料表匯出和匯入(qbit)
- ES模組化的匯入和匯出
- 【STATS】Oracle匯入匯出優化器統計資訊Oracle優化
- 【oracle 多種形式的外部表匯入、匯出】實驗Oracle
- 開源匯入匯出庫Magicodes.IE 多sheet匯入教程
- vue excel匯入匯出VueExcel
- navlicat 匯入匯出SQLSQL
- [資料庫] Navicat for Oracle基本用法(匯入匯出正刪改查)圖文介紹資料庫Oracle