Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In SQL 2012 can you replicate sequence objects, and if so do changes to the sequence (including consumption of values) get replicated?

If not is there a good reason why this was not included?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

No, sequences are not valid as articles for any type of replication.

I don't have a good reason for you (yet). But I'm curious what the purpose of replicating the sequence itself would be. If your intention is to utilize the same sequence on the subscriber to populate other tables there that aren't replicated, this wouldn't really work unless you had some way to notify the source sequence that you've used some values. You could always call a stored procedure on the publisher that generates a new sequence value there, and use it on the subscriber.

share|improve this answer
    
The purpose is because we have existing code written in informix that we are migrating to SQL server and replication. It will be difficult to go back and change it all. I would have thought a way it could work is like the identity columns, allocate a range for each subscriber and the server knows about those ranges etc. –  peter Jun 26 '12 at 4:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.