Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit b9b38be

Browse files
authored
Update usage_guide.md (#249)
Added information about specifying object types (### Include database object types) and where to locate the information.
1 parent 694e705 commit b9b38be

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/usage_guide.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Below are example commands that run against the AdventureWorks database. Here is
151151

152152
[Exclude database objects](#exclude-database-objects)
153153

154+
[Include database object types](#include-database-object-types)
155+
154156
[Target server version](#target-server-version)
155157

156158
[Target server edition](#target-server-edition)
@@ -159,6 +161,9 @@ Below are example commands that run against the AdventureWorks database. Here is
159161

160162
[Script data to a file](#script-data-to-a-file)
161163

164+
165+
166+
162167
### Dump database object schema
163168

164169
# 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
193198
# generate DDL scripts for objects that do not contain 'Sale' in their name to stdout
194199
mssql-scripter -S localhost -d AdventureWorks -U sa --exclude-objects Sale
195200

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+
196208
### Target server version
197209

198210
# 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.
215227

216228
# script all the data to a file.
217229
mssql-scripter -S localhost -d AdventureWorks -U sa --data-only > ./adventureworks-data.sql
230+
218231

219232
## Environment Variables
220233
You can set environment variables for your connection string through the following steps:

0 commit comments

Comments
 (0)