Subject | Activate / Inactivate foreign keys? |
---|---|
Author | Sándor Tamás (HostWare Kft.) |
Post date | 2005-10-13T14:23:49Z |
Hi,
I wonder if ther is any possibility to turn foreign keys on / off, like a
trigger, or something like this.
It is because we have an archiver SP, which deletes dozens of records (if
not thousands), and there are dependencies we have to manage. So to make
things simple, we delete foreign keys, then make that deletion. After that,
we have to make a full database update to restore those foreign keys. Of
course we are aware that dependent records won't be deleted. If there were
some way to turn foreign keys on / off, we could save much time with this.
Thanks,
SanTa
I wonder if ther is any possibility to turn foreign keys on / off, like a
trigger, or something like this.
It is because we have an archiver SP, which deletes dozens of records (if
not thousands), and there are dependencies we have to manage. So to make
things simple, we delete foreign keys, then make that deletion. After that,
we have to make a full database update to restore those foreign keys. Of
course we are aware that dependent records won't be deleted. If there were
some way to turn foreign keys on / off, we could save much time with this.
Thanks,
SanTa