Subject Re: Running a query to find table constraints
Author tractaylor
I thought about disabling foreign keys, but I was trying to avoid
that. I know you can get alot of information from the system tables,
but I have yet to figure out a query that would give me what I want.
List of tables is easy, but trying to find the table constraints is
getting me.

I know about the datapump, but what I am trying to do, is backing up
specific records. Kinda like a archive, that I can un-archive at
anytime. I can just look through our database and figure it out, but
we have over 200 tables to look through. That is why I was looking
for a programmatic solution.

I am guessing that the datapump somehow knows what order to put in
the records, or does it disable the foreign constraints?


> I don't know how to write a query in SQL, maybe with a SP, If I
need to
> implement this, I would make it on the client app, to make a
> call to search for dependencies, and when I found a table without
> dependencies insert data on it, or if all the tables that another
> depends on are already populated. But you will find a problem with
> referencing tables.
> What about another aproach ?
> Disable all the foreign key constraints and triggers then populate
it in
> any order and after all data are in place, turn on the FK's and
> again.
> You could look at IBDataPump or IBPump never remember the correct
> it is used to pump data between databases.
> see you !
> see you !
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda.
> Santo Andre - Sao Paulo - Brazil
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: