Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

doubt on backups Expand / Collapse
Author
Message
Posted Saturday, March 23, 2013 5:35 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, April 28, 2016 12:34 PM
Points: 208, Visits: 621
Hi all

Here we are having 100 databases ,for 30 databases are backed up in first shift they are not prepared the document.

i cam on second shift how can i know which database is backed up and which is not.

As per my knowledge we can use the restore header only

is there any other option for this

Thanks in advance.

Post #1434589
Posted Saturday, March 23, 2013 5:58 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 29, 2016 4:43 AM
Points: 6,107, Visits: 13,540
use the backup details in msdb - this query will tell you when a database was last backed up (full backup)

select a.name, b.backup_finish_date, a.crdate
from master..sysdatabases a left join msdb..backupset b on a.name = b.database_name
where b.backup_finish_date IS NULL or b.backup_finish_date = (select max(backup_finish_date)
from msdb..backupset where database_name = a.name and type = 'D')



---------------------------------------------------------------------

Post #1434592
Posted Saturday, March 23, 2013 6:06 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, April 28, 2016 12:34 PM
Points: 208, Visits: 621
it will give the complete information of those are backed up or single database information
Post #1434598
Posted Saturday, March 23, 2013 6:16 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 29, 2016 4:43 AM
Points: 6,107, Visits: 13,540
all databases on the sql instance

---------------------------------------------------------------------

Post #1434599
Posted Monday, March 25, 2013 12:08 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, April 28, 2016 12:34 PM
Points: 208, Visits: 621
Here after execution the above query it is showing some error

Msg 208, Level 16, State 1, Line 1
Invalid object name 'master.sysdatabases'.
Post #1434755
Posted Monday, March 25, 2013 3:28 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 29, 2016 4:43 AM
Points: 6,107, Visits: 13,540
must be an error in copy and paste - you are missing a '.' - it should read master..sysdatabases

this code is compatible with all versions of sql from sql2000, you could also use master.sys.databases


---------------------------------------------------------------------

Post #1434787
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse