October 31, 2003 at 11:39 am
I ran the sp_shrinklog commnad generated from the following script against a data file (not log file) which reduced 90% of the
data file. It completed without any errors. I wonder what have happened to the database.
Can the script be used against data files?
Thank you for any input!
October 31, 2003 at 11:57 am
Are you sure? The input file has to be the log file name of your database.
October 31, 2003 at 2:10 pm
Yes. I put the data file as the input file...
October 31, 2003 at 2:15 pm
The SP runs command "DBCC SHRINKFILE (@LogicalFileName, @NSize)", If you place data file as input, It will shrink the data file. That is why you see your database file size reduced.
October 31, 2003 at 3:02 pm
Thank you, Allen. What I worry is that: does it truncate any data? How could the data file shrunk 90%? Does it do the same thing as Shrink Database in the Enterprise Manager?
November 1, 2003 at 8:16 am
It shrank because there was free space. Typically is and its a good thing, the maintenance wizard defaults to 10% I think. If you don't have free space in the db it gets allocated when the space is needed (provided autogrow is set).
Andy
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply