|
|
-
|
|
The ROWVERSION column is an auto-incrementing number. The MIN_ACTIVE_ROWVERSION() non-deterministic function can be used to fetch the lowest active ROWVERSION value in the current database....
|
|
-
|
|
It is a myth that the ROWVERSION column holds a unique value across a database. In this post, I demonstrate that a possibility exists for having duplicate values in a ROWVERSION column when using Bulk-Insert operations (SELECT…INTO)...
|
|
-
|
|
It’s a common misconception amongst the novice SQL Server community that ROWVERSION is just a different name for the erstwhile TIMESTAMP. This is not the case – ROWVERSION is an improvement over TIMESTAMP, and one of the key differences is in the way in which they are used when defining tables. Today, we look at this DDL difference between – TIMESTAMP and ROWVERSION....
|
|
-
|
|
Working with the Profiler helps one learn SQL Server internals in a much better way. This post is based on a question I received in the ASK module of BeyondRelational.com regarding why we don't generally see parameter values in the "SQL:StmtCompleted" events....
|
|
-
|
|
One of the most common mistakes that all developers make is to pass parameters to a procedure based on the expected (ordinal) position and not the expected parameter name. Can you change the parameter sequence within your stored procedure without breaking the calling code?...
|
|
-
|
|
Have you ever worked on troubleshooting an issue for hours (or maybe days) at an end only to find that somebody else from the team has either faced the issue before or could have helped you with just 10 minutes of their time? This post is based on a real-life incident and is a lesson to all teams that peer reviews do help in resolving problems quickly....
|
|
-
|
|
In a rare case when you need to control the execution sequence of database triggers, you can use the sp_settriggerorder statement to do so. However, the recommended best practice always remains that you should have business logic dependent upon execution sequence within stored procedures....
|
|
-
|
|
Ever had a situation where you had to attach a database when all you had were the data files? Perhaps when you downloaded the AdventureWorks sample databases from CodePlex? Here's a script to attach a database with just the data files using CREATE DATABASE....ATTACH_REBUILD_LOG statement...
|
|
-
|
|
Introducing the new Scripts module at BeyondRelational.com where developers and administrators can share and find code snippets & scripts to address some of the common business problems. Share your code snippets & scripts on the new Scripts Module - don't reinvent the wheel, and help others to learn from your experiences....
|
|
-
|
|
Use a Windows process Id (PID) and not the SQL Server SPID to monitor the SQL Server activity generated by an application process. Use the SQL Server DMV - sys.dm_exec_sessions and the SQL Server Profiler to achieve this goal - very useful when working with applications hosted on a terminal server....
|
|