SQL creates Oracle tablespaces, users, and methods to empower users

Source: Internet
Author: User

Creating tablespace Create tablespace examination//CREATE table Space examinationdatafile ' c:\Oracle\zhangwei\examination.dbf '// The file location associated with the tablespace (to manually build the folder in advance) size 100m//file, do not write MB (here can be slightly) autoextend on//file size can be automatically expanded next 30m//each expansion 30mmaxsize unlimited//does not limit the maximum file size logging//Generate log extent for the creation and change of database objects in the Tablespace Management local//table space management using localized management segment space Management//Table space in the middle of the management mode for automatic management;//Do not forget to make a semicolon as end//create user orcl//Create user, case-insensitive, without quotes identified by orcl//create password, Case-insensitive, non-quoted default tablespace examination//Specifies the user's default tablespace, default to Systemtemporary tablespace//Create temporary tablespace for user, default to temp;// Finally, don't forget the semicolon end//permissions and Roles Oracle has two types of user rights: System permissions: Allows users to perform certain database operations, such as creating tablespaces. Object permissions: Allows a user to perform specific actions on a particular object, such as a table, view, sequence. Because of the many permissions, when users are getting more and more, setting permissions on different users can be very complex, so Oracle introduces the concept of roles. Connect: Temporary users, especially those who do not need to create a table. Resource: Generally used for formal users, you can create tables, triggers, procedures, and so on. DBA: The database administrator, with the highest permissions to administer the database, can change, delete, and remove other users ' accounts and permissions. Grant Resource,connect to orcl//resource and connect permissions are granted to users Orclrevoke resource from orcl//release user ORCL resource role Grant Select on users to orcl//grant user ORCL the right to view the Users table grant update on the users to orcl//grants the user ORCL permission to update the users table



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.