Posts

Showing posts from May, 2010

Clear SQL Server Cache

When perform benchmark testing, make sure you need to clean the SQL server cache in order to have a more accurate result. -- Clean all data in the cache DBCC DROPCLEANBUFFERS -- clean cache from stored procedure DBCC FREEPROCCACHE

Display the size of all tables in SQL Server 2005

SET NOCOUNT ON DBCC UPDATEUSAGE(0) -- DB size. EXEC sp_spaceused -- Table row counts and sizes. CREATE TABLE #t ( [name] NVARCHAR(128), [rows] CHAR(11), reserved VARCHAR(18), data VARCHAR(18), index_size VARCHAR(18), unused VARCHAR(18) ) INSERT #t EXEC sp_msForEachTable 'EXEC sp_spaceused ''?''' SELECT * FROM #t -- # of rows. SELECT SUM(CAST([rows] AS int)) AS [rows] FROM #t DROP TABLE #t

Windows Server 2008 64bit Edition SMTP service logging

In Windows Server 2008 64bit edition, SMTP service isn't log even if you enabled the logging. It is found that  you need to install the ODBC Logging module. Install ODBC Logging module (Server Manager > Roles > Web Server (IIS) > Add Role Services > Health and Diagnostics > ODBC Logging) Stop / Start the SMTP Service Verify your SMTP service is configured for logging.  It's not on by default. Try a local telnet test (assuming the telnet client is installed) Look at your log folder. Or, take a look at this from Steve Schofield's blog :