1、突然想查看數據庫中哪些用戶擁有DBA權限,於是百度了一下,找到了這一條語句:
select * from dba_role_privs where granted_role='DBA'
注意:執行這一條語句需要執行者本來就要有DBA權限
另外如果要是想收回某用戶的DBA權限則執行:
revoke dba from user_Name
2、在cmd命令行輸入 sqlplus sys/tarena as sysdba 即可.
然后輸入:create user tarena identified by user;
grant connect,resource,create session,create table to user;創建用戶並且賦予權限權.
3、查看數據庫
select * from v$database;
4、允許遠程訪問
https://blog.csdn.net/pengpengpeng85/article/details/78757484
5、創建表空間
create tablespace tablespacename datafile 'd:\data.dbf' size xxxm; tablespacename:表空間的名字 d:\data.dbf':表空間的存儲位置 xxx表空間的大小,m單位為兆(M)
6、將空間分配給用戶:
alert user username default tablespace tablespacename; 將名字為tablespacename的表空間分配給username
7、允許 自動擴展表空間
alter database datafile '/Database/oraapp/oracle/oradata/scorl/SC_CORE20200618.dbf' autoextend on;