ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

oracleµ¼Èëµ¼³ö£¨ÓõñȽ϶ࣩ
2015-07-24 11:00:01 À´Ô´: ×÷Õß: ¡¾´ó ÖРС¡¿ ä¯ÀÀ:2´Î
Tags£ºoracle µ¼Èë µ¼³ö ±È½Ï

1.´´½¨Ä¿Â¼directory(½ÇÉ«system/sys)

create directory hello_file as 'd:\dupmfile';
--²é¿´ËùÓÐÒÑ´´½¨µÄdirectory
--select * from dba_directories;
--drop directoryɾ³ý·¾¶ÓõÄ.

--drop directory exp_dir;

2.´´½¨±í¿Õ¼ä(¿ÉÒÔʹÓÃÆäĬÈϱí¿Õ¼ä)

2.1´´½¨ÁÙʱ±í¿Õ¼ä

create temporary tablespace hello_temp
tempfile 'f:\oracle\data\hello_temp.dbf'
size 1024m
autoextend on
next 32m
extent management local;


2.2´´½¨Êý¾Ý±í¿Õ¼ä

create tablespace hello_data
logging
datafile 'f:\oracle\data\hello_data.dbf'
size 512m
autoextend on
next 32m

extent management local;

3.´´½¨Óû§²¢Ð޸ıí¿Õ¼ä

conn system/system@orcl;
--ɾ³ý֮ǰÓû§
drop user hello_user cascade;
--´´½¨Óû§£¨Èç¹ûÓбí¿Õ¼ä£¬Ôò¼ÓÉÏ£©
create user hello_user identified by pass default;-- tablespace hello_data temporary tablespace hello_temp;

4.¸³È¨ÏÞ

--Óû§µÄȨÏÞ
grant resource,connect,dba to hello_user;
--Ŀ¼µÄȨÏÞ
grant read,write on directory hello_file to hello_user;

5.µ¼³ö

expdp original_user/pass@orcl directory=hello_file dumpfile=data20141014.dmp schemas=original_user
--µ¼³öµ½Ëù½¨µÄdirectoryµÄĿ¼ÏÂd:\dupmfile

6.µ¼Èë

--remap_tablespace¸Ä±í¿Õ¼ä

--remap_schema½«original_userÓû§µ¼Èëµ½hello_userÖУ¬Èç¹ûÓû§ÃûÏàͬ£¬Õâ¾ä¿ÉÒÔÊ¡ÂÔ

--data20141014.dmpµ¼³öµÄÊý¾Ý¿âÎļþÃû

impdp hello_user/pass@orcl directory= hello_filedumpfile= data20141014.dmp remap_tablespace= original_data:hello_data remap_schema=original_user:hello_user
¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
·ÖÏíµ½: 
ÉÏһƪ£ºoracle´´½¨Ë÷Òý ÏÂһƪ£º´óÅúÁ¿Êý¾Ýµ¼ÈëÊý¾Ý¿â£¬dbfµ¼Èëor..

ÆÀÂÛ

ÕÊ¡¡¡¡ºÅ: ÃÜÂë: (ÐÂÓû§×¢²á)
Ñé Ö¤ Âë:
±í¡¡¡¡Çé:
ÄÚ¡¡¡¡ÈÝ:

¡¤Spring Boot Java£º (2025-12-26 16:20:19)
¡¤Spring Boot¤ÇHello (2025-12-26 16:20:15)
¡¤Spring ¤Î»ù±¾¤«¤éŒ (2025-12-26 16:20:12)
¡¤C++Ä£°å (template) (2025-12-26 15:49:49)
¡¤C ÓïÑÔÖÐÄ£°åµÄ¼¸ÖÖ (2025-12-26 15:49:47)