Forum Stats

  • 3,826,883 Users
  • 2,260,721 Discussions
  • 7,897,110 Comments

Discussions

Please after import datapump to check if ok or not

2995489
2995489 Member Posts: 114
edited Apr 29, 2016 2:21PM in SQL & PL/SQL

Hi,

please i want to know after a expdp and impdp of a schema if the operation it's ok

select count(*) , owner from all_objects where owner in ('schema1','schema2') GROUP BY OWNER;

resgards,

Med.

Answers

  • John Thorton
    John Thorton Member Posts: 14,493 Silver Crown
    edited Apr 29, 2016 10:22AM
    2995489 wrote:
    
    Hi,
    
    please i want to know after a expdp and impdp of a schema if the operation it's ok
    
    
    select count(*) , owner from all_objects where owner in ('schema1','schema2') GROUP BY OWNER;
    
    
    resgards,
    Med.
    

    OK

  • Vysakh Suresh - 3035408
    Vysakh Suresh - 3035408 Member Posts: 1,240 Gold Badge
    edited Apr 29, 2016 10:34AM

    Dear 2995489,

    are you trying to verify the process? then please read the advise shared under..

    http://docs.oracle.com/cd/B28359_01/server.111/b28319/dp_export.htm

  • 2995489
    2995489 Member Posts: 114
    edited Apr 29, 2016 11:04AM

    Dear Vysakh Suresh,


    thank you for your response. i'm trying to verify if all exported objects are imported.



    Best regards

    Med.

  • 2995489
    2995489 Member Posts: 114
    edited Apr 29, 2016 12:00PM

    Hi,

    when i execute this query :

    select count(*) , owner from all_objects where owner in ('schema1','schema2') GROUP BY OWNER;

    To have number of objects in the both schemas i have a difference of 2 objects.

    does it mean that my import is not good?

    thank you in advance.

  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    edited Apr 29, 2016 12:19PM
    2995489 wrote:
    
    Hi,
    
    when i execute this query :
    select count(*) , owner from all_objects where owner in ('schema1','schema2') GROUP BY OWNER;
    
    To have number of objects in the both schemas i have a difference of 2 objects.
    
    does it mean that my import is not good?
    
    thank you in advance.
    
    

    What does the import log say?

    you say the counts are different but you dont' say which way. Does the destination have more or fewer objects than the source?  Perhaps a slightly more fine-grained count:

    select owner,

           object_type,

           count(*)

    from dba_objects

    where owner in ('schema1','schema2')

    group by owner, object_type

    order by owner, object_type;

  • John Thorton
    John Thorton Member Posts: 14,493 Silver Crown
    edited Apr 29, 2016 12:22PM
    2995489 wrote:
    
    Hi,
    
    when i execute this query :
    select count(*) , owner from all_objects where owner in ('schema1','schema2') GROUP BY OWNER;
    
    To have number of objects in the both schemas i have a difference of 2 objects.
    
    does it mean that my import is not good?
    
    thank you in advance.
    

    did some one make 2 new objects in source database after the export was completed?

  • 2995489
    2995489 Member Posts: 114
    edited Apr 29, 2016 12:46PM

    Hi EdStevens,

    thank you so much for your response. i found fewer objects in a destination (with my query).

    But  now with your query it's fine the same number for all types.

    Thank you again.

    Med.

  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    edited Apr 29, 2016 2:21PM
    2995489 wrote:
    
    Hi EdStevens,
    
    thank you so much for your response. i found fewer objects in a destination (with my query).
    But  now with your query it's fine the same number for all types.
    
    Thank you again.
    
    Med.
    

    So what was different?  My query didn't change anything. It just exposed data to a finer level of detail?

    If you simply accept that it worked and cannot explain the difference, you've learned nothing and done your career no favor.

This discussion has been closed.