2013. 11. 26. 13:56

Oracle 서버 이동에 대한 전체 쿼리

Tablespace 생성.

   (Tablespace : P_DAT / H_IDX / H_DAT)

create tablespace P_DAT datafile 'D:\oradata\P_DAT01.dbf' size 30G autoExtend on next 100M;

create tablespace H_IDX datafile 'D:\oradata\H_IDX01.dbf' size 10G autoExtend on next 100M;

create tablespace H_DAT datafile 'D:\oradata\H_DAT01.dbf' size 10G autoExtend on next 100M;



user 생성.

  (ID : PK   /  password : PK)

  create user pk identified by pk default tablespace PK_DAT;

  grant dba to pk;




export 진행.


exp system/pk@PK file=D:\PK.dmp full=y log=D:\PK.log




dump 파일 인포트

  

   imp system/pk@PK file=d:\job\pk.dmp log=d:\job\pk.log buffer=4096000 commit=y destroy=y full=y



락 걸린 유져 확인.

SELECT username, account_status, to_char(lock_date,'yy/mm/dd hh24:mi') lock_date FROM dba_users;


락 걸린 유져 풀기.

ALTER USER PK account unlock;



DB 별 이동 

sqlplus system/pk@PK


####################################################################################################



Trackback 0 Comment 0