You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,19 +34,21 @@ This template references an image that was [pre-built](https://containers.dev/im
34
34
35
35
## Using this template
36
36
37
-
This template creates two containers: Python and Microsoft SQL Server. You will be connected to the Ubuntu or Debian container, and from within that container the MS SQL container will be available on **`localhost`** port 1433. The Python container also includes supporting scripts in the `.devcontainer/mssql` folder used to configure the database.
37
+
This template creates two containers: Python and MS SQL Server. After running the template, Python container will be the main connected development container and from within that container the MS SQL Server container will be available on **`db`** port 1433. By default, the `sa` user password is `P@ssw0rd`. All database parameters may be changed in `.devcontainer/docker-compose.yml` file if desired.
38
38
39
-
The MS SQL container is deployed from the latest developer edition of Microsoft SQL 2022. The database(s) are made available directly in the Codespace/VS Code through the MSSQL extension with a connection labeled "db-data-model". The default `sa` user password is set to `P@ssw0rd`. The default SQL port is mapped to port `1433` in `.devcontainer/docker-compose.yml`.
39
+
You also can connect to MS SQL Server from an external tool when connected to the Dev Container from a local tool by updating `.devcontainer/devcontainer.json` as follows:
40
40
41
-
#### Changing the sa password
41
+
```json
42
+
"forwardPorts": [ "1432" ]
43
+
```
42
44
43
-
To change the `sa` user password, change the value in `.devcontainer/docker-compose.yml` and `.devcontainer/devcontainer.json`.
45
+
You can also easily use the [SQL Server extension](https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql) to connect to the database or any Azure databases from VS Code.
44
46
45
-
#### Database deployment
47
+
Once the MS SQL Server container has port forwarding enabled, it will be accessible from the Host machine at `localhost:1433`.
46
48
47
-
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.*
49
+
### Changing the sa password
48
50
49
-
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.*
51
+
To change the `sa` user password, change the value in `.devcontainer/docker-compose.yml` and `.devcontainer/devcontainer.json`.
50
52
51
53
### Adding other services
52
54
@@ -63,3 +65,9 @@ Before start working with MS SQL Server locally, you will need to connect to the
63
65
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:
64
66
65
67

68
+
69
+
### Database deployment
70
+
71
+
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.*
72
+
73
+
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.*
Copy file name to clipboardExpand all lines: src/python-mssql/README.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,19 +16,21 @@ This template references an image that was [pre-built](https://containers.dev/im
16
16
17
17
## Using this template
18
18
19
-
This template creates two containers: Python and Microsoft SQL Server. You will be connected to the Ubuntu or Debian container, and from within that container the MS SQL container will be available on **`localhost`** port 1433. The Python container also includes supporting scripts in the `.devcontainer/mssql` folder used to configure the database.
19
+
This template creates two containers: Python and MS SQL Server. After running the template, Python container will be the main connected development container and from within that container the MS SQL Server container will be available on **`db`** port 1433. By default, the `sa` user password is `P@ssw0rd`. All database parameters may be changed in `.devcontainer/docker-compose.yml` file if desired.
20
20
21
-
The MS SQL container is deployed from the latest developer edition of Microsoft SQL 2022. The database(s) are made available directly in the Codespace/VS Code through the MSSQL extension with a connection labeled "db-data-model". The default `sa` user password is set to `P@ssw0rd`. The default SQL port is mapped to port `1433` in `.devcontainer/docker-compose.yml`.
21
+
You also can connect to MS SQL Server from an external tool when connected to the Dev Container from a local tool by updating `.devcontainer/devcontainer.json` as follows:
22
22
23
-
#### Changing the sa password
23
+
```json
24
+
"forwardPorts": [ "1432" ]
25
+
```
24
26
25
-
To change the `sa` user password, change the value in `.devcontainer/docker-compose.yml` and `.devcontainer/devcontainer.json`.
27
+
You can also easily use the [SQL Server extension](https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql) to connect to the database or any Azure databases from VS Code.
26
28
27
-
#### Database deployment
29
+
Once the MS SQL Server container has port forwarding enabled, it will be accessible from the Host machine at `localhost:1433`.
28
30
29
-
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.*
31
+
### Changing the sa password
30
32
31
-
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.*
33
+
To change the `sa` user password, change the value in `.devcontainer/docker-compose.yml` and `.devcontainer/devcontainer.json`.
32
34
33
35
### Adding other services
34
36
@@ -44,4 +46,10 @@ network_mode: service:db
44
46
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.
45
47
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:
46
48
47
-

49
+

50
+
51
+
### Database deployment
52
+
53
+
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.*
54
+
55
+
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.*
Copy file name to clipboardExpand all lines: src/python-mssql/devcontainer-template.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"id": "python-mssql",
3
3
"version": "1.0.0",
4
4
"name": "Python 3 & Microsoft Sql Server",
5
-
"description": "Develop Python 3 applications with Microsoft Sql Server",
5
+
"description": "Develop Python based applications with all required components to interact with MS SQL Server locally and in Azure. Includes all needed SDKs, extensions, dependencies and an MS SQL container for parallel database development. Adds an additional MS SQL container to Python container definition and deploys any .dacpac files from the mssql .devcontainer folder.",
0 commit comments