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 |
poratips
Posting Yak Master
105 Posts |
Posted - 2014-12-01 : 19:53:32
|
Database_Name FULL - D DIFF - I LOG - LDB1 D LDB2 D model D LDB3 D I Lmsdb D DB4 D I LDB5 D I LReportServer D I LReportServerTempDB D I LDB5 D I LDB6 D I L |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2014-12-01 : 23:49:11
|
[CODE]SELECT DatabaseName, [D] as [Full - D], [I] as [Diff - I], [L] as [Log - L]FROM (SELECT distinct sdb.Name AS DatabaseName, bus.type FROM sys.sysdatabases sdb LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name )PPIVOT (MAX(type) FOR Type IN ([D],[I],[L]))pvt[/CODE]--Chandu |
|
|
|
|
|