1
votes
CREATE DATABASE {0} 
AS COPY OF {1} ( SERVICE_OBJECTIVE = 'S2' )

Execution timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. CREATE DATABASE AS Copy of operation failed. Internal service error.

2

2 Answers

1
votes

If setting a higher connection timeout via the connectionstring doesn't work, you might want to check out the Command Timout setting on the SqlCommand.

You can also set this with any of the ORM-frameworks available, though the property is probably named something different.

0
votes

You have a timeout exception, which indicates the time to complete the command is longer as your timeout. Have a look at the connectionstring to see the connection timeout. Change it to a larger value.

Depending on what takes time, you can create the db as a larger size (S3) and than scale it down afterwards. Check if the DTU usage is at 100% while creating the db.