'SQL Server : one stored procedure used in many databases

I have one main database and I need to replicate it for each client (each client must have one separated database with its own information based on main database).

What is your suggestion to avoid the replication of stored procedures, triggers, functions etc and to have only one code in the main database? But using those procedures, triggers, functions, etc in each database of course.

Thanks and regards.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source