Home Forums SQL Server 2008 SQL Server Newbies Adding record to db using stored procedure and identity counter. RE: Adding record to db using stored procedure and identity counter.

  • Thanks for your fast response.

    The reason we're doing this is simple.

    In order to upgrade our db environment, using clustering, mirroring or whatever methods we choose ... we feel that with another copy of our tables on another (redundant) server, it is too easy to end up with ...

    DB1 - Table Member

    member_id name

    1 Charles

    2 Brian

    DB2 - Table Member (mirror)

    2 Brian

    1 Charles

    where, because member_id column is identity, the member in one db can have a different account number (based on ident) than the other db.

    What I do not understand is that when MS does mirroring, how does identity derived column get handled? When you insert a row that number is dynamically added. Or in a mirror, do they "relax" the restriction on the identity column, fill it in, and then reapply the restriction?

    We've also thought about writing our own "quasi" mirror ... where ColdfuSion would automatically ever 2-3 minutes add new rows to db "2". In that case we would really not have a proper account number in the second db?

    Am I making sense?

    Robert