日期:2014-05-16  浏览次数:20761 次

oracle 创建用户

?
1.首先用管理员用户登陆sqlplus:

sqlplus "sysman/安装时设置的密码"  

??
2.创建用户

create user userName identified by password; 

??
?
创建用户 userName,密码为 password

3.给用户授权

grant dba to userName; --授予DBA权限  
grant unlimited tablespace to userName;--授予不限制的表空间  
grant select any table to userName; --授予查询任何表  
grant select any dictionary to userName;--授予 查询任何字典 

?

4. 创建表空间

--创建立表空间

    CREATE TABLESPACE cheng DATAFILE 'C:\oraclexe\oradata\XE\cheng.dbf' SIZE 500M
UNIFORM SIZE 128k;              #指定区尺寸为128k,如不指定,区尺寸默认为64k
 
--删除表空间
 
     DROP TABLESPACE cheng INCLUDING CONTENTS AND DATAFILES
 
--修改表空间大小
 
     alter database datafile 'c:\oraclexe\oradata\XE\cheng.dbf' resize 50M
?
1 楼 sblig 2012-04-17  
CREATE TABLESPACE TBS_ISP_IT_DAT 
DATAFILE 'G:/app/oradata/rlv_dat001' SIZE 1024M REUSE AUTOEXTEND OFF,
         'G:/app/oradata/rlv_dat002' SIZE 1024M REUSE AUTOEXTEND OFF   
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTO;