SqlDump.Sources
1.4.0
dotnet add package SqlDump.Sources --version 1.4.0
NuGet\Install-Package SqlDump.Sources -Version 1.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SqlDump.Sources" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SqlDump.Sources --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SqlDump.Sources, 1.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SqlDump.Sources as a Cake Addin #addin nuget:?package=SqlDump.Sources&version=1.4.0 // Install SqlDump.Sources as a Cake Tool #tool nuget:?package=SqlDump.Sources&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SqlDump
Simple SQL Server database dumper. Shipped as source-only NuGet package.
Installing
- Package Manager:
Install-Package SqlDump.Sources
- .NET command line:
dotnet add package SqlDump.Sources
Example
private void GenerateBackupScript(string connectionString, string outputFile)
{
var dumper = new SqlDumper.Dumper(connectionString);
dumper.IgnoredTableNames = new[] { "__EFMigrationsHistory", "sysdiagrams" };
using (var writer = File.CreateText(outputFile))
{
dumper.Dump(writer);
}
}
See result
Lecacy System.Data.SqlClient
Add SQL_CLIENT_LEGACY to project defines.
ProgressChanged event
dumper.ProgressChanged += (sender, e) =>
{
if (e.RowsDumped == 0)
{
logWriter.WriteLine($"Dumping {e.SchemaName}.{e.TableName}...");
}
if (e.RowsDumped > 0 && (e.IsCompleted || e.RowsDumped % 10000 == 0))
{
logWriter.WriteLine($"{e.RowsDumped} rows dumped...");
}
if (e.IsCompleted)
{
logWriter.WriteLine($"The table {e.SchemaName}.{e.TableName} has been dumped");
}
};
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.