Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 INITIAL SIZE of DB file

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-07-29 : 14:40:12
How to find the initial size of a DB file using TSQL?

------------------------
I think, therefore I am - Rene Descartes

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-07-29 : 17:11:02
there was a thread about this already, but i think we didn't find a solution to this. search around.
I posted there too if it helps

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-29 : 17:20:06
To easily find out info like this, just run SQL Profiler, then view the information in SSMS. Go back to profiler to see what SSMS ran to get the info.

That's what I always do before posting a question here.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-07-29 : 17:34:11
yeah we acctually tried that too in that thread. didn't work that well... i think...

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-07-29 : 18:30:21
Is the initial size of the database file actually stored anywhere in SQL Server, or just the current size?





CODO ERGO SUM
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-29 : 18:32:36
You can see the initial size by going to the database properties, then files. So it's stored, just not sure where.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-29 : 22:57:06
Take look at sysfiles table in the db, size is in 8k pages.
Go to Top of Page

jason7655
Starting Member

24 Posts

Posted - 2008-07-30 : 10:16:58
Something else to think about.

Doesn't the initial size come from the size of the Model DB if a size isn't specified or is that only 2000?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-07-30 : 10:44:36
quote:
Originally posted by tkizer

You can see the initial size by going to the database properties, then files. So it's stored, just not sure where.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog




I think the "initial size" in the database file properties is just a misleading label for the current size.

I looked at a file, and the "initial size" was exactly the same as the current size. I shrank the file, and the "initial size" changed to the new file size.





CODO ERGO SUM
Go to Top of Page
   

- Advertisement -