Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

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

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
Glen_D
Asked:
Glen_D
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
Glen_DAuthor Commented:
very surprized that you can't review all code within a db...thx
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now