How to manually backup a SQL DB
Purpose
This article documents how to manually backup a Microsoft SQL Database.
Solution
Using SQL Server Management Studio
- Open Microsoft SQL Server Management Studio (May need to be installed separately)
- Connect to the “ServerName\Instance” of the server that has the DB you want backed up.
- Expand the Databases tab to get to the DB you want to back up.
- Right click the desired DB –> Tasks –> Back Up…
- Set “Backup Type” to “Full”
- Go through the rest of the General and Options tab information to set the options to what you want.
- Click OK to start the Backup process.
Using sqlcmd
If SQL Management Studio is not installed, the Veeam database can be collected using SQLCMD:
- Check the name of the SQL instance and Veeam database in windows registry
- HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlDatabaseName
- HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlInstanceName
- HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlServerName
- Open an Administrative Command Prompt and connect to SQL instance:
SQLCMD -S (SqlServerName)\SqlInstanceName
Note: In case you have SQL server authentication enabled you may define username using ‘-U’ parameter. - Backup the Veeam database:
BACKUP DATABASE SqlDatabaseName TO DISK = ‘C:\VeeamDB.bak’ GO
- Change local languages at OS – level on Veeam server to English (it requires a server restart, so make sure that there are no jobs running);
It’s possible to perform with Control Panel > Region:
– Format > English (United States);
– Current language for non-Unicode programs > English (United States);
– Control Panel->Region and Language->Administrative->Copy Settings->check “welcome screen and system accounts”
Restart the OS;
- Open SQL Management Studio, connect to the instance where Veeam database is located.
- Then, select SQL instance – right-click – go to properties. After that, find and open Connections tab and enable following options under ‘Default connections options’ section:
ANSI_NULLS
QUOTED_IDENTIFIER
CONCAT_NULL_YIELDS_NULL
ANSI_WARNINGS
ANSI_PADDING
Additionaly, please verify that the same options are enabled in Veeam database. For that:
- Right-click on Veeam database – Properties
- Options tab – Miscellaneous
- Change the same settings to true
ANSI_NULLS
QUOTED_IDENTIFIER
CONCAT_NULL_YIELDS_NULL
ANSI_WARNINGS
ANSI_PADDING
- Actions below should change SQL Collation to required “Latin1_General_CI_AS”