01/01/2015 by Nitesh

Solution: The server principal is not able to access the database under the current security context in SQL Server

Friends, Yesterday I backed up a SQL database and restored it on a different server. A user was associated with the database on the original server and after I restored it on the new server, the same user was unable to use the database. Trying to use the database gave the error – “The server…

Continue Reading »

31/12/2014 by Nitesh

How To Remove Session Support from SQL Server

Friends, In this post we will see how can we remove Session State Support from SQL Server for ASP.Net applications. To completely remove the Session State support from SQL, we need to perform the following actions – Open Command Prompt Go to C:\Windows\Microsoft.Net\Framework\<Your Framework Version>\ Type aspnet_regsql -S SQLSERVER -U User -P Password -ssremove Confirm the question…

Continue Reading »

30/12/2014 by Nitesh

Generate SQL Script to Manage Session State in Custom SQL Database

Friends, ASP.Net provides 3 different ways to store sessions. They are – InProc Session Mode StateServer Session Mode SQL Server Session Mode In case you are interested to read further about sessions, you can read this excellent article by Abhijit Jana. In this post, we will see some specific details about SQL Server Session Mode….

Continue Reading »

07/10/2014 by Nitesh

SQL Script To List All Columns of a Table in SQL Server

Friends, In my last post, I explained how can you list all tables from a specific table in a database. In this post, we will see different ways of retrieving all columns from a specific table in a database. It is a very simple script to get all columns for a table from a database….

Continue Reading »

06/10/2014 by Nitesh

SQL Script To List All Tables Present In a Database

Friends, In this small post, we will see 2 different ways of retrieving all the tables from a specific database. It is a very simple script to get all tables from a database. We can do it using 2 ways. They are as below – Using INFORMATION_SCHEMA.TABLES table Using sys.Tables table The below script lists…

Continue Reading »

1 2 3 4 5