Results 1 to 5 of 5

Thread: EXP question

  1. #1
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Red face Unanswered: EXP question

    Hi all

    I have a task in windows2000 server which run batch file,
    this task run everyday at 6:00 am
    thebatch file contains :
    exp user/password file=c:\mybackup.dmp owner=user consistent=y

    so I have full backup daily (don't warry >> my dmp file around 200mb only).

    the problem is the new dmp file overloaded the old one.

    I want to create the dmp file with the name of the system date

    ex. the output is : 20_11_2005.dmp

    thanx in advance

  2. #2
    Join Date
    Feb 2004
    Location
    Dublin, Ireland
    Posts
    212
    I had exactly the same issue few months ago but I wasn't able sort this out. It seems to me there are not enought (handy) commands you can use in your batch file to get this work. Maybe I'm wrong and I'll be glad to see solution.

  3. #3
    Join Date
    Jul 2004
    Posts
    6
    this is my batch file:


    @echo off
    rem get current date and time
    for /f "tokens=1,2,3 delims=-/. " %%j in ('Date /T') do set FILENAME=srv_%%j_%%k_%%l.dmp
    exp user/password file=c:\%FILENAME% owner=user consistent=y

  4. #4
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Red face

    Thanx <<<<< yzsind >>>>>>

    but when I put these statment in .bat file its no working
    Last edited by giggs11; 11-22-05 at 06:19.

  5. #5
    Join Date
    Feb 2004
    Posts
    45
    Another way to do this is to rename the old .dmp files before you export. Assuming you want to keep 5 days worth:

    del 5dayold.dmp
    ren 4dayold.dmp 5dayold.dmp
    ren 3dayold.dmp 4dayold.dmp
    ren 2dayold.dmp 3dayold.dmp
    ren 1dayold.dmp 2dayold.dmp
    ren today.dmp 1dayold.dmp
    export to today.dmp
    It was working just 5 minutes ago - I promise !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •