建立表空間 文件路徑:/dm7/data/PROD/tbs1_01.dbf 初始大小:128M 每次自動擴充:8M; 最大尺寸:20G create tablespace tbs1 datafile '/home/dm8/data/PROD/tbs1_01.dbf' size 128 autoextend on next 8 maxsize 20480;
建立用戶 CREATE USER "YSADMIN" IDENTIFIED BY "123456789" DEFAULT TABLESPACE "MOOC" ;
給權限 GRANT create table,select table,update table,insert table TO YSADMIN; GRANT DBA TO YSADMIN;
建立表 create table YSADMIN.PERSON ( id INT IDENTITY(1,1) PRIMARY KEY, name VARCHAR(60) NOT NULL, address VARCHAR(60), age int ) STORAGE (on MOOC);