본문 바로가기
카테고리 없음

Altibase Test Scrpit

by Driving 2015. 8. 18.

테스트 스크립트 


--* 테이블스페이스 생성

create tablespace test_db datafile 'test_db.dbf' size 50M autoextend off next 10M;

create temporary tablespace test_db_temp tempfile 'test_db_tmp.dbf' size 10M autoextend on next 1M;


--* 계정 생성 

create user jyj7942 identified by jyj01 default tablespace test_db temporary tablespace test_db_temp;

create user altibase identified by alti01 default tablespace test_db temporary tablespace test_db_temp;


--* 메모리 테이블스페이스 접근 권한 부여 

alter user jyj7942 access Sys_tbs_memory on;

alter user altibase access Sys_tbs_memory on;


* 테스트 테이블 생성

create table tb_test1

(

     c1 int

    ,c2 char(10)

    ,c3 int

    ,c4 varchar(10)

    ,c5 varchar(20)

    ,c6 varchar(40)

    ,c7 date

) tablespace sys_tbs_disk_data;


* 테스트 프로시저 생성

create or replace procedure proc1

as

cnt int;

    begin   

        for cnt in 1 .. 10000

        loop

            insert into tb_test1

            values (cnt, 'v2'||cnt, cnt, 'v4'||cnt, 'v5'||cnt, 'v6'||cnt, sysdate);

        end loop;

    end;

/