-
Hi All
I am setting up a script to export my database everynight. Below is the script that I have written.
exp80 userid=system/manager full=y inctype=complete constraints=y file=d:\backup\sysdate
Does anyone know how do I set the a variable file to be the current date.
Thanks in adavnce
-
I tried this and wasn't successfull. One way to do this is to do an export and copy and rename the file with the date extension.
Sam
-
I can show you how to do that on UNIX and may be you'll be able to get some idea about how to do that in Windows. The following script will consider today's date as the name of the export file, so the dump file will look something like '13Nov2000.dmp'. The script will run under C shell:
#!/bin/csh
# The date command output look like
# Mon Nov 13 14:28:12 CST 2000
set d=`date`
# d[1] is Mon, d[2] is Nov...
set filename=$d[3]$d[2]$d[6]
exp userid=system/manager full=y inctype=complete constraints=y file=$filename
No doubt UNIX is very flexible!!
Thanks.
Syed
-
UNIX Rules
Just put this in your exp script to create a date variable:
date | awk '{print $3 $2 $6}' | read x
exp80 userid=system/manager full=y inctype=complete constraints=y file=$x
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|