Partager via


Web Deploy dbSqlite Provider

Applies To: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

dbSqlite

The dbSqlite provider deploys a SQLite database.

Example

msdeploy.exe -verb:dump -source:dbSqlite="Data Source=filename;Version=3;Password=password;"

The dbSqlite provider executes a SQLite script against a specified destination database, or to synchronize two SQLite databases.

Important

The dbSqlite provider uses the SQLite3.exe file to script a database or to synchronize two SQLite databases. You should either place this executable file in the %ProgramFiles%\IIS\Microsoft Web Deploy directory, or specify another location by using the following key in the registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1\SqliteDumpPath

Arguments

The dbSqlite provider accepts the following arguments.

  • The absolute file path of a SQL script file (for example, "C:\SQLitedb.sql"). Partial paths are not accepted.

  • The absolute file path of a SQL database file (for example, "C:\SQLite1.db"). Partial paths are not accepted.

  • A valid connection string to a SQLite database (for example, "Data Source=filename;Version=3;Password=Password;").

dump

In a dump operation, the path of the specified database script or database file will be returned. If you specify the -xml operation setting, the results are returned in XML format and include attribute information for the specified file.

sync

In a sync operation, the provider executes the SQLite script that you specify in the source path against the SQLite connection string that you specify for the destination, or synchronizes the SQLite databases that you specify for the source and the destination.

Provider settings

The dbSqlite provider has the following provider settings.

Setting Description

commandDelimiter

A user-defined character or string of characters that separates commands in a source SQL script that synchronizes to a destination database. This setting has no effect in a "script-out" scenario (that is, when a SQL script is the destination).

commandTimeout

An integer that specifies the time, in seconds, that Web Deploy waits for the dbSqlite provider to complete its operations. The default value is 30.

createDBConnectionString

A connection string used to create the database if it does not exist. If the destination database does not exist and no value has been specified for createDBConnectionString, dbFullSql will attempt to create it by using the connection string specified in the path.

includeData

A Boolean value that indicates whether data is scripted. True if data is scripted; otherwise, false.

includeSchema

A Boolean value that indicates whether the schema is scripted. True if the schema is scripted; otherwise, false.

removeCommandDelimiter

A Boolean value. Set removeCommandDelimiter to true if you want the delimiter specified by the commandDelimiter setting to be removed from a source SQL script before the script is run against a destination database connection. If the delimiter that you have specified is not part of the SQL language, you must remove it from the script before executing the script (for example, "GO" is not part of the SQL language). This setting has no effect in a "script-out" scenario (that is, when a SQL script is the destination). The default is true.

transacted

A Boolean value. True if all changes made to the destination database will be rolled back if an error occurs during synchronization; otherwise, false. You may need to set this option to false if your script contains full-text catalogs or other commands that cannot be transacted. The default is true.

Important
The transacted setting applies only when the script is the source of the command. It does not apply when you specify a script as the destination (that is, when the script is the output created from an existing database source).

waitAttempts

Specifies the number of times the provider will wait to retry after a failure. The default number is 5. By default, there is a delay of one second between each attempt.

waitInterval

Specifies, in milliseconds, the interval between retry attempts. The default is 1000 (one second).

Example usages

1) Display the path and attribute information of a SQLite script file.

    msdeploy -verb:dump -source:dbSqlite=c:\SqliteDb.sql -xml

2) Run the SQLite script specified by the source against the database SqliteDb2.

    msdeploy -verb:sync -source:dbSqlite="C:\SqlLiteDb.sql" -dest:dbSqlite="Data Source= C:\SQLiteDb2.db;Pooling=true;FailIfMissing=false"

3) Synchronize the SQLite1.db SQLite database file with the SQLite2.db SQLite database file.

    msdeploy -verb:sync -source:dbsqlite="C:\test.db" -dest:dbsqlite="C:\test2.db"