Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Just another Perl shrine
 
PerlMonks  

Re: Backup Sql databse

by Corion (Pope)
on Feb 02, 2012 at 10:31 UTC ( #951406=note: print w/ replies, xml ) Need Help??


in reply to Backup Sql databse

I don't know why your script "fails" or why the file gets removed (maybe by the database server). Consider looking at the webserver error logs or the database server error logs.

In the long run, you don't want to run your backup(s) with the hope that the user keeps their browser window open and that the browser does not time out. See Watching Long Processes Through CGI for a technique to show a "please wait" or a "backup progress" page while the backup gets generated.


Comment on Re: Backup Sql databse
Re^2: Backup Sql databse
by tobyink (Abbot) on Feb 02, 2012 at 11:04 UTC

    Indeed - backups are the kind of thing cron jobs (or on Windows, Scheduled Tasks) were invented for.

    dmsparts appears to be using Microsoft SQL Server. There are facilities for scheduling regular backups of a database built right into the SQL Server management console.

      While such facilities exist I think it's clear that OP wants to do this dynamically (not as a scheduled task) and remotely. The TSQL method seems like a reasonable solution to this.

      If you are using SQL Server Express I believe Maintenance Plans are not available.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://951406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2014-04-18 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls