select * from role_sys_privs;
descr role_sys_privs
Name Null Type
------------ ---- -------------
ROLE VARCHAR2(128)
PRIVILEGE VARCHAR2(40)
ADMIN_OPTION VARCHAR2(3)
COMMON VARCHAR2(3)
查看db裡有哪些使用者(以sys登入)
select * from dba_users
descr dba_users
Name Null Type
--------------------------- -------- ---------------------------
USERNAME NOT NULL VARCHAR2(128)
USER_ID NOT NULL NUMBER
PASSWORD VARCHAR2(4000)
ACCOUNT_STATUS NOT NULL VARCHAR2(32)
LOCK_DATE DATE
EXPIRY_DATE DATE
DEFAULT_TABLESPACE NOT NULL VARCHAR2(30)
TEMPORARY_TABLESPACE NOT NULL VARCHAR2(30)
CREATED NOT NULL DATE
PROFILE NOT NULL VARCHAR2(128)
INITIAL_RSRC_CONSUMER_GROUP VARCHAR2(128)
EXTERNAL_NAME VARCHAR2(4000)
PASSWORD_VERSIONS VARCHAR2(12)
EDITIONS_ENABLED VARCHAR2(1)
AUTHENTICATION_TYPE VARCHAR2(8)
PROXY_ONLY_CONNECT VARCHAR2(1)
COMMON VARCHAR2(3)
LAST_LOGIN TIMESTAMP(9) WITH TIME ZONE
ORACLE_MAINTAINED VARCHAR2(1)
查看user有哪些權限(以sys登入)
select * from dba_sys_privs
descr dba_sys_privs
Name Null Type
------------ ---- -------------
GRANTEE VARCHAR2(128)
PRIVILEGE VARCHAR2(40)
ADMIN_OPTION VARCHAR2(3)
COMMON VARCHAR2(3)
查看user有哪些role(以sys登入)
select * from dba_role_privs
descr dba_role_privs
Name Null Type
------------ ---- -------------
GRANTEE VARCHAR2(128)
GRANTED_ROLE VARCHAR2(128)
ADMIN_OPTION VARCHAR2(3)
DEFAULT_ROLE VARCHAR2(3)
COMMON VARCHAR2(3
只列出自己建立的user 有哪些role(以sys登入)
select * from dba_role_privs
where grantee in(select username from dba_users where ACCOUNT_STATUS='OPEN') order by grantee
沒有留言:
張貼留言