SqlServer Notes : How to RESET identity columns in SQL Server

— for example

Here product is the table name


#0343 - SQL Server - String values and effect on DateTime objects

One of the things that I was frequently told during my schooling was to initialize the variables that I use in my programs and scripts. The obvious benefit of having such mentors is that it has now become a matter of habit for me to initialize every variable in my SQL scripts. 452 more words


Entity Framework - Debugging the generated SQL

I’m using the Northwind database to take a look at the SQL that EF generates (Here’s the version of Northwind on CodePlex). SQLServer Profiler is your friend in doing this. 263 more words

#0342 – SQL Server – LEN v/s DATALENGTH – A feature comparison

There are few typical questions that developers ask when developing applications or when troubleshooting an issue:

  • What is the length of this string?

  • How many bytes does this string take for storage?

  • 590 more words

Deadlock Detection and Reporting part-II

This is a continuation of the series about deadlock.  First part was how you detect deadlock in SQL Server and collect that information.  This part will be about reporting from the collected information. 1,360 more words


SQL Server – Finding TCP Port Number SQL Instance is Listening on


By default SQL Server listens on TCP port number 1433, and for named instances TCP port is dynamically configured. There are several options available to get the listening port for SQL Server Instance. 701 more words


T-SQL Tuesday #57 – SQL Family and Community

Maybe it is just me, but these monthly block parties seem to be coming around quicker and quicker as time continues to fly by. My good friend Jeffrey Verheul ( 772 more words

SQLServerPedia Syndication