Systems Engineering and RDBMS

Extracting the User Name from the export *.dmp file

Posted by decipherinfosys on June 17, 2007

If you get an export dump file that you need to import but you do not know the userID that was used to do the export, there are a couple of ways, that you can extract that information out of the *.dmp file. You will then use this userID when doing the import using the imp command. Here is how you can get that information using some of the unix commands:

Unix commands ‘head’ and ‘tail’ displays first few lines from the top and bottom respectively. Since user information is usually in the starting of the file, we can issue following command to know the username inside the file.

$head -30 exp.dmp

Above command displays first 30 lines of exp.dmp file. Another such command is ‘strings’ command.

$strings exp.dmp | pg OR
$strings exp.dmp | more

This command also displays first few lines of the file. If you don’t find username in first page, then you can hit <Enter> to display next page. Once you know the username, you can come out of it by hitting <Ctrl-C>.

In Oracle 10g, there are better ways of doing export/import by using the data pump feature – we will cover that in one of the upcoming posts.

Sorry, the comment form is closed at this time.

%d bloggers like this: