Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a huge (38Gb after bzip2) Oracle EXP dump file. It contains one table. Such big dumps usually end up with an error, but in fact contain the full table.

Earlier I was importing these tables back into DB to check that they are ok. But it takes significant amount of time and resources.

Easy way to check that the file is fine - is to see how many rows in it. To compare with database (this table for example has 4 464 761 311 rows). But because export ended with an error, EXP did not show how many rows it dumped.

So how is it possible to see how many rows inside dump file without importing it?

Export was done with such parameters: exp direct=y recordlength=65535 and there are no visible sql commands in it, just the data.

share|improve this question
    
Try use imp parameter show=y –  ibre5041 Apr 23 '13 at 13:11
    
It does not show row count, only table name (but reads the whole file without errors). –  Dmitry Ulupov Apr 23 '13 at 13:51
    
first you can try and look for the exp log. if you don't have it try opening the file with notepad or performing some search with regex for the table name in the file - if you have oracle client installed then in oracle/bin/perl you have batch file called search.bat. you can search inside files with it. maybe you can find it like that. –  haki Apr 23 '13 at 15:27
    
Exp ended with an error, so there is no row count in it. And file itself is binary, because done with direct export. I'll look into search.bat –  Dmitry Ulupov Apr 24 '13 at 1:50
    
Even such big dumps should not usually end up with an error. What parameters do you user for export? What kind of error do you get from exp? Which Oracle Version do you use? –  miracle173 Sep 11 at 5:59

1 Answer 1

grep -a -A 5 METRICSTposttables table.dmp

outputs:

METRICSTposttables actions
METRICET 381
METRICSTPost-inst procedural actions
METRICET 381
METRICSTDeferred analyze commands
TABLE "my_table"

Where 381 matched the export count:

. . exporting table          MY_TABLE        381 rows exported
share|improve this answer
1  
Are you writing about the old exp/imp tools or about the newer expdp/impdp datapunp tools? And which version of Oracle? –  miracle173 Sep 11 at 5:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.