If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Maintaining Referential integrity between databases

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-19-04, 01:04
bsaganand bsaganand is offline
Registered User
 
Join Date: Jan 2004
Location: Mumbai, India
Posts: 16
Maintaining Referential integrity between databases

Hi
I have created two databases and using federated concept i have linked those. now what i want is to create master detail relationship between the tables which are resides is master and child.
i creatred a master table in master database. then from child database i tried to create a table which is having a reference field references the column in master database.
while doing this it raises the following error

The SQL statement failed because of a non-severe system error. subsequent SQL statements can be processed. (Reason "No entry for unique constr in SYSCONTDEP") SQLSTATE=58004

My Master table is Dept in master db, Structure is
deptno integer not null, deptname varchar(2), Location varchar(20),
primary key (deptno)
My client table is emp table in Child Db, Structure is
Empno integer not null, empname varchar(20), deptno integer not
null, primary key (empno), foreign key (deptno) refereneces dept
(deptno)
while creatig second table it raises the those error, pls help to solve this issue
__________________
G.Sakthi
Reply With Quote
  #2 (permalink)  
Old 01-19-04, 05:12
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,536
Hi,

Please read the trigger solution.

Hope this helps,
Grofaty
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On