Tip: Article written in 2018/04/24 daily notes generally just as a note, will not do too much is explained
Notes Main content: Oracle simple structure diagram, create database table space User Basic authorization
Notes purpose: Prepare a basic Oracle database for a project when building a new project
1.oracle simple structure diagram, table space and user and table relationship
2.oracle flowchart for creating a database
Note: For why to create temporary table space, please Baidu, if you do not create table space and temporary table space, then create the user, will use system the default table space and the default temporary table space, when you increase the user, the data increases, if all are placed in a table space and a temporary table space inside ( the system default tablespace), then you may explode!!!
3. Create temporary tablespace and tablespace-----------Previous Oracle instance, DBA account creation omitted.
--SYSDBA Login--creating a temporary tablespace requires specifying the physical path of the tablespace file with the file suffix dbf--such as my temporary tablespace path: E:\zero\life\temp\myTempTablespace.dbf--Initial size 1024M, 256M per capacity, max size 2048MCREATE Temporarytablespace my_temp_tablespace tempfile'E:\zero\life\temp\myTempTablespace.dbf'SIZE 1024MREUSE autoextend on NEXT256M MAXSIZE 2048M;--CREATE TABLE SpaceCREATEtablespace my_tablespace datafile'E:\zero\life\temp\myTablespace.dbf'SIZE 4096MREUSE autoextend on NEXT1024M MAXSIZE UNLIMITED;--keyword Description:--Temporary: Temporary tablespace, non-additive table space--tempfile: Specifying a temporary tablespace file path
--datafile: Specify tablespace file path
-- Size : initial file size -- reuse: tablespace file Reuse -- autoextend on NEXT: Automatically expands size when initial size is full -- MAXSIZE UNLIMITED: Maximum size of table space, no Limit
4. Create a user and specify tablespace and temp table space
-- Create a user and specify tablespace and temp table space CREATE USER by My_password DEFAULT tablespace my_tablespace Temporary Tablespace my_temp_tablespace;
5, Grant user logon, resource permissions
-- Grant user logon, resource permissions GRANT to My_username
Oracle from creating a database to Running