Quantcast
Channel: Sequence Tables
Browsing latest articles
Browse All 14 View Live

re: Sequence Tables

Hi Brad,INSERT...SELECT...ORDER BY provides some guarantees that the identity values will be allocated to rows in the order specified, but it doesn't solve most of the problems discussed.  Using...

View Article



re: Sequence Tables

Correct me if I'm wrong, but the following should guarantee a sequenced identity for the current statement.INSERT myTableWithIdentity WITH(TABLOCK)Yes, this will cause deadlocks issues under high...

View Article

re: Sequence Tables

Denali (the next major release of SQL Server aka SQL11) will support proper sequences!See Denis Gobo's excellent early review (CTP...

View Article

re: Sequence Tables

Paul,I really appreciate your post. I have seen may responses to these questions about sequencing in a database with very few offering any practical advice beyond saying redesign your database or use...

View Article

re: Sequence Tables

Hey Gianluca,Thanks.  You're quite right about the need for the external access permission set.  See you around SSC!Paul

View Article


re: Sequence Tables

Great post, Paul.I've been using the CLR solution during the last 3 years and I have to say I'm very happy with it. It solved all our deadlocking issues.As a side note, opening a new connection from a...

View Article

re: Sequence Tables

Hi Robert,Yes that's a very neat solution, thank you for taking the time to read and comment.Paul

View Article

re: Sequence Tables

Hi Merrill,First, thank you!Yes, you certainly can run the allocation before starting a transaction - at least in the test rig.The more general problem is that there might already be an active outer...

View Article


re: Sequence Tables

I worked on a sequencing project several years ago. The company was using a federated database system, and they wanted all databases on all servers to using the same sequencing generator to ensure that...

View Article


re: Sequence Tables

A great post - one maybe dumb question: is it not enough to run the allocate proc before the start of your "actual" transaction? i.e.:EXECUTE dbo.Allocate_TSQL <parameters>BEGIN TRANSACTION<do...

View Article

re: Sequence Tables

Hey Dale. I do monitor all my old posts for comments, but you're right that I haven't thought about this subject for quite a while :)To achieve what you're asking, I would replace the UPDATE in the...

View Article

re: Sequence Tables

You're probably not even monitoring this blog anymore :) but on the off-chance, I need a sequence as you describe, however if the requested key doesn't exist I need to add it in a concurrency safe way....

View Article

re: Sequence Tables

Hi Paul,About your answer to "merrillaldrich's question (first comment on this post) :"Yes, you certainly can run the allocation before starting a transaction - at least in the test rig.The more...

View Article


re: Sequence Tables

Hi Paul,We have used your solution for SQL Server 2008 using loopback linked server along with sequence table successfully for years. Now we are looking into moving to Azure SQL Database and would like...

View Article
Browsing latest articles
Browse All 14 View Live




Latest Images