Solved

How can you tell if a table has a sequence associated?

Posted on 2009-07-13
3
230 Views
Last Modified: 2012-05-07
I have numerous tables that I created sequences for and now want to ensure the sequences are in place...how do you check for this?

Thx
0
Comment
Question by:Glen_D
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 24844553
you cannot. there is no dictionary indication in oracle for this.
you could check if there is a trigger on the table using a sequence, or some stored procedure doing the inserts while using the sequence, but it could be as well the client application itself.
0
 

Author Closing Comment

by:Glen_D
ID: 31603048
very surprized that you can't review all code within a db...thx
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24844725
you can "look" at all the code of the views, triggers, procedures etc:
select * from dba_code

however, to "analyse" it to find out if there is a insert/update using a given sequence on a given table is VERY far from trivial. peanuts for the human reader, but using some "code" to "understand" the code ...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now