Impdp exclude=schema
hi all,
i have written this
EXCLUDE=SCHEMA:"='ORDERS'"
but it is not working...
i even tried like this
EXCLUDE=SCHEMA:\"='ORDERS'\"
but i am getting error like "ORDERS" is INVALID identifier.
so can any body please tell me how to user schema name in exclude....
user5368861 wrote:
hi all,
i have written this
EXCLUDE=SCHEMA:"='ORDERS'"
but it is not working...
i even tried like this
EXCLUDE=SCHEMA:\"='ORDERS'\"
but i am getting error like "ORDERS" is INVALID identifier.
so can any body please tell me how to user schema name in exclude....if you place everything in a "control file",
then you won't have to battle with command line interpreter
Similar Messages
-
EXPDP/IMPDP : Clone schema with datapump
Hello,
I have a full export with the following parameters:
DIRECTORY=dir$export
DUMPFILE=datapump_exp_FULL.dmp
LOGFILE=datapump_exp_FULL.log
FULL=Y
And I want to import only one schema into a new schema with the following parameters:
DIRECTORY=dir$export
DUMPFILE=datapump_exp_FULL.dmp
LOGFILE=datapump_imp_SCHEMA2.log
SCHEMAS=SCHEMA1
REMAP_SCHEMA=SCHEMA1:SCHEMA2
TABLE_EXISTS_ACTION=REPLACE
TRANSFORM=OID:N
But for what reason ever IMPDP tries to import other schemas like SYSMAN, APEX... also. This throws a load of ORA-31684 (object already exists), what means TABLE_EXISTS_ACTION=REPLACE doesn't work also.
I also tried to import without SCHEMAS=SCHEMA1, but didn't succeed anyway...
So, how can I force IMPDP to import only SCHEMA1, without touching the others ?
Regards,
Mynzeither use INCLUDE PARAMETER as per documentation
http://docs.oracle.com/cd/E11882_01/server.112/e10701/dp_import.htm#i1007761OR
EXCLUDE=SCHEMA:"IN ('OUTLN','SYSTEM','SYSMAN','FLOWS_FILES','APEX_030200','APEX_PUBLIC_USER','ANONYMOUS')"OR
Using NOT-LIKE with EXCLUDETake care of those quotation marks.. -
How to exclude schema name from exported files (PL SQL Developer)
Dear all,
Just one question: I am using PL SQL Developer. My goal is to export some data (as .sql and .dmp files) from one database and to import them into the another database (both databases have identical structure - test database and production, just different database names and names of schema. In order to make it possible, I need to exclude schema name from generated export file. I believe that it is possible to do it automatically by setting up parameters of PL SQL Developer. How?
Thank you in advance,
Kindest regards,
DraganaIn the meantime, I have found the answer on my previous question:
Actually, the initial idea (how to exclude schema name from exported files) was wrong. No need for any intervention.
Trick is: Schema name can be changed during the import of exported files (PL SQL Developer during import gives possibility: From User (old schema) To User (new schema) .
Hope that this will be useful info for others.
Dragana -
Hi All,
Can I exclude schemas (exclude=SCHEMA:"='MDDATA') while taking full export of the db, DB version is 9.2.0.7sr.satya wrote:
"exp help=yes" shows you all available options.exp help=yes dint show me exclude option, so thought of raising this question in the forum.If it is not there, that means it is not available, isn't it ?
In worse case, the 9i doc is still online :
http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#SUTIL001
Nicolas. -
Hi Experts,
I am getting the following error during import using impdp
Failing sql is:
GRANT SELECT ON "CM_DBA"."PARTY" TO "CM_USR"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'CM_USR' does not exist
Failing sql is:
GRANT SELECT ON "CM_DBA"."PARTY_RLN" TO "CM_USR"
How to exclude CM_USR during import in windows?
Thanks for the help.
Regards,
RichardThis link will be helpful
http://psoug.org/reference/datapump.html
Here just find out word EXCLUDE a good explanation is given -
Impdp specific schema from dump which has been created using full=y
Hi,
I have received a dump (expdp) which has been created using the parameter FULL=Y. I just want to import (impdp) only one schema into my database. I have used remap_schema and exclude=grants. The schema i want to import is carried out successfully, but in my import log i keep getting the messages such as :
ORA-31684: Object type TABLESPACE:"TS_BCST1" already exists
ORA-31684: Object type USER:"OUTLN" already exists
ORA-31684: Object type SEQUENCE:"SYSTEM"."MVIEW$_ADVSEQ_GENERIC" already exists
How can i use impdp only to import objects under my specific schema and not have impdp attempt to create system/sys users and its objects, create tablespaces, etc etc.
Kindly assist.
Regards,
KaranUse SCHEMAS parameter in the impdp command to import the scpecific schema.
Eg.
impdp system/password schemas=user1 remap_schema=user1:user2 directory=dir dumpfile=user1.dmp...........
You can specify list of schemas you want to import with , (comma) saperated in the SCHEMAS parameter. -
hi all,
Good day...
DB version is 10.2.0.4
Table of 36gb is exported and while importing using impdp i gave
exclude=INDEX:\"IN\(\'GMF_LOT_COST_DETAILS_U1\')"But after this too..while importing it tries to import the index..as i could see the number of rows increasing in the index..why it is so? Does specifyiing exclude=index is enough!!!
thanks,
baskar.lHi,
Yes the index and table are in the same schema...
impdp gmf/gmf directory=exp_dir dumpfile=gmf.dmp logfile=imp.log tables=gmf_lot_cost_details exclude=indexthanks,
baskar.l -
Impdp import schema to different tablespace
Hi,
I have PRTDB1 schema in PRTDTS tablespace, I need encrypt this tablespace.
and I have done this steps:
1. I created new encrypted PRTDTS_ENC tablespace.
2. I take export PRTDB1 schema. (expdp system/system schema=PRTDB1 directory=datapump dumpfile=data.dmp logfile=log1.log)
and I want import this dump to new PRTDTS_ENC tablespace.
can you give me impdp command, which I need?Hello,
ORA-14223: Deferred segment creation is not supported for this table
Failing sql is:
CREATE TABLE "PRTDB1"."DATRE_CONT" ("BRON" NUMBER NOT NULL ENABLE, "PCDID" NUMBER(9,0) NOT NULL ENABLE, "OWNERSID" NUMBER NOT NULL ENABLE, "VALUESTR" VARCHAR2(4000 CHAR), "VALNUM" NUMBER, "VALDATE" DATE, "VALXML" "XMLTYPE") SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING So it means that these Tables "need" a Segment but, they are created with the option SEGMENT CREATION DEFERRED.
A workaround is to create a Segment for these Tables on the Source Database before exporting them. Then, at the Import you won't have the option SEGMENT CREATION DEFERRED. The following Note of MOS detail this Solution:
- *Error Ora-14223 Deferred Segment Creation Is Not Supported For This Table During Datapump Import [ID 1293326.1]*
The link below gives more informations about the DEFERRED SEGMENT CREATION:
http://docs.oracle.com/cd/E14072_01/server.112/e10595/tables002.htm#CHDGJAGB
With the DEFERRED SEGMENT CREATION feature, a Segment is created automatically at the first insert on the Table. So the Tables for which the error ORA-14223 occurs are empty.
You may also create them separately by using a script generated by the SQLFILE parameter in which you change the option SEGMENT CREATION DEFERRED by SEGMENT CREATION IMMEDIATE.
Hope this help.
Best regards,
Jean-Valentin -
IMPDP into schema with truncated tables, best way to do this?
Hello all,
I'm a bit of a noob witih datapump.
I've got a schema that I've truncated all tables. I have a full schema export I took awhile back, and I'm wanting to import this into the schema to basically 'reset' it.
First time run, I got the :
ORA-39151: Table "xyz.tablename" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
I've been reading through, and see suggestions to add to the par file:
CONTENT=DATA_ONLY TABLE_EXISTS_ACTION=APPEND
And I've seen others use the option for:
table_exists_action=replace
I'm wondering if I could get suggestions best approach to use...I basically want to put the data back into the tables, and have the indexes rebuilt....what is the best course of action here?
Thank you in advance,
cayenneIf all you want is to reload the data, then
impdp user/password ... content=data_only table_exists_action=append
This will only load the data into the existing tables and it will append the data to those tables. If the table definitions may have changed, then you would remove the content=data_only and use table_exists_action=replace.
If you need to load dependent objects like indexes, constraints, etc, then don't do content=data_only and use table_exists_action=replace.
Hope this helps.
Dean -
Impdp := Estimate schema size
I have compressed dump of one schema of 4 GB. Now i wanted to import it . can anyone please tell me that how much space i should reserve for importing dump file.
Thanks in advance ..You should be able to get it from the dump file. This is what you need to do if you are importing the complete dumpfile(s):
impdp user/password directory=your_dir dumpfile=your_dump.dmp master_only=y keep_master=y jobname=est_size
sqlplus user/password
select sum(dump_orig_length) from est_size where process_order > 0 and duplicate = 0 and object_type = 'TABLE_DATA'
If you only want some of the dumpfile, then
add your filters to the impdp command, like schemas=foo, or tables=foo.tab1, or whatever... then
select sum(dump_orig_length) from est_size where process_order > 0 and duplicate = 0 and object_type = 'TABLE_DATA' and processing_state != 'X';
This will give you the uncompressed size of the data that was exported.
when you are done
sql> drop table user.est_size;
Hope this helps.
Dean -
Hello Experts!
I am using Oracle ImpDP to import a fresh DB to a test system. I was the impdp to create all the schema.
My original import was done using sys as sysdba
I am running the import using the same user. What option should I set in the par file to do so?
-- Oracle 10.2G
-- Running on Linux
Thanks!hi
Part of the Exp Logs
Export: Release 10.2.0.4.0 - Production on Monday, 19 September, 2011 19:09:09
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_FULL_01": "system/******** AS SYSDBA" DUMPFILE=EXP_DUMP_DIR:expdp_STAGEDB_09192011.dmp logfile=EXP_LOG_DIR:expdp_STAGEDB_09192011.log PARFILE=/home/oracle/wavemark/export/scripts/expdp_STAGEDB.par
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 9.944 GB
Processing object type DATABASE_EXPORT/TABLESPACE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/ROLE
Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE
Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA
Processing object type DATABASE_EXPORT/RESOURCE_COST
Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK
Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/SEQUENCE
Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY
Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/CONTEXT
Processing object type DATABASE_EXPORT/SCHEMA/PUBLIC_SYNONYM/SYNONYM
Processing object type DATABASE_EXPORT/SCHEMA/SYNONYM
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/TYPE_SPEC
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PROCOBJ
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM
Processing object type DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/PRE_TABLE_ACTION
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/GRANT/CROSS_SCHEMA/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/CONSTRAINT/CONSTRAINT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/COMMENT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/RLS_CONTEXT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/RLS_GROUP
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/RLS_POLICY
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/PACKAGE_SPEC
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/FUNCTION/FUNCTION
Processing object type DATABASE_EXPORT/SCHEMA/PROCEDURE/PROCEDURE
Processing object type DATABASE_EXPORT/SCHEMA/PROCEDURE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/FUNCTION/ALTER_FUNCTION
Processing object type DATABASE_EXPORT/SCHEMA/PROCEDURE/ALTER_PROCEDURE
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/VIEW
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/GRANT/CROSS_SCHEMA/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/COMMENT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE_BODIES/PACKAGE/PACKAGE_BODY
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/TYPE_BODY
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_TABLE_ACTION
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TRIGGER
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/TRIGGER
Processing object type DATABASE_EXPORT/SCHEMA/MATERIALIZED_VIEW
Processing object type DATABASE_EXPORT/SCHEMA/JOB
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCACT_INSTANCE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCDEPOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
. . exported "UWAVE"."PRODUCTITEM" 1.607 GB 4961525 rows
. . exported "UWAVE"."PRODUCTEVENT" 1.363 GB 7668052 rows
. . exported "UWAVE"."RFIDTAG" 716.7 MB 6206230 rows
. . exported "UWAVE"."ERRORLOG" 856.5 MB 628430 rows
. . exported "UWAVE"."CABINETRUN" 979.5 MB 20389386 rows
. . exported "URPT"."STG_RTHOSPITAL_PRODUCTEVENT" 252.4 MB 1854228 rows
. . exported "UWAVE"."AUDITLOG_ARCHIVE" 232.3 MB 571450 rows
. . exported "UWAVE"."PERFORMANCETIMING" 194.8 MB 330004 rows
. . exported "UWAVE"."REPORTLOG" 186.2 MB 2315240 rows
. . exported "UWAVE"."ENDPOINTITEMEND_MV" 138.8 MB 306043 rows
Part of the Imp Logs
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 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": "system/******** AS SYSDBA" DUMPFILE=IMP_DUMP_DIR:expdp_ProdDB_2_EngDB02.dmp LOGFILE=IMP_LOG_DIR:impdp_ProdDB_2_rows.log PARFILE=impdp_ProdDB_2_eng.par
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "UWAVE"."PRODUCT" 8.966 MB 39674 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'USPLY' does not exist
Failing sql is:
GRANT ALTER ON "UWAVE"."PRODUCT" TO "USPLY"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'USPLY' does not exist
Failing sql is:
GRANT DELETE ON "UWAVE"."PRODUCT" TO "USPLY"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'USPLY' does not exist -
Impdp exclude tables getting error
hi,
i issued impdp like this
$impdp dumpfile=xxxxx.dmp logfile=xxx.log directory=xxxxxx exclude=table:"IN('scott.emp','tiger.dept')" full=y version=10.2.0.3
getting error
"exclude badly formed"
thanks in advance
gLike oradba said, it is better to use a parameter file.
Depending on your Operational System, special characters in the EXCLUDE clause may need to be escaped if you use the command line.
Take a look here for more info: http://www.oracle-base.com/articles/10g/OracleDataPump10g.php#IncludeExclude -
Impdp exclude some table grants
Hi,
I exported a schema containing tables. Each table has grants provided to other schemas.
for example:
the schema CSFDS_BAR grants SELECT, INSERT, UPDATE, DELETE on the table EXAMPLE to the schema CSFDS_FOO
and SELECT on the same table to the schema QUX.
I would like to import the datapump to another schema: ERHPQ_BAR; and remap the grants of the table EXAMPLE of CSFDS_FOO to ERHPQ_FOO but exclude the grant provided to QUX.
I use the following parameters to remap the schemas.
SCHEMAS=CSFDS_BAR
EXCLUDE=USER,SYSTEM_GRANT,ROLE_GRANT,DEFAULT_ROLE,TABLESPACE_QUOTA
REMAP_SCHEMA=CSFDS_BAR:ERHPQ_BAR
REMAP_SCHEMA=CSFDS_FOO:ERHPQ_FOO
Grants to CSFDS_FOO are correctly remap to ERHPQ_FOO. But I haven't a way to exclude the grants to QUX.
I tried EXCLUDE=OBJECT_GRANT:"GRANTEE in ('QUX')" but failed.
Please advice.
SebastienHi,
"The error I got is
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00920: invalid relational operator"
this Error you get because you can not use the wrong syntax for Exclude in your command
I tried your suggestion but it only exclude the grants provided the grantor not the grantee.
AFAIK , you can not do what you want. -
Exclude Schema from Gather Statistics Job
I am using 11.1.0,7. I would like to know if we can exclude some schemas While Oracle automatically gathers the statistics.
Reason I want this is that, I have one database that supports multiple applications but as per one application's demand we should not be gathering stats on it's schema. So, in totality I have 20 Schemas but while this jobs run, I want to exclude 2 schemas that this application supports.
Locking the Stats for these schemas is not an option.
Thanks!Have you enquired from the vendor exactly why they do not want you to gather statistics on it's schema?
Is there other options they are willing to consider like baselining the explain plan or perhaps not publishing the statistics to the tables...using the pending statistics feature?
Exec dbms_stats.set_table_prefs('SH', 'CUSTOMERS', 'PUBLISH', 'false');
Regards
Tim Boles
Edited by: Tim Boles on Aug 4, 2010 11:11 AM -
EXPDP/IMPDP EXCLUDING ROLES
Hi All,
I can't call myself new to this forums since I have more than 10 post here but I can call myself new to Oracle databases so please bear with me.
I have a scenario where I need to datapump fron source to target but the issue here is I should not export any connect,resource,dba roles associated with the users.
Can anyone help me what needs to be excluded during the initial export to avoid them being imported on the target.
Thanks in advance for your help,
-NHi 705159 ,
Thank you for your reply.
I m familiar with the EXCLUDE option. I need everything(tables,objects,synonyms and all that is there) except the roles and that too only certain roles.
Initially I figured out that I would do content=data_only and then apply all the metadata But found out that it is leads to same point.
I have to manually go revoke all the CONNECT,RESOURCE and DBA roles for certain users.
EXCLUDE option comes with role_grants, default_roles and grants.
I am sure role_grants and grants would not solve my problem. I haven't tried default roles.
So, it would be helpful if some had faced similar situation can guide me.
Thanks,
-N
Maybe you are looking for
-
GROUP EMAILING LIST: Is it possible to create a group list to email
how would you go about setting up a group contact list to email people instead of having to click on each name.....???? like if you wanted to forward something onto others.......didn't know if it could be done.... Solved! Go to Solution.
-
1. can different ear module share some jar file in j2ee if u don't include the jar files into ear file? for example.i have two ear file a.ear and b.ear,both of them use c.jar,i just want to deploy them on to the same j2ee server,i don't want c.jar to
-
Compressor: Failed: QuickTimer Error: 0
When compressing with Compressor I get error message: Failed: QuickTime Error: 0 This happens when I am exporting from Final Cut Pro HD (photo Jpeg video), and also when I am compressing from Final Cut movie file (with current settings and not self c
-
Initialization was a full update
Hi, We are doing multiple initializations in our ODS. The ODS and its datasources are customized. We used the table vbrp in R/3 as a generic datasource via R/3 infoset. We have been doing initializations per month.Example April 1,2007 to April 30,200
-
Flash player 11.3.300.257 Wont work
When I install it all my videos turn into just a black or winte box where the video should be . Im using firefox but it wont work in IE too. Any ideal whats going on ? I had to go back to 10.3 to get it to work .