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自動建立使用者前提條件與應用場景
- WWDC 2018:自動強密碼與驗證碼自動輸入密碼
- linux建立使用者並設定密碼Linux密碼
- 自動劫持root密碼密碼
- 直播app原始碼,登入時自動輸入密碼/自動記住密碼APP原始碼密碼
- 直播app系統原始碼,使用者登入後選擇記住密碼,下次自動填充密碼APP原始碼密碼
- MySQL建立使用者,配置許可權、密碼策略MySql密碼
- python 建立密碼Python密碼
- Linux建立使用者、設定密碼、修改使用者、刪除使用者命令Linux密碼
- mongodb對資料庫建立使用者名稱和密碼MongoDB資料庫密碼
- Mac設定使用者自動登入無需輸入密碼的方法Mac密碼
- android 短視訊開發,使用者選擇記住密碼,再次登入自動讀取儲存密碼Android密碼
- 關於新版chrome與火狐自動填充賬號密碼的問題Chrome密碼
- ssh直接帶密碼登入Linux,Linux自動密碼登陸利器sshpass密碼Linux
- 【Linux】mysql下載與安裝與重置密碼與建立資料庫LinuxMySql密碼資料庫
- 序列密碼與分組密碼密碼
- 介面自動化程式碼-AI 建立嘗試AI
- 自定義支付密碼輸入view、密碼鍵盤並自動檢測6位密碼輸入完全密碼View
- 解決Moodle在上傳使用者時無法自動傳送賬號密碼郵件密碼
- 密碼學與密碼安全:理論與實踐密碼學
- 鴻蒙Next密碼自動填充服務:功能與應用場景全解析鴻蒙密碼
- Homestead 自帶 MySQL 的 預設賬號與密碼MySql密碼
- docker 建立私有倉庫,並且設定使用者名稱和密碼Docker密碼
- 修改git使用者密碼Git密碼
- 重置PbootCMS使用者密碼boot密碼
- 跑wordpress使用者密碼指令碼密碼指令碼
- SharedPreferences實現記住密碼----自動登入功能密碼
- Mac Monterey如何設定自動填充登入密碼?Mac密碼
- 管理(002):建立密碼檔案示例密碼
- Oracle 12c的DG自動同步密碼檔案--ASM 新特性:共享密碼檔案Oracle密碼ASM
- vue自定義密碼輸入框解決瀏覽器自動填充密碼的問題Vue密碼瀏覽器
- MySQL的Root使用者密碼MySql密碼
- 遷移oracle使用者密碼Oracle密碼
- vivo手機安裝應用自動輸入密碼密碼
- Linux系統自動隨機生成複雜密碼方法Linux隨機密碼
- 深入探索鴻蒙Next密碼自動填充服務:高階功能與適配場景鴻蒙密碼
- 直播系統原始碼,自動登入及記住密碼實現原始碼密碼
- 自動輸入密碼使用root許可權開啟shell指令碼密碼指令碼
- 任意使用者密碼重置(三):使用者混淆密碼