0

I'm distributing a database but I have two tables with foreign keys references to the other database in other server. I have already searched and found that I can't make a foreign key referring to a table in another database in other server. But, how can I resolve this problem? Creating views?

Rajkaran Mishra
  • 4,532
  • 2
  • 36
  • 61
Ninita
  • 1,209
  • 2
  • 19
  • 45

1 Answers1

0

In the instance that needs to refer to "the other server", introduce "the other server" as a linked server and then use INSTED OF triggers to validate the FK constraints.

G. Stoynev
  • 7,389
  • 6
  • 38
  • 49
  • yes, I get it, something like http://msdn.microsoft.com/en-us/library/ms175521(v=sql.105).aspx . So I must remove such foreign keys and whenever someone enters data in a table, the old foreign key field referred must be filled with a certain value of another table. So, I can also do this for input parameters in a stored procedure. thanks – Ninita Apr 25 '13 at 14:37