Search for an Object in all Databases

CREATE PROCEDURE [dbo].[SearchObject] ( @SearchString VARCHAR(255) , @NotContains VARCHAR(255) ) AS DECLARE @Text VARCHAR(1500) , @TextInit VARCHAR(1500); SET @TextInit = ‘USE @Code INSERT INTO ##Temp2 SELECT ”@Code” AS dbName, a.[Object Name], a.[Object Type] FROM (SELECT DISTINCT sysobjects.name AS [Object Name],…

Execute As Clause

In SQL Server you can define the execution context of the following user-defined modules: functions (except inline table-valued functions), procedures, queues, and triggers. By specifying the context in which the module is executed, you can control which user account the…

Index Maintenance

SET NOCOUNT ON; DECLARE @objectid int; DECLARE @indexid int; DECLARE @partitioncount bigint; DECLARE @schemaname nvarchar(130); DECLARE @objectname nvarchar(130); DECLARE @indexname nvarchar(130); DECLARE @partitionnum bigint; DECLARE @partitions bigint; DECLARE @frag float; DECLARE @command nvarchar(4000); DECLARE @dbid smallint; — Conditionally select tables…

WCF Configuration from Novice to Ninja Series Part 2

In today’s blog I am going to explain basicHttpContextBinding. The configuration for basicHttpContextBinding looks like below. If we observe the Configuration of basicHttpBinding and basicHttpContextBinding the configuration is absolutely same. BasicHttpBinding defines a binding used by WCF to configure and…

Merge GridView Cells

In this example i am going to describe how to Merge GridView Cells Or Columns In Gridview Rows Using C# and VB.NET in ASP.NET Containing Same Data or content. For this i m using DataBound Event of gridview, counting total rows and…

DataTableReader in ADO.NET

Introduction This article explores the concept of using DataTableReader in the place of SqlDataReader and DataTable, also explains the methods of creating, reading and using the DataTableReader in the web applications. In this fast and furious world, everyone needs everything…

Columnstore Index Restrictions

Although columnstore indexes work with the majority of the data types, components, and features found in SQL Server 2012, columnstore indexes have the following restrictions and cannot be leveraged in the following situations: • You can enable PAGE or ROW…