Sql2005 solution to database restoration errors

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

Problem 1: Restoration Failure Prompt

System. Data. SqlClient. SqlError: The backup set holds a backup of a database other than the existing 'XXX' database. (Microsoft. SqlServer. Express. Smo)

I checked and found that it was my own Operation problem.
 

In SQL2005, we also checked "options" to overwrite the existing database and selected the path of the target database.

Accustomed to SQL2000 operations, SQL2005 often "careless"

Problem 2: database name restoration

The following error occurs when you return the source database

System. data. sqlClient. sqlError: In the 'C: Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBusinessDB. when mdf 'tries 'restorecontainer: validatetargetforcreation', the operating system returns error '5 (access denied .) '. (Microsoft. SqlServer. Express. Smo)

 


Cause analysis:

There is no permission for "C: Program FilesMicrosoft SQL ServerMSSQL.1MSSQL" to create a file (you can copy it to data). This is SQL2005's security restriction on folders.

Solution:

Modify the folder to 'C: Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData "or another disk folder (such as E: mydb. Note: You must modify the mdf and ldf file paths.

Other references

When you restore a database, if there are too many devices specified for the backup or restoration operation, you can only specify 64

Device. The restore database operation is terminated abnormally ." When this error occurs, it means that you are

The backup data is restored to the SQLServer2000 database. This error occurs:

1. It does not indicate your computer system

There is a problem (you do not need to reinstall the system ).
2. Your SQLServer2005 or SQLServer2000 database is installed properly (no

Reload the database ).
3. You don't have to scold Microsoft for spam.
It's easy, as long as you connect to the SQLEXPRESS instance of SQLServer2005. In the SQLServer2005 database

Original. Download the SQL Server Management Studio Express Software for connection Management.

SQLServer2005 tool. It can help you restore the database.

SQL Server Management Studio Express is a tool, and SQLEXPRESS is the instance you want to connect

. SQLEXPRESS ). Instead of (.) or (local), if it is (.) or (local), it means you do not

When you connect to the SQLServer2005 database, an error is returned. You must be sure that you have actually connected to the SQLServer2005 database.

Conclusion: the backup of SQLServer2005 and SQLServer2000 cannot be universal. Therefore, when restoring

Database cannot be confused, especially when some source code and backup of some databases are downloaded from the internet

2005 or 2000. When the above error occurs, it means that you are restoring the data backed up from SQLServer2005

SQLServer2000 database. Pay attention to it.

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.