The statprint() function
The statprint() function converts the statistics data that the statcollect() function collects to an LVARCHAR value that the database server can use to display information. The dbschema utility executes the statprint() function.
The statprint() function has two arguments. The first argument is a dummy argument of the required data type. The database server uses this argument to resolve the function. The first time the database server executes this function, it sets the first parameter to null.
The second argument is a value of the stat data type. The stat data type is a multirepresentational data type that the database server uses to store data that the statcollect() function collects.
The statprint() function must take the histogram, which is stored in multirepresentational form, and convert it to a printable form.
After you register the functions, make sure those with DBA privilege or the table owner can execute the statcollect() and statprint() UDRs.