• These constraints are often called cross-database foreign key constraints. SQL Server offers no support for them, in fact I don't think any widely used commercial SQL database does. If you want to enforce them it's possible to do it using triggers: triggers on update and delete in the referenced table and on insert and update in the referencing table. But you have to decide what to do with an operation in database A when database B is inaccessible so that the trigger can't do its job. This may be no worse than the problem with FK constraints withing a database when the tables involved are on different discs and one may be unavailable when the other isn't, but it may happen much more often when there are two databases than when there is only one - particular if the two databases are on different servers. And even if you do it with triggers, you don't have a nice object (foreign key constraint) in the metadata that everyone who is interested can see; you can of course invent an analog of the sys.foreignkeys table in which you record all references to other databases and all references from other databases, but it's not as good as having the DBMS do it for you.

    Incidentally, I agree with Lowell that doing something with check constraints is not where you want to go on this; but triggers can work, although there are potential problems.

    And of course you shouldn't do it unless it provides real benefits that make it worth the effort. I'm inclined to believe that in a datawarehouse environment where your RTL processes are already enforcing these constraints that is rather unlikely to be the case.

    Tom