Script for Backing Up?

Script for Backing Up?

Post by Jaso » Sun, 04 Mar 2001 05:11:01



I would like to use a script to back up an SQL database.  Does anyone have
some ActiveX/VBScript code they can send me that does this, or other
information that might help?

Thanks!

 
 
 

Script for Backing Up?

Post by Keith Kratochvi » Sun, 04 Mar 2001 05:44:33


BACKUP is well documented within Books Online.

--
Keith
==============
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


Quote:> I would like to use a script to back up an SQL database.  Does anyone have
> some ActiveX/VBScript code they can send me that does this, or other
> information that might help?

> Thanks!


 
 
 

Script for Backing Up?

Post by Jaso » Sun, 04 Mar 2001 05:52:56


Thanks.  I checked out BOL, and it looks like I'll want to say something
like:  "Backup Database [DBName] to TAPE=\\.\Tape0,Format,Init".  Is that
about right?  And will this work from VBScript or do I need to create a
stored procedure?

Thanks again - and any code is appreciated.

~Jason


> BACKUP is well documented within Books Online.

> --
> Keith
> ==============
> Please reply only to the newsgroups.
> When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
> can be cut and pasted into Query Analyzer is appreciated.



> > I would like to use a script to back up an SQL database.  Does anyone
have
> > some ActiveX/VBScript code they can send me that does this, or other
> > information that might help?

> > Thanks!

 
 
 

Script for Backing Up?

Post by Keith Kratochvi » Sun, 04 Mar 2001 06:05:21


That should just about do it.
You can create a stored procedure, or you can pass this sql directly to sql
server.

Most people create a job within SQL Server that is scheduled for execution.
The job will run as scheduled with the specific commands.

You can backup directly to tape, but my preference is to backup to disk
(using SQL Server's native backp) and then backup to tape (using your
favorite 3rd party software or NTBackup) from there.

--
Keith
==============
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


> Thanks.  I checked out BOL, and it looks like I'll want to say something
> like:  "Backup Database [DBName] to TAPE=\\.\Tape0,Format,Init".  Is that
> about right?  And will this work from VBScript or do I need to create a
> stored procedure?

> Thanks again - and any code is appreciated.

> ~Jason



> > BACKUP is well documented within Books Online.

> > --
> > Keith
> > ==============
> > Please reply only to the newsgroups.
> > When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.)
which
> > can be cut and pasted into Query Analyzer is appreciated.



> > > I would like to use a script to back up an SQL database.  Does anyone
> have
> > > some ActiveX/VBScript code they can send me that does this, or other
> > > information that might help?

> > > Thanks!

 
 
 

1. Scripted back-ups?

I've got about 10 files using FMP server 3.0 (NT) and I want to automate
back-ups to a zip/jaz drive. Can I script this? Do the files have to be closed
before being copied and what if people are accessing the database at the
scheduled time. (Some people leave their computers on and the database open at
night while some of us actually need it occasionally at bizarre hours. Thanks.

2. problem bulk importing an AS/400 flat file

3. Back-ups

4. Repl from Instance of 2000 to a 6.5 Subscriber

5. Copyng Back Ups ?

6. MI-Madison Heights- Database Administrator ( 521313 )

7. SQL Server 6.5 Back ups

8. Looking for references on Database Monitors

9. Converting full database back-ups to Flat Files

10. scheduled back-ups

11. best way to make incremental back-ups?

12. Back-Up Power for servers,UPS, Generators

13. Hot Back-ups from Raw File Systems