Recently in a developer meet, I was asked a question that, “is there a simpler way to have a stored procedure output fill into a table without defining all columns, as simple as like * into #t ?” You must be thinking about OPENQUERY, Continue Reading..
We have been using different methods in SQL to convert row data into columns. Some time it’s just the requirement for data visualisation only. To fulfil this requirement mostly we use PIVOT, which is complex and lengthy. In this blog Continue Reading..
Error: Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner Continue Reading..
As a SQL Server DBA, I like to code in T-SQL mostly. Recently I had a requirement where I need to delete files on conditional basis. I could have done the same writing a simple batch script or vb script Continue Reading..
Recently a friend of mine asked me that how can he record his SQL Server service restart history in a database table, also would like to get some kind of notification email when the instance comes online after a server reboot or after the service Continue Reading..
If you have ever handled errors by using TRY-CATCH in SQL Server then you must be familiar with a function called ERROR_PROCEDURE(), which returns the stored procedure name when any error occurs during execution, and by using this function we write the procedure name with Continue Reading..
We are very much familiar with a system stored procedure called sp_helptext, which gets us the object definition on query window itself, but that sp is limited to procedures, functions, triggers, computed columns, views etc. So far there are no system Continue Reading..
sp_helptext in SQL Server is one of my favorite system stored procedure. It displays the definition of unencrypted objects like stored procedures, functions, triggers, computed columns, views etc. Interestingly there is also an object called sp_helptext in Sybase system. It is Continue Reading..
It is very interesting to know how a single transaction can be shared between two or more SQL Server connections? Now you must be wondering when is this needed and how is this useful? Say, you have a script where Continue Reading..