Home Database Mysql Tutorial 解决SQL2005备份数据库.dat或bak还原时的结构错误的解决方法

解决SQL2005备份数据库.dat或bak还原时的结构错误的解决方法

Jun 07, 2016 pm 06:06 PM
backup database

已备份数据库的磁盘上结构版本为611. 服务器支持版本539, 无法还原或升级此数据库,RESTORE DATABASE 操作异常终止。

远程服务器主机上安装了sql server 2005,备份的时候使用虚拟主机自带的还原工具备份数据库为data.dat格式的,在本机sql2000想还原数据库的时候,出现提示“已备份数据库的磁盘上结构版本为611. 服务器支持版本539, 无法还原或升级此数据库,RESTORE DATABASE 操作异常终止。”

这是由于sql数据库高版本2005向下兼容,但低版本的sql2000不能处理sql2005的数据库格式造成的。客户端必须使用sql2005才能正确还原已经备份的数据库文件。这就需要安装sql 2005,但是sql 2005的一个开发版源文件就达 3.76GB 的大小,X86的也有1GB大小,安装过程更是需要个把小时,这对飘易来说,无疑是个巨大的时间浪费。

那如何解决呢?飘易采取的是下载精简版的 sql 2005的服务器端和客户端,2个文件加起来一共才85M大小,安装的实际也仅仅需要10分钟不到,这比原版的安装时间那可是一个巨大的反差。

好了,飘易就来说说如何安装精简版的 mssql 2005,首先下载服务器端的软件:Microsoft SQL Server 2005 Express Edition ,这个版本其实就是SQL 2005的精减版。

Microsoft SQL Server 2005 Express Edition (SQL Server Express) 是一种免费、易用的轻量版 SQL Server 2005,具有快速且易于掌握的特点,可用于快速开发和部署动态数据驱动的应用程序。SQL Server Express 提供强大而可靠的数据管理工具,它功能丰富,能够保护数据并提高性能。它适用于嵌入式应用程序客户端、轻型 Web 应用程序以及本地数据存储区。SQL Server Express 具有易于部署以及可以快速设计原型的特点,您可以无偿获取并可以随应用程序免费再分发。如果需要更多的高级数据库功能,可将 SQL Server Express 无缝升级到更复杂的 SQL Server 版本。

下载地址:Microsoft SQL Server 2005 Express Edition 官方简体中文版 :
(仅40M) 或


上面的仅仅是个服务器软件,我们还要下载一个图形化客户端管理工具:Microsoft SQL Server Management Studio Express 。下载地址:
(仅45M大小)或


上面的这2个软件下载好,顺序安装完毕,再次还原刚才的2005的备份文件就没问题了,不会再出现“已备份数据库的磁盘上结构版本为611. 服务器支持版本539, 无法还原或升级此数据库,RESTORE DATABASE 操作异常终止”这样的提示,如果你备份的数据库后缀是 .bat 的,可以直接改为 .bak,因为sql2005只认 .bak 的后缀。

针对sql2000升级到sql2005后出现的数据库架构不一样的情况,可以在 查询分析器里或存储过程里执行以下语句:
EXEC sp_MSforeachtable @command1="EXEC SP_ChangeObjectOwner '?','dbo'"
该语句调用系统存储过程 sp_MSforeachtable 批量修改数据表的架构名为 dbo 。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections? How do I configure SSL/TLS encryption for MySQL connections? Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL? How do you handle large datasets in MySQL? Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement? How do you drop a table in MySQL using the DROP TABLE statement? Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you create indexes on JSON columns? How do you create indexes on JSON columns? Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do you represent relationships using foreign keys? How do you represent relationships using foreign keys? Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)? How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)? Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles