Problem solve Get help with specific problems with your technologies, process and projects.

Decreasing the size of a datafile

Business Intelligence expert Eric Brown offers advice on decreasing the size of a datafile.

I had created a database named "maverick" and allocated a size of 6 GB for datafile(.mdf) and 1 GB for logfile(.ldf). But after that, due to some disk space re;ated reason, I tried to decrease the datafile size from 6 GB to 2 GB. But I am not able to do it.

Is it possible to decrease the size of a datafile in SQL Server 2000? If it is possible, how? If it is not possible, why?

I have not personally run into this problem. But if you can't do it directly, you probably shouldn't try to do it. You can create another MDF file, with the smaller size and backup/restore the data from the old/larger file to the smaller one.

View questions and answer from all of our SQL Server experts here.

Dig Deeper on SQL Server Business Intelligence Strategies

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.