Reg: Expdp and Impdp

Dear All.
I am using expdp command to export the table by specifying Query parameter.
But i am unable to export the table based on the condition.
Ex:
EXPDP username/password dumpfile=employee.dmp logfile=emp.log directory=DATADIR_EXP TABLES=EMPLOYEE query=EMPLOYEE:\"UPDATED_TIME >= '04-JUN-13' AND UPDATED_TIME >= '05-AUG-13'\"
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 3 GB
ORA-31693: Table data object "<username>"."EMPLOYEE" failed to load/unload and is being skipped due to error:
ORA-00933: SQL command not properly ended
Master table "<username>"."EMPLOYEE" successfully loaded/unloaded
Dump file set for <username>.SYS_EXPORT_TABLE_01 is:
  E:\IMPDP\employee.dmp
Job "<username>"."SYS_EXPORT_TABLE_01" completed with 1 error(s) at 12:34:45
Oracle 11g,

Use it with a PARFILE and then on the PARFILE specify query clause.
On the PARFILE all you would have to do is use the double quotes at the start and end ofthe QUERY clause, such as:
TABLES:emp_salary
DUMPFILE=dump_dir
QUERY= emp_salary:"WHERE emp_id IN (SELECT id from emp
where join_date> to_date('2004-01-01','YYYY-MM-DD')
AND dept='SALSE')"
This is better so you don't have to deal with shell escape characters.
EDIT: Your query is funny.
UPDATED_TIME >= '04-JUN-13' AND UPDATED_TIME >= '05-AUG-13'\"
Is this really what you want? A row can only have an UPDATED_TIME of 04/JUN (or later) OR 05/AUG (or later) , so your WHERE clause will always return 0 rows.
And if you switch to a OR the second condition becomes redundant.

Similar Messages

  • Full expdp and impdp: one db to another

    Hi! Good Day!
    I Would like to ask for any help regarding my problem.
    I would like to create a full export of one database to and import it on another database. This 2 database are on a separate machines.
    I am trying to use the expdp and impdp tool to do this task. However, i have been experiencing some problems during the import task.
    here is the detail of my problems:
    When i try to impdp the dump file, it seems that i was not able to iimport the user's data and metadata.
    Here is the exact command that i've used during the import and export task:
    export (server #1)
    expdp user01/******** directory=ora3_dir full=y dumpfile=db_full%U.dmp filesize=2G parallel=4 logfile=db_full.log
    import (server #2)
    impdp user01/******** directory=ora3_dir dumpfile=db_full%U.dmp full=y log=db_full.log sqlfile=db_full.sql estimate=blocks parallel=4
    here is the log that was generated during the impdp running:
    Import: Release 10.2.0.1.0 - 64bit Production on Friday, 27 November, 2009 17:41:07
    Copyright (c) 2003, 2005, 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 "SSMP"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
    Starting "SSMP"."SYS_SQL_FILE_FULL_01": ssmp/******** directory=ora3_dir dumpfile=ssmpdb_full%U.dmp full=y logfile=ssmpdb_full.log sqlfile=ssmpdb_full.sql
    Processing object type DATABASE_EXPORT/TABLESPACE
    Processing object type DATABASE_EXPORT/PROFILE
    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/SCHEMA/DB_LINK
    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/DIRECTORY/GRANT/CROSS_SCHEMA/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/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM
    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/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/FUNCTION/GRANT/OWNER_GRANT/OBJECT_GRANT
    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/JOB
    Processing object type DATABASE_EXPORT/SCHEMA/DIMENSION
    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
    Job "SSMP"."SYS_SQL_FILE_FULL_01" successfully completed at 17:43:09
    Thank you in advance.

    I believe there are lines like that in the export log.
    here's an extract from the log file:
    Processing object type DATABASE_EXPORT/SCHEMA/VIEW/TRIGGER
    Processing object type DATABASE_EXPORT/SCHEMA/JOB
    Processing object type DATABASE_EXPORT/SCHEMA/DIMENSION
    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 "SSMP"."SMALLBOX" 450.2 MB 2489790 rows
    . . exported "SSMP"."LTCONFSB" 397.9 MB 3122899 rows
    . . exported "SSMP"."INFRJCT" 317.3 MB 3615810 rows
    . . exported "SSMP"."ICTEST1" 202.5 MB 789618 rows
    . . exported "SSMP"."EQUIPERF" 315.3 MB 3008636 rows
    . . exported "SSMP"."INFOPE2" 190.7 MB 569039 rows
    . . exported "SSMP"."SMALLBSB" 189.8 MB 2659468 rows
    . . exported "PRS1"."STKDTLOLD" 193.4 MB 983322 rows
    . . exported "SSMP"."ICTEST11" 185.2 MB 553916 rows
    . . exported "PRS1"."PURCHASE" 166.5 MB 122787 rows
    . . exported "SSMP"."JIGREC" 183.5 MB 2664488 rows
    . . exported "SSMP"."SALES" 112.4 MB 294134 rows
    . . exported "SSMP"."P_INFOPE" 160.4 MB 485773 rows
    . . exported "SSMP"."CIOP" 128.1 MB 385160 rows
    . . exported "SSMP"."SMALLBOX2" 126.0 MB 589964 rows
    . . exported "SSMP"."SHIPOUT" 123.4 MB 281778 rows
    . . exported "SSMP"."INFHISTORY" 129.9 MB 786844 rows
    . . exported "SYSMAN"."MGMT_TARGETS" 14.90 KB 11 rows
    . . exported "SSMP"."LOGCNT" 4.937 KB 1 rows
    . . exported "SSMP"."WEEKINF" 45.07 KB 700 rows
    . . exported "SSMP"."DEPTNM" 12.33 KB 81 rows
    . . exported "SSMP"."WFRID" 5.953 KB 2 rows
    . . exported "SSMP"."MATDTLS" 85.53 KB 199 rows
    . . exported "SSMP"."ICRATTACH" 9.257 KB 11 rows
    . . exported "SSMP"."WIP2" 20.34 KB 67 rows
    . . exported "SSMP"."MATINFO" 17.83 KB 43 rows
    . . exported "SSMP"."ICRFAPP" 11.48 KB 11 rows
    . . exported "SSMP"."WMXINF" 43.60 KB 500 rows
    . . exported "SSMP"."MLDMACHINE" 32.30 KB 228 rows
    . . exported "SSMP"."ICRNAME" 10.48 KB 23 rows
    . . exported "SSMP"."XLODCNT" 4.937 KB 1 rows
    . . exported "SSMP"."IJPLODCNT" 5.234 KB 1 rows
    . . exported "SSMP"."MONTHINF" 14.67 KB 152 rows
    . . exported "SSMP"."YYSTMP" 15.57 KB 59 rows
    . . exported "SSMP"."MPRICE" 39.95 KB 365 rows
    . . exported "SYSMAN"."ESM_COLLECTION" 8.585 KB 91 rows
    . . exported "SSMP"."INFCHKSHT" 6.406 KB 4 rows
    . . exported "SSMP"."MRKLNO" 4.929 KB 1 rows
    . . exported "SSMP"."JPNMARK" 5.890 KB 2 rows
    . . exported "SSMP"."LODCNT" 4.921 KB 1 rows
    . . exported "SSMP"."MRPNAME" 29.73 KB 310 rows
    . . exported "SYSMAN"."EXPORT000381" 49.68 KB 244 row

  • I am trying the expdp and impdp utility getting error

    I am trying the expdp and impdp utility, as per the documentation I logged in as sys and created a directory datapumpt in the location 'C:\oracle\odp' , i did grant the read and write privilege to my user_id.
    when i tried the expdp command in the prompt its throwing errors:
    Ora:39002 invalid operation
    ora: 39070 unable to open the log file
    ora: 29283 invalid file operation
    ora:06512 : at sys.utl_file line 475
    ora: 29283 invalid file operation.
    Operating system : windows / oracle version : 10.1.0.3.0
    Operating system : Linux AS4
    please help me on this.

    I'm afraid there is a big problem...
    C:\oracle\odp is a windows path
    If the Oracle server is running under Linux, your directory is invalid.
    A directory is an "alias" for a folder on the server, not on the client !!!
    The expdp/utl_file/... won't access folder on the client !

  • Move all data from one database to other using oracle expdp and impdp tool

    I need to move all of the data from one database to another. For that I am using oracle expdp and impdp tool.
    I have the full database export dump file. I moved that dump file to my other database.
    Now when I try to use impdp tools it gives lots of error regarding path mismatch,user not exists, role not exists.
    As my datafile path of source database does not match with the target database path , also the users are not there in target database. I dont want to create all the tablespaces that in my source database as there are 82 tablespaces.Is there any way by which I can move my all data without using remap option for tablespaces or users and grants.

    The FULL parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax.
    The user must have the privielge of EXP_FULL_DATABASE
    expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log
    impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.logGO through below linkfor more details...
    http://www.oracle-base.com/articles/10g/OracleDataPump10g.php
    Regards
    Umi
    Edited by: Umi on Feb 4, 2011 2:27 AM

  • Using expdp and impdp instead of exp and imp

    Hi All,
    I am trying to use expdp and impdp instead of exp and imp.
    I am facing few issues while using expdb. I have a Job which exports data from one DB server and then its imported so another DB server. Both DB servers are run on separate machines. Job runs on various clients machine and not on any of DB server.
    For using expdp we have to create DIRECTORY and as I understand it has to be created on DB server. Problem here is Job can not access DB Server or files on DB server. Also dump file created is moved by Job to other machines based on requirement( Usually it goes to multiple DB server).
    I need way to create dump files on server where job runs.
    If I am not using expdp correctly please guide. I am new to expdp/impdp and imp/exp.
    Regards,

    Thanks for quick reply ..
    Job executing expdb/impdp runs on Red Hat Enterprise Linux Server release 5.6 (Tikanga)
    ORACLE server Release 11.2.0.2.0
    Job can not access the ORACLE server as it does not have privileges (In fact there is no user / password to access ORACLE server machines). Creating dump on oracle server and moving is not an option for this JOB. It has to keep dump with itself.
    Regards,

  • Upgrading using expdp and impdp

    I am upgrading from 10.2 to 11.1 by creating a new 11.1 db and then expdp from the 10.2 db and impdp to the 11.1 db. There is Oracle text installed and in use in the 10g db. Should I install the Oracle text in the 11.1 db first before I do a full impdp? Or install Oracle text and only do schema level impdp and ignore importing to ctxsys schema? I would like to know what's the correct way to do this w/o screwing up the text index on the application schema.
    Thanks.

    Hi,
    CTXSYS is never part of an export (think about that, it is the same as with SYS). Only Indexes used by schemas are exported. The best way to work with Oracle Text and an upgrade is to script the indexes before the export by using ctx_report.create_index_script. Make the export and import, and run afterwards the scripts for the text indexes. In the export the preferences for Text indexes are lost (not exported), so you can get in trouble if you need to change such indexes with preferences.
    Herald ten Dam
    http://htendam.wordpress.com

  • Expdp and impdp  doubt

    hello frnds ,
    I have a expdp dumpfile of a schema from linux ES4 server ,oracle 10 g
    can I use above server dumpfile and impdp in solaris 10 ,oracle 10 g database ..is it possible ?
    thanks

    A corrupted dump file would almost certainly generate a different error message. Either the import utility will blow up when it encountered an invalid header or it will abort in the middle of the import when corruption is found. The error message you're receiving does not indicate that your dump file is corrupt.
    There is no way to validate a dump file short of trying to import it.
    I hope that you are doing a daily export as a supplement to a proper backup not as a replacement for a physical backup. If you're not doing a physical backup, you really want to do so-- export is no replacement for taking a proper backup.
    I'm confused about where the dump file resides now. Have you placed the dump file in the DUMP_FILE_DIR on the destination server? Or are you stating that you cannot put the dump file on the destination server at all? Or something else?
    Justin

  • Datapump (expdp and impdp at FULL=Y)

    Hi ,
    I have two oracle 11G machines
    1)  Prod and 2) test
    I have some concern with datapump:
    1) i have to do export of "prod" database with option FULL=Y and import the same in "test" database . Is it is feasible?
    structure od Both db is same like both have same schemas, tablespace...
    expdp system/*****@prod directory=export dumpfile=export_%U.dmp logfile=export.log FULL=Y
    and
    impdp system/***** directory=export dumpfile=export_%U.dmp logfile=import.log FULL=Y

    Hi,
    >>1) i have to do export of "prod" database with option FULL=Y and import the same in "test" database . Is it is feasible?
    Yes, you can do it.   did you get any Error ? 
    Check here:Data Pump Import
    HTH

  • Expdp and impdp from 10.1.0.4 to 11.2.0.3

    On Oracle 10.1.0.4, I made a data pump as system user:
    sql> CREATE OR REPLACE DIRECTORY TEST_DIR AS 'C:\test';
    C:\> expdp system/********@BDSPROD FULL=Y directory=TEST_DIR dumpfile=BDSPROD.dmp logfile=expdpbdsprod.log On another server with Oracle 11.2.0.3, I tried to make impdp. There is a database with same name and structure of BDSPROD:
    sql> CREATE OR REPLACE DIRECTORY TEST_DIR AS 'C:\test';
    C:\test>impdp system/oracle@bdsprod full=Y directory=test_dir dumpfile=c:\test\bdsprod.dmp
    Import: Release 11.2.0.3.0 - Production on Mon Oct 29 14:45:08 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-39088: file name cannot contain a path specification

    In the impdp command argument dumpfile doesnt need to have full path. You do have directory argument specified so just do:
    impdp system/oracle@bdsprod full=Y directory=test_dir dumpfile=bdsprod.dmp

  • 32bit to 64bit migration via expdp and impdp

    is it possible to use expdp (32bit) to export custom data and import it into 64-bit database via impdp?
    RDBMS: 10.2.0.3 on Redhat Linux4

    Hi,
    Yes, you can use expdp/impdp to migrate data from 32bit to 64bit.
    Regards
    Edited by: skvaish1 on Feb 3, 2010 5:17 PM

  • Question on expdp and impdp for full batabase

    I have 10.2.0.4.0 db1 on solaris10.
    I have to convert the database character set from WE8ISO8859P1 to AL32UTF8 by the export and import method per note [ID 260192.1]
    I will not move the database for the converstion.
    Waht I have done:
    ran csscan for the db1 ( from WE8ISO8859P1 to AL32UTF8 ). The results are perfect -- no "lossy" "truncation".
    ran expdp with full=y sucessfully
    removed the db1 by DBCA.
    created the db1 with AL32UTF8 by DBCA unselect all the option of schemas. And the tablespaces/datafiles are in exact the same locations as the db1 before it was removed.
    I will run impdp with full=y
    Questions:
    There are some users exist in the origina dbl say source, but not exist in new created target, so are some of the tablespaces.
    Do I have to manually create these users and tablespaces in the target database?
    I thought impdp full=y would make a full load of the database which should create the new users and the new tablespaces on the target, correct?
    Thanks for the help.
    TIA

    Actually the answer for what you need to do depends in part on if you are importiing back into the origional souce after it was clearned out or importing into a new database.
    When the target is not the source then on a full import if the file paths exist and the import can allocate the data sets then the import should create the tablespaces however if the same pathing cannot be used or if the souce database in on the same server and you obviously do not want to overwrite the existing database data files then you would need to pre-create the target tablespaces in order to use different files.
    The users should create. I do not have the time to run a test if the user default tablespace does not exist but I would expect the database to create the user defaulting the user default tablespace to whatever tablespace you have set for the database as a whole.
    I would pre-create owners and grant the usernames the necessary system privileges in advance including quotas since it is possilbe that existing owners may not have all necessary privileges to re-creaate what alreadys exists.
    HTH -- Mark D Powell --

  • What are other thing should i consider using expdp and impdp

    (11g express) r2 windows 2008 and also xp ( i installed it at two places for testing.)
    i wanted to make backup of one schema
    so i used expdp
    please tel me is it ok or is there any thing more reliable to make backup of a schema and import(impdp) of a schema to any oracle database.
    from window prompt
    MKDIR c:\oraclexe\app\tmp
    from sql plus
    sqlplus SYSTEM/password
    CREATE OR REPLACE DIRECTORY dmpdir AS ’c:\oraclexe\app\tmp’;
    GRANT READ,WRITE ON DIRECTORY dmpdir TO hr;
    from windows command line.
    expdp SYSTEM/password SCHEMAS=hr DIRECTORY=dmpdir DUMPFILE=schema.dmp
    LOGFILE=expschema.log
    then following to import
    impdp SYSTEM/password SCHEMAS=hr DIRECTORY=dmpdir DUMPFILE=schema.dmp
    REMAP_SCHEMA=hr:hrdev EXCLUDE=constraint, ref_constraint, index
    TABLE_EXISTS_ACTION=replace LOGFILE=impschema.log
    2) pls tel me should i consider any thing else while exporting or importing.
    3) i have removed EXCLUDE=constraint, ref_constraint, index because i need constrainta index etc.
    so pls tel me why in documentation it is written.
    yours sincerely
    Edited by: 944768 on Mar 31, 2013 2:02 AM

    Hi,
    Yes, you can (should) remove exclude parameter if you like import all objects from export.
    Here is example how you export full schema
    expdp SYSTEM/password SCHEMAS=hr DIRECTORY=dmpdir DUMPFILE=hr.dmp LOGFILE=exp_hr.logAnd import it to another database
    impdp SYSTEM/password SCHEMAS=hr DIRECTORY=dmpdir DUMPFILE=hr.dmp LOGFILE=imp_hr.logPlease note that you need create directory dmpdir to target database also.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • EXPDP and IMPDP from existing database to new 'scratch' database

    Hi All,
    THis is the first time i'm trying to export and import (using datapump) from one database into a brand spanking new database.
    Source/Target OS - WIndows 2008 R2 Standard
    Source/Target - Oracle 11G Release 2 (same patch updates - 11.2.0.3.3)
    I took a full expd of the source database.
    I created the same directory structure on the target as the source. I created an empty database on the target server with the same name as the source.
    I am trying to use impdp to import this full export into the target database, with the end goal being everything is the same on the target as it is on the source (users, tablespaces, data, schemas, etc...).
    I am running into some errors (object already exists, a few others to mention). But my question is, is this a proper way of copying a database from one server to a new server?
    Thanks in advance

    Thanks, here are some of the errors i've received:
    ORA-31684: Object type ROLE:"HS_ADMIN_EXECUTE_ROLE" already exists
    ORA-39111: Dependent object type OBJECT_GRANT:"ORDDATA" skipped, base object type SEQUENCE:"ORDDATA"."ORDDCM_DICT_A_DA_ID_SEQ" already exists
    ORA-39082: Object type TRIGGER:"M_SYS"."MVP_OPD_D_TRG" created with compilation warnings
    Cannot set an SCN larger than the current SCN. If a Streams Capture configuration was imported then the Apply that processes the captured messages needs to be dropped and recreated. See My Oracle Support article number 1380295.1.Table "SYSTEM"."DEF$_DEFAULTDEST" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
    ORA-31693: Table data object "SYSMAN"."MGMT_SYSTEM_PERFORMANCE_LOG" failed to load/unload and is being skipped due to error:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-02291: integrity constraint (SYSMAN.MGMT_SYSTEM_PERFORMANCE_LOG_FK) violated - parent key not found
    ORA-31693: Table data object "ORDDATA"."ORDDCM_DOCS" failed to load/unload and is being skipped due to error:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-00001: unique constraint (ORDDATA.ORDDCM_DOCS_PK) violated
    ORA-39082: Object type TRIGGER:"M_SYS"."M_US_PRIVS_TRG" created with compilation warnings
    ...and then the logfile finishes with this:
    Job "SYS"."SYS_IMPORT_FULL_01" completed with 6542 error(s) at 12:56:31

  • How to use expdp and impdp in oracle 12c on a pluggable database

    Hi,
    I have a pluggable database in a container DB. I have to use expdp to export a table and later import the table into another pluggable database.
    How can i tell expdp to which pluggable database I want to connect?
    Thanks,
    Sarayu

    Then
    1. Add newpdb to  tnsnames.ora ?
    2. connect to pluggable database create a directory.
    sqlplus sys/<password>@newpdb as sysdba
    create or replace directory exp_dir as '/u01/app';
    grant read, write on directory exp_dir to scott;
    3. export emp table of scott user.  -- with sys user
    expdp directory=exp_dir dumpfile=TDUMP.DMP TABLES='SCOTT'.'EMP'
    username: sys@newpdb as sysdba
    password: <password>
    Regards
    Mahir M. Quluzade
    Paste here result.

  • Problem in Database EXPDP and IMPDP

    Dear Friends
    I am using Oracle 11G R2 (11.2.0.1.0) on Windows 7 Ultimate.
    I have some 50 tables (along with its data) and corresponding 40 VIEWS (based on those 50 tablees) in User "SYSTEM" schema.
    I want to take Export DUMP file of these 50 tables and 40 views and want create another user with another name and import all these 50+40 tables/views to that new user.
    Could anyone of you please elaborate me the step by step guide to dump the data from SYSTEM USER with lots of tables and views and then import the same data to another user? is this possible
    regards
    Hamza

    thanks. I am now able to copy. here is the error i get
    SQL> $ impdp asim/asim directory=datadump1 dumpfile=asim.dmp
    Import: Release 11.2.0.1.0 - Production on Mon Jul 4 01:52:10 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "ASIM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "ASIM"."SYS_IMPORT_FULL_01": asim/******** directory=datadump1 dumpfile=asim.dmp
    Processing object type TABLE_EXPORT/TABLE/TABLE
    ORA-39151: Table "SYSTEM"."PARTNERS_COMPANY" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
    Processing object type TABLE_EXPORT/TABLE/PRE_TABLE_ACTION
    ORA-39083: Object type PRE_TABLE_ACTION failed to create with error:
    ORA-06550: line 2, column 2:
    PLS-00201: identifier 'SYS.DBMS_DEFER_IMPORT_INTERNAL' must be declared
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    Failing sql is:
    BEGIN
    SYS.DBMS_DEFER_IMPORT_INTERNAL.QUEUE_IMPORT_CHECK('ORCL','IBMPC/WIN_NT64-9.1.0');
    END;
    ORA-39083: Object type PRE_TABLE_ACTION failed to create with error:
    ORA-06550: line 2, column 2:
    PLS-00201: identifier 'SYS.DBMS_DEFER_IMPORT_INTERNAL' must be declared
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    Failing sql is:
    BEGIN
    SYS.DBMS_DEFER_IMPORT_INTERNAL.QUEUE_IMPORT_CHECK('ORCL','IBMPC/WIN_NT64-9.1.0');
    END;
    ORA-39083: Object type PRE_TABLE_ACTION failed to create with error:
    ORA-06550: line 2, column 2:
    PLS-00201: identifier 'SYS.DBMS_DEFER_IMPORT_INTERNAL' must be declared
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    Failing sql is:
    BEGIN
    SYS.DBMS_DEFER_IMPORT_INTERNAL.QUEUE_IMPORT_CHECK('ORCL','IBMPC/WIN_NT64-9.1.0');
    END;
    ORA-39083: Object type PRE_TABLE_ACTION failed to create with error:
    ORA-06550: line 2, column 2:
    PLS-00201: identifier 'SYS.DBMS_DEFER_IMPORT_INTERNAL' must be declared
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    Failing sql is:
    BEGIN
    SYS.DBMS_DEFER_IMPORT_INTERNAL.QUEUE_IMPORT_CHECK('ORCL','IBMPC/WIN_NT64-9.1.0');
    END;
    ORA-39083: Object type PRE_TABLE_ACTION failed to create with error:
    ORA-06550: line 2, column 2:
    PLS-00201: identifier 'SYS.DBMS_DEFER_IMPORT_INTERNAL' must be declared
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    Failing sql is:
    BEGIN
    SYS.DBMS_DEFER_IMPORT_INTERNAL.QUEUE_IMPORT_CHECK('ORCL','IBMPC/WIN_NT64-9.1.0');
    END;
    ORA-39083: Object type PRE_TABLE_ACTION failed to create with error:
    ORA-06550: line 2, column 2:
    PLS-00201: identifier 'SYS.DBMS_DEFER_IMPORT_INTERNAL' must be declared
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    Failing sql is:
    BEGIN
    SYS.DBMS_DEFER_IMPORT_INTERNAL.QUEUE_IMPORT_CHECK('ORCL','IBMPC/WIN_NT64-9.1.0');
    END;
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    Job "ASIM"."SYS_IMPORT_FULL_01" completed with 7 error(s) at 01:52:18
    SQL>

Maybe you are looking for