FAQ
The data file cannot be extended because the requested size is bigger than the maximum size (FID:0) | |||||
분류 | 에러메시지 | 등록일 | 2013-08-09 | 조회수 | 3763 |
현상 디스크 테이블스페이스 데이터 파일 크기 변경 작업 시 아래와 같은 에러 메시지를 만날 수 있습니다. iSQL> alter tablespace DISK_USER_TBS alter datafile '/home/altibase_home/dbs/user.dbf' size 200M; [ERR-11030 : The data file cannot be extended because the requested size is bigger than the maximum size (FID:0).] 원인 위 에러 메시지는 AUTOEXTEND OFF 속성을 가진 데이터 파일의 크기를 maxsize 보다 크게 변경할 때 발생합니다. 데이터 파일의 autoextend 속성 및 설정된 크기는 다음 구문으로 확인할 수 있습니다. (autoextend 가 1 이면 on, 0 이면 off) iSQL> select name, AUTOEXTEND , INITSIZE, MAXSIZE from v$datafiles; NAME AUTOEXTEND INITSIZE MAXSIZE ---------------------------------------------------------------------------------------------------- /home/altibase_home/dbs/temp001.dbf 1 12800 262144 /home/altibase_home/dbs/user.dbf 0 128 128 autoextend on 인 데이터 파일은 maxsize 까지 크기가 자동 증가하기 때문에 초기 설정 크기(INITSIZE) 와 최대 크기(MAXSIZE)에 차이를 보입니다. 하지만, autoextend off 인 데이터 파일의 최대 크기(MAXSIZE) 은 초기 설정 크기(INITSIZE)와 동일하게 설정됩니다. 이 때문에 최대 크기(MAXSIZE) 보다 크게 변경하려는 경우에 위와 같은 에러가 발생할 수 있습니다. 조치 해당 데이터 파일의 AUTOEXTEND 속성을 ON 으로 변경 후 데이터 파일 크기 변경 작업을 진행해야 합니다. 아래 순서대로 진행하면 됩니다. 1) AUTOEXTEND 속성 변경 iSQL> alter tablespace DISK_USER_TBS alter datafile '/home/altibase_home/dbs/user.dbf' autoextend on; Alter success. 2) 데이터 파일 크기 변경 iSQL> alter tablespace DISK_USER_TBS alter datafile '/home/altibase_home/dbs/user.dbf' size 100M; Alter success. 버전 ALTIBASE HDB 4.3.9 (ALTIBASE HDB 5 부터는 정책이 변경되어 위 현상이 발생하지 않습니다. 아래 '참고'를 확인해주세요.) 참고 사실상 autoextend off 속성을 가진 데이터 파일은 초기 설정 크기(initsize) 만 의미가 있습니다. CREATE TABLESPACE 구문 또는 ALTER TABLESPACE 구문에서 autoextend off 절을 포함할 경우, size 절 외에 nextsize 및 maxsize 절은 같이 사용하지 못합니다. 같이 사용하면 아래와 같이 SQL 구문 오류가 납니다. iSQL> create tablespace user_disk_tbs2 datafile 'user2.dbf' size 1M autoextend off next 1M; [ERR-31001 : SQL syntax error line 1: parse error create tablespace USER_DISK_TBS2 DATAFILE 'user2.dbf' SIZE 1M autoextend off NEXT 1M ^ ^ ] ALTIBASE HDB 4.3.9 에서는 이에 대한 처리가 부족했습니다. ALTIBASE HDB 5 부터는 이러한 제약이 반영되어 autoextend off 속성을 가진 데이터 파일의 maxsize 를 OS file limit 값으로 설정하게 됩니다. 이 변경으로 4.3.9 와는 다르게 v$datafile 을 조회했을 때 maxsize 를 0 으로 출력하며, iSQL> select name, AUTOEXTEND , INITSIZE, currsize, MAXSIZE from v$datafiles; NAME AUTOEXTEND INITSIZE CURRSIZE MAXSIZE ------------------------------------------------------------------------------------------------------- /home/altibase_home/dbs/user.dbf 0 128 128 0 size 변경도 가능하게 되었습니다. iSQL> alter tablespace USER_DISK_TBS alter datafile '/home/altibase_home/dbs/user.dbf' size 8M; Alter success. iSQL> select name, AUTOEXTEND , INITSIZE, currsize, MAXSIZE from v$datafiles; NAME AUTOEXTEND INITSIZE CURRSIZE MAXSIZE -------------------------------------------------------------------------------------------------------- /home/altibase_home/dbs/user.dbf 0 128 2048 0 OS file limit 은 ulimit –a 으로 확인할 수 있습니다. $ ulimit -a core file size (blocks, -c) 2097151 data seg size (kbytes, -d) 2097152 file size (blocks, -f) unlimited max memory size (kbytes, -m) unlimited open files (-n) 5030 pipe size (512 bytes, -p) 16 stack size (kbytes, -s) 131072 cpu time (seconds, -t) unlimited max user processes (-u) 3278 virtual memory (kbytes, -v) unlimited |