Status and Error Codes
The operations supported by the SQL Database Management API return standard HTTP status codes, as defined in the HTTP/1.1 Status Code Definitions.
Database Management API operations may also return additional error information that is defined by the SQL Database Management Service. This additional error information is returned in the response body. The code examples given in the technical reference for each operation demonstrate how to access the additional error information from the response stream of WebExceptions. The links below navigate to the technical reference for the supported operations.
The body of the error response follows the basic format shown here.
<?xml version="1.0" encoding="utf-8"?> <Error> <Code>error-code</Code> <Message>detailed-error-message</Message> <Severity>severity-level</Severity> <State>state-information</State> </Error>
The following table describes common errors that may be returned by the SQL Database Management Service while attempting to execute a request. The value for severity-level and state-information will correspond directly to the Severity and State values that are returned for SQL Server error messages. For more information on how SQL Server populates these values, see Understanding Database Engine Errors.
| Error code | HTTP status code | User Message |
|---|---|---|
|
15006 |
Bad Request (400) |
<AdministratorLogin> is not a valid name because it contains invalid characters. |
|
40611 |
Bad Request (400) |
Servers can have at most 128 firewall rules defined. |
|
40614 |
Bad Request (400) |
Start IP address of firewall rule cannot exceed End IP address. |
|
40617 |
Bad Request (400) |
The firewall rule name that starts with <rule name> is too long. Maximum length is 128. |
|
40618 |
Bad Request (400) |
The firewall rule name cannot be empty. |
|
40630 |
Bad Request (400) |
Password validation failed. The password does not meet policy requirements because it is too short. |
|
40631 |
Bad Request (400) |
The password that you specified is too long. The password should have no more than 128 characters. |
|
40632 |
Bad Request (400) |
Password validation failed. The password does not meet policy requirements because it is not complex enough. |
|
40638 |
Bad Request (400) |
Invalid subscription id <subscription-id>. Subscription does not exist. |
|
40639 |
Bad Request (400) |
Request does not conform to schema: <schema error>. |
|
40640 |
Internal Server Error (500) |
The server encountered an unexpected exception. |
|
40641 |
Bad Request (400) |
The specified location is invalid. |
|
40642 |
Service Unavailable (503) |
The server is currently too busy. Please try again later. |
|
40643 |
Bad Request (400) |
The specified x-ms-version header value is invalid. |
|
40644 |
Forbidden (403) |
Failed to authorize access to the specified subscription. |
|
40645 |
Bad Request (400) |
Servername <servername> cannot be empty or null. It can only be made up of lowercase letters 'a'-'z', the numbers 0-9 and the hyphen. The hyphen may not lead or trail in the name. |
|
40646 |
Bad Request (400) |
Subscription ID cannot be empty. |
|
40647 |
Bad Request (400) |
Subscription <subscription-id does not have server servername. |
|
40648 |
Service Unavailable (503) |
Too many requests have been performed. Please retry later. |
|
40649 |
Bad Request (400) |
Invalid content-type is specified. Only application/xml is supported. |
|
40650 |
Bad Request (400) |
Subscription <subscription-id> does not exist or is not ready for the operation. |
|
40651 |
Bad Request (400) |
Failed to create server because the subscription <subscription-id> is disabled. |
|
40652 |
Bad Request (400) |
Cannot move or create server. Subscription <subscription-id> will exceed server quota. |
See Also