-
Compiling PL/SQL objects
Hi,
I am curious to know what does Oracle do internally when we issue for ex. alter procedure xyz compile;
Will it just check for the syntax, depending objects availability, and required privileges?
What happens if one of the depending objects (table) is locked by other session? It compile with errors or waits till the lock released or it won't care about the locked objects?
I haven't find any useful information in google as well as in Metalink so posting here for experts comments.
Thanks,
Vijay Tummala
Try hard to get what you like OR you will be forced to like what you get.
-
During compilation why it'll wait for locking? It's not accessing table data, so locking should not be issue.
-
I think it's like compiling a program unit for lexical, syntax and semantics analysis.
lucky
-
Originally Posted by mahajanakhil198
I think it's like compiling a program unit for lexical, syntax and semantics analysis.
it goes beyond that... checks referenced objects are there, remote connectivity over eventual dblink is available, number and type of input parameters is correct, etc.
Only possible locking situation would be a library cache lock when the object being compiled is in use.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Thanks Malay, I do have the same understanding but the other DBA in my team had the problem with compiling a procedure and he said he found some other session locking one of the referencing tables and when he killed that session he is able to compile. He is not clear what type of lock it is. As PAVB said it might be library cache lock.
I will wait for the same situation and check what type of lock is stopping compilation.
Thanks all for your inputs.
Thanks,
Vijay Tummala
Try hard to get what you like OR you will be forced to like what you get.
-
Originally Posted by vnktummala
... other DBA in my team had the problem with compiling a procedure and he said he found some other session locking one of the referencing tables and when he killed that session he is able to compile. He is not clear what type of lock it is. As PAVB said it might be library cache lock.
this only makes sense if offending session was executing the very same procedure your fellow DBA was attempting to compile. It wasn't a table lock, it was library cache lock.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Vijay Tummala
Try hard to get what you like OR you will be forced to like what you get.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|