Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle DMP backup file import (impdp) export (expdp) method

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

One impdp Import

-- Delete a user if the user already exists (you can connect using the sqlplus that comes with Oracle)

SQL > drop user USER_NAME cascade

SQL > /

SQL > drop tablespace USER_TABLESPACE including contents and datafiles

SQL > /

-- create tablespace download

SQL > CREATE TABLESPACE USER_TABLESPACE DATAFILE 'USER_tablespace.DBF' SIZE 200m AUTOEXTEND ON NEXT 50m MAXSIZE UNLIMITED PERMANENT DEFAULT STORAGE (INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645) MINIMUM EXTENT 64K LOGGING ONLINE

SQL > /

-- create users

SQL > CREATE USER USER_NAME IDENTIFIED BY user_password DEFAULT TABLESPACE USER_TABLESPACE TEMPORARY TABLESPACE TEMP PROFILE DEFAULT

SQL > /

-create a user directory

SQL > CREATE DIRECTORY directory_name as' filePath'

SQL > /

-- download the sample my_dir as'DRO _ DRO _ DVR _ dir'

-Authorization for users

SQL > GRANT CONNECT TO USER_NAME WITH ADMIN OPTION

SQL > /

SQL > GRANT DBA TO USER_NAME WITH ADMIN OPTION

SQL > /

SQL > GRANT UNLIMITED TABLESPACE TO USER_NAME WITH ADMIN OPTION

SQL > /

SQL > GRANT read, write ON DIRECTORY directory_name TO USER_NAME

SQL > /

-- perform import (exit sqlplus to execute import statement in CMD)

Impdp USER_NAME/user_password@SID_NAME directory=directory_name dumpfile=USER_NAME.DMP schemas=USER_NAME logfile=USER_NAME.log

Pause

Two expdp export and download

Expdp USER_NAME/user_password@SID_NAME directory=directory_name dumpfile=USER_NAME.DMP schemas=USER_NAME logfile=USER_NAME.log

Pause

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report