Code Monkey home page Code Monkey logo

sqldumper's Introduction

SQLDumper GitHub Nuget Nuget

Dump your MSSQL database into file or stream using F# library or .NET CLI tool.

Using F# library

Installation

If you want to install this package manually, use usual NuGet package command

Install-Package SQLDumper

or using Paket

paket add SQLDumper

Usage

Library is rather simple:

open SQLDumper

SQLDumper.init "myconnectionstring"
|> SQLDumper.useGoStatements true // default
|> SQLDumper.statementsInTransaction 1000 // default
|> SQLDumper.rowsInStatement 100 // default
|> SQLDumper.ignoreTables ["ignore1";"ignore2"] // empty by default
|> MSSQL.dumpToFile "path/to/file.sql"

If you prefer using TextWriter from BCL, you can use MSSQL.dumpToWriter function.

Using .NET CLI tool

Installation

To install .NET tool use this command

dotnet tool install SQLDumper.Tool

Usage

Again, this CLI tool is rather simple:

USAGE:
    sqldump (-h | --help)
    sqldump <connectionstring> <outputfile> [options]

OPTIONS [options]:
    -h --help                          Shows help
    --usego <bool>                     Use GO statements [default: True]
    --statements <number>              Number of statements in transaction [default: 1000]
    --rows <number>                    Number of rows in transaction [default: 100]
    --ignore <tables>                  Tables to ignore when doing SQL dump (use comma for more tables separation)

Kudos ๐Ÿ‘

Thanks to @ArtemAvramenko for his SqlDump C# library used as reference project for this library.

sqldumper's People

Contributors

dzoukr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.