Re: Referential Integrity across Multiple Databases? Please Help!
Posted in 1997
Chris Collins wrote: > > Hello All, > > I have two separate databases for two applications. I need to enforce > referential integrity across the two databases - I would rather not have > to use single database, but rather keep the databases separate. > > Is there a way to create a foreign key relationship between tables that > do not reside in the same database. > > Any help would be most appreciated. > > Thanks, > Chris Collins Chris, I am in the same situation. In my case two databases will help in dba chores such as purges. Anyway referential integrity across multiple databaes is not recommended. If a problem occurs you may have to MANUALLY fix it, read about multi-phase commits. That may not seem to a big deal but then throw in the fact you need to maintain integrities justs makes your life harder. It can be done! You would want to use a synonym. this is the solution I was going to use until I looked into the degree of difficulty recovery would be. Make it simple, if possible keep tables in same db. good luck Michael