Getting started with Managed Service for SQL Server
To get started with the service:
Before you start
Go to the management console. Then log in to Yandex.Cloud or sign up if you don't have an account yet.
If you don't have a folder yet, create one:
Click Create folder in the Home page of the management console.
Enter the folder name.
- The name must be unique within the folder.
- The name may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't be a hyphen.
- The maximum length of the name is 63 characters.
Select Create a default network. A network is created with subnets in each availability zone.
You can connect to DB clusters from both inside and outside Yandex.Cloud:
- To connect to a DB cluster from inside Yandex.Cloud, create a VM in the same network as the DB cluster (with Linux or Windows).
- To connect to a cluster from the internet, request public access to the hosts when creating the cluster.
Create a cluster
- In management console, select the folder where you want to create a cluster.
- Select Managed Service for SQL Server.
- Click Create cluster.
- Set the cluster parameters and click Create cluster. This process is described in detail in Creating clusters SQL Server.
- When the cluster is ready, its status changes to Running and its state to Alive. This may take some time.
Connect to the DB
Connect to the VM via SSH.
Install the dependencies and the
$ sudo apt update $ sudo apt install python3-pip python-is-python3 $ pip3 install mssql-cli $ source ~/.profile
Connect to a database:
$ mssql-cli -U <username> \ -d <database name> \ -S <FQDN of the host>,1433
After running the command, enter the user password to complete the connection procedure.