Azure Container Instance and SQL server part 2

In the last post we built an image of SQL server 2019 Linux hosted in Azure Container Instance for fast access to SQL server. So, your next question is probably, lets see some database action?

When you connect to SSMS its not different, the feel and look, is, SQL server. Lets have a tour.

I create a database and issue:

SELECT * FROM sys.databases

lets check the file location.

SELECT * FROM sys.sysaltfiles

The infamous /var/opt/ location, that’s nice to see.

What if you want to check the logs? I like doing this  via the Azure portal. Go to the Container Instance under containers, you will see logs.

Go to the end of the file, you will see the database creation.

Now lets stop and start the container.

What happens to the yahoo database?

Does not exist after the container instance starts back up this is because they are stateless. A better solution if you want storage to be persisted is to use SQL server in AKS – Azure Kubernetes Service via persistent volume claims. Hopefully I can get a demo on that working for everyone.

Advertisement

1 thought on “Azure Container Instance and SQL server part 2

  1. Pingback: Dew Drop – July 9, 2021 (#3481) – Morning Dew by Alvin Ashcraft

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s