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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Restore Transaction Log

Author  Topic 

cddot
Starting Member

37 Posts

Posted - 2009-02-18 : 21:59:15
When right-clicking on a database to Restore Transaction Log, is there any way of specifying a group of log files, or the only way is to manually highlight/select each file name in turn to Add the file?


sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-18 : 22:31:48
I use this one to track all backups:
--- Finding backups and Location

Declare @databasename as varchar(100)

set @databasename = 'AdventureWorksDW'

Select a.database_name + rtrim(case when type ='L' then space(5)+ name
when type ='D' then space(1)+name
when type ='I' then space(3)+name else '' end)+ space(3)+
convert(varchar, Backup_Start_date, 121),b.physical_device_name
from msdb..backupset a inner join msdb..backupmediafamily b
on a.media_set_id = b.media_set_id
where database_name = @databasename
and Backup_Start_Date >= (select max(Backup_Start_Date)
from msdb..backupset
where database_name = @databasename
and type = 'D')
order by Backup_Start_date


See this
http://www.mssqltips.com/tip.asp?tip=1584
Go to Top of Page

cddot
Starting Member

37 Posts

Posted - 2009-02-19 : 01:05:36
mssqltips looks like a very useful site, thanks.
Go to Top of Page
   

- Advertisement -