현재 user가 사용중인 tablespace의 특정 테이블을 다른 tablespace의
영역으로 옮기는 방법은 다음과 같다.
예를 들어 SCOTT user의 DEPT table이 현재 USERS tablespace에 있는 경우,
이것을 TOOLS tablespace로 옮기는 경우 다음과 같은 순서대로 작업을
하여야 한다.
(1) DEPT table을 export한다.
os> exp scott/tiger file=file_name.dmp tables=dept
(2) 이전하고자 하는 tablespace인 TOOLS가 없는 경우에는 다음과 같이
생성한다. datafile의 위치나 크기는 임의로 설정한다.
os> svrmgrl (7.2이하의 경우 sqldba lmode=y)
SVRMGR> CONNECT INTERNAL;
SVRMGR> CREATE TABLESPACE tools
DATAFILE '/user1/oracle_data/tools01.dbf' SIZE 100M;
(3) 옮기고자 하는 table의 owner인 SCOTT의 default talbespace를
table을 새로 위치시킬 tablespace인 TOOLS로 임시 지정한다.
SVRMGR> alter user scott default tablespace tools;
(4) SCOTT가 임시로 TOOLS에만 insert 가능하도록 다음과 같이 조치한다.
SVRMGR> revoke unlimited tablespace from scott;
SVRMGR> alter user scott quota unlimited on tools;
(5) (1)에서 export받은 DEPT를 다시 SCOTT user로 import한다.
os> imp scott/tiger file=file_name.dmp full=y commit=y
(6) IMPORT 후 각 TABLE이 해당 TABLESPACE로 변경되었는지 확인
os> sqlplus scott/tiger
SQL> select tablespace_name from user_tables where table_name = 'DEPT';
(7) SCOTT의 권한 및 default tablespace를 원상태로 복구시킨다.
SVRMGR> grant unlimited tablespace to scott;
SVRMGR> alter user scott default tablespace users;
Previous Article : 현재 DataFile(TableSpace)의 Free 영역을 확인하는 SQL
Next Article : 한글 Column명을 영문 Column명으로 바꾸기(R2.1.2용)
영역으로 옮기는 방법은 다음과 같다.
예를 들어 SCOTT user의 DEPT table이 현재 USERS tablespace에 있는 경우,
이것을 TOOLS tablespace로 옮기는 경우 다음과 같은 순서대로 작업을
하여야 한다.
(1) DEPT table을 export한다.
os> exp scott/tiger file=file_name.dmp tables=dept
(2) 이전하고자 하는 tablespace인 TOOLS가 없는 경우에는 다음과 같이
생성한다. datafile의 위치나 크기는 임의로 설정한다.
os> svrmgrl (7.2이하의 경우 sqldba lmode=y)
SVRMGR> CONNECT INTERNAL;
SVRMGR> CREATE TABLESPACE tools
DATAFILE '/user1/oracle_data/tools01.dbf' SIZE 100M;
(3) 옮기고자 하는 table의 owner인 SCOTT의 default talbespace를
table을 새로 위치시킬 tablespace인 TOOLS로 임시 지정한다.
SVRMGR> alter user scott default tablespace tools;
(4) SCOTT가 임시로 TOOLS에만 insert 가능하도록 다음과 같이 조치한다.
SVRMGR> revoke unlimited tablespace from scott;
SVRMGR> alter user scott quota unlimited on tools;
(5) (1)에서 export받은 DEPT를 다시 SCOTT user로 import한다.
os> imp scott/tiger file=file_name.dmp full=y commit=y
(6) IMPORT 후 각 TABLE이 해당 TABLESPACE로 변경되었는지 확인
os> sqlplus scott/tiger
SQL> select tablespace_name from user_tables where table_name = 'DEPT';
(7) SCOTT의 권한 및 default tablespace를 원상태로 복구시킨다.
SVRMGR> grant unlimited tablespace to scott;
SVRMGR> alter user scott default tablespace users;
Previous Article : 현재 DataFile(TableSpace)의 Free 영역을 확인하는 SQL
Next Article : 한글 Column명을 영문 Column명으로 바꾸기(R2.1.2용)
오라클자바커뮤니티교육센터, 개발자전문교육, 개인80%환급
www.oraclejavacommunity.com
평일주간(9:30~18:10) 개강
(6/23)[기업100%환급]자바기초에서 JDBC, Servlet/JSP까지
(6/23)[기업100%환급]Spring ,MyBatis,Hibernate실무과정
(6/23)[기업100%환급]SQL기초에서 Schema Object까지
(6/30)[기업100%환급]PL/SQL,ORACLE HINT,TUNING
(6/30)[기업100%환급]안드로이드개발자과정
(7/07)[기업100%환급]C#4.0,WinForm,ADO.NET프로그래밍
(7/07)[채용예정교육]오라클자바개발잘하는신입뽑기프로젝트,교육전취업확정
평일야간(19:00~21:50) 개강
(6/17)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지
(6/18)C#,ASP.NET마스터
(6/19)웹퍼블리싱 마스터
(6/19)Spring3.X, MyBatis, Hibernate실무과정
(6/24)안드로이드개발자과정
(6/24)MyBatis3.X, Hibernate4.X ORM실무과정
(6/26)SQL초보에서실전전문가까지
(7/02)자바웹(JSP,Spring,MyBatis,XPlatform)프로젝트과정
주말(10:00~17:50) 개강
(6/21)Spring3.X, MyBatis, Hibernate실무과정
(6/21)MyBatis3.X, Hibernate4.X ORM실무과정
(6/21)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지
(6/28)SQL초보에서 Schema Object까지
(6/28)안드로이드개발자과정
(6/28)개발자를위한PLSQL,SQL튜닝,힌트
(6/28)실무예제로 배워보는 jQuery(개발자/디자이너를위한)
(6/28)자바웹(JSP,Spring,MyBatis,XPlatform)프로젝트과정
(7/13)C#,ASP.NET마스터
주말저녁(18:30~22:20) 개강
(6/28)JAVA,Network&WEB&Framework
(6/28)SQL기초에서실무까지
www.oraclejavacommunity.com
평일주간(9:30~18:10) 개강
(6/23)[기업100%환급]자바기초에서 JDBC, Servlet/JSP까지
(6/23)[기업100%환급]Spring ,MyBatis,Hibernate실무과정
(6/23)[기업100%환급]SQL기초에서 Schema Object까지
(6/30)[기업100%환급]PL/SQL,ORACLE HINT,TUNING
(6/30)[기업100%환급]안드로이드개발자과정
(7/07)[기업100%환급]C#4.0,WinForm,ADO.NET프로그래밍
(7/07)[채용예정교육]오라클자바개발잘하는신입뽑기프로젝트,교육전취업확정
평일야간(19:00~21:50) 개강
(6/17)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지
(6/18)C#,ASP.NET마스터
(6/19)웹퍼블리싱 마스터
(6/19)Spring3.X, MyBatis, Hibernate실무과정
(6/24)안드로이드개발자과정
(6/24)MyBatis3.X, Hibernate4.X ORM실무과정
(6/26)SQL초보에서실전전문가까지
(7/02)자바웹(JSP,Spring,MyBatis,XPlatform)프로젝트과정
주말(10:00~17:50) 개강
(6/21)Spring3.X, MyBatis, Hibernate실무과정
(6/21)MyBatis3.X, Hibernate4.X ORM실무과정
(6/21)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지
(6/28)SQL초보에서 Schema Object까지
(6/28)안드로이드개발자과정
(6/28)개발자를위한PLSQL,SQL튜닝,힌트
(6/28)실무예제로 배워보는 jQuery(개발자/디자이너를위한)
(6/28)자바웹(JSP,Spring,MyBatis,XPlatform)프로젝트과정
(7/13)C#,ASP.NET마스터
주말저녁(18:30~22:20) 개강
(6/28)JAVA,Network&WEB&Framework
(6/28)SQL기초에서실무까지
댓글 없음:
댓글 쓰기