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

Update usage_guide.md include object type example #249

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/usage_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ Below are example commands that run against the AdventureWorks database. Here is

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

[Include database object types](#include-database-object-types)

[Target server version](#target-server-version)

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

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




### Dump database object schema

# generate DDL scripts for all objects in the Adventureworks database and save the script to a file
Expand Down Expand Up @@ -193,6 +198,13 @@ Below are example commands that run against the AdventureWorks database. Here is
# generate DDL scripts for objects that do not contain 'Sale' in their name to stdout
mssql-scripter -S localhost -d AdventureWorks -U sa --exclude-objects Sale

### Include database object types

# generate DDL scripts for stored procedures to stdout
# The list of object types is specified in the DatabaseObjectTypes Enum of Microsoft.SqlServer.Management.Smo
# https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.management.smo.databaseobjecttypes?view=sql-smo-160
mssql-scripter -S localhost -d AdventureWorks -U sa --include-types StoredProcedure

### Target server version

# specify the version of SQL Server the script will be run against
Expand All @@ -215,6 +227,7 @@ Note this example is for Linux and macOS usage.

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


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