How to determine the Schemas inside an Oracle Data Pump Export file

后端 未结 8 421
梦谈多话
梦谈多话 2021-01-30 13:28
  • I have an Oracle database backup file (.dmp) that was created with expdp.
  • The .dmp file was an export of an entire database.
  • I need to resto
8条回答
  •  隐瞒了意图╮
    2021-01-30 13:53

    Step 1: Here is one simple example. You have to create a SQL file from the dump file using SQLFILE option.

    Step 2: Grep for CREATE USER in the generated SQL file (here tables.sql)

    Example here:

    $ impdp directory=exp_dir dumpfile=exp_user1_all_tab.dmp  logfile=imp_exp_user1_tab sqlfile=tables.sql
    

    Import: Release 11.2.0.3.0 - Production on Fri Apr 26 08:29:06 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

    Username: / as sysdba

    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Job "SYS"."SYS_SQL_FILE_FULL_01" successfully completed at 08:29:12

    $ grep "CREATE USER" tables.sql
    

    CREATE USER "USER1" IDENTIFIED BY VALUES 'S:270D559F9B97C05EA50F78507CD6EAC6AD63969E5E;BBE7786A5F9103'

    Lot of datapump options explained here http://www.acehints.com/p/site-map.html

提交回复
热议问题