Jump to content

Recommended Posts

Posted

Hi,

What I am hoping to do is to create a script that will run every morning to compress SQL transaction logs from the day before and move them to another location for off loading.

Personal History:

- I am new to scripting

- language wise I have experience with Delphi / C++ / a little VB

Environment & Apps:

- Win 2003 Server Standard

- WinRar 3.3x

- SQL 2000 Standard

My questions are this:

1. VBS or JScript? I understand JScript is newer but is it worth using it over VBS?

2. How to call rar.exe from the script. I'm assuming that once I know this, passing paramaters with the execute command will be a snap.

3. I am assuming that I can setup a script as a scheduled task for the purpose of running it daily.

If there is another post/resource which will cover this, please point me in the right direction. I tookk a brief search through the forums and on the net, but have come up empty handed thus far.

Thanks in advance for any assistance you can offer.

Regards,

Terry


Posted

sounds too simple to even bother with a script. why not a cmd? just call "rar a <in path> <out path>". add this cmd to scheduled tasks.

Posted

Yeah, that was what I was originally thinking of, but I want to move teh files out of the directory as well so that they are not grabbed by the process on the next day.

I will be leaving the country for a bit for training and can't guarantee that I'll be able to login to the server daily and wanted to automate the process untill I return.

The other alternative is to do up a console app in Delphi to do this for me, just figured that a script will be less resource intensive.

Regardless, thanks for the input.

Regards,

Terry

Posted

The other reason that I wanted to use a script is that I want to generate the file name on the fly so that it contains the current date with the following format:

Database_tlog_yyyymmdd.exe

ie. Database_tlog_20050419.exe

Forgot this when I replied to your recomendation to use a batch.

Regards,

Terry

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...