May 6, 2021 at 12:37 pm
why is that when I run the sp_help (database name) or any query which gives datafile/log file name and size, it mentioned one value
but when I go to the path where the data file is and check on property it gives another value
I tried to restore the db but it still no change
any views on how to troubleshoot this
May 6, 2021 at 3:41 pm
Can you explain more what you are doing and seeing? What differences do you see? When you look in the folder, it's unclear what you are checking here. Is it the file size in bytes? Depending on what you are looking at, things might be different.
for example, sp_helpdb gives me a size of 80.00MB for my Sandbox db. In the file system, I see
That's 8192, and if I divide by 1024, I get the 80MB. You should be able to do something similar, but there might be some rounding difference, so this is why I'm curious for more details.
May 6, 2021 at 3:54 pm
when I use sp_helpdb I get file size of 170GB. but when I go to the location where the mdf is placed it shows 160 GB
May 6, 2021 at 4:14 pm
You are adding the log and data files together?
There might be some rounding here, though that seems high. Can you provide exact values you see and how you are getting them?
May 6, 2021 at 4:32 pm
no.. the data file and log files are stored on separate drives. 170 GB from sp_helpdb (db name) query and 160 approx from the mdf location right click properties)
May 6, 2021 at 6:46 pm
when I use sp_helpdb I get file size of 170GB. but when I go to the location where the mdf is placed it shows 160 GB
This might be a problem that has existed forever... some things use 1000^2 and 1000^3 for MB and GB totals and other things use 1024^2 and 1024^3 for MB and GB totals.
I gave up trying to reconcile things like this about the 2nd time I saw them, which was back in the '70s some time. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2021 at 4:36 pm
What size is your log file ? xyz.LDF
I just added up a database's MDF, NDF and LDF and everything matched up. when comparing sp_helpdb and the windows file info.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply