Everyone in the project development process to apply MySQL and SQL Server more, Oracle used less, MySQL and SQL Server to use more similar, MySQL and SQL Server directly through the CREATE DATABASE "name" You can create a database, and Oracle needs the database and the user to correspond when creating the database, the following is the steps to create an Oracle database:
Create a file for two databases
Create a mapping relationship between the user and the file created above
Adding permissions to Users
I. Creation of two database files (monitor.dbf and monitor_temp.dbf two files)
Copy Code code as follows:
CREATE tablespace monitor LOGGING datafile ' E:\app\owner\oradata\orcl\monitor.dbf '
SIZE 100M autoextend on NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT Local;
Copy Code code as follows:
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;
II. Create a mapping relationship between the user and the file created above (user name is monitor, password is monitor)
Copy Code code as follows:
CREATE USER Monitor identified by Monitor DEFAULT tablespace monitor temporary tablespace monitor_temp;
Third, add permissions
Copy Code code as follows:
Grant CONNECT,RESOURCE,DBA to monitor;
Grant create session to monitor;
Sometimes it is also used to delete the database and delete the user's operation, here also gives the deletion statement
Iv. Delete Database
Copy Code code as follows:
DROP tablespace Monitor including CONTENTS and datafiles;
V. Delete users
Copy Code code as follows:
Drop User monitor cascade;
Based on the above steps, you can successfully create Oracle databases and users, and hope to help.