>sp_MSForEachDb 'IF LOWER(''?'') NOT IN (''master'', ''tempdb'', ''model'', ''msdb'') > BEGIN > print ''?'' -- HERE - No TEMPDB in the Message tab > declare @LogFile nvarchar(2000) > print ''?'' > USE [?] > SELECT @LogFile = master.dbo.sysaltfiles.name > FROM master.dbo.sysdatabases > INNER JOIN master.dbo.sysaltfiles ON master.dbo.sysdatabases.dbid = master.dbo.sysaltfiles.dbid > WHERE (master.dbo.sysaltfiles.fileid = 1) AND (master.dbo.sysdatabases.name = ''?'') > ALTER DATABASE [?] SET RECOVERY SIMPLE > DBCC SHRINKFILE (@LogFile, 1) > ALTER DATABASE [?] SET RECOVERY FULL > END' >Yes, very strange - why does it still try to change tempdb?
Msg 5058, Level 16, State 1, Line 11 Option 'RECOVERY' cannot be set in database 'tempdb'. ReportServer$IOTECHSQL2008 ReportServer$IOTECHSQL2008 DBCC execution completed. If DBCC printed error messages, contact your system administrator. ReportServer$IOTECHSQL2008TempDB ReportServer$IOTECHSQL2008TempDB DBCC execution completed. If DBCC printed error messages, contact your system administrator. Test Test DBCC execution completed. If DBCC printed error messages, contact your system administrator. (8 row(s) affected)