Using Azure Data Studio
Connect to Azure from Azure Data Studio. Generate an ER diagram.
Source:
- Download Azure Data Studio here
- What is Azure Data Studio? here
- Quickstart docs here
- Writing T-SQL docs here
Install Azure Data Studio in Ubuntu
Download the deb
file.
Go to home and install the file (change to your exact file name)
cd ~
sudo dpkg -i ./Downloads/azuredatastudio-linux-1.40.2.deb
Output:
Selecting previously unselected package azuredatastudio.
(Reading database ... 202924 files and directories currently installed.)
Preparing to unpack .../azuredatastudio-linux-1.40.2.deb ...
Unpacking azuredatastudio (1.40.2-1671747874) ...
Setting up azuredatastudio (1.40.2-1671747874) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2)
Go to Activities
and find Azure Data Studio
Connect to a server
Create a connection to SQL Server.
Enter server name.
Select Active Directory authentication.
Enter an account. Create new. It opens a link to login with your AD account.
Generate ER diagram in Azure Data Studio
In Extensions
search for Schema Visualization
. Follow the steps to install.
Clicking on Install
opens the Github repo. Download the VSIX
file. In Data Studio, in the Extension. Go to the 3-dots menu, click Install from VSIX
, locate the file to install.
Create a database in Azure
Create a database in the Azure portal:
- Enter all basic details
- Select
Compute+Storage
asBasic
Create a schema in Azure Data Studio
In Azure Data Studio:
- Go to Connections
- Expand server/databases
- Right click on the database
- New query
Instead of using the default dbo
schema, create your own. For example my schema is called PL300
CREATE SCHEMA SchemaName;
GO
Create a table in Azure Data Studio
For example create the tables Product
and ProductSubcategory
CREATE TABLE PL300.Product
(