bhavini dave
bhavini dave

Reputation: 39

How to create SQL Server on Azure Using Python SDK?

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

Upvotes: 2

Views: 423

Answers (2)

Peter Pan
Peter Pan

Reputation: 24128

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.

Upvotes: 1

forester123
forester123

Reputation: 1579

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.

Upvotes: 1

Related Questions