Monday, October 24, 2005 - Posts

T-SQL and CLR types for return value do not match

If you've been playing building serious applications with SQL Server and its CLR integrtation you may have come across error 6551 or 6552. These relate to types not matching up between the function/type/procedure... declaration in TSQL to that in your CLR code.

The basics are that certain TSQL types map to certain SQLCLR types.

What can get annoying (if you didn't read the manual like me!) is that you may create your CLR code and TSQL code and can't for love nor money find whats wrong. You've got 1 parameter that is a CLR SqlString and your TSQL is declared as a varchar. Surely they are the same.

Well they could be but they're not. SQLCLR requires the use of the unicode data types nchar and nvarchar.

For a mapping of the types look for "SQL Server Data Types and Their .NET Framework Equivalents" in BOL

So if you're getting error 6551 or 6552 check to see if you have your chars declared properly as nvarchar or nchar.

Microsoft search performance counters missing

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Microsoft search performance counters missing
The new RSS feed is here

I have come across this a number of times before and always found it very annoying.

When running performance monitor you can look at counters for the performance of the Microsoft Search engine MSSearch, which is what full text uses.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Microsoft search performance counters missing