Oracle creates a database in three steps and oracle creates a database in three steps

Source: Internet
Author: User

Oracle creates a database in three steps and oracle creates a database in three steps

In the past, mysql and SQL server were mostly used during development, while oracle was rarely used and unfamiliar. mysql and SQL server were used in a similar way, the usage of oracle is different from that of oracle. When creating a database, oracle needs to correspond to one user. Generally, the database corresponds to one user, mysql and SQL server can directly create a database by using the create databse "Database Name", while creating a database in oracle requires the following three steps:

Create two database files

Create a ing between the user and the file created above

Add permissions to users

1. Create two database files (monitor. dbf and monitor_temp.dbf)

CREATE TABLESPACE monitor LOGGING DATAFILE 'E:\app\owner\oradata\orcl\monitor.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;  create temporary tablespace monitor_temp tempfile 'E:\app\owner\oradata\orcl\monitor_temp.dbf' size 100m autoextend on next 32m maxsize 500m extent management local; 

2. Create a ing between the user and the file created above (the user name is monitor and the password is monitor)

Copy codeThe Code is as follows: create user monitor identified by monitor default tablespace monitor temporary tablespace monitor_temp;

3. Add Permissions

grant connect,resource,dba to monitor; grant create session to monitor; 

Sometimes database deletion and user deletion are also used. The delete statement is also provided here.

4. delete a database

DROP TABLESPACE monitor INCLUDING CONTENTS AND DATAFILES; 

5. delete a user

DROP TABLESPACE monitor INCLUDING CONTENTS AND DATAFILES; 

The above is the whole process of creating a database in oracle. You can try to create a database and hope to help you.

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.