Comb the reload Sql2008r2sp1 steps

Source: Internet
Author: User

My computer is so, the earliest time loaded is 2005, then the company used to 2008, I will manually uninstall, but it seems that the uninstall is not thorough enough, in the installation of 2008, choose the upgrade method to install.

Although successful, but when running the select @ @version, the discovery is still 2005, but oddly enough, the boot interface is indeed 2008, indicating that the upgrade installation, although ostensibly successful, but not very thorough. Especially after the upgrade, there are some similar to the replication of such a situation. But my machine is only used for experimentation, so I don't care too much.

But recently, I need to restore the backup file of the official library, because the server is loaded with 64bit sql2008r2sp1, so it is incompatible with my native, so it cannot be restored.

No way, had to upgrade to 2008R2SP1, because of the previous situation, there are 2005 residual files, and 2008 residual files, try a bit, upgrade to R2, the results are unsuccessful, simply uninstall all, re-install it. So manual various deletions, and into the registry, and into the control Panel, and stop service, tossing a little day, the last one, found or uninstalled not clean, unable to install successfully.

Baidu a bit, found that there is a software, called Windows Installer Clean up, after downloading, found unloading that called a fast, and very neat.

So the normal installation of sql2008r2, all smooth, after installation, remember to install SP1 patch, the address is as follows:

Http://download.microsoft.com/download/0/9/9/099E0C83-072B-42A5-83A0-9BB3D2E6E2A3/SQLServer2008R2SP1-KB2528583-x86-CHS.exe

Remember to download the time, pay attention to the smooth speed. Install the time try not to run other programs at the same time, I found that the program is not stable, decompression prone to file corruption prompt, in fact, there is no damage. It's good to unzip it a few times.

After normal installation, do not skip the installation steps.

After normal start want to use sa account login, select SQL Server mode login, but found the password is not prompt, so want to change the sa password.

Log in with Windows Authentication mode, open the Server Properties dialog box, and enable both SQL Server and Windows Authentication mode. Click OK. Then find the security ==> login name ==>sa==> property, after modifying the password, restart the database service, at the related item point restart. After that, you can log in as SQL Server.

Then prepare to restore the database, preferably with a statement restore, there is a benefit, that is, if there is an error, it will prompt related errors:

Restore Database heb00 from

Disk = ' e:\heb000_2012-12-25 01.40.00.bak '

With replace

Although the version is now consistent, there are still errors, as follows:

Msg 3183, Level 16, State 2, line 1th

When reading from this backup set, RESTORE detects an error on page (0:0) in the database "Heb00".

Msg 3013, Level 16, State 1, line 1th

RESTORE DATABASE is terminating abnormally.

According to the hint, thought is heb00 This new database problem, because the original database is about 34 g, and the initial database is very small, thought to have this possibility, so the initial size is set to 35 g, but the problem is still, repeatedly tried several times, the feeling should be in the backup file. Copy backup, the backup file from the server to the mobile hard disk, and then copied from the mobile hard disk on the computer, according to experience, the general large files in the process of copying, are vulnerable.

It suddenly occurred to you to view the log file:

Date 2012-12-28 10:33:29

Log SQL Server (current-2012-12-28 10:33:00)

SOURCE Spid55

News

The backup data at the end of the ' e:\heb000_2012-12-25 01.40.00.bak ' is incorrectly formatted. Backup sets on the media might is damaged and unusable. To determine the backup sets on the media, use the RESTORE headeronly. To determine the usability of the backup sets, run RESTORE verifyonly. If all of the backup sets is incomplete, reformat the media using Backup with FORMAT, which destroys all the backup sets.

As a hint, it is possible to estimate the problem with the backup file.

Then, according to the hints, make a comparison:

RESTORE headeronly

From DISK = N ' e:\heb000_2012-12-25 01.40.00.bak '

With Nounload;

GO

RESTORE headeronly

From DISK = N ' D:\book.bak '

With Nounload;

GO

As you can see, the second database backup file is recognizable, but the first database file to be restored does not appear to be complete, so here, the problem should be confirmed on the backup file,

Commiseration, you can only re-copy it.

"Because the database is in use, you cannot gain exclusive access to the database", the Final solution is as follows

Key SQL statements:

ALTER DATABASE [datebase] SET OFFLINE with ROLLBACK IMMEDIATE

Run out and then

ALTER database [Datebase] set online

Comb the reload Sql2008r2sp1 steps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.