// 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