SQLBackupAndFTP allows you to set a connection to MSSQL Server via one of the options: Microsoft SQL Server (local) or Microsoft SQL Server (remote). This primarily affects how SQLBackupAndFTP performs backups.
Microsoft SQL Server (local)
The backup is created via the T-SQL command BACKUP DATABASE:
BACKUP DATABASE [db_name] TO DISK = "path\to\backup\folder"
Differential backups are created with the following command:
BACKUP DATABASE [db_name] TO DISK = "path\to\backup\folder" with differential
Transaction log backups are created using the following command:
BACKUP LOG [db_name] TO DISK = "path\to\backup\folder"
The restore process is performed using the command RESTORE DATABASE:
RESTORE DATABASE [db_name] FROM DISK = "path\to\backup"
BACKUP DATABASE
or RESTORE DATABASE
there.Microsoft SQL Server (remote)
For remote connection, SQLBackupAndFTP creates a logical backup in the form of a T-SQL script using SMO libraries. The script file will contain commands such as CREATE DATABASE
, CREATE TABLE
and INSERT INTO TABLE
.
This operation is similar to the operation that can be performed through SSMS: right-click on the database, then click Tasks – Generate Scripts…, with the Schema and Data option selected.
Unlike the first method, this method has several drawbacks: backup creation takes longer, significantly increases the load on the database, and there may be issues with scripting certain values (such as BLOB fields). We do not recommend using this type of connection.