资源描述:
《创建表空间对象表.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、--创建表空间createtablespacexcvbnloggingdatafile'D:OeacleoradataorclXCVxcvbn.dbf'size100mautoextendonnext50mextentmanagementlocal;--创建用户createuserxcvbnmidentifiedbyxcvbnmprofiledefaultaccountunlock;--授权xcvbngrantdbatoxcvbn;grantconnecttoxcvbn;alteruserxcvbndefa
2、ultroleall;grantunlimitedtablespacetoxcvbn;droptablebuff_na查找表创建表createtable表名(字段名类型notnull字段名类型)例子createtableID_IDX_G_INCE(RESOURCEIDVARCHAR2(42)defaultSYS_GUID(),ORG_NOVARCHAR2(16),IDX_CODEVARCHAR2(16),PERIODVARCHAR2(8),STAT_CYCLEVARCHAR2(16),STAT_CALIBREVAR
3、CHAR2(8),DIM_CODE1VARCHAR2(256)default'-',DIM_VAL_CODE1VARCHAR2(32)default'-',DIM_CODE2VARCHAR2(256)default'-',DIM_VAL_CODE2VARCHAR2(32)default'-',DIM_CODE3VARCHAR2(256)default'-',DIM_VAL_CODE3VARCHAR2(32)default'-',DIM_CODE4VARCHAR2(256)default'-',DIM_VAL_COD
4、E4VARCHAR2(32)default'-',DIM_CODE5VARCHAR2(256)default'-',DIM_VAL_CODE5VARCHAR2(32)default'-',DIM_CODE6VARCHAR2(256)default'-',DIM_VAL_CODE6VARCHAR2(32)default'-',DIM_CODE7VARCHAR2(256)default'-',DIM_VAL_CODE7VARCHAR2(32)default'-',DIM_CODE8VARCHAR2(256)defaul
5、t'-',DIM_VAL_CODE8VARCHAR2(32)default'-',DATA_VALUENUMBER(18,6),DATA_VALUE_SUMNUMBER(18,6),DATA_VALUE_LYNUMBER(18,6),DATA_VALUE_SUM_LYNUMBER(18,6),DATA_VALUE_LCNUMBER(18,6),DATA_VALUE_SUM_LCNUMBER(18,6),PLAN_VALUENUMBER(18,6),PLAN_VALUE_YEARNUMBER(18,6),EXT_VA
6、LUE1NUMBER(18,6),EXT_VALUE2NUMBER(18,6),EXT_VALUE3NUMBER(18,6),EXT_VALUE4NUMBER(18,6),EXT_VALUE5NUMBER(18,6),DATA_SRC_SYSVARCHAR2(16),DATA_SRCVARCHAR2(16),TIME_STAMPDATEdefaultSYSDATE,PERIOD_VALUENUMBER(18,6),CHAIN_VALUENUMBER(18,6),SUM_PERIOD_VALUENUMBER(18,6
7、),SUM_CHAIN_VALUENUMBER(18,6),IS_EXTRACTVARCHAR2(8)default'0',VER_NONUMBER(8)default1,PERIOD_CHANGENUMBER(18,6),CHAIN_CHANGENUMBER(18,6),SUM_PERIOD_CHANGENUMBER(18,6),OLD_FLAGVARCHAR2(8)default'02',IDX_DATA_IDVARCHAR2(42)defaultSYS_GUID()notnull)创建表空间:运行PLSQL以
8、oracl系统用户登录,新建一个SQL窗口,复制以下SQL执行:创建rdc表createtablespacerdc红色为表空间名称loggingdatafile'd:oracleproduct10.2.0oradataorclrdc.dbf'红色为表空间路径size1112m红色为表空间大小autoextendonnext64m红色为表空间每次自