Skip to content

Commit

Permalink
Show how to extract an existing database
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Nov 14, 2024
1 parent d5d4565 commit 1b855df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ If you are using Visual Studio, to make files excluded from the package appear i

Wildcards are supported for all nodes (`Content`, `None`, etc.). For example, `<None Include="Directory\**" />`.


## Use an existing database

If you want to initialize your project with objects from an existing database, you can do so with the following command:

```
sqlpackage /a:Extract /p:ExtractTarget=Flat /scs:"data source=.\SQLEXPRESS;initial catalog=Chinook;Trusted_Connection=true;encrypt=False" /tf:.\Tables
```

> Note: The /tf parameter is currently required, and must refer to an non-existing folder.
## Item templates
To create database objects you can use the following item templates:

Expand Down

0 comments on commit 1b855df

Please sign in to comment.