SmartRestore (SQL Server only)

[path]SmartRestore SqlServer=<sqlServerName> DatabaseName=<databaseName> User=<userName> Password=<password>  Action=<action> RestoreNumber=<restoreNumber>

Example

This example uses SmartRestore to restore the SmartBatch database:

c:\ProgramFiles\SmartBatch\bin\SmartRestore.exe sqlServer=otwc\SmartBatch databaseName=SmartBatch user=sa password=sa action=restore restoreNumber=6

To determine the restoreNumber run SmartRestore with action=listonly.  The information in the backup will be written to the console.

[path]

SmartRestore is a program that is installed when you install SmartBatch. You need to specify the full path to the program to run it successfully or have it in your search path. For example:

c:\Program Files\SmartBatch\bin\SmartRestore.exe

You can set a search path for executable files using environmental variables. Refer to Windows documentation for information about paths and environmental variables.

SqlServer

Indicates the name of the SQL Server to use for the backup.

Database Name

The name of the database for the backup.

User

The SQL Server user to use to connect to the SQL Server.

Password

The password associated with the user to use when connecting to the SQL Server.

Action

Must be one of the following values:

listonly

Runs the SmartRestore program and tells it to list the backups in the backup file.  A backup file can contain many backups.  The backups are maintained until their retention date has passed.  SQL Server will automatically remove the backup from the file once the retention date has passed.

restore

Restores the backup to the database specified.  The backup number must be specified in the RestoreNumber parameter.

Restore Number

A number that represents a backup within the backup file.  Run the SmartRestore program with action=listonly to obtain a list of backups that exist within the backup file.