Posts

Showing posts from July, 2011

Get the last restore done on a SQL database

Run this Query on the msdb system database select MAX ( [restore_date] ) from [msdb] . [dbo] . [restorehistory]

Get restore history for a SQL database

SELECT TOP 1000 [restore_history_id]       , [restore_date]       , [destination_database_name]       , [user_name]       , [backup_set_id]       , [restore_type]       , [replace]       , [recovery]       , [restart]       , [stop_at]       , [device_count]       , [stop_at_mark_name]       , [stop_before]   FROM [msdb] . [dbo] . [restorehistory]   where restore_history_id

Forefront marked all files as infected with a virus and causes the SharePoint page not to load

Use these queries to get your site backup. --Find all infected files select * from AllDocs where ( VirusStatus >= 0 ) and ( VirusStatus is not null) --Run this next query if you know all your documents do not have a Virus --update AllDocs set VirusStatus = null where (VirusStatus > 0) and (VirusStatus is not null)

Map to GAC to get Assembly

Run this command to pull DLLs out of the GAC.  It will map the G drive to the GAC and you will be able to access it like it is a file folder. subst G: %windir%\assembly

Dump stsadm output to a txt file from command prompt or batch file

Use this when the output is to long to view in a command prompt or you want to save the file output to review later. stsadm -o enumsites -url  http://TeamSite/ >c:\AllTeamSites.txt 2>&1