| 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 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
|
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 KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
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 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
|
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 |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
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. |
 |
|
|
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? |
 |
|
|
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 KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://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 |
 |
|
|
|