Working with Database - MS SQL Server (3): Creating a Database, Inserting Data, and Running a Query Using sqlcmd Commands

In my previous article, we learned information about SQL and NoSQL databases. Then, we prepared a development environment on AWS to run the MS SQL Server and Webserver(Apache)+PHP containers. Then, we prepared a GitHub repository for the application code. In the second article, we wrote Dockerfiles for MS SQL Server and Webserver(Apache)+PHP step by step by looking at the relevant Microsoft documents and Docker Hub pages. Then we created two Docker containers from them by using Docker Compose. We tested them by checking that they ran in the browser. In this article, we’ll create a database and add data by using sqlcmd commands. Then, we’ll run a query to return data from the inventory table. Then, we’ll test the volumes; “data” and “src” that we connected to the DB (MSSQL Server Database) container.
Finally, we’ll troubleshoot in the MS SQL Server and Containers.
We…

Cumhur Akkaya
10 min readOct 7, 2024

--

--

Cumhur Akkaya

✦ Multi-Cloud & DevOps Engineer, ✦Technical Writer, ✦AWS Community Builder, ✦LinkedInTop Voice, ✦Believes in learning by doing, ✦ linkedin.com/in/cumhurakkaya