Tablespace (upper), tablespace (

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.