Update Statistics in All databases on a server

Simply run this script in SQL Server Management Studio to obtain the script to run for the current server. Copy-paste the results in a new window and press F5.

DECLARE @SQL VARCHAR(1000) 
DECLARE @DB sysname

DECLARE curDB CURSOR FORWARD_ONLY STATIC FOR 
SELECT [name] 
FROM master..sysdatabases 
WHERE [name] NOT IN ('model', 'tempdb') 
ORDER BY [name] 

OPEN curDB 
FETCH NEXT FROM curDB INTO @DB 
WHILE @@FETCH_STATUS = 0 
BEGIN 
SELECT @SQL = 'USE [' + @DB +']' + CHAR(13) + 'EXEC sp_updatestats' + CHAR(13) 
PRINT @SQL 
FETCH NEXT FROM curDB INTO @DB 
END 

CLOSE curDB 
DEALLOCATE curDB
Advertisements

b-PAC Application Examples [ Print from Web Application]

This article explains the system configuration and coding examples to print Brother labels from the web. If you’ve ever tried to work with the Brother software SDK you definitely would have reached a point where you feel true frustration with the lack of documentation and samples from 2003 written in VBS and Visual Studio 2003 (that don’t even compile anymore).

Continue reading “b-PAC Application Examples [ Print from Web Application]”