Oracle CREATE database, table user, and permission settings code

Source: Internet
Author: User

--Create TABLE space and database files and default tablespace size
Create tablespace tablespace_test datafile ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\DataBase_Test.DBF ' size 200m;

--Set up automatic database growth
ALTER DATABASE datafile ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\DataBase_Test.DBF ' autoextend on;

--Create User
Create user user_test identified by password_test default tablespace tablespace_test account unlock;

--Authorization to the user
Grant Create Table,create View,create trigger, create sequence,create procedure to user_test;
Grant DBA to User_test;


--Modify Table space size
ALTER DATABASE datafile ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\DataBase_Test.DBF ' resize 500m;

---************* after importing the database (DMP) tablespace incorrect workaround ************************
Revoke unlimited tablespace from User_test

Alter user user_test default Tablespace tablespace_test

Alter user user_test quota unlimited on tablespace_test

Alter user user_test quota 0 on system
---**************************************************************************

Oracle CREATE database, table user, and permission settings code

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.