Re: Cascading Delete Referential integrity problem
Posted in 1998
Art S. Kagel wrote:
>
> Syed wrote:
> >
> > Dear Friends,
> >
> > I have set cascading delete for master details tables, but whenever i
> > delete the master it gives me the referential integrity error as follow,
> > I have checked all the referential integrity in all
> > chid table. i have this errors appeared:
> >
> > SQL error -692 : Key value for constraint (informix.project_key) is> > still being referenced. has occurred.
> >
> > No changes made to database.
> >
> > DELETE FROM project WHERE sec_code = ? AND min_code = ? AND ri_code = ?
> > AND proj_serial = ? AND proj_state = ? AND proj_title = ? AND> > proj_key_words = ? AND pan_id = ?
>
> Sounds like your database does not have logging turned on. No logging -
> no transactions. No transactions - no cascading deletes. Check in
> onmonitor>status>database or 'SELECT * FROM sysmaster:sysdatabases
> WHERE name = "mydatabase"' or get my latest submission to the iiug
> archives (utils2_ak) and compile & run listdb7.ec to see your databases
> logging status.
>
> If this is your problem you need to do a level zero (0) backup and
> include the flags to add logging to your database (ie:
> ontape -s -L 0 -U mydatabase ## To add unbuffered logging>
> Onbar and Onarchive have similar options.
>
> Art S. Kagel
I have checked the sysdatabases tables and its is_logging, is_buff_log,
is_ansi, is_nls and flags columns value are 0. Is this means no logging
was set for the database? can i just alter this values using SQL and
what values should it be? can i change the is_logging values to 1? using
this sql statement : UPDATE tablename SET is_logging = 1 WHERE name =
"mydatabase" ? directly using SQL editor?
--
Syed Ibrahim
Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan
Raja Laut, 50350 Kuala Lumpur, Malaysia
Tel: (03) 295-3472, (03) 294-3000 Fax: (03) 294-6587, (03) 293-3154