Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-05 : 10:58:15
|
| Kumar JR writes "Dear All,Can anyone suggest me the "Best and Easier way to Backup ALL DATABASES at a time from a VB Application "Presently I am Doing it one by one using Backup Command.Also Tried with the sqlmaint SQL DBO but facing some problem.Anticipating a reply .Thank YouKumar JR" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-07-05 : 11:16:53
|
| That's kinda like asking, "How do I write all my stored procedures at once?" It doesn't make sense....Each backup command requires specific parameters include what type of backup, where to backup too etc. There is no concept of BACKUP ALL DATABASES....You could write a stored procedure that issues a distinct backup command for each of your databases. Then you could call that proc from your VB app, but I have to wonder why you are using VB as the catalyst for your administrative tasks?<O> |
 |
|
|
Kevin Snow
Posting Yak Master
149 Posts |
Posted - 2002-07-05 : 13:01:17
|
| You can use the Maintenance Plan wizard in SQL ENTERPRISE MANAGER. It has an option to backup ALL databases on a given server. You can also specify a sub group of databases. It has default groupings for system and user databases in general, and you can select sub groups out of those defaults.This is especially nice on, say, a development server where users may be allowed to create their own databases. If you are using the 'backup all User DBs' option, then anything they add automatically gets backed up on the next maintenance plan execution. So long as you provide sufficient space for storage, you don't have to worry about new backup jobs for every 'project' your users come up with.Once the job is created, you can kick it off from VB by executing the same statement the job does.EXECUTE master.dbo.xp_sqlmaint N'...Edited by - kevin snow on 07/05/2002 13:05:53Edited by - kevin snow on 07/09/2002 15:32:07 |
 |
|
|
macka
Posting Yak Master
162 Posts |
Posted - 2002-07-10 : 02:04:57
|
quote: That's kinda like asking, "How do I write all my stored procedures at once?" It doesn't make sense....
Can't blame the guy for looking for a setbased solution. macka. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-07-10 : 02:55:37
|
| Sounds a bit like you need a point in time backup of all databases.Hope not as it means that your design is incorrect and you would have to do it by taking downn the service.I would do the backups by creating a job with all the backups in it - either a single step per backup or all in one. Whether or not you want to call a stored procedure (once or multiple times) to do it is up to you - depends on whether it's just a simple backup or you want more in it.==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|