Skip to main content
Version: 4

Setting up the SQL DB

Setting up the Log and Backend databases on SQL DB comprises of the following actions:

Connect to Azure SQL Server​

  1. Launch Microsoft SQL Server Management Studio (SSMS).

  2. In the Object Explorer, click Connect → Database Engine.

  3. The Connect to Server window opens.

  4. Fill in the connection details:

    1. Server type: Database Engine

    2. Server name:

      (Example: her-sql.public.dededc70fdf0.database.windows.net,3342)

    3. Authentication: Microsoft Entra MFA (or Azure AD authentication as per your setup)

    4. User name: sqladmin (or your Azure SQL admin user)

  5. Under Connection Security:

    1. Encryption: Mandatory

    2. Leave Trust server certificate unchecked (recommended)

  6. Click Connect.

  7. Complete the MFA login if prompted.

Verify the connection​

  1. After successful login, the Object Explorer refreshes.

  2. Expand the connected server node.

  3. Expand Databases.

  4. You should see:

    1. **System Databases
      **This confirms that the connection to Azure SQL Server is successful.

Create Log and Backend DB Schemas and assign privileges​

  1. In Object Explorer, right-click on the server or a specific database (e.g., master).

  2. Click New Query.

  3. A new SQL editor window opens.

  4. Ensure the correct database is selected in the dropdown (top-left of query window), e.g.:

  5. The status bar at the bottom should show:

    1. Connected

    2. Server name

    3. Logged-in user

  6. In the query editor, run the SQL commands as shown in the following example:

    In the SQL commands above:
         rancherbackend is the Backend DB username 
         Rancher@123 is the Backend DB password
         Backend DB Schema name is derived from the Backend DB username, which is rancherbackend.

  7. Click Execute or press F5.

  8. Repeat the steps 6 and 7 for log database.

  9. Check the Messages tab for success or errors.

  10. If successful, the changes are applied to the Azure SQL Database.

Best practices to follow​

  • Always verify:

    • Correct server name and port

    • Correct authentication method

    • Correct target database

  • Use least-privilege permissions when granting access.

  • For Azure SQL, prefer Azure AD users where possible instead of SQL logins.