DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: pass system date to export filename - Windows

  1. #1
    Join Date
    May 2002
    Posts
    193

    pass system date to export filename - Windows

    Hi,

    Can anyone help me in passing the system day/date as a parameter to the export filename in the export command.

    It is a windows environment and I need to pass the day and date in the filename of the export command dynamically.

    Regards,

    K.Diwakar

  2. #2
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187

    Re: pass system date to export filename - Windows

    Originally posted by diwakar
    Hi,

    Can anyone help me in passing the system day/date as a parameter to the export filename in the export command.

    It is a windows environment and I need to pass the day and date in the filename of the export command dynamically.

    Regards,

    K.Diwakar
    quick and dirty but I simply pipe the dir listing to the export log file when the export completes

    ie

    dir c:\oradata\dump\prod.dmp >> c:\oradata\dump\prod.log
    I'm stmontgo and I approve of this message

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Hey, we did this justa few days ago: http://www.dbasupport.com/forums/sho...threadid=45671

  4. #4
    Join Date
    May 2001
    Posts
    736
    u can create some Batch files which will add the sysdate to the dump file automatically.
    1.First batch file
    set today=Mon 12/06/2004
    2.Second batch file
    DATE /t >e:\foldername\setdate.txt

    COPY e:\foldername\settoday.txt+e:\foldername\setdate.txt e:\foldername\firstbatchfile name

    CALL e:\foldername\firstbatchfile name

    SET today=%today: =%
    SET today=%today:/=%

    exp userid=username/password@connect string full=y file=e:\foldername\SID_%today%.dmp log=e:\foldername\SID_%today%.log

  5. #5
    Join Date
    May 2002
    Posts
    193
    Hi all,

    Thanks for your response.

    I feel that the command that I have used below is a lot more simpler :

    exp system/ file=g:\indigo_%date:~0,3%_%date:~7,2%_%date:~10%.dmp log=g:\indigo_%date:~0,3%_%date:~7,2%_%date:~10%.log inctype=complete constraints=y direct=y compress=y


    Regards,

    K.Diwakar

Posting Permissions

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


Click Here to Expand Forum to Full Width