All Forums Database
muthm 6 posts Joined 10/08
17 Jul 2013
Access rights to see UDF source code in SHOW FUNCTION

I can retrieve the C source code of UDFs by using SHOW FUNCTION (in SQL Assistant as well as in BTEQ).
But this only works for UDFs that I have created myself. For UDFs created by others, I only get back the REPLACE FUNCTION statement, but no source code.
I guess that it is a matter of access rights whether I see the source code or not. So can anyone please tell me what access right I need to be granted in order to be able to see the source code of UDFs (or external procedures as well)?
Thanks a lot!

dnoeth 4628 posts Joined 11/04
19 Jul 2013

Hi Matthias,
are you trying to SHOW some of the built-in functions like oREPLACE?
They never show source code as they're not complied on the system, they're supplied in a pre-compiled library.


muthm 6 posts Joined 10/08
19 Jul 2013

Hi Dieter,
thanks for your answer!
No, I need it for dumping the complete DDL of a database. The purpose is to rebuild (or 'clone') all the objects in another database after modifying all the database qualifiers.
No problem for all usual objects. My script interprets the SHOW <object type> output, and in case of external functions or procedures it splits up the output into a .sql an a .c file automatically.
The problem is that for dumping user defined functions using SHOW FUNCTION, to see the source code I seem to need a special acces right if someone else owns that function.
Thanks for your help!

You must sign in to leave a comment.