Solved

Overwrite .dmp file

Posted on 2006-07-06
7
3,304 Views
Last Modified: 2008-02-07
Trying to set up expdp job to back up schema daily overwriting each time.
I get Oracle error messages:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/export/home/oracle/backups/datapump/paebprd_expfull.dmp"
ORA-27038: created file already exists
Additional information: 1

Is there any way to simply overwrite the file if it exists?
0
Comment
Question by:xoxomos
  • 3
  • 3
7 Comments
 
LVL 14

Accepted Solution

by:
sathyagiri earned 250 total points
ID: 17053964
If you're using expdp then I guess the only way is to make sure the file doesn't exist. In case of exp this issue wouldn't be there
0
 
LVL 19

Expert Comment

by:actonwang
ID: 17053968
unfoturnately , you can not overwrite  it automatically:

see:


////////////////////////////////
Restrictions

If there are preexisting files that match the resulting filenames, an error is generated. The existing dump files will not be overwritten.


from:
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10825/dp_export.htm#sthref55
0
 
LVL 19

Expert Comment

by:actonwang
ID: 17053972
you need to remove or move the file if it exisits before you do data pump export.

acton
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 14

Expert Comment

by:sathyagiri
ID: 17053995
Are you using a shell script or batch file to do this expdp?
0
 
LVL 19

Expert Comment

by:actonwang
ID: 17054012
you could use sth like this to do it before you do expdp:


f [ -f filename ];then
rm -fr filename
else
expdp
fi
0
 
LVL 14

Expert Comment

by:sathyagiri
ID: 17054026
If so, just add logic to either remove or rename the file

In case of shell script

if [ -f filename ]; then
mv filename1 filename2
fi
0
 

Author Comment

by:xoxomos
ID: 17054046
export ORACLE_SID=paebprd
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1


$ORACLE_HOME/bin/expdp system/xoxomos directory=datadir1 dumpfile=paebprd_expfull_$dt.dmp logfile=paebprd_e
xpfull full=y
~
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Shredding xml into an oracle 11g Database 2 59
PL SQL Developer 7 54
Trying to get a Linked Server to Oracle DB working 21 69
return value in based on value passed 6 28
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question