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.