Common knowledge about Oracle tablespace commands

Source: Internet
Author: User

// View the tablespace Information
Select file_name, tablespace_name, bytes, user_blocks from dba_data_files

// Create a tablespace
Create tablespace zjsmsweb datafile '/opt/Oracle/APP/Oracle/product/9.2.0/dbs/myweb. ora 'size 512 M autoextend on next 5 m maxsize unlimited default storage (initial 128 K next 2 m pctincrease 0 );

-- Initial 128 K, because the table is created in the tablespace and owned by the user,
-- The user inherits the storage parameters of the data table space, and the table inherits the user's storage parameters.
-- If initial is set to an excessively large value, for example, 5 MB, each empty table is created to occupy 5 MB of space, even if one record does not exist.
-- Autoextend on next 5 m maxsize unlimited: sets the automatic expansion of data files. Each expansion increases by 5 m, and the maximum space is not limited.

Reference command: delete a tablespace
Drop tablespace zjsmsweb including contents;

Change the tablespace owner:
Alter tablespace zjsmsweb owner to zjsms;

// Change the tablespace size
Alter database datafile '/oradata/k12db/zjsms. dbf' resize 500 m;

// View character sets
Select parameter, value from V $ nls_parameters

Note the character set of the client when importing data using sqlplus.
Set character set:
Nls_lang = american_america.zhs16gbk
Export nls_lang

Log on to sqlplus:
Sqlplus user/pwd @ oradb92 as DBA
SQL> @/home/Oracle/sqlfile. SQL

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.