The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

I am trying to find out all the foreign keys declared in my database along with the attributes of each key, for example is there a delete or update action defined for that key, etc. if I can some how get the script that defines these keys that would be even better. Is there a way to do that?

asked 23 Jan '13, 10:04

javedrehman's gravatar image

accept rate: 0%

If you can unload the full schema for the database, that will provide the statements used to create tables, foreign keys, etc. This can be done with dbunload -n.

Otherwise, you may be able to piece the information together from certain systems views:

Integrity rules in the system tables

permanent link

answered 23 Jan '13, 13:58

Tyson%20Lewis's gravatar image

Tyson Lewis
accept rate: 22%

edited 24 Jan '13, 12:18

@Tyson: that link didn't work for me, I had to change it to this one:

(24 Jan '13, 03:28) Reimer Pods
Replies hidden

Tyson lives inside the Golden Palace where all things are possible :)

(24 Jan '13, 11:04) Breck Carter

Ah, yes, that would be an oversight on my part. I have a DNS suffix for configured on my machine, and occasionally forget that when I link to a page.

I've edited my answer to include the full domain name.

(24 Jan '13, 12:21) Tyson Lewis
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 23 Jan '13, 10:04

question was seen: 685 times

last updated: 24 Jan '13, 12:21