My reading lists have moved:
- SQL Server Reading List: http://amzn.com/l/R1AWOTUQQVHE5L
- C# / .NET Reading List: http://amzn.com/l/R2QKS4Y0VXGQXR
sounding - noun. 1. the act of taking a measure of depth
2. a probe of an environment
My reading lists have moved:
I had Visual Studio 2010 Beta 2 installed and running for a few weeks, and then suddenly, it started crashing every time I tried to start it. I uninstalled, re-installed, etc., but the problem turned out to be a font viewer program I had installed. For some reason, the date-time modified of some random ttf file in the Windows Fonts folder had gotten changed.
Microsoft has a workaround posted at https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=509285&wa=wsignin1.0#tabs . I downloaded a freeware program called "FileTouch" from http://wareseeker.com/download/filetouch-1.0.rar/5f214be45. After I opened a DOS window, navigated to the %windir%\Fonts folder, and ran "FileTouch wingdng3.ttf", Visual Studio 2010 Beta 2 started up with no problems.
This is really handy when you have a large legacy database where the previous owner forgot to add DEFAULT constraints to the NOT NULL columns.
This script has been moved to the Schema Analysis scripts page.
I finally got tired of accidentally polluting the master database with my tables and stored procedures: it can be very confusing when you're debugging something and you don't realize you're in the master database. I needed a simple check that the current database isn't one of the four system ones. Seems easy enough. But when I tried to find a way to do it in SQL Server 2005, this was the best I could find:
IF DB_NAME() IN ('master', 'tempdb', 'model', 'msdb') RAISERROR(' $$$ SYSTEM DB $$$', 20, 1) WITH NOWAIT, LOG
This is lame. I have to explicitly list them, and by name? I was really expecting something like sys.databases.is_ms_shipped, but no such luck. Seems like this would be a common need. (The error is at level 20 so that the script stops in its tracks, before it can do any damage.)
|
|
Larry Leonard |
| Larry@LarryLeonard.net | |
| Lawrenceville, Georgia, United States | |
| United States | |
| Before making the move to SQL Server, Larry specialized in Windows programming in C/Win32, C++/MFC, and C#/.NET. His blog focuses on query tuning, database optimization, and system performance, and features handy scripts, practical tips, and occasional dispatches from the many dark corners of SQL Server. | |