有下面这些权限表,你自己研究一下:
SQL>
select from dictionary where table_name like '%PRIVS%';TABLE_NAME COMMENTS
-------------------- ----------------------------------------
ALL_COL_PRIVS Grants on columns for which the user is
the grantor, grantee, owner,
or an enabled role or PUBLIC is the gra
ntee
ALL_COL_PRIVS_MADE Grants on columns for which the user is
owner or grantor
ALL_COL_PRIVS_RECD Grants on columns for which the user, PU
BLIC or enabled role is the grantee
TABLE_NAME COMMENTS
-------------------- ----------------------------------------
ALL_TAB_PRIVS Grants on objects for which the user is
the grantor, grantee, owner,
or an enabled role or PUBLIC is the gra
ntee
ALL_TAB_PRIVS_MADE User's grants and grants on user's objec
ts
ALL_TAB_PRIVS_RECD Grants on objects for which the user, PU
BLIC or enabled role is the grantee
TABLE_NAME COMMENTS
-------------------- ----------------------------------------
DBA_AQ_AGENT_PRIVS
DBA_COL_PRIVS All grants on columns in the database
DBA_ROLE_PRIVS Roles granted to users and roles
DBA_RSRC_CONSUMER_GR Switch privileges for consumer groups
OUP_PRIVS
DBA_RSRC_MANAGER_SYS system privileges for the resource manag
TEM_PRIVS er
DBA_SYS_PRIVS System privileges granted to users and r
oles
TABLE_NAME COMMENTS
-------------------- ----------------------------------------
DBA_TAB_PRIVS All grants on objects in the database
USER_AQ_AGENT_PRIVS
USER_COL_PRIVS Grants on columns for which the user is
the owner, grantor or grantee
USER_COL_PRIVS_MADE All grants on columns of objects owned b
y the user
USER_COL_PRIVS_RECD Grants on columns for which the user is
the grantee
TABLE_NAME COMMENTS
-------------------- ----------------------------------------
USER_ROLE_PRIVS Roles granted to current user
USER_RSRC_CONSUMER_G Switch privileges for consumer groups fo
ROUP_PRIVS r the user
USER_RSRC_MANAGER_SY system privileges for the resource manag
STEM_PRIVS er for the user
USER_SYS_PRIVS System privileges granted to current use
r
TABLE_NAME COMMENTS
-------------------- ----------------------------------------
USER_TAB_PRIVS Grants on objects for which the user is
the owner, grantor or grantee
USER_TAB_PRIVS_MADE All grants on objects owned by the user
USER_TAB_PRIVS_RECD Grants on objects for which the user is
the grantee
ROLE_ROLE_PRIVS Roles which are granted to roles
ROLE_SYS_PRIVS System privileges granted to roles
ROLE_TAB_PRIVS Table privileges granted to roles
SESSION_PRIVS Privileges which the user currently has
TABLE_NAME COMMENTS
-------------------- ----------------------------------------
set
GV$ENABLEDPRIVS Synonym for GV_$ENABLEDPRIVS
V$ENABLEDPRIVS Synonym for V_$ENABLEDPRIVS
已选择30行。
SQL>
用scott用户登录后执行
declarel_dname varchar2(200) ;
begin
select max(ddname) into l_dname from dept d where exists (select 1 from emp e where ddeptno=edeptno and eename = '&输入员工姓名') ;
dbms_outputput_line(nvl(l_dname,'没有找到该员工')) ;
end ;
/
表名和用户没有关系,关键的一个实例下,不能有相同的表名存在。也就是说Oracle数据库系统中,可以有多个数据库,每一个数据库可以有多个数据表。
同一个数据库中不能有相同名称的数据表,但在不同的数据库中可以有相同的数据表名。
首先第一步,你的终端上要安装oracle client,或者oracle server,这是Plsql连接oracle的基本要求。
第二步,你要在你的$ORACLE_HOME/network/admin目录下配置tns,配置文件是tnsnamesora,配置的格式为:
ORCL(按照你的要求命名) =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = 数据库服务sid)
)
)
配置完后,保存。
第三步,打开plsql,你会在
看到你刚才配置的服务,选择以后,登录就可以了。
---------------------------------------------------
还有一种比较简便的方式,
直接在数据库输入框的地方输入ip:端口(不输入默认1521)/数据库sid,就可以连接,无需配置tns。
导出创建表空间和用户的pdc
for i in select tablespace_name from dba_tablespaces loop
SELECT dbms_metadataget_ddl('i','TABLESPACE_NAME') into v_varchar from dual;
insert into a values (v_varchar);
end loop;
用户,对象等同理
in sqlplus:
host exp
可在PL/SQL中导出DMP
以上就是关于如何查询oracle当前用户权限的授予人,或者当前用户给其他用户授予过的权限全部的内容,包括:如何查询oracle当前用户权限的授予人,或者当前用户给其他用户授予过的权限、用plsql编译一个匿名块,由用户输入员工姓名,获取该员工的部门名称,,感谢大大、一个数据库有不同的用户而且每个用户表也不一样,那么在plsql中怎样用该数据库的一个用户等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)