欢迎您访问新疆栾骏商贸有限公司,公司主营电子五金轴承产品批发业务!
全国咨询热线: 400-8878-609

新闻资讯

常见问题

oracle创建用户过程详解

作者:用户投稿2026-01-11 03:21:56

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