how to attach big Data Files to My SQL

Discussion in 'General troubleshooting' started by tery, Jan 14, 2010.

  1. Hi:
    I've bought 500M MS SQL 2008 from DiscountAsp.Net, but I cann't Attach My Data File to my SQL because the DATA FILE is LARGER than my diskspace of the FTP, I've zip it and upload it to my Diskspace named "sql08.zip" under the "/attach" directory. could you help me to attach it ot my SQL2008. after that , you can just delete the data file.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    How big is the data file size (not to be confused with the actual file size)? Check the filesize in the SSMS.
     
  3. my SQL space is enough as soon as my Data file attached, in other word, my data is 3GB in file system, but after attach it to SQL it's not larger than 100M, What I need is attach the data to my SQL, but i have not enough space to upload my data file temporary.

    one possible solution is to buy more FTP space which I am not realy need, and then upload my big data file and attach it to SQL, then delete the big data file. My question is can I get cut the additional FTP space down, and get my money back?
     
  4. Try a DBCC SHRINKDATABASE to reclaim all unused pages in the database files and reclaim the space in the file system. If the database size is only 100Mb but actually 3Gb on disk, it sounds like you have a lot of unclaimed space in the mdf / ldf files. You can also view the current amount of free unallocated space in the database with the sp_spaceused SPROC.
     

  5. yes, it works, thanks!
     

Share This Page