Posts

Showing posts from October, 2009

SQL Server Insert Into Identity Column

We all know that if you have an identity column and if you try to insert a value in the identity column, you will get an error. Here is how you can avoid the error First thing to do here is to set Identity to ON on the tblname you want to insert row in. SET IDENTITY_INSERT tblname ON INSERT tblname (ID,colname) VALUES(5,'ajas') SET IDENTITY_INSERT tblname OFF Do not forget to set IDENTITY_INSERT to off once you are done with inserting the record because you dont want it to be off if you have an application where developers will be working on it. Hope this Helps.

RDP End a Disconnected session

Image
We all have had issues where in a RDP disconnected session wont allow other users to login until the administrator manually kills that disconnected session. Well, I just found out that there is a setting in Windows Server 2003 which would allow to automatically kill a RDP Disconnected session. Go to Start - Administrative Tools - Terminal Services Configuration. In Terminal Services Configuration, select Connections - RDP-Tcp. Right click RDP-Tcp and select properties. Go to sessions tab and select override user settings which is disabled by default. Here is a snapshot of the setting. Many thanks to Cameron Childress for this post titled How to Automatically Log Off Disconnected Remote Desktop / Terminal Services Sessions This article is also good.