Hi... this is a multi-part question on the topic of setting up referential
integrity between two tables, one on each separate DB, on the same server.
First, is this even possible? If yes, then how would the foreing key be
referenced? And what if the referential integrity were to expand between two
tables, on separate servers? What implications should one be aware of in
doing so, provided this feature is supported?
Your comments and suggestions are highly appreciated. Thanks in advance.
Regards...examnotes <Rob@.discussions.microsoft.com> wrote in
news:B9763B6E-1408-4D3C-9889-CD1524234F81@.microsoft.com:
> Hi... this is a multi-part question on the topic of setting up
> referential integrity between two tables, one on each separate DB, on
> the same server.
> First, is this even possible? If yes, then how would the foreing key
> be referenced? And what if the referential integrity were to expand
> between two tables, on separate servers? What implications should one
> be aware of in doing so, provided this feature is supported?
Does not appear so:
Msg 1763, Level 16, State 0, Line 1
Cross-database foreign key references are not supported. Foreign key
'AdventureWorks.HumanResources.Employee'.
> Your comments and suggestions are highly appreciated. Thanks in
> advance.
The easiest way of implementing cross-database fk is most likely to use
triggers.
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment