Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have never heard of this nor has anyone I've asked. I created a database via SSMS about a year ago and put a 4GB table in it. I don't know what I did, but every time I create a new database it puts a copy of that table in there automatically. It's easy to delete but makes DB creation a pain.

A solution would be appreciated as well as learning how the hell I did it.

Thanks
Posted
Comments
Kornfeld Eliyahu Peter 6-Jan-15 11:51am    
How do you create your new database?
Do you have any DDL triggers?

1 solution

You have created that table in the model database. That one is replicated on every database creation. Please noted, that in SQL Server not the database, but the instance is the top level logical and functional object.

[Update]
Not master, model.
 
Share this answer
 
v2
Comments
Richard Deeming 6-Jan-15 12:09pm    
Did you mean the model database? :)
Zoltán Zörgő 6-Jan-15 12:23pm    
Yes, I meant model!
John M Bundy 6-Jan-15 12:22pm    
There are no tables at all in my master or model database.
Zoltán Zörgő 6-Jan-15 12:28pm    
Well, you could have also created an instance level event but I doubt that something like that is created by accident.
John M Bundy 6-Jan-15 12:26pm    
Strange, there are no tables showing under my model database, but when I search for that table using the sp_MSforeachdb procedure it says there is one there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900