SQL Server – Origin of Stored Procedure Searchinall

sql serverssmsstored-procedures

When I create a new database in SSMS either using the creation wizard or the CREATE DATABASE command the database will contain a stored procedure called Searchinall. This procedure has never been added to new databases previously, but since 2 days it will be created in every new database, no matter how I create it. I have tried creating a database from a different Computer on this server as well, but the stored procedure will still appear.

When I tried looking online for a procedure Searchinall I could not find any results, so I suspect it is not a new feature and nothing that should be created by default.

Could someone have maybe accidentally added it as a default stored procedure to be created in every new database on the server?
If so, how can I disable it?

Best Answer

When you create a new database in SQL Server the Model database is used as a template. Your new database will contain any stored procedurethat is in the model database.

From what you are describing it seems that the stored procedure, Searchinall is a custom procedure added to the model database by someone in your organization and then automatically included in any database that you created.