I've been looking at a problem, and after perusing the wealth of information on this forum I've come to the answer: Not possible by design. Just wanted to throw this out there and see what you guys think.
I wanted to have 2 databases (same schema) that one is used as "currently all good" and the other a work in progress. As pages are developed (got 120 tax developers working on the 8000 or so corporate & professional tax forms) they go in the WIP and then they are "published" to the current all good database for building the eventual product.
Up until this point everything has been done in the WIP. One major requirement is to have the ability to "undo" everything they have been working on since the last "good" version. I was planning on using this 2nd database as "the good version" and move pages and their contents (some 10 odd tables - images, graphics, code scripts, large serialized objects, etc) back and forth as I need them. Furthermore, all databases are back'd up nightly - and I can attach to a restored one if I need to go back any farther, or produce customer specific products.
So I added this 2nd database and then tried to sync up the various security tables and all "non- versioned" information - so that all foreign keys dealing with security could be satisfied when I "publish". So I used the dbUtils.ActiveConnetionString property, swapped to the 2nd database and then tried to sync up these tables. Obviously I had problems with the Identity fields - and I know now that I won't be able to force those values.
I know that SQL has a "SET IDENTITY_INSERT tableName OFF" command, but I can't seem to get it to affect the non-inserting of the Identity columns
At this point I have a couple options, come up with a different way of dealing with it, or turn off all identity columns and use a different means to generate all IDs.
Thanks for you time,
Brian