|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
bak file = 5gb, attempted restore claims its 100GbSQL server 1 holds DB1 its a 100GB file approx I back it up Restore it on SQL server 1 as DB2 Truncate large tables DB2 now = 5Gb approx BACKUP. My .bak file = 5gb ish. ZIP = 1 gb FTP UNZIP. My .bak file = 5gb ish SQL SERVER 2 has 80GB disk space Attempt to restore DB2 from my 5Gb .bak file ... I get the message: "Restore failed for Server # System.Data.SQLClientError. There is insufficent free disk space on disk volume d:\ to create database. The database requires 101503664128 additional free bytes while only 82900180992 bytes are available." MY .BAK FILE IS 5GB !!! how can it think i need 100GB ? NOTE: I should probably add i just unistalled SQL express and installed SQL standard 2005. Thanks for any help Scott Scott,
The database on disk is 100Gb as you mention. The actual data is now around 5Gb after the truncation. The data in the backup may only be 5Gb but it was from a 100Gb database so the restore is trying to allocate the new database with the attributes of the database it was backed up from. You need to shrink the original from 100Gb and back it up again and then try. Chris Show quoteHide quote "Scott" <nospam123@yahoo.co.uk> wrote in message news:eN9NVCHYJHA.684@TK2MSFTNGP04.phx.gbl... > this is a new one on me: > > SQL server 1 holds DB1 its a 100GB file approx > I back it up > Restore it on SQL server 1 as DB2 > Truncate large tables > DB2 now = 5Gb approx > BACKUP. My .bak file = 5gb ish. > ZIP = 1 gb > FTP > UNZIP. My .bak file = 5gb ish > SQL SERVER 2 has 80GB disk space > Attempt to restore DB2 from my 5Gb .bak file ... > > I get the message: > > "Restore failed for Server # > System.Data.SQLClientError. There is insufficent free disk space on disk > volume d:\ to create database. The database requires 101503664128 > additional free bytes while only 82900180992 bytes are available." > > MY .BAK FILE IS 5GB !!! how can it think i need 100GB ? > > NOTE: I should probably add i just unistalled SQL express and installed > SQL standard 2005. > > Thanks for any help > Scott > > Scott
Shortly, you database contains lots of empty pages, you option is to run DBCC SHRINKFILE/DBCC SHRINDATABASE commands Show quoteHide quote "Scott" <nospam123@yahoo.co.uk> wrote in message news:eN9NVCHYJHA.684@TK2MSFTNGP04.phx.gbl... > this is a new one on me: > > SQL server 1 holds DB1 its a 100GB file approx > I back it up > Restore it on SQL server 1 as DB2 > Truncate large tables > DB2 now = 5Gb approx > BACKUP. My .bak file = 5gb ish. > ZIP = 1 gb > FTP > UNZIP. My .bak file = 5gb ish > SQL SERVER 2 has 80GB disk space > Attempt to restore DB2 from my 5Gb .bak file ... > > I get the message: > > "Restore failed for Server # > System.Data.SQLClientError. There is insufficent free disk space on disk > volume d:\ to create database. The database requires 101503664128 > additional free bytes while only 82900180992 bytes are available." > > MY .BAK FILE IS 5GB !!! how can it think i need 100GB ? > > NOTE: I should probably add i just unistalled SQL express and installed > SQL standard 2005. > > Thanks for any help > Scott > > thanks for the reply. I understand the DB contains empty pages after the
truncation. What i dont understand is why NTFS shows 5GB and SQL thinks its still 100GB. cheers scott > thanks for the reply. I understand the DB contains empty pages after the The database backup on disk includes only used pages, not empty ones. That > truncation. What i dont understand is why NTFS shows 5GB and SQL thinks > its still 100GB. is why only 5GB is needed for the backup file. However, when you restore the database, it is created exactly like the original 100GB database, including both empty and used pages. Both Chris and Uri already mentioned that you need to shrink the database file(s) before you perform the backup to reduce space requirements for the restore. Show quoteHide quote "Scott" <nospam123@yahoo.co.uk> wrote in message news:eXNfNEcYJHA.5828@TK2MSFTNGP03.phx.gbl... > thanks for the reply. I understand the DB contains empty pages after the > truncation. What i dont understand is why NTFS shows 5GB and SQL thinks > its still 100GB. > > cheers > scott >
Other interesting topics
testing 2000 to 2005 update
Query is very slow then fast bcp delimiter Transactional data fun... using DATEADD to report informaiton from 60 days ago Performance Dashboard giving incorrect missing index SQL 2005 Management Studio truncate log Trigger returning DBCC input buffer statement being cut-off SQL Server 2005 SP3 and SQL Authentication |
|||||||||||||||||||||||