实验环境:

源数据库:oracle 10g(Release 10.2.0.1.0)

目标数据库:oracle 10g(Release 10.2.0.1.0)

待传输的表空间:TEST

1.在test(默认表空间是TEST)用户以下创建一张test表。

SQL> select * from tab;

no rows selected

SQL> create table test (id int primary key)

  2  ;

Table created.

SQL> insert into test values(1);

1 row created.

SQL> insert into test values(2);

1 row created.

SQL> insert into test values(3);

1 row created.

SQL> show user;

USER is "TEST"

SQL> commit;

Commit complete.

在传输之前:

(1)确认平台是否支持:若是不同平台须要检查平台版本号及Endian Format。

SQL> exec DBMS_TTS.TRANSPORT_SET_CHECK('test',true);

BEGIN DBMS_TTS.TRANSPORT_SET_CHECK('test',true); END;

*

ERROR at line 1:

ORA-06550: line 1, column 7:

PLS-00201: identifier 'DBMS_TTS.TRANSPORT_SET_CHECK' must be declared

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

SQL> conn sys/oracle as sysdba

Connected.

SQL> exec DBMS_TTS.TRANSPORT_SET_CHECK('test',true);

PL/SQL procedure successfully completed.

SQL> select * from transport_set_violations;

no rows selected

严格方式验证:

SQL> exec DBMS_TTS.TRANSPORT_SET_CHECK('test',true,true);

PL/SQL procedure successfully completed.

SQL> select * from transport_set_violations;

no rows selected

3.

(1)

SQL> conn test/oracle

Connected.

SQL> select username,default_tablespace from user_users;

USERNAME                       DEFAULT_TABLESPACE

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

TEST                           TEST

SQL> conn sys/oracle as sysdba

Connected.

SQL> alter tablespace test read only;

Tablespace altered.

(2)

[oracle@linux5 dpdump]$ expdp system/oracle dumpfile=test.dmp directory=data_pump_dir transport_tablespaces=test nologfile=y

Export: Release 10.2.0.1.0 - Production on Sunday, 13 April, 2014 20:01:58

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** dumpfile=test.dmp directory=data_pump_dir transport_tablespaces=test nologfile=y


Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/TABLE

Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK

Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is:

  /u01/app/oracle/10.2.0/db_1/rdbms/log/test.dmp

Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 20:03:05

[oracle@linux5 dpdump]$ cd /u01/app/oracle/10.2.0/db_1/rdbms/log

[oracle@linux5 log]$ ls

dp.log  test.dmp

(3)

4.

SQL> select * from dba_directories where directory_name='DUMP_DIR';

OWNER                          DIRECTORY_NAME

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

DIRECTORY_PATH

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

SYS                            DUMP_DIR

/u01/dmp

SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS

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

SYSTEM                         ONLINE

UNDOTBS1                       ONLINE

SYSAUX                         ONLINE

TEMP                           ONLINE

USERS                          ONLINE

EXAMPLE                        ONLINE

RMANTBS                        ONLINE

TEST                           READ ONLY

8 rows selected.

SQL> alter tablespace test read write;

Tablespace altered.

SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS

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

SYSTEM                         ONLINE

UNDOTBS1                       ONLINE

SYSAUX                         ONLINE

TEMP                           ONLINE

USERS                          ONLINE

EXAMPLE                        ONLINE

RMANTBS                        ONLINE

TEST                           ONLINE

8 rows selected.

5.

SQL> select block_size from dba_tablespaces where tablespace_name='TEST';

BLOCK_SIZE

----------

      8192

SQL> show parameter BLOCK_SIZE

NAME                                 TYPE        VALUE

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

db_block_size                        integer     8192

[oracle@localhost orclstd]$ scp oracle@192.168.1.222:/u01/app/oracle/oradata/orcl/test.dbf /u01/dmp

oracle@192.168.1.222's password:


test.dbf                                      100%   50MB   5.6MB/s   00:09   

[oracle@localhost orclstd]$ impdp test/oracle dumpfile=test.dmp directory=dump_dir nologfile=y transport_datafiles=/u01/dmp/test.dbf remap_schema=test:test

Import: Release 10.2.0.1.0 - Production on Sunday, 13 April, 2014 20:36:05

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Master table "TEST"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded

Starting "TEST"."SYS_IMPORT_TRANSPORTABLE_01":  test/******** dumpfile=test.dmp directory=dump_dir nologfile=y transport_datafiles=/u01/dmp/test.dbf remap_schema=test:test


Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

ORA-39123: Data Pump transportable tablespace job aborted

ORA-19721: Cannot find datafile with absolute file number 7 in tablespace TEST

Job "TEST"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 20:38:33

返回查看:

SQL> select file_name,tablespace_name from dba_data_files where tablespace_name='TEST';

FILE_NAME

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

TABLESPACE_NAME

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

/u01/app/oracle/oradata/orcl/tests.dbf

TEST

看来是拷贝错了数据文件,重头再来:

SQL> alter tablespace test read only;

Tablespace altered.

[oracle@linux5 orcl]$ expdp system/oracle dumpfile=test.dmp directory=dump_file_dir transport_tablespaces=test nologfile=y

Export: Release 10.2.0.1.0 - Production on Monday, 14 April, 2014 1:27:00

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** dumpfile=test.dmp directory=dump_file_dir transport_tablespaces=test nologfile=y


Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK

Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is:

  /u01/imp_exp/dmp/test.dmp

Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 01:27:26

[oracle@localhost dmp]$ scp oracle@192.168.1.222:/u01/imp_exp/dmp/test.dmp /u01/dmp

oracle@192.168.1.222's password:


test.dmp                                      100%   64KB  64.0KB/s   00:01   

[oracle@localhost dmp]$ scp oracle@192.168.1.222:/u01/app/oracle/oradata/orcl/tests.dbf /u01/dmp

oracle@192.168.1.222's password:


tests.dbf                                     100%   50MB   2.1MB/s   00:24  

SQL> alter tablespace test read write;

Tablespace altered.

应该没问题能够……

[oracle@localhost dmp]$ impdp test/oracle dumpfile=test.dmp directory=dump_dir nologfile=y transport_datafiles=/u01/dmp/tests.dbf

Import: Release 10.2.0.1.0 - Production on Monday, 14 April, 2014 1:33:15

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Master table "TEST"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded

Starting "TEST"."SYS_IMPORT_TRANSPORTABLE_01":  test/******** dumpfile=test.dmp directory=dump_dir nologfile=y transport_datafiles=/u01/dmp/tests.dbf


Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK

Job "TEST"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 01:33:53

SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS

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

SYSTEM                         ONLINE

UNDOTBS1                       ONLINE

SYSAUX                         ONLINE

TEMP                           ONLINE

USERS                          ONLINE

EXAMPLE                        ONLINE

RMANTBS                        ONLINE

TEST                           READ ONLY

8 rows selected.

SQL> alter tablespace test read write;

Tablespace altered.

SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS

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

SYSTEM                         ONLINE

UNDOTBS1                       ONLINE

SYSAUX                         ONLINE

TEMP                           ONLINE

USERS                          ONLINE

EXAMPLE                        ONLINE

RMANTBS                        ONLINE

TEST                           ONLINE

8 rows selected.

OK :::::::::::::::

SQL> conn test/oracle

Connected.

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID

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

DEPT                           TABLE

EMP                            TABLE

BONUS                          TABLE

SALGRADE                       TABLE

TEST                           TABLE

SQL> select * from test;

ID

----------

         1

         2

         3

RMAN::::::::::::::::::::::

有效的全库备份:

1.

RMAN> backup database format '/u01/full_back/orcl_full_bak';

Starting backup at 14-APR-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

input datafile fno=00006 name=/u01/rec_catalog/rmantbs.dbf

input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/tests.dbf

input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf

input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

channel ORA_DISK_1: starting piece 1 at 14-APR-14

channel ORA_DISK_1: finished piece 1 at 14-APR-14

piece handle=/u01/full_back/orcl_full_bak tag=TAG20140414T180413 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:38

Finished backup at 14-APR-14

Starting Control File and SPFILE Autobackup at 14-APR-14

piece handle=/u01/scripts/controlfile_c-1368292794-20140414-08 comment=NONE

Finished Control File and SPFILE Autobackup at 14-APR-14

2.

SQL> conn test

Enter password:

Connected.

SQL> select username,default_tablespace from user_users;

USERNAME                       DEFAULT_TABLESPACE

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

TEST                           TEST

3.RMAN> TRANSPORT TABLESPACE TEST tablespace destination '/u01/tts_test/td' auxiliary destination '/u01/tts_test/ad';

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "test": expecting one of: "double-quoted-string, identifier, single-quoted-string"

RMAN-01007: at line 1 column 22 file: standard input

RMAN> TRANSPORT TABLESPACE "TEST" tablespace destination '/u01/tts_test/td' auxiliary destination '/u01/tts_test/ad';

RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point in time

List of tablespaces expected to have UNDO segments

tablespace SYSTEM

tablespace UNDOTBS1

Creating automatic instance, with SID='wmoB'

initialization parameters used for automatic instance:

db_name=ORCL

compatible=10.2.0.1.0

db_block_size=8192

db_files=200

db_unique_name=tspitr_ORCL_wmoB

large_pool_size=1M

shared_pool_size=110M

#No auxiliary parameter file used

db_create_file_dest=/u01/tts_test/ad

control_files=/u01/tts_test/ad/cntrl_tspitr_ORCL_wmoB.f

starting up automatic instance ORCL

Oracle instance started

Total System Global Area     201326592 bytes

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of tranport tablespace command at 04/14/2014 18:13:52

RMAN-06136: ORACLE error from auxiliary database: ORA-02122: Message 2122 not found;  product=RDBMS; facility=ORA

ORA-16009: remote archive log destination must be a STANDBY database

Mon Apr 14 20:17:34 2014

PING[ARC1]: Heartbeat failed to connect to standby 'orcls_192.168.1.223'. Error is 16009.

****************************************************************************************************************************

RMAN> transport tablespace example    

2> tablespace destination '/u01/td'

3> auxiliary destination '/u01/ad';

using target database control file instead of recovery catalog

RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point in time

List of tablespaces expected to have UNDO segments

tablespace SYSTEM

tablespace UNDOTBS1

Creating automatic instance, with SID='osxd'

initialization parameters used for automatic instance:

db_name=ORCLLDG

compatible=10.2.0.1.0

db_block_size=8192

db_files=200

db_unique_name=tspitr_ORCLLDG_osxd

large_pool_size=1M

shared_pool_size=110M

#No auxiliary parameter file used

db_create_file_dest=/u01/ad

control_files=/u01/ad/cntrl_tspitr_ORCLLDG_osxd.f

starting up automatic instance ORCLLDG

Oracle instance started

Total System Global Area     201326592 bytes

Fixed Size                     1218508 bytes

Variable Size                146802740 bytes

Database Buffers              50331648 bytes

Redo Buffers                   2973696 bytes

Automatic instance created

contents of Memory Script:

{

# set the until clause

set until  scn 1441931;

# restore the controlfile

restore clone controlfile;

# mount the controlfile

sql clone 'alter database mount clone database';

# archive current online log for tspitr to a resent until time

sql 'alter system archive log current';

# avoid unnecessary autobackups for structural changes during TSPITR

sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';

}

executing Memory Script

executing command: SET until clause

Starting restore at 14-APR-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=37 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: reading from backup piece /u01/scripts/controlfile_c-939793073-20140414-08

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/u01/scripts/controlfile_c-939793073-20140414-08 tag=TAG20140414T204122

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02

output filename=/u01/ad/cntrl_tspitr_ORCLLDG_osxd.f

Finished restore at 14-APR-14

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

released channel: ORA_AUX_DISK_1

contents of Memory Script:

{

# generated tablespace point-in-time recovery script

# set the until clause

set until  scn 1441931;

# set an omf destination filename for restore

set newname for clone datafile  1 to new;

# set an omf destination filename for restore

set newname for clone datafile  2 to new;

# set an omf destination filename for restore

set newname for clone datafile  3 to new;

# set an omf destination tempfile

set newname for clone tempfile  1 to new;

# set a destination filename for restore

set newname for datafile  5 to

 "/u01/td/example01.dbf";

# rename all tempfiles

switch clone tempfile all;

# restore the tablespaces in the recovery set plus the auxilliary tablespaces

restore clone datafile  1, 2, 3, 5;

switch clone datafile all;

#online the datafiles restored or flipped

sql clone "alter database datafile  1 online";

#online the datafiles restored or flipped

sql clone "alter database datafile  2 online";

#online the datafiles restored or flipped

sql clone "alter database datafile  3 online";

#online the datafiles restored or flipped

sql clone "alter database datafile  5 online";

# make the controlfile point at the restored datafiles, then recover them

recover clone database tablespace  "EXAMPLE", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;

alter clone database open resetlogs;

# PLUG HERE the creation of a temporary tablespace if export fails due to lack

# of temporary space.

# For example in Unix these two lines would do that:

#sql clone "create tablespace aux_tspitr_tmp

#           datafile ''/tmp/aux_tspitr_tmp.dbf'' size 500K";

}

executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed temporary file 1 to /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 14-APR-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=40 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_system_%u_.dbf

restoring datafile 00002 to /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_undotbs1_%u_.dbf

restoring datafile 00003 to /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_sysaux_%u_.dbf

restoring datafile 00005 to /u01/td/example01.dbf

channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCLLDG/backupset/2014_04_14/o1_mf_nnndf_TAG20140414T200614_9ns8k7rm_.bkp

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/u01/app/oracle/flash_recovery_area/ORCLLDG/backupset/2014_04_14/o1_mf_nnndf_TAG20140414T200614_9ns8k7rm_.bkp tag=TAG20140414T200614

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:10

Finished restore at 14-APR-14

datafile 1 switched to datafile copy

input datafile copy recid=5 stamp=844894555 filename=/u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_system_9nscb9cf_.dbf

datafile 2 switched to datafile copy

input datafile copy recid=6 stamp=844894557 filename=/u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_undotbs1_9nscb9kv_.dbf

datafile 3 switched to datafile copy

input datafile copy recid=7 stamp=844894557 filename=/u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_sysaux_9nscb9ft_.dbf

datafile 5 switched to datafile copy

input datafile copy recid=8 stamp=844894558 filename=/u01/td/example01.dbf

sql statement: alter database datafile  1 online

sql statement: alter database datafile  2 online

sql statement: alter database datafile  3 online

sql statement: alter database datafile  5 online

Starting recover at 14-APR-14

using channel ORA_AUX_DISK_1

starting media recovery

archive log thread 1 sequence 17 is already on disk as file /u01/arch_ldg/archive_1_17_843071181.arclog

archive log thread 1 sequence 18 is already on disk as file /u01/arch_ldg/archive_1_18_843071181.arclog

archive log filename=/u01/arch_ldg/archive_1_17_843071181.arclog thread=1 sequence=17

archive log filename=/u01/arch_ldg/archive_1_18_843071181.arclog thread=1 sequence=18

media recovery complete, elapsed time: 00:00:05

Finished recover at 14-APR-14

database opened

contents of Memory Script:

{

#mark read only the tablespace that will be exported

sql clone "alter tablespace EXAMPLE read only";

# create directory for datapump export

sql clone "create or replace directory STREAMS_DIROBJ_DPDIR as ''

/u01/td''";

# export the tablespaces in the recovery set

host 'expdp userid=\"/@\(DESCRIPTION=\(ADDRESS=\(PROTOCOL=beq\)\(PROGRAM=/u01/app/oracle/10.2.0/db_1/bin/oracle\)\(ARGV0=oracleosxd\)\(ARGS=^'\(DESCRIPTION=\(LOCAL=YES\)\(ADDRESS=\(PROTOCOL=beq\)\)\)^'\)\(ENVS=^'ORACLE_SID=osxd^'\)\)\(CONNECT_DATA=\(SID=osxd\)\)\)
as sysdba\" transport_tablespaces=

 EXAMPLE dumpfile=

dmpfile.dmp directory=

STREAMS_DIROBJ_DPDIR logfile=

explog.log';

}

executing Memory Script

sql statement: alter tablespace EXAMPLE read only

sql statement: create or replace directory STREAMS_DIROBJ_DPDIR as ''/u01/td''

Export: Release 10.2.0.1.0 - Production on Monday, 14 April, 2014 20:56:52

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_01":  userid="/********@(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/app/oracle/10.2.0/db_1/bin/oracle)(ARGV0=oracleosxd)(ARGS=\(DESCRIPTION=\(LOCAL=YES\)\(ADDRESS=\(PROTOCOL=beq\)\)\))(ENVS=ORACLE_SID=osxd))(CONNECT_DATA=(SID=osxd)))
AS SYSDBA" transport_tablespaces= EXAMPLE dumpfile=dmpfile.dmp directory=STREAMS_DIROBJ_DPDIR logfile=explog.log


Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC

Processing object type TRANSPORTABLE_EXPORT/TABLE

Processing object type TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT

Processing object type TRANSPORTABLE_EXPORT/INDEX

Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT

Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/COMMENT

Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT

Processing object type TRANSPORTABLE_EXPORT/TRIGGER

Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_AND_BITMAP/INDEX

Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/DOMAIN_INDEX/INDEX

Processing object type TRANSPORTABLE_EXPORT/MATERIALIZED_VIEW

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PROCACT_INSTANCE

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PROCDEPOBJ

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK

Master table "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_01 is:

  /u01/td/dmpfile.dmp

Job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 20:58:18

host command complete

/*

   The following command may be used to import the tablespaces.

   Substitute values for <logon> and <directory>.

   impdp <logon> directory=<directory> dumpfile= 'dmpfile.dmp' transport_datafiles= /u01/td/example01.dbf


*/

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

-- Start of sample PL/SQL script for importing the tablespaces

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

-- creating directory objects

CREATE DIRECTORY STREAMS$DIROBJ$1 AS  '/u01/td/';

CREATE DIRECTORY STREAMS$DIROBJ$DPDIR AS  '/u01/td';

/* PL/SQL Script to import the exported tablespaces */

DECLARE

  -- the datafiles

  tbs_files     dbms_streams_tablespace_adm.file_set;

  cvt_files     dbms_streams_tablespace_adm.file_set;

  -- the dumpfile to import

  dump_file     dbms_streams_tablespace_adm.file;

  dp_job_name   VARCHAR2(30) := NULL;

  -- names of tablespaces that were imported

  ts_names       dbms_streams_tablespace_adm.tablespace_set;

BEGIN

  -- dump file name and location

  dump_file.file_name :=  'dmpfile.dmp';

  dump_file.directory_object := 'STREAMS$DIROBJ$DPDIR';

  -- forming list of datafiles for import

  tbs_files( 1).file_name :=  'example01.dbf';

  tbs_files( 1).directory_object :=  'STREAMS$DIROBJ$1';

  -- import tablespaces

  dbms_streams_tablespace_adm.attach_tablespaces(

    datapump_job_name      => dp_job_name,

    dump_file              => dump_file,

    tablespace_files       => tbs_files,

    converted_files        => cvt_files,

    tablespace_names       => ts_names);

  -- output names of imported tablespaces

  IF ts_names IS NOT NULL AND ts_names.first IS NOT NULL THEN

    FOR i IN ts_names.first .. ts_names.last LOOP

      dbms_output.put_line('imported tablespace '|| ts_names(i));

    END LOOP;

  END IF;

END;

/

-- dropping directory objects

DROP DIRECTORY STREAMS$DIROBJ$1;

DROP DIRECTORY STREAMS$DIROBJ$DPDIR;

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

-- End of sample PL/SQL script

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

Removing automatic instance

shutting down automatic instance

Oracle instance shut down

Automatic instance removed

auxiliary instance file /u01/ad/cntrl_tspitr_ORCLLDG_osxd.f deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_system_9nscb9cf_.dbf deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_undotbs1_9nscb9kv_.dbf deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_sysaux_9nscb9ft_.dbf deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/datafile/o1_mf_temp_9nschf73_.tmp deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/onlinelog/o1_mf_1_9nscgpy1_.log deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/onlinelog/o1_mf_2_9nscgzkl_.log deleted

auxiliary instance file /u01/ad/TSPITR_ORCLLDG_OSXD/onlinelog/o1_mf_3_9nsch314_.log deleted

[oracle@localhost ~]$ cd /u01/td/

[oracle@localhost td]$ ls

dmpfile.dmp  example01.dbf  explog.log  impscrpt.sql

[oracle@localhost td]$ cd ../ad/

[oracle@localhost ad]$ ls

TSPITR_ORCLLDG_OSXD

又一次測试:   含有数据文件的备份和有效的归档文件

SQL> show user

USER is "SYS"

SQL> create tablespace TTS       

  2  datafile '/u01/app/oracle/oradata/orclstd/tts.dbf'

  3  size 20m;

Tablespace created.

SQL> alter user test default tablespace TTS;

User altered.

SQL> conn test/oracle

Connected.

SQL> select username,default_tablespace from user_users;

USERNAME                       DEFAULT_TABLESPACE

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

TEST                           TTS

SQL> create table tts as select * from test;

Table created.

SQL> commit;

Commit complete.

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID

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

TTS                            TABLE

TEST                           TABLE

2.检查备份:

RMAN> configure controlfile autobackup on;

old RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP OFF;

new RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters are successfully stored

备份:

RMAN> backup database;

Starting backup at 14-APR-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=/u01/app/oracle/oradata/orclstd/system01.dbf

input datafile fno=00003 name=/u01/app/oracle/oradata/orclstd/sysaux01.dbf

input datafile fno=00005 name=/u01/app/oracle/oradata/orclstd/example01.dbf

input datafile fno=00007 name=/u01/dmp/tests.dbf

input datafile fno=00002 name=/u01/app/oracle/oradata/orclstd/undotbs01.dbf

input datafile fno=00008 name=/u01/app/oracle/oradata/orclstd/tts.dbf

input datafile fno=00004 name=/u01/app/oracle/oradata/orclstd/users01.dbf

channel ORA_DISK_1: starting piece 1 at 14-APR-14

channel ORA_DISK_1: finished piece 1 at 14-APR-14

piece handle=/u01/app/oracle/flash_recovery_area/ORCLLDG/backupset/2014_04_14/o1_mf_nnndf_TAG20140414T235610_9nsp0cbd_.bkp tag=TAG20140414T235610 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:06

Finished backup at 14-APR-14

Starting Control File and SPFILE Autobackup at 14-APR-14

piece handle=/u01/scripts/controlfile_c-939793073-20140414-0b comment=NONE

Finished Control File and SPFILE Autobackup at 14-APR-14

生成传输集:

RMAN> transport tablespace tts

2> tablespace destination '/u01/tts/td'

3> auxiliary destination '/u01/tts/ad';

RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point in time

List of tablespaces expected to have UNDO segments

tablespace SYSTEM

tablespace UNDOTBS1

Creating automatic instance, with SID='gmcj'

initialization parameters used for automatic instance:

db_name=ORCLLDG

compatible=10.2.0.1.0

db_block_size=8192

db_files=200

db_unique_name=tspitr_ORCLLDG_gmcj

large_pool_size=1M

shared_pool_size=110M

#No auxiliary parameter file used

db_create_file_dest=/u01/tts/ad

control_files=/u01/tts/ad/cntrl_tspitr_ORCLLDG_gmcj.f

starting up automatic instance ORCLLDG

Oracle instance started

Total System Global Area     201326592 bytes

Fixed Size                     1218508 bytes

Variable Size                146802740 bytes

Database Buffers              50331648 bytes

Redo Buffers                   2973696 bytes

Automatic instance created

contents of Memory Script:

{

# set the until clause

set until  scn 1449047;

# restore the controlfile

restore clone controlfile;

# mount the controlfile

sql clone 'alter database mount clone database';

# archive current online log for tspitr to a resent until time

sql 'alter system archive log current';

# avoid unnecessary autobackups for structural changes during TSPITR

sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';

}

executing Memory Script

executing command: SET until clause

Starting restore at 15-APR-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=37 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: reading from backup piece /u01/scripts/controlfile_c-939793073-20140414-0b

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/u01/scripts/controlfile_c-939793073-20140414-0b tag=TAG20140414T235817

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04

output filename=/u01/tts/ad/cntrl_tspitr_ORCLLDG_gmcj.f

Finished restore at 15-APR-14

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

released channel: ORA_DISK_1

released channel: ORA_AUX_DISK_1

contents of Memory Script:

{

# generated tablespace point-in-time recovery script

# set the until clause

set until  scn 1449047;

# set an omf destination filename for restore

set newname for clone datafile  1 to new;

# set an omf destination filename for restore

set newname for clone datafile  2 to new;

# set an omf destination filename for restore

set newname for clone datafile  3 to new;

# set an omf destination tempfile

set newname for clone tempfile  1 to new;

# set a destination filename for restore

set newname for datafile  8 to

 "/u01/tts/td/tts.dbf";

# rename all tempfiles

switch clone tempfile all;

# restore the tablespaces in the recovery set plus the auxilliary tablespaces

restore clone datafile  1, 2, 3, 8;

switch clone datafile all;

#online the datafiles restored or flipped

sql clone "alter database datafile  1 online";

#online the datafiles restored or flipped

sql clone "alter database datafile  2 online";

#online the datafiles restored or flipped

sql clone "alter database datafile  3 online";

#online the datafiles restored or flipped

sql clone "alter database datafile  8 online";

# make the controlfile point at the restored datafiles, then recover them

recover clone database tablespace  "TTS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;

alter clone database open resetlogs;

# PLUG HERE the creation of a temporary tablespace if export fails due to lack

# of temporary space.

# For example in Unix these two lines would do that:

#sql clone "create tablespace aux_tspitr_tmp

#           datafile ''/tmp/aux_tspitr_tmp.dbf'' size 500K";

}

executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed temporary file 1 to /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 15-APR-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=39 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_system_%u_.dbf

restoring datafile 00002 to /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_undotbs1_%u_.dbf

restoring datafile 00003 to /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_sysaux_%u_.dbf

restoring datafile 00008 to /u01/tts/td/tts.dbf

channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCLLDG/backupset/2014_04_14/o1_mf_nnndf_TAG20140414T235610_9nsp0cbd_.bkp

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/u01/app/oracle/flash_recovery_area/ORCLLDG/backupset/2014_04_14/o1_mf_nnndf_TAG20140414T235610_9nsp0cbd_.bkp tag=TAG20140414T235610

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:20

Finished restore at 15-APR-14

datafile 1 switched to datafile copy

input datafile copy recid=5 stamp=844906379 filename=/u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_system_9nspvcw5_.dbf

datafile 2 switched to datafile copy

input datafile copy recid=6 stamp=844906382 filename=/u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_undotbs1_9nspvd37_.dbf

datafile 3 switched to datafile copy

input datafile copy recid=7 stamp=844906383 filename=/u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_sysaux_9nspvcwv_.dbf

datafile 8 switched to datafile copy

input datafile copy recid=8 stamp=844906384 filename=/u01/tts/td/tts.dbf

sql statement: alter database datafile  1 online

sql statement: alter database datafile  2 online

sql statement: alter database datafile  3 online

sql statement: alter database datafile  8 online

Starting recover at 15-APR-14

using channel ORA_AUX_DISK_1

starting media recovery

archive log thread 1 sequence 21 is already on disk as file /u01/arch_ldg/archive_1_21_843071181.arclog

archive log filename=/u01/arch_ldg/archive_1_21_843071181.arclog thread=1 sequence=21

media recovery complete, elapsed time: 00:00:13

Finished recover at 15-APR-14

database opened

contents of Memory Script:

{

#mark read only the tablespace that will be exported

sql clone "alter tablespace TTS read only";

# create directory for datapump export

sql clone "create or replace directory STREAMS_DIROBJ_DPDIR as ''

/u01/tts/td''";

# export the tablespaces in the recovery set

host 'expdp userid=\"/@\(DESCRIPTION=\(ADDRESS=\(PROTOCOL=beq\)\(PROGRAM=/u01/app/oracle/10.2.0/db_1/bin/oracle\)\(ARGV0=oraclegmcj\)\(ARGS=^'\(DESCRIPTION=\(LOCAL=YES\)\(ADDRESS=\(PROTOCOL=beq\)\)\)^'\)\(ENVS=^'ORACLE_SID=gmcj^'\)\)\(CONNECT_DATA=\(SID=gmcj\)\)\)
as sysdba\" transport_tablespaces=

 TTS dumpfile=

dmpfile.dmp directory=

STREAMS_DIROBJ_DPDIR logfile=

explog.log';

}

executing Memory Script

sql statement: alter tablespace TTS read only

sql statement: create or replace directory STREAMS_DIROBJ_DPDIR as ''/u01/tts/td''

Export: Release 10.2.0.1.0 - Production on Tuesday, 15 April, 2014 0:14:52

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_01":  userid="/********@(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/app/oracle/10.2.0/db_1/bin/oracle)(ARGV0=oraclegmcj)(ARGS=\(DESCRIPTION=\(LOCAL=YES\)\(ADDRESS=\(PROTOCOL=beq\)\)\))(ENVS=ORACLE_SID=gmcj))(CONNECT_DATA=(SID=gmcj)))
AS SYSDBA" transport_tablespaces= TTS dumpfile=dmpfile.dmp directory=STREAMS_DIROBJ_DPDIR logfile=explog.log


Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/TABLE

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK

Master table "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_01 is:

  /u01/tts/td/dmpfile.dmp

Job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 00:16:18

host command complete

/*

   The following command may be used to import the tablespaces.

   Substitute values for <logon> and <directory>.

   impdp <logon> directory=<directory> dumpfile= 'dmpfile.dmp' transport_datafiles= /u01/tts/td/tts.dbf


*/

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

-- Start of sample PL/SQL script for importing the tablespaces

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

-- creating directory objects

CREATE DIRECTORY STREAMS$DIROBJ$1 AS  '/u01/tts/td/';

CREATE DIRECTORY STREAMS$DIROBJ$DPDIR AS  '/u01/tts/td';

/* PL/SQL Script to import the exported tablespaces */

DECLARE

  -- the datafiles

  tbs_files     dbms_streams_tablespace_adm.file_set;

  cvt_files     dbms_streams_tablespace_adm.file_set;

  -- the dumpfile to import

  dump_file     dbms_streams_tablespace_adm.file;

  dp_job_name   VARCHAR2(30) := NULL;

  -- names of tablespaces that were imported

  ts_names       dbms_streams_tablespace_adm.tablespace_set;

BEGIN

  -- dump file name and location

  dump_file.file_name :=  'dmpfile.dmp';

  dump_file.directory_object := 'STREAMS$DIROBJ$DPDIR';

  -- forming list of datafiles for import

  tbs_files( 1).file_name :=  'tts.dbf';

  tbs_files( 1).directory_object :=  'STREAMS$DIROBJ$1';

  -- import tablespaces

  dbms_streams_tablespace_adm.attach_tablespaces(

    datapump_job_name      => dp_job_name,

    dump_file              => dump_file,

    tablespace_files       => tbs_files,

    converted_files        => cvt_files,

    tablespace_names       => ts_names);

  -- output names of imported tablespaces

  IF ts_names IS NOT NULL AND ts_names.first IS NOT NULL THEN

    FOR i IN ts_names.first .. ts_names.last LOOP

      dbms_output.put_line('imported tablespace '|| ts_names(i));

    END LOOP;

  END IF;

END;

/

-- dropping directory objects

DROP DIRECTORY STREAMS$DIROBJ$1;

DROP DIRECTORY STREAMS$DIROBJ$DPDIR;

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

-- End of sample PL/SQL script

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

Removing automatic instance

shutting down automatic instance

Oracle instance shut down

Automatic instance removed

auxiliary instance file /u01/tts/ad/cntrl_tspitr_ORCLLDG_gmcj.f deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_system_9nspvcw5_.dbf deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_undotbs1_9nspvd37_.dbf deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_sysaux_9nspvcwv_.dbf deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/datafile/o1_mf_temp_9nsq2hbj_.tmp deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/onlinelog/o1_mf_1_9nsq1cmc_.log deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/onlinelog/o1_mf_2_9nsq1fq2_.log deleted

auxiliary instance file /u01/tts/ad/TSPITR_ORCLLDG_GMCJ/onlinelog/o1_mf_3_9nsq1jsw_.log deleted

[oracle@localhost ad]$ ls

TSPITR_ORCLLDG_GMCJ

[oracle@localhost ad]$ cd ..

[oracle@localhost tts]$ cd td/

[oracle@localhost td]$ ls

dmpfile.dmp  explog.log  impscrpt.sql  tts.dbf

拷贝dmp文件和dbf数据文件:

[oracle@linux5 tts_test]$ scp oracle@192.168.1.223:/u01/tts/td/tts.dbf /u01/tts_test/tts.dbf

oracle@192.168.1.223's password:


tts.dbf                                       100%   20MB   4.0MB/s   00:05   

[oracle@linux5 tts_test]$ scp oracle@192.168.1.223:/u01/tts/td/dmpfile.dmp /u01/tts_test/

oracle@192.168.1.223's password:


dmpfile.dmp                                   100%   68KB  68.0KB/s   00:00   

导入:

SQL> select * from tab;

no rows selected

SQL> show user

USER is "TEST"

[oracle@linux5 dmp]$ impdp system/oracle dumpfile=dmpfile.dmp directory=DUMP_FILE_DIR nologfile=y transport_datafiles=/u01/tts_test/tts.dbf remap_schema=test:test

Import: Release 10.2.0.1.0 - Production on Tuesday, 15 April, 2014 1:05:34

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 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=dmpfile.dmp directory=DUMP_FILE_DIR nologfile=y transport_datafiles=/u01/tts_test/tts.dbf remap_schema=test:test


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 01:05:42

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID

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

TTS                            TABLE

检查貌似少了一张表。然后回顾曾经做实验好像test默认表空间是test,后来改为了tts。传输的时候传的是默认表空间(仅仅传输TTS)。

查看源数据库:

SQL> select table_name,tablespace_name from user_tables;

TABLE_NAME                     TABLESPACE_NAME

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

TTS                            TTS

TEST                           TEST

SQL> select username,default_tablespace from user_users;

USERNAME                       DEFAULT_TABLESPACE

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

TEST                           TTS

目标数据库:

SQL> select table_name,tablespace_name from user_tables;

TABLE_NAME                     TABLESPACE_NAME

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

TTS                            TTS

把导入的表空间状态更改为READ WRITE

RMAN传输表空间迁移数据的更多相关文章

  1. 使用MySQL传输表空间迁移数据

    对于大表的迁移,如果使用mysqldump进行导出,然后重新导入到其它环境,速度是非常缓慢的.如果使用传输表空间,则可以解决这个问题. 测试使用传输表空间迁移表,基础环境如下:   源库 目标库 IP ...

  2. 如何通过RMAN使用传输表空间迁移到不同的Endian平台 (Doc ID 371556.1)

    How to Migrate to different Endian Platform Using Transportable Tablespaces With RMAN (Doc ID 371556 ...

  3. mysql 案例 ~ 表空间迁移数据与数据导入

    一  简介:mysql5.6+的表空间传输二 目的:复制数据到另一个表三 步骤   1 create table b like a ->创建一个空表   2 alter table b disc ...

  4. mysql5.6之 传输表空间迁移表或恢复误删除的表

    一,简单说明: 1),传输表空间的限制:  1,mysql 版本 5.6.6 及其以上,并且版本建议源和目标版本建议都是GA版并且大版本一样  2,表引擎为innodb并且开启独立表空间  innod ...

  5. oracle操作之传输表空间

    一.传输表空间概述 什么是传输表空间,传输表空间技术始于oracle9i,不论是数据字典管理的表空间还是本地管理的表空间,都可以使用传输表空间技术:传输表空间不需要在源数据库和目标数据库之间具有同样的 ...

  6. [20170623]利用传输表空间恢复部分数据.txt

    [20170623]利用传输表空间恢复部分数据.txt --//昨天我测试使用传输表空间+dblink,上午补充测试发现表空间设置只读才能执行impdp导入原数据,这个也很好理解.--//这样的操作模 ...

  7. 转 Oracle Transportable TableSpace(TTS) 传输表空间 说明

    ############1   迁移数据库的集中方法 三.相关技术 迁移方式 优势 不足1 Export and import • 对数据库版本,以及系统平台没有要求 • 不支持并发,速度慢• 停机时 ...

  8. 【TTS】传输表空间AIX asm -> linux asm

    [TTS]传输表空间AIX asm -> linux asm 一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌 ...

  9. 【TTS】传输表空间Linux asm -> AIX asm

    [TTS]传输表空间Linux asm -> AIX asm 一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌 ...

随机推荐

  1. A10 平板开发二搭建Android开发环境

    我是直接在Ubuntu 12.10 64位系统下操作的,搭建Ubuntu开发环境类似,见Ubuntu 10.04开发环境配置.需要注意的是,64位的系统,需要安装支持32位的库(sudo apt-ge ...

  2. [Hapi.js] Request Validation with Joi

    hapi supports request validation out of the box using the joi module. Request path parameters, paylo ...

  3. 达到XML简单的动态配置

    今天写的XML相关内容:随着上述眼前的小项目(等级类别)由于地图每个级别.因此,让他动态读取XML内容,这样的变化只能看到XML档. 简单的想法:第一次使用UserDefault类写入文件 UserD ...

  4. javascript学习笔记(一)

    学习书籍 Javascript高级程序设计 第3,4章 javascript数据类型 Undefined(undefined) Null(null,空指针) Boolean(true,false) N ...

  5. html基本基础

    一 HTML5是用来做什么的? PSD2HTML 信息 信息差(信息不对称) 二 html文件新建流程: 新建文本文件 网页文件后缀 .html 修改编码:ANSI格式,UTF-8无BOM格式==== ...

  6. NFinal 视图—用户控件

    自定义控件 定义控件 以Label控件为例: 1.首先在Common文件夹下添加Label.cs文件,其中代码如下: //a.control的实体类必须继承NFinal.UserControl类 pu ...

  7. 阿里云 Debian Linux 布署记录

    摘要: 主要安装了web环境,java+tomcat+mysql+nginx(暂没没用) 数据盘挂载在/data下,项目,索引都放/data目录下 java,tomcat,mysql程序都在/root ...

  8. 客户端调用web中js方法(C调B)跨域问题

    这几天遇到了个棘手问题(c调b),经过排错查出了问题. 一,问题描述如下: 1.客户端需要调用father.html中一个js方法,特殊之处在于 这个father.html中有个iframe嵌套了一个 ...

  9. 使用BOOST.SPIRIT.X3的RULE和ACTION进行复杂的语法制导过程

    Preface 上一篇简述了boost.spirit.x3的基本使用方法.在四个简单的示例中,展示了如何使用x3组织构造一个语法产生式,与源码串匹配并生成一个综合属性.这些简单的示例中通过组合x3库中 ...

  10. codeforces 340D Bubble Sort Graph(dp,LIS)

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud  Bubble Sort Graph Iahub recently has lea ...