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.