If, like me, you need to move your TFS 2010 databases from one machine to another in order to create a separate application tier, one of the tasks is to shift the database from one machine to another.
Alas, when backing up the database on your existing SQL server, you may receive the following:
Microsoft SQL Server Management Studio
Backup failed for Server 'TFS2010'. (Microsoft.SqlServer.SmoExtended)
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: A nonrecoverable I/O error occurred on file "e:\temp.bak:" 112(failed to retrieve text for this error. Reason: 15105). (Microsoft.SqlServer.Smo)
The reason for this obscure error is that your TFS database is very, very large. Your disk on the other hand is very, very small. You therefore have 2x options.
1. Delete files from the disk
2. Try and export with the ‘WITH COMPRESSION’ command.
In order to attempt the latter, you need to script to a new query window as you can’t do it from the UI.
Within the query window, add ‘WITH COMPRESSION’ so that it looks something like this:
BACKUP DATABASE [Tfs_DefaultCollection] TO DISK = N'e:\temp.bak' WITH COMPRESSION, NOFORMAT, NOINIT, NAME = N'Tfs_DefaultCollection-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
Perfect! Your database should now end up on the disk, even if you don’t have a whole lot of space left. Note that the export and compression will likely take a long time (just over an hour for our TFS database)
No comments:
Post a Comment