Skip to content

Commit a61590b

Browse files
committed
Update NOTES.md
1 parent f3d3b9f commit a61590b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/python-mssql/NOTES.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
This template references an image that was [pre-built](https://containers.dev/implementors/reference/#prebuilding) to automatically include needed devcontainer.json metadata.
33

4-
* **Image**: mcr.microsoft.com/devcontainers/dotnet ([source](https://github.com/devcontainers/images/tree/main/src/dotnet))
5-
* **Applies devcontainer.json contents from image**: Yes ([source](https://github.com/devcontainers/images/blob/main/src/dotnet/.devcontainer/devcontainer.json))
4+
* **Images**: mcr.microsoft.com/azure-sql-edge && mcr.microsoft.com/vscode/devcontainers/python
5+
* **Applies devcontainer.json contents from image**: Yes ([source](https://github.com/Azure-Samples//blob/main/src/python-mssql/.devcontainer/devcontainer.json))
66

77
## Using this template
88

@@ -18,6 +18,10 @@ You can also easily use the [SQL Server extension](https://marketplace.visualstu
1818

1919
Once the MS SQL Server container has port forwarding enabled, it will be accessible from the Host machine at `localhost:1433`.
2020

21+
### Changing the sa password
22+
23+
To change the `sa` user password, change the value in `.devcontainer/docker-compose.yml` and `.devcontainer/devcontainer.json`.
24+
2125
### Adding other services
2226

2327
You can add other services to your `.devcontainer/docker-compose.yml` file [as described in Docker's documentation](https://docs.docker.com/compose/compose-file/#service-configuration-reference). However, if you want anything running in this service to be available in the container on localhost, or want to forward the service locally, be sure to add this line to the service config:
@@ -32,4 +36,10 @@ network_mode: service:db
3236
Before start working with MS SQL Server locally, you will need to connect to the local MS SQL Server instance using MS SQL Server extension.
3337
Use **`db`** as a server name and **`sa`** as a user name. The password is **`P@ssw0rd`** by default. Once entered the password, you will be prompted to enable trust server certificate as below:
3438

35-
![Trust Server Certificate](images/trust.png)
39+
![Trust Server Certificate](images/trust.png)
40+
41+
### Database deployment
42+
43+
By default, a blank user database is created titled "ApplicationDB". To add additional database objects or data through T-SQL during Codespace configuration, edit the file `.devcontainer/mssql/setup.sql` or place additional `.sql` files in the `.devcontainer/mssql/` folder. *Large numbers of scripts may take a few minutes following container creation to complete, even when the SQL server is available the database(s) may not be available yet.*
44+
45+
Alternatively, .dacpac files placed in the `./bin/Debug` folder will be published as databases in the container during Codespace configuration. [SqlPackage](https://docs.microsoft.com/sql/tools/sqlpackage) is used to deploy a database schema from a data-tier application file (dacpac), allowing you to bring your application's database structures into the dev container easily. *The publish process may take a few minutes following container creation to complete, even when the server is available the database(s) may not be available yet.*

0 commit comments

Comments
 (0)