建立表空间和用户

CREATE TABLESPACE DATA_CENTER_DATA DATAFILE 
  '/opt/oracle/oradata/mesdb/data_center_data.dbf' SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE UNLIMITED
LOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;


DROP USER DATA_CENTER CASCADE;

CREATE USER DATA_CENTER
  IDENTIFIED BY data_center
  DEFAULT TABLESPACE DATA_CENTER_DATA
  TEMPORARY TABLESPACE TEMP
  PROFILE DEFAULT
  ACCOUNT UNLOCK;
  -- 1 Role for DATA_CENTER 
  GRANT CONNECT TO DATA_CENTER;
  ALTER USER DATA_CENTER DEFAULT ROLE ALL;
  -- 16 System Privileges for DATA_CENTER 
  GRANT ALTER ANY PROCEDURE TO DATA_CENTER;
  GRANT ALTER ANY TABLE TO DATA_CENTER;
  GRANT CREATE ANY INDEX TO DATA_CENTER;
  GRANT CREATE ANY PROCEDURE TO DATA_CENTER;
  GRANT CREATE ANY TABLE TO DATA_CENTER;
  GRANT CREATE ANY VIEW TO DATA_CENTER;
  GRANT CREATE SEQUENCE TO DATA_CENTER;
  GRANT CREATE SESSION TO DATA_CENTER;
  GRANT DELETE ANY TABLE TO DATA_CENTER;
  GRANT DROP ANY INDEX TO DATA_CENTER;
  GRANT DROP ANY PROCEDURE TO DATA_CENTER;
  GRANT DROP ANY TABLE TO DATA_CENTER;
  GRANT DROP ANY VIEW TO DATA_CENTER;
  GRANT INSERT ANY TABLE TO DATA_CENTER;
  GRANT SELECT ANY TABLE TO DATA_CENTER;
  GRANT UPDATE ANY TABLE TO DATA_CENTER;
  -- 1 Tablespace Quota for DATA_CENTER 
  ALTER USER DATA_CENTER QUOTA UNLIMITED ON DATA_CENTER_DATA;

 

上一篇:参数化解决sql注入


下一篇:linux下oracle修改、新建用户并授权