Zip the dmp file in windows 2003 [message #306329] |
Thu, 13 March 2008 12:51 |
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 #306336 is a reply to message #306329] |
Thu, 13 March 2008 14:01 |
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 #306343 is a reply to message #306338] |
Thu, 13 March 2008 16:24 |
|
Littlefoot
Messages: 21823 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.
|
|
|
|
|