linux 下如何创建oracle 新用户

linux 下如何创建oracle 新用户,第1张

在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权限

在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

用户名'

1、我们在Sql Plus中,我们利用Create User关键字进行用户创建。

2、此时,我们就可以在Create User后面,指定用户名称。

3、这时候,我们就可以在这里利用Indentified By关键字引导。

4、引导我们当前新建的用户指定与Test。

5、这时候,我们按下回车,就可以看到我们新家你的Angela用户成功创建。

6、这时候,我们就能对Dba_Users表进行查询是否创建成功。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8918652.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-23
下一篇 2023-04-23

发表评论

登录后才能评论

评论列表(0条)

保存