question

askmlx121 avatar image
askmlx121 asked

database size to 30 GB

Can we create the database with 30 GB OR MORE as per our wish? can we add/modify the database size to 30 GB as already existing Database in server?
sql-server-2005database
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Not only can you... it's a Best Practice to pre-allocate the space.
4 Likes 4 ·
Remember, if you got the answer to your question, make sure you mark it by clicking on the check box next to it.
1 Like 1 ·

1 Answer

· Write an Answer
Cyborg avatar image
Cyborg answered
Yes, when you create the database put the default size as 30720, this creates the database with size of 30 GB but they are unused reserved space that can will be used later when database grows with user objects, but make sure you have enabled "[instant file initialization][1]" for the SQL Server account to boost up the performance of creating database to 30 GB. Use alter database modify file for altering existing db size. ALTER DATABASE MyDB MODIFY FILE (NAME = MyFile, SIZE = 30720) [1]: http://msdn.microsoft.com/en-us/library/ms175935.aspx
3 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

be sure to size the data file and not the log file...
5 Likes 5 ·
Also assuming you have the space ;-)
3 Likes 3 ·
Great thanks
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.