Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:09 AM
Points: 139, Visits: 403
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: Yesterday @ 11:37 AM
Points: 5,879, Visits: 13,009
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-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:09 AM
Points: 139, Visits: 403
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: Yesterday @ 11:37 AM
Points: 5,879, Visits: 13,009
all databases on the sql instance

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

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

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:09 AM
Points: 139, Visits: 403
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: Yesterday @ 11:37 AM
Points: 5,879, Visits: 13,009
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