如何更正sql server错误消息:208?

编程入门 行业动态 更新时间:2024-10-11 15:21:14
本文介绍了如何更正sql server错误消息:208?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

实际上我遵循了用C#备份SQL数据库的代码程序..

Actually I followed ur code procedure for Backing up an SQL Database in C#..

public static void BackupDatabase(string backUpFile) { ServerConnection con = new ServerConnection(@"xxxxx\SQLEXPRESS"); Server server = new Server(con); Backup source = new Backup(); source.Action = BackupActionType.Database; source.Database = "MyDataBaseName"; BackupDeviceItem destination = new BackupDeviceItem(backUpFile, DeviceType.File); source.Devices.Add(destination); source.SqlBackup(server); con.Disconnect(); } public static void RestoreDatabase(string backUpFile) { ServerConnection con = new ServerConnection(@"xxxxx\SQLEXPRESS"); Server server = new Server(con); Restore destination = new Restore(); destination.Action = RestoreActionType.Database; destination.Database = "MyDataBaseName"; BackupDeviceItem source = new BackupDeviceItem(backUpFile, DeviceType.File); destination.Devices.Add(source); destination.ReplaceDatabase = true; destination.SqlRestore(server); }

正确支持数据库在指定位置并且在我尝试恢复我已经支持数据库的数据库之后文件,所以在那之后我在sql server 2008中得到数据库错误,因为MS SQL错误:208无效的对象名称。 所以我需要做的是在sql server 2008中恢复我的数据库.. 。:(

It's backed database at specified location correctly and after I tried to restore the database from which I had already backed database file,so after that onwards Iám getting database error in sql server 2008 as MS SQL Error: 208 "Invalid object name". so what I need to do for restore my database in sql server 2008...:(

推荐答案

最有可能的原因是备份和恢复不会使用相同版本的SQL:如果源是更高版本,那么它可以包括目的地不理解的备份中的数据。 首先查看数据库安装并检查修订级别。 Most likely reason is that the backup and restore are not going to the same version of SQL: if the source is a higher revision, then it could include data in the backup which the destination does not understand. So start by looking at your database installations and check the revision levels.

错误208

更多推荐

如何更正sql server错误消息:208?

本文发布于:2023-11-22 06:10:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616268.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   消息   sql   server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!