2

I want to create SQL Server and SQL Database using python sdk on Azure. Does Azure Provides Support for that?

2 Answers 2

1

Azure support two ways for creating Azure SQL Database.

  1. Using Azure Service Management(ASM) to create a classic SQL Database (REST API).
  2. Using Azure Resource Manage(ARM) to create a SQL Database (REST API).

For the process of creating Azure SQL Database, you can refer to the document for C# SDK https://azure.microsoft.com/en-us/documentation/articles/sql-database-client-library/.

To create SQL Database using Python SDK, according to the api document, it seems to only support ASM mode, please see the sql database managementservice module at http://azure-sdk-for-python.readthedocs.org/en/latest/ref/azure.servicemanagement.sqldatabasemanagementservice.html?highlight=sql%20database.

If you want to create sql database via ARM mode, I think you can try to use the REST API Create or Update Database that need to be authenticated by using Python SDK for Resource Management Authentication.

Sign up to request clarification or add additional context in comments.

2 Comments

ASM API is working fine. But It is for classic portal. I want to create resources in resource group. So, Do we have Python SDK for ARM? I can see Raw REST API for that but not getting Wrapper for that
@bhavinidave On Azure new portal, you can see the two SQL database types include classic (created by ASM) and normal (created by ARM). The Azure SDK for Python includes the ASM part, the ARM part and other service part. I'm not sure for the wrapped Python API for creating SQL Database in ARM, that's not clear. So I suggest that using the REST APIs instead of the Python APIs which you not clear their usage.
1

You can check the python sdk for azure, I find that the azure.servicemanagement.sqldatabasemanagementservice module which provides the function to create a new SQL Server and SQL Database, please check the detail in this article. So the answer to your question would be yes. Hope this help you.

1 Comment

Yes, ASM is working fine But I am using ARM for all other operations, So Is there any ARM support for that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.