Home » RDBMS Server » Server Utilities » Silent Export
Silent Export [message #172180] Mon, 15 May 2006 07:10 Go to next message
matthiasgress
Messages: 2
Registered: May 2006
Junior Member
Hi folks,

is there a way calling export-utility in a script, so that the export doesn't stop for asking for wrong usr/pwd or file name, but instead writes into log file and returning exit code EX_FAIL?

Regards

Matthias
Re: Silent Export [message #172182 is a reply to message #172180] Mon, 15 May 2006 07:24 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> so that the export doesn't stop for asking for
You can use a parfile for that.
Have all your export options inside the parfile
oracle@mutation#exp  parfile=parfile.par
LRM-00110: syntax error at 'scott/wrongpassword'
LRM-00113: error when processing file 'parfile.par'

EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully

without parfile, export will ask for the password.
oracle@mutation#exp scott/wrongpassword owner=scott

Export: Release 9.2.0.4.0 - Production on Mon May 15 08:23:22 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


EXP-00056: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied
Username: ^C

Re: Silent Export [message #172189 is a reply to message #172182] Mon, 15 May 2006 07:51 Go to previous messageGo to next message
matthiasgress
Messages: 2
Registered: May 2006
Junior Member
Hi,

tahnk you so far. Tested it, but did not achive all I wanted:
Suppose script is called with usr, pwd and alias as params. Inside script you find the code:

echo "userid=$1/$2@$3" 2>&1 > par.dat
echo "file=../dumps/$1" 2>&1 >> par.dat
echo "log=../log/exp$1.log" 2>&1 >> par.dat
echo "statistics=none" 2>&1 >> par.dat
echo "grants=n" 2>&1 >> par.dat
echo "consistent=y" 2>&1 >> par.dat

exp PARFILE=par.dat

Having explicitly given the wrong path, export asks for it:

EXP-00028: failed to open ../dumps/usr.dmp for write
Export file: expdat.dmp >

How can this be suppressed?

Regards

Matthias
Re: Silent Export [message #172206 is a reply to message #172189] Mon, 15 May 2006 08:45 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Aplogies.
I was wrong. Parfile will not work with anycase. My testcase was wrong.
Re: Silent Export [message #218962 is a reply to message #172180] Mon, 12 February 2007 04:47 Go to previous messageGo to next message
Re-Offender
Messages: 1
Registered: February 2007
Junior Member
does anyone have a resolution for this problem?
i'm trying to do a silent export as well. tia
Re: Silent Export [message #219169 is a reply to message #218962] Tue, 13 February 2007 08:22 Go to previous messageGo to next message
fl@kimik-it.gl
Messages: 3
Registered: January 2007
Junior Member
Hi

Put a line like this in your script:


exec > /exportlog/export${ORACLE_SID}.log 2>&1


This redirects all output from exp.
Re: Silent Export [message #350802 is a reply to message #219169] Fri, 26 September 2008 07:15 Go to previous message
MrBassman
Messages: 1
Registered: September 2008
Location: Lelystad, Netherlands
Junior Member
Maybe kind of a late reply, but I just ran into the same question. As I world like to pick up the output of EXP and parse it for errors, I do not want to see the repeated username and password prompts in my log file. What I did was the following:

1. Create an empty dummy file: null
2. Use this as input on the command line:

$ EXP user/pass@instance param=... < null


Now EXP gets an EOF from the file and shuts up its mouth... Confused

Regards,

Paul
Previous Topic: Will data pump preserve the order specified in the tables list ?
Next Topic: ORACLE DATAPUMP table_exists_action - only tables are replaced ?
Goto Forum:
  


Current Time: Thu May 02 21:38:24 CDT 2024