Faster Management of Oracle Datafiles

Source: Internet
Author: User

Today we are going to discuss with you the actual management operations of Oracle Datafiles. I saw the management information of Oracle Datafiles on the relevant website two days ago and thought it was quite good. I will share it with you, I hope it will help you in this regard.

 
 
  1. SQL>alter tablespace ...add datafile ...  
  2. SQL>alter tablespace ...add tempfile ...  

1. add files:

 
 
  1. SQL>CREATE SMALLFILE TABLESPACE "STAGING" DATAFILE 
    '/u01/app/oracle/oradata/orcl/staging01.dbf' SIZE 3M REUSE NOLOGGING  
  2. EXTENT MANAGEMENT LOCAL  
  3. SEGMENT SPACE MANAGEMENT AUTO  

1. Add a file

 
 
  1. SQL>alter tablespace myts01  
  2. add datafile 'd:\oracle\product\10.2.0\oradata\orcl\myts03.dbf' size 10M;  

2. Manage temporary tablespace for Oracle Datafiles to add files

 
 
  1. SQL>alter tablespace temp  
  2. add tempfile 'd:\oracle\product\10.2.0\oradata\orcl\mytemp.dbf' size 10M;  
  3. ==============================================================  

Ii. Change the data file size

1. Set the data file to automatically increase

 
 
  1. SQL>create smallfile tablespace myts02  
  2. datafile 'd:\oracle\product\10.2.0\oradata\orcl\myts02_1.dbf' size 10M  
  3. autoextend on  
  4. next 5M  
  5. maxsize 50M;  
  6. SQL>alter tablespace myts02  
  7. add datafile 'd:\oracle\product\10.2.0\oradata\orcl\myts02_2.dbf' size 10M  
  8. autoextend on  
  9. next 4k  
  10. maxsize 40M;  
  11. SQL>alter database  
  12. datafile 'd:\oracle\product\10.2.0\oradata\orcl\myts01_3.dbf'  
  13. autoextend on  
  14. next 2M  
  15. maxsize 20M;  

Cancel automatic Growth

 
 
  1. SQL>alter database  
  2. datafile 'd:\oracle\product\10.2.0\oradata\orcl\myts01_3.dbf'  
  3. autoextend off;  

2. Modify the data file size

 
 
  1. SQL>alter database  
  2. datafile 'd:\oracle\product\10.2.0\oradata\orcl\myts01_3.dbf' resize 100M;   

The above content describes the management of Oracle Datafiles, hoping to help you in this regard.

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.