BlitzSqlExtract2SeedData 1.1.2

Install-Package BlitzSqlExtract2SeedData -Version 1.1.2
dotnet add package BlitzSqlExtract2SeedData --version 1.1.2
<PackageReference Include="BlitzSqlExtract2SeedData" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlitzSqlExtract2SeedData --version 1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlitzSqlExtract2SeedData, 1.1.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlitzSqlExtract2SeedData as a Cake Addin
#addin nuget:?package=BlitzSqlExtract2SeedData&version=1.1.2

// Install BlitzSqlExtract2SeedData as a Cake Tool
#tool nuget:?package=BlitzSqlExtract2SeedData&version=1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


An update to a little utility to extract tables in SQL Server to SQL Files for Seed Data

.NET Core 3.1 Runtime or SDK Required


BlitzSqlExtract2SeedData 1.1.2 Copyright (c) 2020 Blitzkrieg Software

-v, --verbose Set output to verbose messages.

-c, --connectstring Required. Connection String

-t, --table Required. SQL Table To Extract Data From

-o, --orderby (optional) Order By Clause in the form of "order by column1, column2"

-w, --where (optional) Where Clausein the form of "where (column1 = 3)"

-n, --ntop (optional) Top N Rows

-a, --ascsv (optional) Emit CSV instead

--help Display this help screen.

--version Display version information.

Pro Tip: please use quotes around strings like table names, clauses, etc.

Sample Command

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product"

Table notation

Tables can be in the form of:

  • table[dbo].[table]

  • [table][dbo].[table]

  • schema.table[schema].[table]

  • [schema].[table][schema].[table]

  • "table"[dbo].[table]

  • "[table]"[dbo].[table]

  • "schema.table"[schema].[table]

  • "[schema].[table]"[schema].[table]

Where and Order By

You can use where and/or order by clauses, just like you would do in SQL server.

Please supply full valid sql clauses such as:

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product" -w "Where [IsActive] = 1" -o "Order By [CustomerId]"

Top Modifier

By default, all rows are returned. If -n is specified a Top N clause is added, the rows returned are controlled by the where and order by clauses if supplied, and will be returned in "natural" order otherwise.

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product" -n 20


BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product" -w "Where [IsActive] = 1" -o "Order By [CustomerId]" -n 100


Using the flag -a will create a CSV file with TAB delimiters, instead of a seed data SQL Script.

To open it in Excel or Open Office, use the file, open mechanism so that you will be given a chance to set the settings in the text import wizard:

  • Field Delimiter (Tab \t)
  • Row Delimiter (CRLF \r\n)

About Me

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.2 193 12/28/2020

Updated for the latest versions of Microsoft SQL Server