Create Oracle Database tablespaces, roles, and user SQL statements

Source: Internet
Author: User
1. Create a role

Create role "qiudingrole" not identified;

Grant "Connect" to "qiudingrole ";
Grant "dba" to "qiudingrole ";
Grant "resource" to "qiudingrole ";

2. Create a tablespace
Create smallfile tablespace "diaocha" datafile 'd: \ oracle \ product \ 10.1.0 \ oradata \ qiuding \ diaocha 'size 100 m autoextend on next 1 m maxsize unlimited logging extent management local segment space management auto;

Begin dbms_server_alert.set_threshold (9000, null, 1, 1, null, 5, 'diaocha '); end;

Create smallfile temporary tablespace "diaocha_temp" tempfile 'd: \ oracle \ product \ 10.1.0 \ oradata \ qiuding \ diaocha_temp 'size 100 m autoextend on next 1 m maxsize unlimited extent management local uniform size 1 m;

Begin dbms_server_alert.set_threshold (9000, null, 5, 'diaocha _ temp '); end;

3. Create a user
Create user qiuding
Identified by "qiuding"
Default tablespace "diaocha"
Temporary tablespace "diaocha_temp"
Profile default
Account unlock;

Grant qiudingrole to qiuding;
Grant unlimited tablespace to qiuding

4. Create a backup directory and grant corresponding Permissions
Create directory dump_dir as 'd: \ oracle \ backup ';
Grant read, write on directory dump_dir to qiuding;

 

Turn: http://www.blogjava.net/lyjjq/articles/99167.html

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.