BCA3.2.1 - 建立db

-- 创建表空间
CREATE TABLESPACE "BCA"
    LOGGING
    DATAFILE 'D:\ORACLE\ORADATA\BCA\BCA1.ora' SIZE 265M REUSE
    AUTOEXTEND
    ON NEXT  10240K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT  AUTO ;


CREATE TABLESPACE "HONEST"
    LOGGING
    DATAFILE 'D:\ORACLE\ORADATA\BCA\HONEST1.ora' SIZE 5M REUSE
    AUTOEXTEND
    ON NEXT  1000K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT  AUTO ;


CREATE TABLESPACE "TCWM"
    LOGGING
    DATAFILE 'D:\ORACLE\ORADATA\BCA\TCWM1.ora' SIZE 15M REUSE
    AUTOEXTEND
    ON NEXT  10240K MAXSIZE  16383M EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT  AUTO ;


CREATE TABLESPACE "TEST"
    LOGGING
    DATAFILE 'D:\ORACLE\ORADATA\BCA\TEST1.ora' SIZE 375M REUSE
    AUTOEXTEND
    ON NEXT  10240K MAXSIZE  10000M EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT  AUTO ;





-- 创建用户

CREATE USER "BCA"  PROFILE "DEFAULT"
    IDENTIFIED BY "1" DEFAULT TABLESPACE "BCA"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "BCA" WITH ADMIN OPTION;
GRANT "CONNECT" TO "BCA" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "BCA" WITH ADMIN OPTION;



CREATE USER "BCA320HN"  PROFILE "DEFAULT"
    IDENTIFIED BY "5" DEFAULT TABLESPACE "BCA"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "BCA320HN" WITH ADMIN OPTION;
GRANT "CONNECT" TO "BCA320HN" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "BCA320HN" WITH ADMIN OPTION;




CREATE USER "BCALOG"  PROFILE "DEFAULT"
    IDENTIFIED BY "2" DEFAULT TABLESPACE "BCA"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "BCALOG" WITH ADMIN OPTION;
GRANT "CONNECT" TO "BCALOG" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "BCALOG" WITH ADMIN OPTION;





CREATE USER "HMTK"  PROFILE "DEFAULT"
    IDENTIFIED BY "hspace" DEFAULT TABLESPACE "HONEST"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "HMTK" WITH ADMIN OPTION;
GRANT "CONNECT" TO "HMTK" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "HMTK" WITH ADMIN OPTION;


CREATE USER "TCWM"  PROFILE "DEFAULT"
    IDENTIFIED BY "1" DEFAULT TABLESPACE "TCWM"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "TCWM" WITH ADMIN OPTION;
GRANT "CONNECT" TO "TCWM" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "TCWM" WITH ADMIN OPTION;



CREATE USER "TEST01"  PROFILE "DEFAULT"
    IDENTIFIED BY "1" DEFAULT TABLESPACE "TEST"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "TEST01" WITH ADMIN OPTION;
GRANT ALTER ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT ALTER ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT DELETE ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT DELETE ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT INDEX ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT INDEX ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT INSERT ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT INSERT ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT REFERENCES ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT REFERENCES ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT SELECT ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT SELECT ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT UPDATE ON  "TEST02"."TEST_MESURE02" TO "TEST01" WITH GRANT OPTION;
GRANT UPDATE ON  "TEST02"."WF_ACT_PROP_REG" TO "TEST01" WITH GRANT OPTION;
GRANT "CONNECT" TO "TEST01" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "TEST01" WITH ADMIN OPTION;



CREATE USER "TEST02"  PROFILE "DEFAULT"
    IDENTIFIED BY "2" DEFAULT TABLESPACE "TEST"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "TEST02" WITH ADMIN OPTION;
GRANT "CONNECT" TO "TEST02" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "TEST02" WITH ADMIN OPTION;


你可能感兴趣的:(oracle)