Oracle 데이터베이스 이전 배치 기록

 1 --20141230    (          )
 2 
 3  4 --   ,           (   )
 5 --expdp RMB3/test123@orcl3 SCHEMAS=RMB3 directory=expdir dumpfile=20141230.dmp logfile=20141230.log
 6     --
 7     --expdp:cmd  ( win    exe  )
 8     --RMB3/test123@orcl3:   /  @      (netManager        SID,          )
 9     --SCHEMAS=RMB3 :        SCHEMAS
10     --directory:        
11     --dumpfile:   dmp   (    )
12     --logfile:     
13 
14     
15 --           user  tablespace
16 --drop user RMB cascade;
17 --drop tablespace RMB including contents and datafiles;
18 
19 --create or replace directory EXP_DIR as 'D:\app\Administrator\exp_dir';--      ,            
20 --GRANT READ,WRITE ON DIRECTORY EXP_DIR TO sys;--                 
21 
22 --     
23 --        dbf      ,     oracle     oradata  
24 CREATE TABLESPACE RMB 
25 LOGGING 
26 DATAFILE 'D:\app\Administrator\oradata\orcl\RMB.DBF'  
27 SIZE 50M 
28 AUTOEXTEND ON 
29 NEXT 32M MAXSIZE UNLIMITED 
30 EXTENT MANAGEMENT LOCAL;
31 
32 --          
33 create user RMB identified by test123 
34 DEFAULT TABLESPACE RMB;
35 
36 --      
37 grant connect,resource to RMB;
38 grant create session,dba to RMB;
39 --  RMB            
40 revoke unlimited tablespace from RMB;
41 --    RMB    RMB       “   ”
42 alter user RMB quota unlimited on RMB;
43 
44 --   ,        (   )
45 --impdp RMB/test123@orcl SCHEMAS=RMB3  exclude=USER REMAP_TABLESPACE=RMB3:RMB REMAP_SCHEMA=RMB3:RMB directory=exp_dir dumpfile=20141230.dmp logfile=20141230imp.log
46     --
47     --impdp:cmd  (  win    exe  )
48     --SCHEMAS:     SCHEMAS
49     --exclude:      
50     --REMAP_TABLESPACE=RMB3:RMB :        (    :     )
51     --REMAP_SCHEMA :     SCHEMA( SCHEMA:  SCHEMA),         SCHEMA    SCHEMA
52     --dumpfile:         
53     --logfile:        
54 
55     
56 --      
57 --       
58 select * from dba_tablespaces ;
59 --  RMB      
60 select file_name ,TABLESPACE_NAME from dba_data_files where TABLESPACE_NAME ='RMB';
61 --      
62 select * from dba_directories;

좋은 웹페이지 즐겨찾기