Handling Error 40619 while copying database using T-SQL

Posted by

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

We got an error while copying a database from one server to another server or the same server using T-SQL command:

create database testcopy2 as copy of testcopy(Service_Objective='S2')


Msg 40619, Level 16, State 1, Line 1

The edition 'Standard' does not support the database data max size '3221225472'.


Steps to reproduce this error:

1. Create the source db with Maxsize=3GB/4GB with any SLO(Vcore or DTU). Here I am using General Purpose 2 vcore as an example.




2. From SSMS try to create a new db(target db) as copy of testcopy with (Service_Objective='S2') or any other SLO in DTU mode.

It will fail with this error below

Msg 40619, Level 16, State 1, Line 1

The edition 'Standard' does not support the database data max size '3221225472'.




We cant fix this error by adding maxsize parameter as maxsize is not supported in the create db as copy of syntax




The only way to fix this issue is to make sure the source db (testcopy in my example above) has one of the supported max size for the target db(DTU based) in this chart below: 





Check for what are the different MAXSIZE options available for the target SLO and change the maxsize of the Source db. 

For example: In my case, target SLO is S2 and 5 GB is one of the supported options as you can see from the above chart. 

1. alter database testcopy modify (MAXSIZE = 5 GB);




     2. Then you can run the create database as copy of command below and it will work. 




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.