Hello everyone,

I am creating UDF using CREATE FUNCTION statement.

The question is how can I make them globally accessible to all the databases, rather than specific database?


Recommended Answers

All 3 Replies

Grant access to the UDF to all involved parties and call it with the database name as a dot-terminated prefix, like in

call testDB.myUDF();

Thank you for the response.

There is no way omitting the database_name? to write something as follow:


The default path to search for database objects is the database currently in use. If there is no object of that name (myUDF) in the database, you have either to switch the database or to include the search path (the database name) in the function call.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.