I would like to apply referential integrity between two
tables that are not part of the same database.
Is this possible ?
You can't do it with foreign key constraints. They are not allowed across
databases.
You can do it with triggers or by only allowing inserts, deletes, and
updates through stored procedures and enforcing the integrity in the
triggers or stored procs. Note that if you do this, there are still some
problematic situations. For example, the triggers and/or stored procs can't
prevent you from restoring one of the databases from last night's backup and
thus breaking the integrity.
Tom
"TheOne" <TheOne@.discussions.microsoft.com> wrote in message
news:61E4E107-5E5C-4D40-9575-D5B8E17D9F04@.microsoft.com...
>I would like to apply referential integrity between two
> tables that are not part of the same database.
> Is this possible ?
>
No comments:
Post a Comment