Skip to content
Ladislau Molnar edited this page Jan 14, 2017 · 6 revisions

To see a help page run:
BitcoinDatabaseGenerator /?

Usage:  BitcoinDatabaseGenerator
        [/?] | [<transfer-options>] |
        [/ShowDbSchema] | [<auto-validation-options>]

<transfer-options>:
        /BlockchainPath path
        [/SqlServerName sql_server_name] /SqlDbName db_name
        [/SqlUserName user_name /SqlPassword pwd]
        [/Threads number_of_threads] [/DropDb]

<auto-validation-options>:
        /RunValidation
        [/SqlServerName sql_server_name] /SqlDbName db_name
        [/SqlUserName user_name /SqlPassword pwd]

/?               Displays this help page.
/BlockchainPath  Specifies the path to the folder where the
                 Bitcoin Core blockchain files are stored.
/SqlServerName   Specifies the name of the SQL Server.
                 Default value: localhost
/SqlDbName       Specifies the name of a SQL Server database.
/SqlUserName     Specifies the SQL Server user name.
/SqlPassword     Specifies the SQL Server user password.
                 When the SQL server user name and password are not
                 specified, Windows Authentication is used.
/Threads         Specifies the number of background threads.
                 Default value: the number of logical processors on your
                 system.
                 The valid range is [1-100].
/BlockId         Specifies the value that will be used to check against
                 the BlockId of each block when parsing the blockchain.
                 Useful when the blockchain is generated on a test net
                 where the Block Id has a value different than the
                 default one.
                 Default value: 0xD9B4BEF9
/DropDb          When specified the database will be dropped and recreated
                 before the blockchain transfer is executed.
/ShowDbSchema    When specified the database schema will be displayed.
                 You may want to use the command line redirect syntax in
                 order to redirect the output to a file:
                 BitcoinDatabaseGenerator /ShowDbSchema > schema.txt
                 or the pipe syntax to copy the output to the clipboard:
                 BitcoinDatabaseGenerator /ShowDbSchema | clip
/RunValidation   Runs the application in auto-validation mode.
                 Reserved for development.
                 If you are a developer and make changes to the sources,
                 in addition to the available test automation, you can run
                 the application in auto-validation mode.
                 The application will run certain queries over an existing
                 database, save the results to temporary data files and
                 compare their content against built-in baselines.
                 This test is based on the fact that data once in the
                 blockchain should never change. The built-in baseline data
                 may be updated in future versions as the blockchain grows.

The tool will also work when you do not have access to the SQL Server at a
level needed to create a new database. If you have write access to a new empty
database, the tool will be able to setup the schema and execute the data
transfer using that database.

Clone this wiki locally