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?

  • 5
    Check the model database. All newly created Sql Server databases use the MODEL database as a template and any objects (tables, views, stored procedures, etc.) that exists in model be will a part of any new database created on that SQL Server instance. Commented Jan 28, 2021 at 10:21

3 Answers 3


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.

  • 2
    TIL what the model system database was for! I've been using SQL Server for 17 years now and I never knew that!
    – Dai
    Commented Jan 28, 2021 at 19:39

Usually, it is placed in the model database, that serves as default template when you create a new database. Try to look into it.


Look in the model database. That is where new databases are copied from

  • ops, sorry, double answer
    – MBuschi
    Commented Jan 28, 2021 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.