I am looking for the command line command that will display the same thing as the gui
Unindexed Foreign Keys
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no command line command (that I know of) which does it. But you can roll your own. Basically you need a query which checks the database for these, which is effectively what your GUI tool must be doing. The query would be something like:
NOTE: This SQL is NOT perfect. There could be situations where it is fooled into thinking there is an index bet there’s not really. Multiple different indexes with columns in the right place could fool it. To do it properly you’ll need to start grouping in inline views or use analytic functions to ensure all the index columns come from the same index. So I left it at this simple version which will work most of the time.
Then you can run this SQL in sqlplus, or you could embed it in a shell script which is easily run from the command line. A crude one would be:
Which you can then run like this and get the basic results: