Resize data file

  • Hi ...

    I am trying to resize the .mdf file for my database but it seems to just go on for hours, the last time being 2hrs until I stopped the resize manually. The reason I want to resize it is so that the restore may go quicker. The database was created with file sizes of 1 MB for both the .mdf and .ldf but the backup of the database to be restored is 50GB so I tried to resize the db to be 50GB.

    I have also tried creating the db with a 50GB .mdf with the same sort of problem. It just went on CREATEing for hours until I killed the process.

    Does anyone have an explanation of this problem and a solution?

    Thanks a stack.

  • First to run sp_spaceused @updateusage = true to find out spaces used by your database and sp_helpfile to get how large your MDF and LDF are. Then shrink them with DBCC SHRINKFILE command.

    Which verion of SQL Server do you run?

    Edited by - Allen_Cui on 07/23/2003 10:03:31 AM

    Edited by - Allen_Cui on 07/23/2003 10:04:48 AM

  • Expanding your database from 1MB to 50GB take long time. Who many data files you have? Make sure you have enough disk space left on the drives where your data file/files reside

    Shas3

  • Hi again ...

    Firstly, thank you for the responses.

    I am running SQL2000 ADV SERV with SP3. There is just one .mdf and one .ldf to this database. The available drive space is in excess 200GB. The drive configuration is RAID 5.

    Shas3------------------------------------

    Expanding your database from 1MB to 50GB take long time. Who many data files you have? Make sure you have enough disk space left on the drives where your data file/files reside

    ------------------------------------------

    How long should one expect this process of expanding the files to take? Previously I tried a restore directly to the newly created db with files of 1MB and that just took hours and I had to kill it. Therefore I decided that maybe resizing the data files or createing the db with large data files may speed up the process.

    Thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply