Let's discuss how to create an Oracle tablespace.

Source: Internet
Author: User

During project implementation, tables are generally designed. Different from general databases, Oracle table space statement. A tablespace is the space used to store tables. When creating a table, we can create a new tablespace to store the table in order to be different from the original Oracle tablespace. It is generally recommended to create two tablespaces, one for data storage and one for index storage.

To create an Oracle tablespace, follow these steps:
1. It can be implemented through the graphical user interface provided by Oracle. For more information, see the Oracle Enterprise Console.
2. Implemented through statements

For example:

 
 
  1. CREATE TABLESPACE "HHSCINFO"  
  2. LOGGING  
  3. DATAFILE 'D:\ORACLE\ORADATA\INFOPLAT\HHSCINFO.ora' SIZE 512M  
  4. EXTENT MANAGEMENT LOCAL 

A new "HHSCINFO" tablespace is created. The data file storage location is D: \ Oracle \ ORADATA \ INFOPLAT \ HHSCINFO. ora. The size is 512 MB.

After creation, you can refresh to see if the creation is successful. If you find that your space is too small, you can modify the Code as follows:

 
 
  1. ALTER DATABASE  
  2. DATAFILE 'D:\ORACLE\ORADATA\INFOPLAT\HHSCINFO.ORA' RESIZE  
  3. 1024M 

Of course, you can also perform operations on the GUI. Generally, when creating a tablespace, select the tablespace auto-incrementing AUTOEXTEND and specify the size. After creating a tablespace, we also need to create a new user and grant the relevant permissions to the user.

 
 
  1. CREATE USER InfoManager IDENTIFIED BY admin  
  2. DEFAULT TABLESPACE HHSCINFO;  
  3. GRANT CONNECT TO InfoManager;  
  4. GRANT DBA TO InfoManager;  
  5. GRANT resource TO InfoManager; 

In this way, we can create a new table on this basis, which is relatively independent from other tablespaces.

  1. Create and assign Oracle user permissions
  2. Two solutions for Oracle password loss
  3. Quickly implement the Oracle tablespace Transfer Function
  4. Amazon pushes MySQL to meet the needs of relational databases
  5. Explain how to use the Oracle user permission View

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.