Welcome to Sign in | Join | Help

Browse by Tags

All Tags » Samples   (RSS)
One of the most common complains about using Service Broker in production is when administrators discover, usually after some months of usage, that sys.conversations_endpoints grows out of control with CLOSED conversations that are never cleaned up. I Read More...
The SQL Server transaction log contains the history of every action that modified anything in the database. Reading the log is often the last resort when investigating how certain changes occurred. It is one of the main forensic tools at your disposal Read More...
The SMO object model for SQL Server ServiceQueue does allow one to enable or disable a queue, but the property that modifies the queue status is not intuitive, it is IsEnqueueEnabled: Gets or sets the Boolean property that specifies whether the queue Read More...
In a previous article Online non-NULL with values column add in SQL Server 2012 I talked about how adding a non-null column with default values is now an online operation in SQL Server 2012 and I mentioned how the situation when the newly added column Read More...
with xmlnamespaces (default 'http://schemas.microsoft.com/sqlserver/2004/07/showplan') select x.value(N'@NodeId',N'int') as NodeId , x.value(N'@PhysicalOp', N'sysname') as PhysicalOp , x.value(N'@LogicalOp', N'sysname') as LogicalOp , ox.value(N'@Database',N'sysname') Read More...
You probably can easily answer a question like ‘What columns does this table have?’. Whether you use the SSMS object explorer, or sp_help, or you query sys.column, the answer is fairly easy to find. But what is I ask ‘What are the physical Read More...
Looking at this question on StackOverflow: Conversion failed when converting from a character string to uniqueidentifier error in SQL Server one can see a reproducible example where a string split UDF works fine in the SELECT statement, but it gives a Read More...
In a previous article I have shown how it is possible to use efficient streaming semantics when Download and Upload images from SQL Server via ASP.Net MVC. In this article I will go over an alternative approach that relies on the FILESTREAM column types Read More...
The SEND Transact-SQL verb does not allow to send a NULL message body, attempting to do so will result in error: Msg 8433, Level 16, State 1, Line 11 The message body may not be NULL. A zero-length UNICODE or binary string is allowed. But there are ways Read More...
A frequent question that pops up on discussion forums is how to serve an image that is stored in a SQL Server table from an ASP.Net application. Unfortunately the answer is almost always wrong, as the prevalent solution involves copying the entire image Read More...
A very common question asked on all programming forums is how to implement queues based on database tables. This is not a trivial question actually. Implementing a queue backed by a table is notoriously difficult, error prone and susceptible to deadlocks. Read More...
The question of comparing the MAX types (VARCHAR, NVARCHAR, VARBINARY) with their non-max counterparts is often asked, but the answer usually gravitate around the storage differences. But I’d like to address the point that these types have inherent, Read More...
Copyright Remus Rusanu 2009. Visit the original article at http://rusanu.com/2009/10/26/select-count/  Quick trivia: what is the result of running SELECT COUNT(*);? That’s right, no FROM clause, just COUNT(*). The answer may be a little Read More...
Copyright Remus Rusanu 2009. Visit the original article at http://rusanu.com/2009/08/18/passing-parameters-to-a-background-procedure/  I have posted previously an example how to invoke a procedure asynchronously using service Broker activation. Read More...
Copyright Remus Rusanu 2009. Visit the original article at http://rusanu.com/2009/08/05/asynchronous-procedure-execution/  Recently an user on StackOverflow raised the question Execute a stored procedure from a windows form asynchronously and Read More...
More Posts Next page »