Tablespace (upper), tablespace (
4. directly modify the tablespace resizing:
(1) General tablespace:
Automatic Scaling: alter database datafile '/oracle/app/oradata/tbs_sys_ptcl.dbf' autoextend on;
Disable auto Scaling: alter database datafile '/oracle/app/oradata/tbs_sys_ptcl.dbf' autoextend off;
Specify the size: alter database datafile '/oracle/app/oradata/tbs_sys_ptcl.dbf' resize 50 m;
(2) Temporary tablespace
Automatic Scaling: alter database tempfile '/oracle/app/oradata/tbs_temp_ptcl.dbf' autoextend on;
Disable auto Scaling: alter database datafile '/oracle/app/oradata/tbs_sys_ptcl.dbf' autoextend off;
Specify the size: alter database tempfile '/oracle/app/oradata/tbs_temp_ptcl.dbf' resize 50 m;
(3) Search statement after resizing:
Select * from dba_tablespaces a where a. tablespace_name like '% PTCL ';
5. Add new data files to the tablespace
(1) General tablespace:
Specify the size: alter tablespace tbs_sys_ptcl add datafile '/oracle/oradata/ora242/YM_tbs/tbs_sys_ptcl.ora' size 50 M;
Automatic extension of alter tablespace tbs_sys_ptcl add datafile '/oracle/oradata/ora242/YM_tbs/tbs_sys_ptcl.ora' size 50 M
Autoextend on;
(2) Temporary tablespace
Specify the size: alter tablespace tbs_temp_ptcl add tempfile '/oracle/oradata/ora242/YM_tbs/tbs_temp_ptcl.dbf' size 50 M;
Automatic Scaling: alter tablespace tbs_temp_ptcl add tempfile '/oracle/oradata/ora242/YM_tbs/tbs_temp_ptcl.dbf' size 50 M
Autoextend on;
6. delete users and their tablespaces:
(1) Delete A User:
Drop user lbi_sys_ptcl cascade;
(2) Delete the tablespace:
Drop tablespace TBS_SYS_PTCL including contents and datafiles cascade constraints;
(3) Delete data files:
Alter database datafile '/oracle/oradata/ora242/YM_tbs/TBS_DW_YM.ora' offline drop;
How to create tables and tablespaces in Oracle?
1. Log On with the sys user, create a tablespace, and then create a user. The user needs to create a tablespace;
Example: create tablespace "CC_HINDEX"
---- DATAFILE 'f: \ oracle \ product \ 10.2.0 \ oradata \ Database Name \ CC_HINDEX.ora 'SIZE 300 M
Autoextend on next 50 M MAXSIZE UNLIMITED
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8 K
SEGMENT SPACE MANAGEMENT AUTO
Flashback on;
----- Create user XXX
Identified by XXX
Quota unlimited on cc_hindex
-- Grant/Revoke role privileges
Grant connect to xxx;
Grant resource to xxx;
Grant dba to xxx;
-- Grant/Revoke system privileges
Grant alter session to xxx;
I hope to help you with this misunderstanding.
In the oracle database, how do I view all the table names created on a tablespace?
Select table_name, tablespace_name from dba_tables where tablespace_name = 'tablespace name ';
DBA permission required
Select table_name, tablespace_name from user_tables where tablespace_name = 'tablespace name ';
Only query the current user without DBA permission