oracle 创建 删除 增加 表空间 用户授权
《PS:留下小赞赞,比心比心》
1.查询用户表空间
---select username,default_tablespace from dba_users;
---select tablespace_name from user_tablespaces;
---select username,default_tablespace from dba_users where username='JIUQI';
--1.1 删除表空间
---https://zhidao.baidu.com/question/809236437836705492.html
---drop tablespace tablespace_name including contents and datafiles;
2.删除表空间---drop tablespace userManager including contents;
---alter user DC default tablespace NEWDC; 修改用户默认表空间
3.删除用户---drop user jiuqi cascade;
4.查询表空间所在的数据文件---SELECT * FROM dba_data_files;
5.创建表空间---
create tablespace ASSETS
datafile 'D:\APP\ADMINISTRATOR\ORADATA\ZLORCL\ASSETS01.DBF'
size 1024m autoextend
on next 50m maxsize unlimited extent management local
segment space management auto;
6 增加表空间 -- alter tablespace ASSETS add datafile 'E:\ORACLE\ORADATA\ORCL\ASSETS5.dbf' size 10g autoextend on next 500M;
6.创建用户---create user jiuqi default tablespace ASSETS identified by jiuqi;
6.1 修改用户默认表空间 alter user user default tablespace tablespaceName
7.赋予用户权限---grant dba to jiuqi;
grant all privileges to jiuqi;
grant select any table to jiuqi;
grant insert any table to jiuqi;
grant update any table to jiuqi;
grant delete any table to jiuqi;
grant create any table to jiuqi;