Home » Infrastructure » Windows » Zip the dmp file in windows 2003 (Oracle 10.2.0.1 on windows 2003 R2.)
Zip the dmp file in windows 2003 [message #306329] Thu, 13 March 2008 12:51 Go to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Hi All,

I am trying to schedule the nightly export for a 10g database on windows 2003 server. Below is the .bat file I ran, I need to also zip the dmp file into the destination folder, but script doesnt work. Any idea of other possible ways I can zip the dmp file?

exp.bat

exp test/test@db file=c:\exp.dmp log=c:\exp.log buffer=300000

C:\Program Files (x86)\WinZip\winzip32.exe c:\exp.dmp

Thank you
Re: Zip the dmp file in windows 2003 [message #306333 is a reply to message #306329] Thu, 13 March 2008 13:37 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ "script doesnt work" means nothing for us
2/ Why is this in Server Administration forum and Windows one?
3/ This is not an Oracle question and so this is not a question for this site.

Regards
Michel
Re: Zip the dmp file in windows 2003 [message #306336 is a reply to message #306329] Thu, 13 March 2008 14:01 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
I am sorry that I created the topic in Server Admin. I just wanted to find out if any of the experts can help me out with this in the export script.

The script runs the export but not for the zipping part. I am trying to zip the dmp file that is created by the export script.

Thank you.
Re: Zip the dmp file in windows 2003 [message #306338 is a reply to message #306336] Thu, 13 March 2008 14:28 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Did you post this in a Windows forum? or Winzip one? This is an Oracle forum.

Regards
Michel
Re: Zip the dmp file in windows 2003 [message #306343 is a reply to message #306338] Thu, 13 March 2008 16:24 Go to previous messageGo to next message
Littlefoot
Messages: 18847
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd say that Winzipping won't do much good in a scheduled job; Winzip is Windows application (GUI, you know ... requires you to click this and click that). What you need is the good old ZIP. It has numerous options (most of them begin with a dash) which will make it possible to successfully compress a file.

Invoke on-screen help by typing "zip" at the command prompt - it will look like this:
C:\>zip
Copyright (C) 1990-1996 Mark Adler, Richard B. Wales, Jean-loup Gailly
Onno van der Linden and Kai Uwe Rommel. Type 'zip -L' for the software License
Zip 2.1 (April 27th 1996). Usage:
zip [-options] [-b path] [-t mmddyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete files)
  -k   force MSDOS (8+3) file names -g   allow growing existing zipfile
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -b   use "path" for temp file     -t   only do files after "mmddyy"
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zip file prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -$   include volume label         -S   include system and hidden files
  -h   show this help               -n   don't compress these suffixes

C:\>

In order to learn how to use it, either find and download instructions, or test these options. Once you are satisfied with the result, include the zip command into the batch file.

Just to mention: I don't quite remember what happens if you use Windows-style directory names (i.e. long ones, with possible spaces in name). I *think* that it might cause problems to Zip, so - either create a DMP file in a "short" 8+3 DOS-style directory name (for example, C:\DMP) and put zip.exe in there, or use valid abbreviations (such as "C:\progra~1\zip\zip.exe"). Personally, I prefer DOS-style better than suspicious "~1", "~2" etc. mumbo-jumbo.
Re: Zip the dmp file in windows 2003 [message #306354 is a reply to message #306329] Thu, 13 March 2008 18:27 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
If you are content on using Winzip, you'll need to download their command line version add-on.
Re: Zip the dmp file in windows 2003 [message #306490 is a reply to message #306329] Fri, 14 March 2008 08:48 Go to previous message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Thank you very much Little Foot and Ebrian, for the info.
Previous Topic: converting text file data to a table on oracle 10g
Next Topic: Oracle Homes (Mess up folders)
Goto Forum:
  


Current Time: Thu Apr 24 22:37:03 CDT 2014

Total time taken to generate the page: 0.09485 seconds