SELECT USERENV('LANGUAGE') FROM DUAL;
connect system as sysdba ;
shutdown immediate ;
startup mount ;
alter system enable restricted session;
alter system set JOB_QUEUE_PROCESSES=0;
alter system set AQ_TM_PROCESSES=0;
alter database open ;
alter database character set internal_use ZHS16GBK ;
shutdown immediate ;
startup ;
create tablespace Toaprd_tbs01
logging
permanent
datafile 'F:\APP\ADMINISTRATOR\ORADATA\ORCL\tbs01.dbf'
size 500m
autoextend on
next 50m maxsize 20480m
SEGMENT SPACE MANAGEMENT AUTO
extent management local;--创建表空间
create tablespace Ioaprd_idx01
logging
permanent
datafile 'F:\APP\ADMINISTRATOR\ORADATA\ORCL\idx01.dbf'
size 500m
autoextend on
next 50m maxsize 20480m
SEGMENT SPACE MANAGEMENT AUTO
extent management local;--创建索引表空间
--创建用户
-- Create the user
create user OAPRD
default tablespace TOAPRD_TBS01
temporary tablespace TEMP
profile DEFAULT
password expire;
-- Grant/Revoke role privileges
grant connect to OAPRD;
grant resource to OAPRD;
-- Grant/Revoke system privileges
grant alter any index to OAPRD;
grant alter any procedure to OAPRD;
grant alter any role to OAPRD;
grant alter any sequence to OAPRD;
grant alter any table to OAPRD;
grant alter session to OAPRD;
grant create any index to OAPRD;
grant create any materialized view to OAPRD;
grant create any procedure to OAPRD;
grant create any sequence to OAPRD;
grant create any synonym to OAPRD;
grant create any table to OAPRD;
grant create any view to OAPRD;
grant create database link to OAPRD;
grant create job to OAPRD;
grant create public database link to OAPRD;
grant create tablespace to OAPRD;
grant unlimited tablespace to OAPRD;
---授权语句package未写
GRANT
CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE,
ALTER ANY TABLE, ALTER ANY PROCEDURE,
DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE,
SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE
TO oaprd;
grant create sequence to oaprd
grant unlimited tablespace to oaprd;
grant debug connect session to oaprd;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21302630/viewspace-1571828/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21302630/viewspace-1571828/