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

Commit 6bf25d8

Browse files
author
Tara Raj
authored
Added in run and cloud shell support
1 parent 1fbbd9c commit 6bf25d8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

doc/documentation_page.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Get Started with mssql-scripter
22

3-
mssql-scripter is the multiplatform command line equivalent of the widely used Generate Scripts Wizard experience in SSMS.
3+
mssql-scripter is the command line equivalent of the widely used Generate Scripts Wizard experience in SSMS.
44

5-
You can use mssql-scripter on Linux, macOS, and Windows to generate data definition language (DDL) and data manipulation language (DML) T-SQL scripts for database objects in SQL Server running anywhere, Azure SQL Database, and Azure SQL Data Warehouse. You can save the generated T-SQL script to a .sql file or pipe it to standard *nix utilities (for example, sed, awk, grep) for further transformations. You can edit the generated script or check it into source control and subsequently execute the script in your existing SQL database deployment processes and DevOps pipelines with standard multiplatform SQL command line tools such as sqlcmd.
5+
You can use mssql-scripter on Linux, macOS, Windows, and the Azure Cloud Shell to generate data definition language (DDL) and data manipulation language (DML) T-SQL scripts for database objects in SQL Server running anywhere, Azure SQL Database, and Azure SQL Data Warehouse. You can save the generated T-SQL script to a .sql file or pipe it to standard *nix utilities (for example, sed, awk, grep) for further transformations. You can edit the generated script or check it into source control and subsequently execute the script in your existing SQL database deployment processes and DevOps pipelines with standard multiplatform SQL command line tools such as sqlcmd.
66

77
## Install
88

@@ -82,11 +82,19 @@ You can set environment variables for your connection string through the followi
8282
export MSSQL_SCRIPTER_PASSWORD='ABC123'
8383
mssql-scripter -S localhost -d AdventureWorks -U sa
8484

85-
## Run your scripts using sqlcmd
86-
Now that you have generated a script for your database objects, you can execute the script using sqlcmd such as in the example below.
85+
## Generate and run scripts
86+
In this example you will generate a script, send it to a file, and execute the script.
8787

88+
Generate a script and send it to a file using mssql-scripter.
8889
# script all the data to a file.
8990
mssql-scripter -S localhost -d AdventureWorks -U sa --data-only > ./adventureworks-data.sql
91+
92+
Now that you have generated a script for your database objects, you can execute the script using sqlcmd such as in the example below.
93+
94+
# execute the script from the file.
9095
sqlcmd -S localhost -d AdventureWorks -U sa -i`./adventureworks-data.sql
9196

9297
You can find more details on using sqlcmd [here](https://docs.microsoft.com/en-us/sql/relational-databases/scripting/sqlcmd-use-the-utility).
98+
99+
## Use mssql-scripter in the Cloud Shell
100+
You can use mssql-scripter in the Azure Cloud Shell to generate scripter for Azure SQL DB, Azure SQL DW, and SQL Server instances in Azure VMs. [Connect to the Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/overview?view=azure-cli-latest). Once connected, you can use mssql-scripter in the terminal as you would in a local terminal.

0 commit comments

Comments
 (0)