Home > Archive > MS SQL Server > January 2006 > Backup only new databases









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Backup only new databases
CR

2006-01-26, 4:53 pm

Is there any way with SQL 2000 SP3a to backup all new databases that have
been created and have not had a full backup run yet?


David Gugick

2006-01-26, 4:53 pm

CR wrote:
> Is there any way with SQL 2000 SP3a to backup all new databases that
> have been created and have not had a full backup run yet?


You could probably query the msdb.backupset table for all user databases
that do not have rows in the table (check the database_name column)

--
David Gugick
Quest Software


Uri Dimant

2006-01-26, 4:53 pm

CR

Create a table where you store the db_id or dbnames.

insert into table (dbid,name) select dbid,name from sysdatabases

select dbid,name from sysdatabases where not exists
(select * from table where table.dbid=sysdatabases.dbid)



"CR" <a@b.c> wrote in message news:u$MxBHhIGHA.676@TK2MSFTNGP10.phx.gbl...
> Is there any way with SQL 2000 SP3a to backup all new databases that have
> been created and have not had a full backup run yet?
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com