linux创建oracle数据库无权限
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux创建oracle数据库无权限相关的知识,希望对你有一定的参考价值。
参考技术A 正常现象。linux创建oracle数据库无权限是正常现象。新建立的用户是没有权限的,是不能执行数据库的操作。要创建一个表空间,把这个表空间分配给你创建的用户,默认情况下,你创建的用户是在users表空间,你创建的用户在这个表空间没有建表的权限。linux 下如何创建oracle 新用户
我用secureCRT进入红帽系统,系统里已经安装了ORACLE。现在我想要创建一个oracle的新用户,这个新用户有完全权限,该怎么建,注意是在字符模式下。
参考技术A 在CRT中进入oracle--连接sqlplus
按照下面写完代码直接复制进去回车就行了
---建立用户代码为:CREATE
USER
"用户名字"
PROFILE
"DEFAULT"
IDENTIFIED
BY
"密码"
DEFAULT
TABLESPACE
"指定表空间名字"
TEMPORARY
TABLESPACE
"临时表空间"
ACCOUNT
UNLOCK;
---赋权
begin
EXECUTE
IMMEDIATE
'GRANT
SELECT
ANY
DICTIONARY
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
ALTER
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
ALTER
SYSTEM
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
ALTER
ANY
PROCEDURE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CONNECT
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
PROCEDURE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
INDEX
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
DATABASE
LINK
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
PUBLIC
DATABASE
LINK
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
VIEW
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
PUBLIC
SYNONYM
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DELETE
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
PUBLIC
DATABASE
LINK
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
ANY
TRIGGER
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
ANY
INDEX
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
ANY
PROCEDURE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
ANY
VIEW
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
PUBLIC
SYNONYM
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
PUBLIC
SYNONYM
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
SEQUENCE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
EXECUTE
ANY
PROCEDURE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
GRANT
ANY
PRIVILEGE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
GRANT
ANY
ROLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
TRIGGER
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
INSERT
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
SELECT
ANY
DICTIONARY
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
SELECT
ANY
SEQUENCE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
DROP
ANY
SEQUENCE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
SELECT
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
UNLIMITED
TABLESPACE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
UPDATE
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
COMMENT
ANY
TABLE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
ANY
TYPE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
TABLESPACE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
CREATE
USER
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
EXP_FULL_DATABASE
TO
用户名';
EXECUTE
IMMEDIATE
'GRANT
IMP_FULL_DATABASE
TO
用户名';
End;
---或者直接给DBA权限
以上是关于linux创建oracle数据库无权限的主要内容,如果未能解决你的问题,请参考以下文章