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则将用户连同其创建的东西全部删除)
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步