1z0-051-1, sql-preparation work

Source: Internet
Author: User
Tags dba

0 , preparatory work

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,c Reatesequence,create trigger,create type,create procedure,create operator to Dev;

Grant succeeded.

Sql> grantdev,resource,dba to peenboo with admin option;

Grant succeeded.

## Note: Grant permissions must be very careful and validated.

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>


This article is from the "struggle more than" blog, please be sure to keep this source http://peenboo.blog.51cto.com/2865551/1790579

1z0-051-1, sql-preparation work

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.