Archive for the 'Technology' Category
SQL Server Autosave Registry Toggle
While working in SQL Server 2005 Studio, the studio will pause for a second or two. The studio is being helpful by writing autosaving information. Since the files are stored on the company’s network, this feature becomes super annoying when i’m working from home. the second becomes a few very long seconds. so i searched high and low for a way to turn it off. it isn’t in the options; it’s in the registry. Edit the following registry key and set the Value of the AutoRecovery to 0(zero) to turn it off.
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\General\AutoRecover
length of ntext in sql server
In SQL Server, if you try len(FieldName) to return the number of characters in a field and the field is a type of Text or nText, you get an error:
Argument data type text is invalid for argument 1 of len function
The answer to this is the Datalength() function which will return the length of any expression. This can be used on all data types including text, ntext, image and varbinary.
It returns the actual number of bytes in the field.

