Transport Tablespace Set (3), createtablespace

Source: Internet
Author: User

Transport Tablespace Set (3), createtablespace

View the source Character Set and endian:
SQL> select userenv ('language') from dual;
USERENV ('language ')

SIMPLIFIED CHINESE_CHINA.ZHS16GBK
SQL> SELECT d. PLATFORM_NAME, ENDIAN_FORMAT
2 FROM V TRANSPORTABLEPLATFORMtp, V DATABASE d
3 WHERE tp. PLATFORM_NAME = d. PLATFORM_NAME;
PLATFORM_NAME ENDIAN_FORMAT

Microsoft Windows IA (32-bit) Little
Check the target character set and endian:
SQL> select userenv ('language') from dual;
USERENV ('language ')

AMERICAN_AMERICA.ZHS16GBK
SELECT d. PLATFORM_NAME, ENDIAN_FORMAT
FROM V TRANSPORTABLEPLATFORMtp, V DATABASE d
3 WHERE tp. PLATFORM_NAME = d. PLATFORM_NAME;
PLATFORM_NAME ENDIAN_FORMAT

Linux 64-bit for AMD Little
From the above information, we can see that the note set is ZHS16GBK and the endian type is Little, which meets the requirements of transpor tablespace set.

The following operations are performed on the source:

SQL> create tablespace keke datafile 'C: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ keke_01.dbf' size 10 M autoextend on;
The tablespace has been created.
SQL> create user keke identified by oracle default tablespace keke;
The user has been created.
SQL> grant connect, resource, dba to keke;
Authorization successful.
SQL> conn keke/oracle
Connected.
SQL> create table keke as select * from dba_objects;
The table has been created.
SQL> commit;
Submitted.
SQL> CONN/AS SYSDBA
Connected.
SQL> exec dbms_tts.transport_set_check ('kekeke', TRUE );
The PL/SQL process is successfully completed.
SQL> select * from transport_set_violations;
Unselected row
SQL> select tablespace_name, status from dba_tablespaces where tablespace_name = 'keke ';
TABLESPACE_NAME STATUS

KEKE ONLINE
10 rows have been selected.
SQL>
SQL> alter tablespace keke read only;
The tablespace has been changed.
C: \ Documents ents and Settings \ Administrator> expdp system/oracle directory = mydump dumpfile = keke. dmp logfi
Le = keke. log transport_tablespaces = KEKE
Export: Release 10.2.0.1.0-Production on Monday, September, 2013 13:28:18
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options
Start "SYSTEM". "SYS_EXPORT_TRANSPORTABLE_01": system/**Directory = mydump dumpfile = keke. dmp log
File = keke. log transport_tablespaces = KEKE
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
The master table "SYSTEM". "SYS_EXPORT_TRANSPORTABLE_01" has been successfully loaded/uninstalled"

The dump file set of SYSTEM. SYS_EXPORT_TRANSPORTABLE_01 is:
C: \ MYDMP \ KEKE. DMP
The job "SYSTEM". "SYS_EXPORT_TRANSPORTABLE_01" was successfully completed at 13:28:33.

The following operations are performed on the target end:

SQL> create user keke identified by keke;
User created.
[Oracle @ node1 ~] $ Impdp system/oracle dumpfile = KEKE. DMP directory = dmp transport_datafiles =/test/mydump/KEKE_01.DBF
Import: Release 10.2.0.1.0-64bit Production on Monday, 09 September, 2013 13:38:39
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, OLAP and Data Mining options
Master table "SYSTEM". "SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYSTEM". "SYS_IMPORT_TRANSPORTABLE_01": system/**Dumpfile = KEKE. DMP directory = dmp

Transport_datafiles =/test/mydump/KEKE_01.DBF
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYSTEM". "SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 13:39:12
SQL> select tablespace_name, status from dba_tablespaces where tablespace_name = 'keke ';
TABLESPACE_NAME STATUS

KEKE READ ONLY
SQL> alter tablespace keke read write;
Tablespace altered.
SQL> select tablespace_name, status from dba_tablespaces where tablespace_name = 'keke ';
TABLESPACE_NAME STATUS

KEKE ONLINE
7 rows selected.
SQL> alter user keke identified by oracle default tablespace keke; ##### because the permissions and passwords are stored in the oracle Data Dictionary, these messages

Information needs to be updated.
User altered.
SQL> conn keke/oracle
Connected.
SQL> select count (*) from keke;
COUNT (*)

 49781

End

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.