A stored procedure may be called during a client session with multiple catalogs active.
A stored procedure in an auxiliary catalog can be called by explicitly qualifying the procedure name by the catalog name. For example:
"call sales_db.smith.total_sales(‘Mary Jones')"
The SQL statements executed from within a stored procedure are interpreted in light of the multiple catalogs active. Consider a stored procedure in an auxiliary database. Tables referenced from statements in the stored procedure, if they are not qualified by a catalog name, will refer to tables in the default catalog, or primary database. This may not be what the author of the stored procedure intended. To avoid such problems, fully qualify table names if such usage is anticipated.