TableSpace의 물리적 공간을 줄이는 방법 0 1 4,538

by 김영철 tablespace 공간 물리적 파일 [2009.02.19 09:22:25]


현재 Oracle 10g에 유닉스 환경으로 되어있습니다.

운영중인 서버여서 Off-line 시키지 못하는 상황이고..

DB 작업을 할 경우는 새벽이나 주말에(비영업일)만 작업을 하고 있습니다.

 

현재 물리적 구성으로는

AAA TableSpace에 15개의 DBF파일이 할당(각 10G)되어있고

각각의 논리적 사용량은

20% 이내 4개

50%대가 8개

90%대가 3개 이런 식이구요..

그런데 할당되어있는 이 물리적 파일이 HDD의 한 물리적 할당된 곳에 위치해 있습니다.

온라인 상태에서 DBF파일 하나(또는 여러개)를 삭제를 하고 싶은데..

안에 있는 데이터를 다른 물리적인 DBF파일에 옮길 수 있는 방법이 있을까요?

물리적인 공간확보를 하고 싶어서...

방법을 아무리 찾아도 없네요.. DBF파일 자체의 물리적 사이즈를 줄이는 방법을 찾았으나..

실제 사용되는 논리적 사용량이 20% 정도 되는 것도 실제로 작업을 걸어보면 10GB 파일을 9GB로도 잘 줄지 않더라구요.. 줄일 수 있는 한계 용량을 넘었다는 메세지가 뜨면서...

방법을 못찾고 있습니다.. 물리적 공간을 확보하고 싶어요...

 

 

by 타락천사 [2009.02.19 09:38:27]
관건은 비우시는건데 결국 비울려면 프리가 가장 많은 데이타파일에
있는 세그먼트를 모두 다른 tablspace 로 옮기셨다가
empty 가 되면 datafile 날리시고, 다시 원복 하구, 하는 것보다는
사이즈만 된다면 차라리 새로optimal 한 size 의 tablespace 를 만들구
그냥 table 은move, index 는 rebuilid 하시구
invalid object compile 하시는게 편할듯 싶네요..
Restrictions for Dropping Datafiles :

The following are restrictions for dropping datafiles and tempfiles:

+ The database must be open.

+ If a datafile is not empty, it cannot be dropped.

If you must remove a datafile that is not empty and that cannot be made empty by dropping schema objects, you must drop the tablespace that contains the datafile.

+ You cannot drop the first or only datafile in a tablespace.

+ This means that DROP DATAFILE cannot be used with a bigfile tablespace.

+ You cannot drop datafiles in a read-only tablespace.

+ You cannot drop datafiles in the SYSTEM tablespace.

+ If a datafile in a locally managed tablespace is offline, it cannot be dropped.
댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.
로그인 사용자만 댓글을 작성 할 수 있습니다. 로그인, 회원가입