Skip to main content

Posts

Showing posts from April, 2005

FxCop .Net code analyzer

http://www.gotdotnet.com/team/fxcop/ FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses reflection, MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 defects in the following areas: Library design Localization Naming conventions Performance Security FxCop includes both GUI and command line versions of the tool, as well as an SDK to create custom rules.

HOWTO: SQL Server: Reporting on performance

Some resources to draw info on SQL Server memory usage, locks, fragmentation, etc. This is my favorite SQL Server tuning site: http://www.sql-server-performance.com/ SQL Server Perf Mon SQLServer: Access Methods - Page Splits/sec: Number of page splits occurring as the result of index pages overflowing. SQLServer: Databases - Data File Size (KB) SQLServer: Databases - Log File Size (KB) SQLServer: Databases - Log File Used Size (KB) SQLServer: General Statistics - User Connections: Number of users connected to the system. SQLServer: Locks - Average Wait Time (ms): The average amount of wait time (milliseconds) for each lock request that resulted in a wait. SQLServer: Locks - Number of Deadlocks/sec: Number of lock requests that resulted in a deadlock. SQLServer: Memory Manager - Total Server Memory (KB): Total amount of dynamic memory the server is currently consuming Many, many others… Queries View Blocks SELECT spid, blocked, waittype, getdate() AS 'Time' FROM master.

HOWTO: Restore a differential database backup

ALTER DATABASE DB_Restore_To SET SINGLE_USER GO RESTORE DATABASE DB_Restore_To FROM DISK = 'C:\MSSQL\DB_Restore_From_Full.BAK' WITH NORECOVERY GO RESTORE DATABASE DB_Restore_To FROM DISK = 'C:\MSSQL\DB_Restore_From_Diff.BAK' WITH NORECOVERY GO RESTORE LOG DB_Restore_To FROM DISK = 'C:\MSSQL\DB_Restore_From_Tran.TRN' GO ALTER DATABASE DB_Restore_To SET MULTI_USER GO