Oracle database creation, table space creation, user creation steps

Source: Internet
Author: User
Tags dba

First, Database creation:

1, the use of database Configuration Assistant (dbca,database Configuration Assistant) Graphical Way

2, after the completion of the creation, find D:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN under the Tnsnames.ora listening configuration file Open

Configure the database name and SID for the new database

3, and then restart Pl\sql Landing can


Second, create a temporary tablespace: (Use default temporary tablespace if not created)

Create temporary tablespace temp_hjb tempfile ' temp_file.dbf ' size 10m;

Modify table space name: Alter tablespace TEMP_HJB rename to Hjb_temp;


Third, create a permanent tablespace: (Use default permanent table space if not created)

Create tablespace hjb_data datafile ' hjb_data.dbf ' size 10m;

Modify the table space (online or offline) status: Alter Tablespace hjb_data Online|offline;

To view the file name of a tablespace: select file_name from dba_data_files where tablespace_name = ' hjb_data '; (table space name to capitalize)

Add Delete table space data file: Alter tablespace hjb_data add/drop data_file ' hjb_data.dbf ';


Create a User: (specify both its temporary and permanent tablespace spaces)

Create user WBS identified by wbs123 account unlock
Default Tablespace HJB
Temporary tablespace hjb_temp;

Delete users: Drop user hjb_wbs;


V. Empowering newly created Users

Grant Connect,resource to WBS; -Grant Connect,resource permissions to new users

Grant DBA to WBS; -Delegating DBA authority to new users


Note:

Grant XXX to User;,grant is the role of authorization, where XXX can be a role or a privilege

DBA: With full privileges, the system has the highest privileges, and only DBAs can create the database structure.

RESOURCE: Users with RESOURCE permissions can create entities only and cannot create database structures.

Connect: Users who have connect permissions can only log on to Oracle and cannot create entities and cannot create database structures.

For ordinary users: Grant Connect, resource permissions.

For DBA administration User: Grant Connect,resource, dba authority.


Database user creation completed.

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.