1Z0-051-1SQL-准备工作
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1Z0-051-1SQL-准备工作相关的知识,希望对你有一定的参考价值。
0、准备工作
SQL> createtablespace tbs_peenboo
2 datafile ‘/home/oracle/app/oracle/oradata/orcl/tbs_peenboo01.dbf‘
3 size20m autoextend on next 5m maxsize 2G
4 logging
5 extent management local
6 segment space management auto
7 default nocompress;
Tablespace created.
SQL> create userpeenboo
2 default tablespace tbs_peenboo temporary tablespace temp
3 quota unlimited on tbs_peenboo
4 identified by pb1234
5 password expire
6 account unlock;
User created.
SQL> grant createsession,alter session,create table,create view,create synonym, create cluster,create database link,createsequence,create trigger,create type,create procedure,create operator to dev;
Grant succeeded.
SQL> grantdev,resource,dba to peenboo with admin option;
Grant succeeded.
##注:授予权限一定要非常小心,且进行验证。
SQL> select *from dba_role_privs where grantee=‘PEENBOO‘;
GRANTEE GRANTED_ROLE ADM DEF
----------------------------------------------------------- ---
PEENBOO DBA YES YES
PEENBOO RESOURCE YES YES
PEENBOO DEV YES YES
SQL> revoke dba frompeenboo;
SQL> select *from dba_role_privs
2 where grantee=‘PEENBOO‘;
GRANTEE GRANTED_ROLE ADM DEF
------------------------------------------------------------ --- ---
PEENBOO RESOURCE YES YES
PEENBOO DEV YES YES
SQL> conn peenboo
Enter password:
ERROR:
ORA-28001: thepassword has expired
Changing passwordfor peenboo
New password:
Retype new password:
Password changed
Connected.
SQL>
本文出自 “奋斗不止” 博客,请务必保留此出处http://peenboo.blog.51cto.com/2865551/1790579
以上是关于1Z0-051-1SQL-准备工作的主要内容,如果未能解决你的问题,请参考以下文章