oracle creates table Spaces in detail
- 2020-12-18 01:57:58
- OfStack
Note:
1. If open in PL/SQL, modify the following code
2. Make sure the path exists, such as [D:\oracle\oradata\Oracle9i\] where you want to save the file
There are 4 steps */
/* Step 1: Create a temporary table space */
/* Step 2: Create a data table space */
/* Step 3: Create the user and specify the table space */
/* Step 4: Grant permission to the user */
1. If open in PL/SQL, modify the following code
2. Make sure the path exists, such as [D:\oracle\oradata\Oracle9i\] where you want to save the file
There are 4 steps */
/* Step 1: Create a temporary table space */
create temporary tablespace user_temp
tempfile 'D:\oracle\oradata\Oracle9i\user_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
/* Step 2: Create a data table space */
create tablespace user_data
logging
datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
/* Step 3: Create the user and specify the table space */
create user username identified by password
default tablespace user_data
temporary tablespace user_temp;
/* Step 4: Grant permission to the user */
grant connect,resource,dba to username;