I have to run the backup of SQL Server 2000 in SQL Server 2008.
While restoring the database from the .bak
file, I got the error
specified cast is invalid
After doing google I feel there is compatibility issue. Therefore I want to make the database compatibile to SQL Server 2000.
And run the below query
ALTER DATABASE DBNAME
SET COMPATIBILITY_LEVEL = 80
but nothing help. Any help will be appreciated.
The complete error message is :
Specified cast is not valid. (SqlManagerUI)
------------------------------
Program Location:<br/>
at <br/>Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.PopulateGridWithBackupSetsFromDevices()<br/>
at <br/>Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.GetBackupSetsFromDevices()<br/>
at <br/>Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.textDeviceSelected_TextChanged(Object sender, EventArgs e)<br/>
at System.Windows.Forms.Control.OnTextChanged(EventArgs e)<br/>
at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)<br/>
at System.Windows.Forms.Control.set_Text(String value)<br/>
at System.Windows.Forms.TextBoxBase.set_Text(String value)<br/>
at System.Windows.Forms.TextBox.set_Text(String value)<br/>
at <br/>Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.bu<br/>ttonSelectDevice_Click(Object sender, EventArgs e)<br/>
at System.Windows.Forms.Control.OnClick(EventArgs e)<br/>
at System.Windows.Forms.Button.OnClick(EventArgs e)<br/>
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br/>
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,Int32 clicks)<br/>
at System.Windows.Forms.Control.WndProc(Message& m)<br/>
at System.Windows.Forms.ButtonBase.WndProc(Message& m)<br/>
at System.Windows.Forms.Button.WndProc(Message& m)<br/>
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)<br/>
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)<br/>
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, <br/><IntPtr wparam, IntPtr lparam)<br/>
Best Answer
According to the following link there is a step missing:
http://blogs.technet.com/b/mdegre/archive/2012/06/15/migration-sql-server-2000-to-sql-server-2012.aspx
The TechNet link refers to moving from SQL Server 2000 to SQL Server 2012, but the first step is moving from SQL Server 2000 SP4 to SQL Server 2008.
If going all the way to a current version of SQL Server you will have to make the migration in two steps:
Step 1: Make a first migration from SQL Server 2000 to SQL Server 2008 for instance. You need to be on SQL Server 2000 SP4.
Step 2: Make a second migration from SQL Server 2008 to 2012.