Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Created March 19, 2021 00:18
Show Gist options
  • Save sjwaight/805ca7ea12837bd9b4993764bfc795b6 to your computer and use it in GitHub Desktop.
Save sjwaight/805ca7ea12837bd9b4993764bfc795b6 to your computer and use it in GitHub Desktop.
Sample script to create Azure SQL DB and show ADO.NET connection string
az group create --name {resgroup} --location {location}
az sql server create --admin-password {youradminpwd} --admin-user {youradminuser} --name {servername} --resource-group {resgroup} --location {location}
az sql db create --resource-group {resgroup} -server {servername} --name {dbname} --edition GeneralPurpose --family Gen5 --capacity 2 --compute-model Serverless
az sql db show-connection-string --server {servername} --name {dbname} -c ado.net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment