Thursday, 30 June 2011
Thursday, 24 February 2011
SELECT 'SQL Server '
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - '
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' ('
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'
Tuesday, 15 February 2011
Friday, 4 February 2011
Worryingly few people seem to be aware that DevExpress have released a free version of their CodeRush tool.
Read the original announcement from DevExpress here: http://www.devexpress.com/Home/Announces/CodeRushXpress.xml
Get the tool now: http://www.devexpress.com/coderushx
To quote from the original announcement:
The following Integrated Code Navigation features are available to you and your team free-of-charge:
- Duplicate Line
- Highlight All References
- Increase or Reduce Selection
- Smart Clipboard Operations
- Generate from Using (TDD)
- Quick Navigation Window
- Quick File Navigation
In addition, CodeRush Xpress Ships with the following 25 Code Refactorings:
Add Block Delimiters -- Combine Conditionals -- Compress to Lambda Expression -- Compress to Ternary Expression -- Convert to Auto-implemented Property -- Convert to Initializer -- Create Backing Store -- Decompose Initializer -- Decompose Parameter -- Expand Lambda Expression -- Expand Ternary Expression -- Extract Method -- Flatten Conditional -- Inline Delegate -- Inline Temp -- Introduce Local -- Make Explicit -- Make Implicit -- Move Type to File -- Name Anonymous Method -- Name Anonymous Type -- Reverse Conditional -- Split Conditional -- Use String.Format -- Use StringBuilder
Check for corruption:
To fix any errors the database must be in single user mode.
ALTER DATABASE database_name SET SINGLE_USER
DBCC CHECKDB('database_name', REPAIR_REBUILD)
ALTER DATABASE database_name SET MULTI_USER
Further details on DBCC CHECKDB can be found here.