Click or drag to resize

SA0220 : Creating backups with PASSWORD or MEDIAPASSWORD option is deprecated

The topic describes the SA0220 analysis rule.

Message

Creating backups with PASSWORD or MEDIAPASSWORD option is deprecated

Description

The rule checks T-SQL code and reports usages of the deprecated BACKUP { DATABASE | LOG } WITH [MEDIA]PASSWORD option.

Beginning with SQL Server 2012 the PASSWORD and MEDIAPASSWORD options are discontinued for creating backups. It is still possible to restore backups created with passwords.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

New Rules, Deprecated Features

Additional Information
Example Test Script
SQL
1BACKUP DATABASE Northwind TO DISK='C:\Northwind.BAK' WITH MEDIAPASSWORD='mypassword'
2BACKUP DATABASE Northwind TO DISK='C:\Northwind.BAK' WITH PASSWORD='mypassword'
3
4RESTORE DATABASE Northwind FROM DISK='C:\Northwind.BAK' WITH MEDIAPASSWORD='mypassword'

Analysis Results

 MessageLineColumn
1SA0220 : Creating backups with PASSWORD or MEDIAPASSWORD option is deprecated.158
2SA0220 : Creating backups with PASSWORD or MEDIAPASSWORD option is deprecated.258
See Also

Other Resources