impdp自動建立使用者與密碼
1、檢視jzh使用者下物件
JZH@jzh>select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
JZH1 TABLE
T TABLE
TEST TABLE
TEST1 TABLE
2、建立directory
SYS@jzh>create directory dir_dmp as '/home/oracle';
Directory created.
SYS@jzh>grant read,write on directory dir_dmp to public;
Grant succeeded.
3、匯出資料
[oracle@jzh5 ~]$ expdp jzh/jzh schemas=jzh directory=dir_dmp dumpfile=jzh.dmp
Export: Release 11.2.0.3.0 - Production on Tue Jun 2 15:52:36 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "JZH"."SYS_EXPORT_SCHEMA_01": jzh/******** schemas=jzh directory=dir_dmp
dumpfile=jzh.dmp
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 319.2 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "JZH"."T" 222.2 MB 2301632 rows
. . exported "JZH"."TEST1" 46.45 MB 4096000 rows
. . exported "JZH"."TEST" 122.3 KB 10000 rows
. . exported "JZH"."JZH1" 5.468 KB 4 rows
Master table "JZH"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for JZH.SYS_EXPORT_SCHEMA_01 is:
/home/oracle/jzh.dmp
Job "JZH"."SYS_EXPORT_SCHEMA_01" successfully completed at 15:53:53
4、刪除使用者
SYS@jzh>drop user jzh cascade;
User dropped.
5、匯入資料
[oracle@jzh5 ~]$ impdp system/oracle directory=dir_dmp dumpfile=jzh.dmp schemas=jzh
Import: Release 11.2.0.3.0 - Production on Tue Jun 2 15:56:16 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** directory=dir_dmp
dumpfile=jzh.dmp schemas=jzh
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "JZH"."T" 222.2 MB 2301632 rows
. . imported "JZH"."TEST1" 46.45 MB 4096000 rows
. . imported "JZH"."TEST" 122.3 KB 10000 rows
. . imported "JZH"."JZH1" 5.468 KB 4 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 15:56:37
----成功匯入
6、使用jzh登陸
[oracle@jzh5 ~]$ sqlplus jzh/jzh
SQL*Plus: Release 11.2.0.3.0 Production on Tue Jun 2 15:57:15 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
7、查詢jzh使用者下物件
JZH@jzh>select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
JZH1 TABLE
T TABLE
TEST TABLE
TEST1 TABLE
JZH@jzh>select index_name from user_indexes where table_name='JZH1';
INDEX_NAME
------------------------------
PK_JZH1
----表與索引回來了
總結:imdp不但自動建立了使用者,而且密碼與原來一樣。
JZH@jzh>select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
JZH1 TABLE
T TABLE
TEST TABLE
TEST1 TABLE
2、建立directory
SYS@jzh>create directory dir_dmp as '/home/oracle';
Directory created.
SYS@jzh>grant read,write on directory dir_dmp to public;
Grant succeeded.
3、匯出資料
[oracle@jzh5 ~]$ expdp jzh/jzh schemas=jzh directory=dir_dmp dumpfile=jzh.dmp
Export: Release 11.2.0.3.0 - Production on Tue Jun 2 15:52:36 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "JZH"."SYS_EXPORT_SCHEMA_01": jzh/******** schemas=jzh directory=dir_dmp
dumpfile=jzh.dmp
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 319.2 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "JZH"."T" 222.2 MB 2301632 rows
. . exported "JZH"."TEST1" 46.45 MB 4096000 rows
. . exported "JZH"."TEST" 122.3 KB 10000 rows
. . exported "JZH"."JZH1" 5.468 KB 4 rows
Master table "JZH"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for JZH.SYS_EXPORT_SCHEMA_01 is:
/home/oracle/jzh.dmp
Job "JZH"."SYS_EXPORT_SCHEMA_01" successfully completed at 15:53:53
4、刪除使用者
SYS@jzh>drop user jzh cascade;
User dropped.
5、匯入資料
[oracle@jzh5 ~]$ impdp system/oracle directory=dir_dmp dumpfile=jzh.dmp schemas=jzh
Import: Release 11.2.0.3.0 - Production on Tue Jun 2 15:56:16 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** directory=dir_dmp
dumpfile=jzh.dmp schemas=jzh
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "JZH"."T" 222.2 MB 2301632 rows
. . imported "JZH"."TEST1" 46.45 MB 4096000 rows
. . imported "JZH"."TEST" 122.3 KB 10000 rows
. . imported "JZH"."JZH1" 5.468 KB 4 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 15:56:37
----成功匯入
6、使用jzh登陸
[oracle@jzh5 ~]$ sqlplus jzh/jzh
SQL*Plus: Release 11.2.0.3.0 Production on Tue Jun 2 15:57:15 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
7、查詢jzh使用者下物件
JZH@jzh>select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
JZH1 TABLE
T TABLE
TEST TABLE
TEST1 TABLE
JZH@jzh>select index_name from user_indexes where table_name='JZH1';
INDEX_NAME
------------------------------
PK_JZH1
----表與索引回來了
總結:imdp不但自動建立了使用者,而且密碼與原來一樣。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-1683286/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- impdp自動建立使用者前提條件與應用場景
- 【IMPDP】使用IMPDP自動建立使用者並完成資料的匯入
- impdp 匯入 schema的資料時會自動建立對應的使用者
- svn建立使用者及密碼密碼
- MYSQL建立使用者時用密文密碼MySql密碼
- WWDC 2018:自動強密碼與驗證碼自動輸入密碼
- 自動劫持root密碼密碼
- 直播app原始碼,登入時自動輸入密碼/自動記住密碼APP原始碼密碼
- linux建立使用者並設定密碼Linux密碼
- MySQL 多例項給root使用者建立密碼MySql密碼
- 直播app系統原始碼,使用者登入後選擇記住密碼,下次自動填充密碼APP原始碼密碼
- Ubuntu 修改使用者密碼與啟動root賬號Ubuntu密碼
- Linux 每月自動改密碼Linux密碼
- MySQL建立使用者,配置許可權、密碼策略MySql密碼
- 建立使用者時的密碼校驗問題密碼
- expdp和impdp自動使用resumable特性
- PL/SQL Developer自動儲存密碼SQLDeveloper密碼
- 自動擷取root密碼和防暴力破解sshd密碼密碼
- 【密碼】Oracle使用者密碼系列密碼Oracle
- Mac設定使用者自動登入無需輸入密碼的方法Mac密碼
- Oracle10g Data guard會不會自動更新sys使用者密碼?Oracle密碼
- python 建立密碼Python密碼
- linux建立使用者、設定密碼、修改使用者、刪除使用者Linux密碼
- 關於新版chrome與火狐自動填充賬號密碼的問題Chrome密碼
- mongodb對資料庫建立使用者名稱和密碼MongoDB資料庫密碼
- RUBY實踐—帶密碼加密的使用者建立及修改密碼加密
- git儲存使用者名稱與密碼Git密碼
- android 短視訊開發,使用者選擇記住密碼,再次登入自動讀取儲存密碼Android密碼
- 讓Team Foundation Server/TFS自動記住使用者名稱密碼解決方案Server密碼
- EndlessID手環一掃就能自動輸入密碼 不怕密碼太多密碼
- Win8系統PIN碼與圖片密碼的建立密碼
- Linux建立使用者、設定密碼、修改使用者、刪除使用者命令Linux密碼
- 建立oracle 密碼檔案Oracle密碼
- 自動建立samba目錄的shell指令碼Samba指令碼
- Activiti-Explorer 使用者名稱與密碼密碼
- 自定義支付密碼輸入view、密碼鍵盤並自動檢測6位密碼輸入完全密碼View
- 序列密碼與分組密碼密碼
- 使用者密碼研究密碼