当前位置:首页>开发>正文

怎么赋truncate权限给其他用户 oracle里如何对scott用户授权

2023-04-14 22:21:05 互联网 未知 开发

 怎么赋truncate权限给其他用户 oracle里如何对scott用户授权

怎么赋truncate权限给其他用户

楼上的就胡说,权限里根本就没有truncate这一项
-- oracle中truncate其他用户的表必须要有drop any table权限,如果没有此权限,可以采用下面的方法

-- 1.创建存储过程
create or replace procedure truncate_tbl
(table_name in varchar2)
authid definer
as
cursor_id integer
begin
cursor_id := dbms_sql.open_cursor
dbms_sql.parse(cursor_id, TRUNCATE TABLE || table_name, dbms_sql.v7)
dbms_sql.close_cursor(cursor_id)
exception
when others then
dbms_sql.close_cursor(cursor_id)
raise
end truncate_tbl
-- 2.授予存储过程的执行权限
grant execute on truncate_tbl to XXX

oracle里如何对scott用户授权

权限分为系统权限和对象权限。
1. 授予连接权限:grant connect to scott
2. 授予创建表等基本权限:grant resource to scott
3. 授予dba:grant dba to scott
4. 授予使用空间权限:grant unlimited on tablespace to scottalter user scott quota unlimited on tablespace_name


知识延展:
权限管理,一般指根据系统设置的安全规则或者安全策略,用户可以访问而且只能访问自己被授权的资源,不多不少。
权限管理几乎出现在任何系统里面,只要有用户和密码的系统,很多人,常将“用户身份认证”、“密码加密”、“系统管理”等概念与权限管理概念混淆。
系统权限是针对oracle系统操作而言,例如登陆“create session”,创建表“create table”等,
对象权限是针对对象操作的,例如查询“select”,更新“update”等。

oracle怎么给新建用户授予source权限

cmd 进入oracle命令
sqlplus /nolog
conn jrw/jrw@orcl
create用户
sql 代码SQL> create user visiontv identified by visiontv default tablespace visiontv quo
ta 10m on users

Oracle关于用户的授权问题

1.grant create session to test--赋予create session的权限
2.grant create table,create view,create trigger, create sequence,create procedure to test--分配创建表,视图,触发器,序列,过程 权限
3.grant unlimited tablespace to test --授权使用表空间

Oracle数据库如何授权收费

按CPU: License数=CPU 数*系数。系数来自Oracle的一个参数表,如IBM Power6的处理器为1,AMD和Intel的处理器为0.按用户数:Oracle用户数的官方定义是每一个访问Oracle数据库的用户,无论是自然人还是设备(如工业环境中的传感器之类),都算作一个用户(Named User)。
一般情况下,1CPU的费用约等于50user的费用,所以如果用户数>CPU数*系数*50,则按CPU订购反而更为经济。

每个License还有有效期的分类[不论是User License还是CPU License],分别为:1年、2年、3年、4年、5年、永久。当然价格也是依次增加。

当前Oracle 11G的User License无限使用期的价格为人民币3千5左右,按50个User
License无限使用期的购买量则价格为17.5万每个CPU
License无限使用期的价格为17万9千,按IBM小机的系数计算,则购买价格为17万9千,和50个User License的价格相近。

关于服务价格:一般地,购买Oracle的License都包含首年的服务费,以后的费用按每年原价的22%计算。

有关oracle数据库角色授权的问题

可以用plsql建立用户,在users那里右键new一个然后写上基本信息,在role privileges 一项里面写上两个角色权限dba 和connect ,另外在system privileges里面写上unlimited tablespce就可以了,比较简单的建立用户的办法。

最新文章

随便看看