0
SQLデベロッパーのデータポンプのエクスポートでは、シーケンスでテーブルをエクスポートします。データポンプ "エクスポートウィザード"フィルタオプションを使用する方法 "含めるまたは除外フィルタを有効にする"。Sql developer Sqlエクスポートポンプでテーブルを取得する方法
SQLデベロッパーのデータポンプのエクスポートでは、シーケンスでテーブルをエクスポートします。データポンプ "エクスポートウィザード"フィルタオプションを使用する方法 "含めるまたは除外フィルタを有効にする"。Sql developer Sqlエクスポートポンプでテーブルを取得する方法
わからないが、これは、コマンドラインを介してそれを行うだろうかです:
は、テストスキーマ(TEST_EXP_OBJECTS)でいくつかのテストオブジェクトを作成:
CREATE SEQUENCE TEST_EXP_OBJECTS.TEST_SEQUENCE;
CREATE TABLE TEST_EXP_OBJECTS.TEST_TABLE AS
SELECT * FROM DBA_USERS WHERE ROWNUM<2;
はその後、テストディレクトリを作成しました:
:SQL> create directory test_exp_dir as '/home/oracle';
Directory created.
その後、スキーマ、特定のテーブル名、および特定のシーケンス名を引用オブジェクトをEXPDP EXPDPから
expdp schemas=TEST_EXP_OBJECTS \
include=sequence:\"= \'TEST_SEQUENCE\'\" \
include=table:\"= \'TEST_TABLE\'\" \
directory=test_exp_dir \
logfile=test.log \
dumpfile=test.dmp
出力:
[email protected]:/home/oracle> impdp dumpfile=test.dmp logfile=test.log remap_schema=TEST_EXP_OBJECTS:REIMPORT_TEST_SCHEMA directory=test_exp_dir
Import: Release 11.2.0.4.0 - Production on Thu Mar 9 08:39:50 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Username:/as sysdba
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01": /******** AS SYSDBA dumpfile=test.dmp logfile=test.log remap_schema=TEST_EXP_OBJECTS:REIMPORT_TEST_SCHEMA directory=test_exp_dir
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "REIMPORT_TEST_SCHEMA"."TEST_TABLE" 10.82 KB 1 rows
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at Thu Mar 9 08:39:54 2017 elapsed 0 00:00:01
[email protected]:/home/oracle> !sql
sqlplus/as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 9 08:39:57 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select object_name, owner from all_objects where owner='REIMPORT_TEST_SCHEMA';
OBJECT_NAME OWNER
------------------------------ ------------------------------
TEST_SEQUENCE REIMPORT_TEST_SCHEMA
TEST_TABLE REIMPORT_TEST_SCHEMA
SQL> select count(*) from REIMPORT_TEST_SCHEMA.test_table;
COUNT(*)
----------
1
SQL>
そして、我々の混乱をクリーンアップ:
をExport: Release 11.2.0.4.0 - Production on Thu Mar 9 08:32:48 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Username: ***
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA schemas=TEST_EXP_OBJECTS include=sequence:"= include include=table:"= include directory=test_exp_dir logfile=test.log dumpfile=test.dmp
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 104 KB
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . exported "TEST_EXP_OBJECTS"."TEST_TABLE" 10.82 KB 1 rows
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
/home/oracle/test.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Thu Mar 9 08:33:47 2017 elapsed 0 00:00:56
は、テスト・スキーマ(REIMPORT_TEST_SCHEMA)を作成impdpは、データやシーケンスを確認することができます
SQL> drop user REIMPORT_TEST_SCHEMA cascade;
User dropped.
SQL> drop user TEST_EXP_OBJECTS cascade;
User dropped.
SQL> drop directory test_exp_dir;
Directory dropped.
特定のテーブルとシーケンスは1つだけですか? – mmmmmpie
@mmmmmpieだけでなく、このcritieriaだけでなく、私はフィルタ式を適用する方法を知る必要があります。 –