@@ -151,6 +151,8 @@ Below are example commands that run against the AdventureWorks database. Here is
151
151
152
152
[ Exclude database objects] ( #exclude-database-objects )
153
153
154
+ [ Include database object types] ( #include-database-object-types )
155
+
154
156
[ Target server version] ( #target-server-version )
155
157
156
158
[ Target server edition] ( #target-server-edition )
@@ -159,6 +161,9 @@ Below are example commands that run against the AdventureWorks database. Here is
159
161
160
162
[ Script data to a file] ( #script-data-to-a-file )
161
163
164
+
165
+
166
+
162
167
### Dump database object schema
163
168
164
169
# generate DDL scripts for all objects in the Adventureworks database and save the script to a file
@@ -193,6 +198,13 @@ Below are example commands that run against the AdventureWorks database. Here is
193
198
# generate DDL scripts for objects that do not contain 'Sale' in their name to stdout
194
199
mssql-scripter -S localhost -d AdventureWorks -U sa --exclude-objects Sale
195
200
201
+ ### Include database object types
202
+
203
+ # generate DDL scripts for stored procedures to stdout
204
+ # The list of object types is specified in the DatabaseObjectTypes Enum of Microsoft.SqlServer.Management.Smo
205
+ # https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.management.smo.databaseobjecttypes?view=sql-smo-160
206
+ mssql-scripter -S localhost -d AdventureWorks -U sa --include-types StoredProcedure
207
+
196
208
### Target server version
197
209
198
210
# specify the version of SQL Server the script will be run against
@@ -215,6 +227,7 @@ Note this example is for Linux and macOS usage.
215
227
216
228
# script all the data to a file.
217
229
mssql-scripter -S localhost -d AdventureWorks -U sa --data-only > ./adventureworks-data.sql
230
+
218
231
219
232
## Environment Variables
220
233
You can set environment variables for your connection string through the following steps:
0 commit comments