[DBMaker] total length of all columns exceeds maximum length : this table needs at least 8081 bytes, it should be less than the maximum length of a page 8064 bytes (6527) (SQLExecDirectW)')
[DBMaker] Invalid field name : FORMITM_127 (6523) (SQLPrepare)
//列出所有 tablespace
select TS_NAME from systablespace;
//查詢 table 所在的 tablespace
def table ;
//將 DEFTABLESPACE 修改為 regular ts
ALTER TABLESPACE DEFTABLESPACE SET AUTOEXTEND OFF;
EXTENDTS() stored procedure to extend tablespace
Description: provide stored procedure for user to extend or add file to tablespace based
on some condition.
Synatx: EXTENDTS(VARCHAR(128) TABLESPACE_NAME INPUT,
VARCHAR(100) THRESHOLD_PAGE INPUT,
VARCHAR(100) THRESHOLD_FRAME INPUT,
VARCHAR(256) FILE_PREFIX INPUT,
VARCHAR(256) FILE_PATH INPUT)
Check and extend tablespace by adding page or
file according to the threshold_page/frame. The syntax for threshold_page/frame is "nFree
nAdd nMax". EXTENDTS() will check and extend when the tablespace's free page/frame < nFree
and add nAdd page/frame. If user has specified the FILE_PREFIX, it will check whether
the data file's npage + nAdd > nMax and add a file as FILE_PATH/FILE_PREFIX_%d.DB/BB.
example: CALL EXTENDTS('TS1', '10280 20560 10G', '10280 20560 10G','TS1','/data/ts1');
or CALL EXTENDTS('TS1', '100M 200M 10G', '100M 200M 10G','TS1','/data/ts1');
For example: If user want to extend deftablespace when free space < 100M and add 200M,
can use the following task to define it.
User can create task as following example:
call task_create('task1','STORE_PROCEDURE', 'call EXTENDTS(''DEFTABLESPACE'', ''100M 200M 100G'',
''100M 200M 100G'', null, null)');
Or if user want to add file if exceed 10G, user must specify file_prefix
call task_create('task1','STORE_PROCEDURE', 'call EXTENDTS(''TS1'', ''100M 200M 10G'', ''100M
200M 10G'', ''TS1'', ''/data/ts1/'')');
If the file in TS1 exceed 10G (NOTE: limitation: the file size cannot be exactly 10G)
it will create logical file TS1_01.DB in the /data/ts1/TS1_01.DB
After create a task, user can create/enable it in the schedule daemon.
To run the stored procedure for every 30 minitues:
call schedule_create('sche1','task1','*/30 * * * *','2012-12-12 12:12:00','2028-12-12 12:12:00');
call schedule_enable('sche1');