简体   繁体   中英

Restore of database 'DatabaseName' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

Error:

System.Data.SqlClient.SqlError: CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 10240 MB per database. (Microsoft.SqlServer.SmoExtended)

This is for Windows 10, running Microsoft SQL Server Management Studio 18.1. I've tried on SQL Server 2012 & 2014, getting the same error.

I restored the DB using these steps

* Right Click on Databases
  >> Restore Database 
     >> Selected Device under source
        >> clicked ... 
           >> Select backup devices
              >> Add
                 >> Select .bak file
                    >> Ok

You are trying to restore a database on SQL Server Express edition. The maximum allowed database size on this edition is 10 GB.

You must restore this backup on another edition of SQL Server, like Developer (free for non-production use), Standard, Enterprise or Trial.

Step 1: Open SSMS and connect to the db.

Step 2: After connecting to the database, Object Explorer panel will appear on the left side of the SSMS window.

Step 3: In Object Explorer panel, right-click Databases, and then select Restore Database. Select Restore Database Option

Step 4: In Restore Database dialog box, do the following:

Select one of the databases to restore. In the left panel, click Options.

Step 5: In Options page, check the checkbox labeled, 'close existing connections to destination database'.

Close existing database connections

Once the SQL Server connections are closed, proceed with the restore operation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM