阿郎的技術搏客

          成長軌跡

          創建表空間、回滾段、用戶、表的詳細語法信息

          1:創建表空間
          CREATE TABLESPACE ts_name DATAFILE '/dev/name1' SIZE 2000M, '/dev/name2' SIZE 2000M
          DEFAULT STORAGE ( INITIAL 64K NEXT 64K MAXEXTENTS UNLIMITED PCTINCREASE 50 );

          2:修改表空間
          alter TABLESPACE ts_name add DATAFILE '/dev/name3' SIZE 2000M;

          3:回滾段
          CREATE ROLLBACK SEGMENT "RS01" TABLESPACE "TS_name"
          STORAGE ( INITIAL 8M NEXT 8M MAXEXTENTS UNLIMITED);

          4:創建用戶和授權
          CREATE USER tempuser IDENTIFIED BY tempuser
          DEFAULT TABLESPACE TS_name1 TEMPORARY TABLESPACE TS_name2;
          GRANT CONNECT TO tempuser;
          GRANT DBA TO tempuser;
          GRANT resource TO tempuser;


          5:創建表
          create table tablename
          (
          f1 NUMBER(10) not null,
          f2 NUMBER(10) null ,
          f3 NUMBER(3) defalut 0,
          pt number(3) not null ,
          constraint PK_tablename primary key (f1)
          using index
          tablespace ts_name
          storage
          (
          initial 1m
          next 1m
          pctincrease 0
          )
          )

          pctfree 10
          tablespace ts_name
          storage
          (
          initial 1m
          next 1m
          pctincrease 0
          )
          partition by range(pt)
          (partition part000 values less than (1) tablespace ts_name,
          partition part001 values less than (2) tablespace ts_name,
          )
          /

          6:創建索引
          create index i_tablename1 on tablename(f2)
          tablespace ts_name
          storage
          (
          initial 500k
          next 500k
          pctincrease 0
          )

          posted on 2007-04-27 16:12 alone 閱讀(337) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 修水县| 古丈县| 策勒县| 阿克苏市| 新乡县| 石家庄市| 宜丰县| 巴林右旗| 高尔夫| 张家港市| 肇州县| 绥江县| 临沂市| 洪洞县| 岳阳市| 德阳市| 栾城县| 郯城县| 禹州市| 昌乐县| 林州市| 唐河县| 苍山县| 舒城县| 临漳县| 三穗县| 临湘市| 上虞市| 冀州市| 大理市| 海阳市| 海晏县| 保康县| 榆社县| 上思县| 霍林郭勒市| 宜阳县| 晋江市| 囊谦县| 玉田县| 罗源县|