After You Install > Post-installation Tasks > RestoreDatabase

RestoreDatabase

This task does not occur during the installation process. To restore a backup database (*.bak), you must perform this task. You can choose to overwrite the existing database and replace it with the backup copy.

Option

Description

BackupFile

Enter the name of the *.bak file. The backup database file and path must be on the SQL Server instance where the database is restored.

ConnectString

Enter the connection string for the SQL Server instance where the database is restored.

Server=<server machine>\<server instance name>;integrated security=sspi;database=<database name>

Server=MYMACHINE\MSSQLSERVER;integrated security=sspi;database=BBInfinity

A Microsoft article about connection strings for SQL Server in .NET: SqlConnection.ConnectionString Property

DatabaseName

Enter the name of the database to restore database on the SQL Server instance.

DataPath

Enter the location to restore the data files on the SQL Server instance. If you do not enter a path, the default is used.

LogPath

Enter the location to restore the log files on the SQL Server instance. If you do not enter a path, the default is used.

OverWriteExistingDB

Select whether to overwrite an existing database with the same name on the SQL Server instance. If you select “True” and a database with the same name exists, the task closes all existing connections and drops the database. If you select “False” and a database with the same name exists, the task fails with a standard SQL exception.