sqldatadump

command module
v0.0.0-...-9211f3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 11 Imported by: 0

README

sqldatadump

Docs Version

sqldatadump generates insert statements with data for tables in a provided SQL Server database.

Documentation

See the docs here.

Install

go install github.com/cbergoon/sqldatadump

Example Usage

USAGE: Usage: sqldatadump [--directory] [--schema=<schema>] [--batchesPerFile=<batches>] [--rowsPerBatch=<rows>] <username>:<password>@<address>:<port>/<database>

To generate insert statements in a directory called table-data for tables in the dbo schema of the AdventureWorks database with 10 batches per file and 1000 records per batch:

$ sqldatadump --directory=./table-data --schema=dbo --rowsPerBatch=1000 --batchesPerFile=10 --ignoreTables=CarrierRef,MasterLocation '<username>:<password>@127.0.0.1:1433/AdventureWorks'

To use windows authentication:

$ sqldatadump --directory=./table-data --schema=dbo --rowsPerBatch=1000 --batchesPerFile=10 --ignoreTables=CarrierRef,MasterLocation '<domain>\<username>:<password>@127.0.0.1:1433/AdventureWorks'

License

This project is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL