MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Datastore.register_azure_sql_database requires base SQL servername, not FQDN.

Open krisbock opened this issue 6 years ago • 2 comments

The following snippet:

sql_datastore_name="azuresqldatastore" server_name=os.getenv("SQL_SERVERNAME", "<my_server_name>") # Name of the Azure SQL server database_name=os.getenv("SQL_DATABASENAME", "<my_database_name>") # Name of the Azure SQL database username=os.getenv("SQL_USER_NAME", "<my_sql_user_name>") # The username of the database user. password=os.getenv("SQL_USER_PASSWORD", "<my_sql_user_password>") # The password of the database user.

Should call out that server_name needs to be the base server name, not servername.database.windows.net. This is confusing customers and leads to a lot of time spent debugging. Perhaps server_name=os.getenv("SQL_SERVERNAME", "<my_server_name>") # Base name of the Azure SQL server


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

krisbock avatar Jul 15 '20 23:07 krisbock

thanks for the feedback. we will follow up for doc update

MayMSFT avatar Aug 27 '20 21:08 MayMSFT

The sdk docs have further clarification in the parameters section: server_name The SQL server name. For fully qualified domain name like "sample.database.windows.net", the server_name value should be "sample", and the endpoint value should be "database.windows.net". https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.datastore(class)?view=azure-ml-py#register-azure-sql-database-workspace--datastore-name--server-name--database-name--tenant-id-none--client-id-none--client-secret-none--resource-url-none--authority-url-none--endpoint-none--overwrite-false--username-none--password-none----kwargs-

#please-close

meyetman avatar Nov 05 '20 19:11 meyetman