Re: On demand backups

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 08/13/03


Date: Wed, 13 Aug 2003 14:52:31 -0400

Tom's can be modified. ;-) Just have it execute the proc instead of the raw BACKUP:

osql -SMyServer -E -Q"exec MyBackupProc"

-- 
Tom
---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"_M_" <here@gone.com> wrote in message news:uofpKqcYDHA.2448@TK2MSFTNGP09.phx.gbl...
I like both yours and Tom's responses...  Can yours be modified to use
Windows Authentication or can Tom's be modified to save each backup in the
time-date file name like yours ???
I'm sort of new to this SQL server stuff but I have had a semester of DB in
college...
"Wayne Snyder" <wsnyder@computeredservices.com> wrote in message
news:OVu5IfcYDHA.2524@TK2MSFTNGP09.phx.gbl...
> Dbo does not have to have backup database permission. A dbo can do
anything
> to the database that he/she owns..
>
> Here is something short I did
> 1. create this proc ( you need to adjust the db name)
> create proc dbo.bu as
> declare @fname varchar(128)
> select @fname = 'c:\' +
>  db_name() + '_DB_' + convert(varchar(100), getdate(),112)
>  + datename(hh,getdate()) + datename(mi,getdate())
> --select @fname
> backup database northwind to disk = @fname
>
> create a dos batch job like this
> OSQL -Ulogin -Ppassword -Q"exec dbname.dbo.bu"
>
> when the job is run the backup occurs....
>
> Then put a shortcut to the job on their desktop
>
> I would create a new login for the database which has ONLY backup
> permissions, since the login and password are easily found...
>
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
>
> I support the Professional Association of SQL Server (PASS) and its
> community of SQL Server professionals.
> www.sqlpass.org
>
>
> "_M_" <here@gone.com> wrote in message
> news:#KbMuEcYDHA.2464@TK2MSFTNGP09.phx.gbl...
> > Have a client that needs to do an "on demand" back up of a database.
How
> > can this be done ???
> >
> > The database in question is used by the accounting department and the
> > application uses the SA login to access the database.
> >
> > Any insight would be greatful.
> >
> > TIA
> >
> >
>
>


Relevant Pages

  • RE: Backups have Shadow Copy Problems
    ... with volume Shadow Copy error 800423f4. ... You back up data from a volume that contains a Microsoft SQL Server ... The recovery model of the SQL Server database is configured to use an ... It just ensures backup will continue without reporting the error. ...
    (microsoft.public.windows.server.sbs)
  • Re: Start SQLServerAgent job Synchronously
    ... Wayne Snyder, MCDBA, SQL Server MVP ... > call and the caller resumes processing as soon as the call is made. ... > I have a set of SQLServerAgent jobs, each of which runs a BACKUP DATABASE ...
    (microsoft.public.sqlserver.server)
  • Re: Start SQLServerAgent job Synchronously
    ... Wayne Snyder, MCDBA, SQL Server MVP ... > call and the caller resumes processing as soon as the call is made. ... > I have a set of SQLServerAgent jobs, each of which runs a BACKUP DATABASE ...
    (microsoft.public.sqlserver.programming)
  • Re: "Best Practices" way to distribute MSDE
    ... > Restore a users's selected backup. ... for dayly house-keeping I do usually provide scripted job for database ... that file copy operation (not SQL Server backup!) can be performed.. ... my personala advice is to perform dayly house-keeping actions ...
    (microsoft.public.sqlserver.msde)
  • Re: NT Backup Causes Server to Hang
    ... Thanks for using the SBS newsgroup. ... You back up data from a volume that contains a Microsoft SQL Server ... The recovery model of the SQL Server database is configured to use an ... It just ensures backup will continue without reporting the error. ...
    (microsoft.public.windows.server.sbs)

Quantcast