Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Initial size of a new database in SQL Svr 7

Status
Not open for further replies.

jcrivera

Technical User
Sep 14, 2000
46
PR
Greetings.

My situation is as follows: Whenever I want to create a new database (I'm using SQL Svr 7), although the default initial size is 1 MB, when I press OK I get an error message indicating that the initial size should be at least 81 MB.

This is due to the fact that for a reason that I still don't know when the database is created, at the same time it includes about 7 or 8 tables (and 4 stored procedures) of some other existing databases which reside in the same server. The total size of these 7 or 8 tables and the 4 sp's totalizes 81 MB.

My question is, how I can prevent to have these tables and sp's to be included in the new database, so that I can create it with the initial 1 Meg size and only including the system tables, views, and sp's?

Please advise.

J.C.
 
check your model database - make sure there aren't any user tables or user stored procedures in this database. sql uses the model to determine your default setup for a new database.
 

From SQL Books Online:

The model database is used as the template for all databases created on a system. When a CREATE DATABASE statement is issued, the first part of the database is created by copying in the contents of the model database, then the remainder of the new database is filled with empty pages.

Check the model database. Perhaps someone added tables and other objects that shouldn't exist in model. Check the properties of the model database. The space allocated may be larger than necessary. Terry
------------------------------------
People who don't take risks generally make about two big mistakes a year. People who do take risks generally make about two big mistakes a year. -Peter Drucker
 
Greetings guys...

In fact, that was the situation. I didn't realize my model database contained a copy of the mentioned tables and sp's.

However, I erased them (made sure the only tables, views and sp's present are system defaults)... moreover I stopped/started the engine, and still getting the same error (81MB needed as initial size)!

Shall I reboot?
 
i don't think you'll need to reboot... probably just need to shrink the model database now that you've removed all of the unnecessary items. to shrink the database in em, right click on the model database and select 'all tasks' - shrinking the database should be one of the available tasks.
 
Yep...
That's what I did before receiving your reply. The problem has been solved now.

Thanx!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top