SQL Server 2016 Always Encrypted

Introduction SQL Server 2016 is yet to be released, but you can download the CTP versions. The mostly anticipated and marveled feature is Always Encrypted. Let me discuss few bits of this feature before getting into the technical side of it. I got to know this right after reading an article about Microsoft had applied … Continue reading SQL Server 2016 Always Encrypted

Advertisements

How to create code snippets in SQL Server Management Studio (SSMS)

Recently I’ve been working on a project which requires plenty of stored procedures and custom logging. For error handling I don’t want to repeat my logging TSQL statements for each and every SP I write. I created a code snippet and let the IDE code for me. Follow these simple steps to create code snippets … Continue reading How to create code snippets in SQL Server Management Studio (SSMS)

Recovering a SQL Server database from Suspect Mode

Yesterday my SharePoint environment didn’t respond I checked the DB server and got to know few SharePoint databases were in suspect mode. Now I want to make the databases up and running as usual in order to get my work done. This is a SQL Server thing. There could be several reasons for a database … Continue reading Recovering a SQL Server database from Suspect Mode

The database is in single-user mode, and a user is currently connected to it.

Sometimes you might get the above error message from SQL Server when you try to change the user mode from MULTI to SINGLE. You have to explicitly kill the connection in order to solve the problem. First you need the dbid of your database. Run the following command. 1: SELECT name, database_id 2: FROM sys.databases … Continue reading The database is in single-user mode, and a user is currently connected to it.

Hierarchy in TSQL – step by step guide

Hierarchy data type is introduced in SQL Server 2008. It is a CLR data type. This post gives a simple step by step guide to implement HierarchyID data type Hierarchical navigation or simply the navigation between nodes could happen in 2 ways. Depth First Breadth First Having said that, we’ll start the tutorial. Create a … Continue reading Hierarchy in TSQL – step by step guide

Inheritance in relational database

This article describes about the inheritance in the relational database and how we can handle that in the Entity Framework. First let me discuss about the database inheritance. I searched the Internet and found there are databases which support inheritance natively. PostgreSQL has this feature, something similar to this. INHERITS FROM (tablename[, othertable...])   Then … Continue reading Inheritance in relational database