On the migration problem of table space

Source: Internet
Author: User
Tags create index oracle database

Transport table Space tablespaces, Transport_tablespace, Tts_full_check

Use Exp/imp to transfer tablespace Data_tbs from a library to B library? Here is the preparation work.

Create Tablespace Data_tbs;

Create Tablespace Idx_tbs;

CREATE table T (x varchar2 ()) tablespace Data_tbs;

CREATE index idx_t on t (x) Tablespaceidx_tbs;

INSERT into t;

(1) created under the SYS user (note: Export is incorrect)

C:\Documents and Settings\administrator>set ORACLE_SID=ORCL

C:\Documents and Settings\administrator>sqlplus sys/ymh assysdba;

Sql*plus:release 10.2.0.1.0-production on Friday June 24 10:36:38 2011

Copyright (c) 1982, +, 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

sql> CREATE tablespace Data_tbs

2 datafile ' Data_tbs ' SIZE 100M autoextend onnext 100M MAXSIZE Unlimited LOGGING

3 EXTENT MANAGEMENT local SEGMENT spacemanagement AUTO;

The table space has been created.

sql> CREATE tablespace Idx_tbs

2 datafile ' Idx_tbs ' SIZE 10M autoextend onnext 10M MAXSIZE Unlimited LOGGING

3 EXTENT MANAGEMENT local SEGMENT spacemanagement AUTO;

The table space has been created.

Sql> CREATE TABLE T (x varchar2 ()) tablespace Data_tbs;

Table has been created.

Sql> CREATE index idx_t on t (x) tablespace Idx_tbs;

The index has been created.

sql> INSERT INTO T-select object_id from Dba_objects;

50407 lines have been created.

sql> INSERT INTO T-select * from T;

50407 lines have been created.

Sql> commit;

Sql> alter tablespace DATA_TBS Read only;

The table space has changed.

Sql> alter tablespace IDX_TBS Read only;

The table space has changed.

Sql> Executesys.dbms_tts.transport_set_check (' Data_tbs ', true,true);

The PL/SQL process has completed successfully.

sql> SELECT * fromsys.transport_set_violations;

Violations

--------------------------------------------------------------------------------

The Index SYS. idx_t in tablespace idx_tbs points to table SYS. T Intablespace data_t

Bs

Sys owned Object T intablespace Data_tbs not allowed in pluggable set

Sql> Delete from sys.transport_set_violations;

2 rows have been deleted.

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.