AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/persistence/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Operational Scripting

Component:
Sql Persistence

In order to generate database scripts outside of a build process, use the NServiceBus.Persistence.Sql.CommandLine command prompt tool developed for this purpose.

The tool can be downloaded from NuGet and installed using the following command:

dotnet tool install -g NServiceBus.Persistence.Sql.CommandLine

Once installed, the sql-persistence command line tool will be available for use.

sql-persistence <command> [options]

Available commands

This tool currently has one command.

  • script

sql-persistence script

Generates scripts required to setup a database for an NServiceBus endpoint:

sql-persistence script <assembly>
                              [--output-dir]
                              [--clean]
                              [--overwrite]
                              [--dialect]
                              [--verbose]

Options

-o=<path> | --output-dir=<path> : Path to the output directory. If not specified, the current directory will be used.

--clean : Removes existing files in the output directory

--overwrite: Overwrites existing files in the output if they match the files to be generated

--dialect=<value>: Specifies a dialect to generate. Allowed values are: SqlServer, MySql, Oracle, PostgreSql

--verbose: Verbose logging