cancel
Showing results for 
Search instead for 
Did you mean: 

source code for system procedures

Former Member
0 Kudos
2,083

where can i find the source code for predefined system procedure like CALL sa_table_page_usage(), CALL sa_table_stats(), CALL sa_table_fragmentation() etc..

Accepted Solutions (0)

Answers (2)

Answers (2)

VolkerBarth
Contributor
0 Kudos

In addition to Reimer's answer, you may get more hints when searching within this forum, e.g. here is a discussion what the internal gear behind sa_table_fragmentation() might query:

What is the Sybase Central 16 "Fragmentation" tab showing?

Of course that usually won't answer what exact query the stored procedures perform if that is not contained within the SYSPROCEDURE's contents. Note, for sa_table_stats() and sa_table_fragmentation() the procedures's definitions is documented there - for the latter, at least partly.

reimer_pods
Participant
0 Kudos

While you might view the source code using this SQL statement

select proc_defn 
from sys.sysprocedure 
where proc_name = 'sa_table_page_usage'
you won't get much information apart form the parameter declaration. System procedures call interal functions whose code isn't accessible.

Former Member
0 Kudos

I appreciate your answer but i want to know the query behind the procedure call so then i can know which tables they are using.

VolkerBarth
Contributor
0 Kudos

System procedures call interal functions whose code isn't accessible.

I think that is different for different system procedures, some do contain their definition, others call internal procedures, and some do some stuff and then call internal procedures.