MultiCloud Classroom notes 29/Sep/2026

Azure sql database

refer here for sql database creation

watch class recording and create sql server & database

steps to access sql db

  1. db visulizer select azure sql db
  2. allow/create firewall rule allow you network ip address (ClientIPAddress)
  3. connect db use endpoint <qtdevops2205/sql server name>.database.windows.net

run below query

-- Create database
CREATE DATABASE demo;

-- Select the database
USE demo;

-- Create table
CREATE TABLE employees (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    department VARCHAR(100),
    salary DECIMAL(10,2)
);

-- Insert sample data
INSERT INTO employees (id, name, department, salary)
VALUES
    (1, 'Ram', 'Engineering', 75000.00),
    (2, 'John', 'Finance', 65000.00),
    (3, 'Anita', 'Engineering', 80000.00),
    (4, 'David', 'HR', 55000.00);

-- View the data
SELECT * FROM employees;

SQLManagedInstance vs SQL logical servers

keypoints:

  • SQL logical servers
    • managed by azure (serverless compute)
    • it will provide DNS to connect from anywhere *.database.windows.net
    • name of server is gobal unique
    • upgrade will take care by azure
  • SQLManagedInstance
    • it is created a instance (vm) and manged by Us.
    • it is managed and upgrade by us
    • manual upgrade is required
    • free-sql-mi-8031232.public.57f61c0be053.database.windows.net,3342

after create db connect from db visulizer or vscode and use auth microsoft MFA

Task:

  1. create both SQL logical servers & SQLManagedInstance
  2. create database in both above servers
  3. conect using password & entra id
  4. run above sql query
-- Create user
CREATE USER 'demo_user'@'localhost'
IDENTIFIED BY 'Password@123';

-- Give SELECT access to only the employees table
GRANT SELECT ON demo.employees
TO 'demo_user'@'localhost';

-- Check permissions
SHOW GRANTS FOR 'demo_user'@'localhost';

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%