Skip to content
Stackship documentation Svenska

SQL ServerUsers

Manage an instance

The SQL Server instance page — stop and start the server, change its storage, resources and network settings, set or rotate a product key, roll back a change, and delete the instance.

Requires: sqlservercluster/write, sqlservercluster/manageLicense, sqlservercluster/delete

Open SQL Server in the sidebar and choose the instance. The header shows its status and Restart and Stop while it is Running, or Start while it is Stopped. The Overview shows the instance's edition, version and status, its resources, how it is reached, its metrics and the Sentinel card. Changing anything on this page needs sqlservercluster/write unless a section says otherwise.

Stop and start

Stop shuts the server down and keeps its data volume; the instance shows Stopped, and nothing can connect to it, the Data Explorer included. Start brings the server back on the same volume. Follow either on the Operations tab.

Note

Restart is accepted and reported as finished, but it does not restart the server today. To restart the server, stop it and start it again.

Important

Saving the Database or Networking & Security section, or any update through the API or the CLI, while the instance is Stopped starts the server again: an update replaces the instance's whole configuration, and the stop is not part of it. Stop the instance again afterwards if it should stay stopped.

With the CLI:

bash
stsh sqlserver stop my-sql -g my-resource-group
stsh sqlserver start my-sql -g my-resource-group

Runtime

Configuration → Runtime shows what was fixed at creation: the edition, the version, the database name, the collation and the compute plan. Availability is always Single instance — see One server per instance.

Storage and resources

Configuration → Database holds Storage Size, and under Advanced resources the CPU Request, CPU Limit, Memory Request and Memory Limit. Saving a change to any of them restarts the server, so connections drop for a moment.

Warning

Raising Storage Size saves the new size, and the Overview shows it, but the server keeps the data volume it was created with: the volume is not enlarged. Size the storage when you create the instance.

The compute plan cannot be changed in the portal. Through the API or the CLI a new plan applies its CPU and memory and leaves the storage as it is:

bash
stsh sqlserver update my-sql -g my-resource-group --set computePlan=large

The same section holds Monitoring, which the platform stores but does not act on today — changing it restarts the server and nothing else — and Backups, described in Back up and restore.

Networking and security

Configuration → Networking & Security has three settings:

  • Enable External Access — a load balancer on port 1433 for clients outside the cluster; see Connect from outside the cluster.
  • Firewall — Boundary default, Same resource group only or Selected networks.
  • Allowed CIDRs — shown when Firewall is Selected networks: the address ranges allowed through the load balancer, separated by commas.

Important

The Firewall choice does not change who can reach the instance inside the cluster today: whichever you pick, every workload in the boundary can connect on port 1433, and no workload in another boundary can. Only Allowed CIDRs has an effect, on external access.

License

Configuration → License is for Standard and Enterprise instances; for the free editions it only says that no licence is needed. It shows whether a licence is configured and has one field, Set Product Key, or Rotate Product Key once a key exists. Enter the key and choose Save. This needs sqlservercluster/manageLicense; the Owner, Contributor and Databases Operator roles have it.

The key is stored as a secret in the resource group and never displayed. The server reads it when it starts, so a new key takes effect the next time the server starts — stop and start the instance to apply it now.

Caution

On a Standard or Enterprise instance, saving the Database or Networking & Security section, or an update through the API or the CLI that does not carry licenseKey, removes the instance's reference to its product key. The server restarts without the key, and License then shows No license is configured. Set the key again on License after every such change, or send licenseKey with the update.

Revisions

Every configuration change is recorded as a revision on the Revisions tab. View changes shows what a revision changed, and Roll back restores its configuration; the instance is deployed again with it.

Access control

The Access Control tab assigns roles on this instance alone — see Role assignments. The roles that matter for SQL Server are listed in Permissions.

Delete the instance

On the Danger Zone tab, choose Delete, type the instance's name and choose Delete Permanently. This needs sqlservercluster/delete, which sqlservercluster/write includes; the Owner, Contributor and Databases Operator roles have it. With the CLI:

bash
stsh sqlserver delete my-sql -g my-resource-group --yes

The server, its connection strings and the sa password go with it. Two things stay in the resource group until it is deleted itself — see Delete a resource group:

  • The data volume. The platform has no action to remove or reattach it. An instance created later with the same name in the same resource group is given this volume instead of an empty one, so use a new name for a new instance.
  • The product key of a paid-edition instance.