Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    7

    Unanswered: Can i partially import a dump?

    Hi,

    I am not a DBA, but managing few database instances for testing purposes, I got this dump from production, with the structural and data dump.
    Structural dump contains: tablespaces, users, roles, grants....
    Data dump contains: data corresponding to user XYZ

    Now, I know how to import, from user to user, but this structural dump contains many users which i do not need. i just need single user from the dump, which is XYZ.

    This is how structural dump looks like:

    BEGINSYS
    CONNECT SYSTEM
    CREATE TEMPORARY TABLESPACE "TEMP_001_XYZ" BLOCKSIZE 8192 TEMPFILE '/database/oracle/XYZ/TEMP_001_XYZ_001.dbf' SIZE 1073741824 REUSE, '/database/oracle/XYZ/TEMP_001_XYZ_002.dbf' SIZE 1048576000 REUSE, '/database/oracle/XYZ/TEMP_001_XYZ_003.dbf' SIZE 3000M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576
    CREATE TABLESPACE "TOOLS_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/TOOLS_001_XYZ_001.dbf' SIZE 52428800 REUSE EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING
    CREATE TABLESPACE "USER_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/USER_001_XYZ_001.dbf' SIZE 105906176 REUSE EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING
    CREATE TABLESPACE "PERFDATA" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/PERFDATA_001_XYZ_001.dbf' SIZE 943718400 REUSE EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING
    CREATE TABLESPACE "RBS_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/RBS_001_XYZ_001.dbf' SIZE 2500M REUSE, '/database/oracle/XYZ/RBS_001_XYZ_002.dbf' SIZE 524288000 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10485760 ONLINE PERMANENT NOLOGGING
    CREATE TABLESPACE "DATA_XS_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/DATA_XS_001_XYZ_001.dbf' SIZE 209715200 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 524288 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "DATA_S_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/DATA_S_001_XYZ_001.dbf' SIZE 536870912 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "DATA_M_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/DATA_M_001_XYZ_001.dbf' SIZE 402653184 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10485760 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "DATA_L_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/DATA_L_001_XYZ_001.dbf' SIZE 5101M REUSE, '/database/oracle/XYZ/DATA_L_001_XYZ_002.dbf' SIZE 2199M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 104857600 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "DATA_XL_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/DATA_XL_001_XYZ_001.dbf' SIZE 12001M REUSE, '/database/oracle/XYZ/DATA_XL_001_XYZ_002.dbf' SIZE 12450M REUSE, '/database/oracle/XYZ/DATA_XL_001_XYZ_003.dbf' SIZE 2250M REUSE, '/database/oracle/XYZ/DATA_XL_001_XYZ_004.dbf' SIZE 1950M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 524288000 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "INDX_XXS_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/INDX_XXS_001_XYZ_001.dbf' SIZE 22020096 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 65536 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "INDX_XS_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/INDX_XS_001_XYZ_001.dbf' SIZE 1048576000 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 524288 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "INDX_S_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/INDX_S_001_XYZ_001.dbf' SIZE 891289600 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "INDX_M_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/INDX_M_001_XYZ_001.dbf' SIZE 2350M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10485760 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "INDX_L_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/INDX_L_001_XYZ_001.dbf' SIZE 18000M REUSE, '/database/oracle/XYZ/INDX_L_001_XYZ_002.dbf' SIZE 6050M REUSE, '/database/oracle/XYZ/INDX_L_001_XYZ_003.dbf' SIZE 7000M REUSE, '/database/oracle/XYZ/INDX_L_001_XYZ_004.dbf' SIZE 6450M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 104857600 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "INDX_XL_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/INDX_XL_001_XYZ_001.dbf' SIZE 6750M REUSE, '/database/oracle/XYZ/INDX_XL_001_XYZ_002.dbf' SIZE 9409M REUSE, '/database/oracle/XYZ/INDX_XL_001_XYZ_003.dbf' SIZE 5341M REUSE, '/database/oracle/XYZ/INDX_XL_001_XYZ_004.dbf' SIZE 8500M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 524288000 ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    CREATE TABLESPACE "PRC_I3_OR_TAB" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/PRC_I3_OR_TAB_001.dbf' SIZE 104857600 REUSE EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING
    CREATE TEMPORARY TABLESPACE "PRC_I3_OR_TMP" BLOCKSIZE 8192 TEMPFILE '/database/oracle/XYZ/PRC_I3_OR_TMP_001.dbf' SIZE 52428800 REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576
    CREATE UNDO TABLESPACE "UNDO_001_XYZ" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/UNDO_001_XYZ_001.dbf' SIZE 5000M REUSE EXTENT MANAGEMENT LOCAL
    CREATE TABLESPACE "PATROL_TBS" BLOCKSIZE 8192 DATAFILE '/database/oracle/XYZ/PATROL_TBS_XYZ_001.dbf' SIZE 52428800 REUSE EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING SEGMENT SPACE MANAGEMENT AUTO
    ALTER USER "SYS" IDENTIFIED BY VALUES '55F9423C0E6B8C0F' TEMPORARY TABLESPACE "TEMP_001_XYZ"
    ALTER USER "SYSTEM" IDENTIFIED BY VALUES 'A6D15216D0ECD880' TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "OUTLN" IDENTIFIED BY VALUES 'C6E37B008DE60C3F' TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "WMSYS" IDENTIFIED BY VALUES '456841663644FC73' TEMPORARY TABLESPACE "TEMP_001_XYZ" ACCOUNT LOCK
    CREATE USER "OPS$ORACLE" IDENTIFIED EXTERNALLY DEFAULT TABLESPACE "USER_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "USRTOU" IDENTIFIED BY VALUES '2760E3E272EB2E33' DEFAULT TABLESPACE "TOOLS_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "DBSNMP" IDENTIFIED BY VALUES '2EEE7ADF4EE099CC' TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "RTXYZ" IDENTIFIED BY VALUES '7A7B1892338BEF1D' DEFAULT TABLESPACE "USER_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "XYZ" IDENTIFIED BY VALUES 'A2E4641EA075847A' DEFAULT TABLESPACE "USER_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "BKTUSER" IDENTIFIED BY VALUES 'F2C497DCD69AC001' DEFAULT TABLESPACE "TOOLS_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "SUIVI_XYZ" IDENTIFIED BY VALUES '70E9F840A7885FB4' DEFAULT TABLESPACE "USER_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "PERFSTAT" IDENTIFIED BY VALUES '14146C06525833EF' DEFAULT TABLESPACE "PERFDATA" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "PSSORACLE" IDENTIFIED BY VALUES '7A4C515E78D016F1' DEFAULT TABLESPACE "PRC_I3_OR_TAB" TEMPORARY TABLESPACE "PRC_I3_OR_TMP"
    CREATE USER "OEMCLI" IDENTIFIED BY VALUES '1B3DC60650E647C6' DEFAULT TABLESPACE "TOOLS_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "PATROL" IDENTIFIED BY VALUES '0478B8F047DECC65' DEFAULT TABLESPACE "PATROL_TBS" TEMPORARY TABLESPACE "TEMP_001_XYZ"
    CREATE USER "RMANCLI" IDENTIFIED BY VALUES '6A4C8251A9A531C4' DEFAULT TABLESPACE "TOOLS_001_XYZ" TEMPORARY TABLESPACE "TEMP_001_XYZ"


    After this there are roles, and table structures, functions, packages etc.
    I just want one user out of these, so what are my options??
    Can i simply do it fromuser touser???


    NOTEorry if i posted in some wrong manner. Kindly help.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    you don't mention your version or if it is a datapump export so let's just guess.
    assuming datapump:
    schemas=XYZ

    Code:
    -bash-3.00$ impdp help=y
    
    Import: Release 11.1.0.7.0 - 64bit Production on Thursday, 04 March, 2010 9:28:41
    
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    
    
    The Data Pump Import utility provides a mechanism for transferring data objects
    between Oracle databases. The utility is invoked with the following command:
    
         Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp
    
    You can control how Import runs by entering the 'impdp' command followed
    by various parameters. To specify parameters, you use keywords:
    
         Format:  impdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
         Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp
    
    USERID must be the first parameter on the command line.
    
    Keyword               Description (Default)
    ------------------------------------------------------------------------------
    ATTACH                Attach to existing job, e.g. ATTACH [=job name].
    CONTENT               Specifies data to load where the valid keywords are:
                          (ALL), DATA_ONLY, and METADATA_ONLY.
    DATA_OPTIONS          Data layer flags where the only valid value is:
                          SKIP_CONSTRAINT_ERRORS-constraint errors are not fatal.
    DIRECTORY             Directory object to be used for dump, log, and sql files.
    DUMPFILE              List of dumpfiles to import from (expdat.dmp),
                          e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.
    ENCRYPTION_PASSWORD   Password key for accessing encrypted column data.
                          This parameter is not valid for network import jobs.
    ESTIMATE              Calculate job estimates where the valid keywords are:
                          (BLOCKS) and STATISTICS.
    EXCLUDE               Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.
    FLASHBACK_SCN         SCN used to set session snapshot back to.
    FLASHBACK_TIME        Time used to get the SCN closest to the specified time.
    FULL                  Import everything from source (Y).
    HELP                  Display help messages (N).
    INCLUDE               Include specific object types, e.g. INCLUDE=TABLE_DATA.
    JOB_NAME              Name of import job to create.
    LOGFILE               Log file name (import.log).
    NETWORK_LINK          Name of remote database link to the source system.
    NOLOGFILE             Do not write logfile.
    PARALLEL              Change the number of active workers for current job.
    PARFILE               Specify parameter file.
    PARTITION_OPTIONS     Specify how partitions should be transformed where the
                          valid keywords are: DEPARTITION, MERGE and (NONE)
    QUERY                 Predicate clause used to import a subset of a table.
    REMAP_DATA            Specify a data conversion function,
                          e.g. REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO
    REMAP_DATAFILE        Redefine datafile references in all DDL statements.
    REMAP_SCHEMA          Objects from one schema are loaded into another schema.
    REMAP_TABLE           Table names are remapped to another table,
                          e.g. REMAP_TABLE=EMP.EMPNO:REMAPPKG.EMPNO.
    REMAP_TABLESPACE      Tablespace object are remapped to another tablespace.
    REUSE_DATAFILES       Tablespace will be initialized if it already exists (N).
    SCHEMAS               List of schemas to import.
    SKIP_UNUSABLE_INDEXES Skip indexes that were set to the Index Unusable state.
    SQLFILE               Write all the SQL DDL to a specified file.
    STATUS                Frequency (secs) job status is to be monitored where
                          the default (0) will show new status when available.
    STREAMS_CONFIGURATION Enable the loading of Streams metadata
    TABLE_EXISTS_ACTION   Action to take if imported object already exists.
                          Valid keywords: (SKIP), APPEND, REPLACE and TRUNCATE.
    TABLES                Identifies a list of tables to import.
    TABLESPACES           Identifies a list of tablespaces to import.
    TRANSFORM             Metadata transform to apply to applicable objects.
                          Valid transform keywords: SEGMENT_ATTRIBUTES, STORAGE,
                          OID, and PCTSPACE.
    TRANSPORTABLE         Options for choosing  transportable data movement.
                          Valid keywords: ALWAYS and (NEVER).
                          Only valid in NETWORK_LINK mode import operations.
    TRANSPORT_DATAFILES   List of datafiles to be imported by transportable mode.
    TRANSPORT_FULL_CHECK  Verify storage segments of all tables (N).
    TRANSPORT_TABLESPACES List of tablespaces from which metadata will be loaded.
                          Only valid in NETWORK_LINK mode import operations.
    VERSION               Version of objects to export where valid keywords are:
                          (COMPATIBLE), LATEST, or any valid database version.
                          Only valid for NETWORK_LINK and SQLFILE.
    
    The following commands are valid while in interactive mode.
    Note: abbreviations are allowed
    
    Command               Description (Default)
    ------------------------------------------------------------------------------
    CONTINUE_CLIENT       Return to logging mode. Job will be re-started if idle.
    EXIT_CLIENT           Quit client session and leave job running.
    HELP                  Summarize interactive commands.
    KILL_JOB              Detach and delete job.
    PARALLEL              Change the number of active workers for current job.
                          PARALLEL=<number of workers>.
    START_JOB             Start/resume current job.
                          START_JOB=SKIP_CURRENT will start the job after skipping
                          any action which was in progress when job was stopped.
    STATUS                Frequency (secs) job status is to be monitored where
                          the default (0) will show new status when available.
                          STATUS[=interval]
    STOP_JOB              Orderly shutdown of job execution and exits the client.
                          STOP_JOB=IMMEDIATE performs an immediate shutdown of the
                          Data Pump job.
    Last edited by The_Duck; 03-04-10 at 11:36.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •