oracle的用户、权限、表空间的管理


1、创建表空间

create tablespace test1_tablespace datafile 'test1file.dbf' size 10m;

 

2、创建临时表空间

 create temporary tablespace temptest1_tablespace tempfile 'tempfile1.dbf' size 10m;

 

3、查看创建的表空间的位置

 select file_name from dba_data_files where tablespace_name='TEST1_TABLESPACE';

 

4、查看创建的临时表空间的位置

select file_name from dba_temp_files where tablespace_name='TEMPTEST1_TABLESPACE';

 

5、创建用户

 create user wyl identified by 123456 default tablespace  test1_tablespace temporary tablespace temptest1_tablespace;

 

6、查看用户

 select username from dba_users;

 

7、授予用户连接数据库的权限

 grant connect to wyl;

 

8、连接到用户wyl

 

9、更改密码

alter user wyl identified by 123;

 

10、连接到用户wyl

 

11、若希望用户不能登录,但又不想删除它,可将用户锁住

 ①conn sys/orcl as sysdba

 ②alter user wyl account lock

 

 

12、删除用户(加上cascade则将用户连同其创建的东西全部删除)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM