• Weird that it works fine for the other tables in Development DB (running it from a different context)..

    It must be something undocumented ...

    Then I have a second question - how could I check in code if a table (from a different DB) has an identity field?

    If OBJECTPROPERTY works only with local objects it doesn't make sense to make it dynamic and considering that USE WhateverDB doesnt work in SP, is there any way for me to check if a table in a different DB has an identity field?

    (I need this to SET IDENTITY_INSERT ON whenever a table has an identity field)