WSRR V7 ON AIX WITH ORACLE群集安装记录11

 

sqlplus sys/<yourPassword>@ORCL AS SYSDBA @createWsrrProcs.sql

    检查运行结果,看看是否有错误发生。

 

创建WSRR数据表

创建以下sql文件:createActTables.sql(修改所需内容)

— Licensed Materials – Property of IBM

— 5724-N72 5655-W17

— (c) Copyright IBM Corp. 2009 All Rights Reserved

— US Government Users Restricted Rights – Use, duplication or

— disclosure restricted by GSA ADP Schedule Contract with

— IBM Corp.

 

ALTER SESSION SET CURRENT_SCHEMA = WSRR;

 

CREATE TABLE SR_ACTIVITY_CONTAINER (

ID NUMBER(*,0),

    TRANSACTION_ID VARCHAR2(1020) NOT NULL ENABLE ,

    INSTANCE_ID VARCHAR2(256) ,

    STATE VARCHAR2(128) NOT NULL ENABLE ,

    VERSION NUMBER(*,0),

    TIME_CREATED TIMESTAMP(6));

    

 

ALTER TABLE SR_ACTIVITY_CONTAINER ADD PRIMARY KEY (ID) ENABLE;

 

CREATE TABLE SR_ACTIVITY_APICALL (

    ID NUMBER(*,0),

    CONTAINER_ID NUMBER(*,0) NOT NULL ENABLE ,

OWNING_APICALL_ID NUMBER(*,0),

    API_TYPE VARCHAR2(8) ,

    METHOD VARCHAR2(32) ,

    ROOT_OBJECT VARCHAR2(72),

    USERID VARCHAR2(64) ,

    TIME_CREATED TIMESTAMP (6));

 

ALTER TABLE SR_ACTIVITY_APICALL ADD PRIMARY KEY (ID) ENABLE;

 

 

CREATE TABLE SR_ACTIVITY_RECORD (

ID NUMBER(*,0),

    API_CALL_ID NUMBER(*,0),

    RESOURCE_ACTION VARCHAR2(16) ,

    RESOURCE_TYPE VARCHAR2(16) ,

    SUBJECT VARCHAR2(1020) ,

    PREDICATE VARCHAR2(1020),

    FROM_VALUE VARCHAR2(1020) ,

    TO_VALUE VARCHAR2(1020) ,

    TIME_CREATED TIMESTAMP (6));

 

ALTER TABLE SR_ACTIVITY_RECORD ADD PRIMARY KEY (ID) ENABLE;

 

CREATE SEQUENCE SEQ_SR_ACTIVITY_CONTAINER_ID MINVALUE 1 NOMAXVALUE INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;

CREATE SEQUENCE SEQ_SR_ACTIVITY_APICALL_ID MINVALUE 1 NOMAXVALUE INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;

CREATE SEQUENCE SEQ_SR_ACTIVITY_RECORD_ID MINVALUE 1 NOMAXVALUE INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;

 

CREATE INDEX IDX_ACT_CONT_TRAN ON SR_ACTIVITY_CONTAINER(TRANSACTION_ID);

CREATE INDEX IDX_ACT_CONT_VER ON SR_ACTIVITY_CONTAINER(VERSION);

CREATE INDEX IDX_ACT_REC_SUB ON SR_ACTIVITY_RECORD(SUBJECT, API_CALL_ID);

    用oracle用户登录到数据库服务器上执行以下语句,以创建(注意,sql文件当中定义的目录需要事先手工创建好,否则执行时会出错!)

 

sqlplus sys/<yourPassword>@ORCL AS SYSDBA @createActTables.sql

    检查运行结果,看看是否有错误发生。

 

    创建wsrr数据表

    创建以下sql文件:createSibTables.sql(修改所需内容)

— Licensed Materials – Property of IBM

— 5724-N72 5655-W17

— (c) Copyright IBM Corp. 2009 All Rights Reserved

— US Government Users Restricted Rights – Use, duplication or

— disclosure restricted by GSA ADP Schedule Contract with

— IBM Corp.

 

CREATE USER WSRRSIB IDENTIFIED EXTERNALLY;

–DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS ACCOUNT LOCK;

 

CREATE TABLE WSRRSIB.SIBOWNER (

ME_UUID VARCHAR(16),

INC_UUID VARCHAR(16),

VERSION INTEGER,

MIGRATION_VERSION INTEGER

);

 

CREATE TABLE WSRRSIB.SIBOWNERO (

EMPTY_COLUMN INTEGER

);

 

CREATE TABLE WSRRSIB.SIBCLASSMAP (

CLASSID INTEGER NOT NULL,

URI VARCHAR2(2048) NOT NULL,

PRIMARY KEY(CLASSID)

);

 

CREATE TABLE WSRRSIB.SIBLISTING (

ID INTEGER NOT NULL,

SCHEMA_NAME VARCHAR2(10),

TABLE_NAME VARCHAR2(10) NOT NULL,

TABLE_TYPE CHAR(1) NOT NULL,

PRIMARY KEY(ID)

);

 

CREATE TABLE WSRRSIB.SIB000 (

ID NUMBER(19) NOT NULL,

STREAM_ID NUMBER(19) NOT NULL,

TYPE CHAR(2),

EXPIRY_TIME NUMBER(19),

STRATEGY INTEGER,

REFERENCE NUMBER(19),

CLASS_ID INTEGER NOT NULL,

PRIORITY INTEGER,

SEQUENCE NUMBER(19),

PERMANENT_ID INTEGER,

TEMPORARY_ID INTEGER,

LOCK_ID NUMBER(19),

DATA_SIZE INTEGER NOT NULL,

LONG_DATA LONG RAW,

XID VARCHAR(254),

DELETED SMALLINT,

PRIMARY KEY(ID)

);

 

CREATE INDEX WSRRSIB.SIB000STREAMIX ON

WSRRSIB.SIB000(STREAM_ID,SEQUENCE);

 

CREATE TABLE WSRRSIB.SIB001 (

ID NUMBER(19) NOT NULL,

STREAM_ID NUMBER(19) NOT NULL,

TYPE CHAR(2),

EXPIRY_TIME NUMBER(19),

STRATEGY INTEGER,

REFERENCE NUMBER(19),

CLASS_ID INTEGER NOT NULL,

PRIORITY INTEGER,

SEQUENCE NUMBER(19),

PERMANENT_ID INTEGER,

TEMPORARY_ID INTEGER,

LOCK_ID NUMBER(19),

DATA_SIZE INTEGER NOT NULL,

LONG_DATA LONG RAW,

XID VARCHAR(254),

DELETED SMALLINT,

PRIMARY KEY(ID)

);

 

CREATE INDEX WSRRSIB.SIB001STREAMIX ON

WSRRSIB.SIB001(STREAM_ID,SEQUENCE);

 

CREATE TABLE WSRRSIB.SIB002 (

ID NUMBER(19) NOT NULL,

STREAM_ID NUMBER(19) NOT NULL,

TYPE CHAR(2),

EXPIRY_TIME NUMBER(19),

STRATEGY INTEGER,

REFERENCE NUMBER(19),

CLASS_ID INTEGER NOT NULL,

PRIORITY INTEGER,

SEQUENCE NUMBER(19),

PERMANENT_ID INTEGER,

TEMPORARY_ID INTEGER,

LOCK_ID NUMBER(19),

DATA_SIZE INTEGER NOT NULL,

LONG_DATA LONG RAW,

XID VARCHAR(254),

DELETED SMALLINT,

PRIMARY KEY(ID)

);

 

CREATE INDEX WSRRSIB.SIB002STREAMIX ON

WSRRSIB.SIB002(STREAM_ID,SEQUENCE);

 

CREATE TABLE WSRRSIB.SIBXACTS (

XID VARCHAR2(254) NOT NULL,

STATE CHAR(1) NOT NULL,

PRIMARY KEY(XID)

);

 

CREATE TABLE WSRRSIB.SIBKEYS (

ID VARCHAR2(50) NOT NULL,

LAST_KEY NUMBER(19) NOT NULL,

PRIMARY KEY(ID)

);

 

GRANT SELECT,INSERT,UPDATE ON WSRRSIB.SIBOWNER TO WSRR;

 

GRANT SELECT,INSERT,UPDATE ON WSRRSIB.SIBOWNERO TO WSRR;

 

GRANT SELECT,INSERT ON WSRRSIB.SIBCLASSMAP TO WSRR;

 

GRANT SELECT,INSERT ON WSRRSIB.SIBLISTING TO WSRR;

 

GRANT SELECT,INSERT,DELETE,UPDATE ON WSRRSIB.SIB000 TO WSRR;

 

GRANT SELECT,INSERT,DELETE,UPDATE ON WSRRSIB.SIB001 TO WSRR;

 

GRANT SELECT,INSERT,DELETE,UPDATE ON WSRRSIB.SIB002 TO WSRR;

 

GRANT SELECT,INSERT,UPDATE,DELETE ON WSRRSIB.SIBXACTS TO WSRR;

 

GRANT SELECT,INSERT,UPDATE ON WSRRSIB.SIBKEYS TO WSRR;

 

GRANT DROP ANY TABLE TO WSRR;

    用oracle用户登录到数据库服务器上执行以下语句,以创建(注意,sql文件当中定义的目录需要事先手工创建好,否则执行时会出错!)

 

sqlplus sys/<yourPassword>@ORCL AS SYSDBA @createSibTables.sql

    检查运行结果,看看是否有错误发生。

 

    

以下文章点击率最高

Loading…


发表评论

电子邮件地址不会被公开。 必填项已用*标注