Sql server 2008 r2 我有相同的sql server版本,尝试还原数据库,出现错误:指定的强制转换无效。(SqlManagerUI)
我有一个客户给我发了他的数据库。我已经解压了它,并尝试将它恢复到我的sql数据库中。他正在使用SQLServer2008R2和我。我尝试以下步骤:Sql server 2008 r2 我有相同的sql server版本,尝试还原数据库,出现错误:指定的强制转换无效。(SqlManagerUI),sql-server-2008-r2,restore,database-restore,Sql Server 2008 R2,Restore,Database Restore,我有一个客户给我发了他的数据库。我已经解压了它,并尝试将它恢复到我的sql数据库中。他正在使用SQLServer2008R2和我。我尝试以下步骤: 开放式SQL Server管理工作室 登录 右键单击databases文件夹 单击“还原数据库…” 我给数据库起了一个新名字,因为我还没有 我选择单选按钮“从设备” 我浏览并选择.bak文件 我单击OK按钮开始恢复 现在我在下面得到了这个错误。我不明白是什么问题 指定的强制转换无效。(SqlManagerUI) 节目地点: 在Microsoft.Sq
.bak
文件位于Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.GetBackupSetsFromDevices()
在Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.textDeviceSelected_TextChanged(对象发送方,事件参数e)
在System.Windows.Forms.Control.ContextChanged(EventArgs e)
在System.Windows.Forms.TextBoxBase.ContextChanged(EventArgs e)中
在System.Windows.Forms.Control.set_Text(字符串值)
在System.Windows.Forms.TextBoxBase.set_Text(字符串值)
在System.Windows.Forms.TextBox.set_Text(字符串值)
在Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.buttonSelectDevice\单击(对象发送器,事件参数)
在System.Windows.Forms.Control.OnClick(EventArgs e)
在System.Windows.Forms.Button.OnClick(EventArgs e)中
在System.Windows.Forms.Button.OnMouseUp(MouseEventArgs-mevent)中
在System.Windows.Forms.Control.WmMouseUp(消息&m,鼠标按钮,Int32点击)
在System.Windows.Forms.Control.WndProc(Message&m)中
在System.Windows.Forms.ButtonBase.WndProc(Message&m)中
在System.Windows.Forms.Button.WndProc(Message&m)中
在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)中
在System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息和消息)
在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd、Int32 msg、IntPtr wparam、IntPtr lparam)中
如果
.BAK
文件损坏,通常会发生这种情况,请检查.BAK
文件是否损坏,也可以尝试使用命令进行恢复
RESTORE DATABASE test FROM DISK = 'E:\test.bak'
真是奇怪的问题,我也面临着同样的问题;并以这种方式解决: