How to create an Oracle tablespace in six minutes

Source: Internet
Author: User

Six minutes to learn how to create an Oracle tablespace. After a long time to learn how to create an Oracle tablespace, I would like to share it with you. After reading this article, you will certainly have a lot of GAINS. I hope this article will teach you more. Www.2cto.com 1. First query the idle space select tablespace_name, file_id, block_id, bytes, blocks from dba_free_space; 2. Add an Oracle tablespace to first query the data file name, size, and path information. The statement is as follows: select tablespace_name, file_id, bytes, file_name from dba_data_files; 3. Modify the file size statement as follows: alter database datafile the data file path to be added, that is, the path 'resize 800 M; 4. create an Oracle tablespace www.2cto.com create tablespace test datafile '/home/app/oracle/oradata/oracle8i/test01.dbf' size 8 M autoext End on next 5 M maxsize 10 M; create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800 M autoextend on next 50 M maxsize unlimited is not limited in size create tablespace sales datafile '/ home/app/oracle/oradata/oracle8i/sales01.dbf 'size 800 M autoextend on next 50 M maxsize 1000 M extent management local uniform; unform indicates that the partition size is the same. The default value is 1 M create tablespace sales datafile. '/Home/app/oracle/oradata/oracle8i/sales01.dbf' size 800 M autoextend on next 50 M maxsize 1000 M extent management local uniform size 500 K; unform size k indicates the same partition size, for 500 K create tablespace sales datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800 M autoextend on next 50 M maxsize 1000 M extent management local autoallocate; autoallocate indicates that the partition size is automatically and dynamically changed with the table size. Large tables use big tables and small tables use cell create tablespace sa Les datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800 M autoextend on next 50 M maxsize 1000 M temporary; temporary create dictionary management temporary tablespace create temporary tablespace sales tempfile '/home/app/oracle/oradata/oracle8i/sales01.dbf' size 800 M autoextend on next 50 M maxsize 1000 M create local management temporary tablespace, if it is a temporary tablespace, datafile in all statements is replaced by tempfile 8i. By default, the system creates a temporary tablespace for dictionary management. To create a temporary tablespace for local management, you must add the temporary tablespace keyword to create a temporary tablespace for local management, do not use Uoallocate parameter. By default, the system creates the uniform management mode to add data files to the tablespace: alter tablespace sales add datafile '/home/app/oracle/oradata/oracle8i/sales02.dbf' size 800 M autoextend on next 50 M maxsize 1000 M; Create local management temporary Oracle tablespace, if it is a temporary tablespace, The datafile in all statements is replaced by tempfile8i. By default, the system creates a temporary tablespace for dictionary management. To create a temporary tablespace for local management, you must add the temporary tablespace keyword to create a temporary tablespace for local management, do not use the atuoallocate parameter. By default, the system creates an uniform management mode to add a data file for the tablespace: www.2cto.com alter tablespace sales add datafile '/home/ App/oracle/oradata/oracle8i/sales02.dbf 'size 800 M autoextend on next 50 M maxsize 1000 M; 5. Modify auto scaling attributes: alter database datafile '/home/app/oracle/oradata/oracle8i/sales01.dbf ', '/home/app/oracle/oradata/oracle8i/sales02.dbf'/home/app/oracle/oradata/oracle8i/sales01.dbf autoextend off; the preceding section describes how to create an Oracle tablespace, I would like to share it with you here and hope it will be useful to you.

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.