Backup & Restore Database with Password

 

 

 

BACKUP DATABASE MyOffice

 TO DISK = 'd:\MyOffice.bak'

 WITH NAME = 'MyOffice',

 PASSWORD = 'secret'

 

RESTORE DATABASE MyOffice FROM DISK = 'd:\MyOffice.bak' WITH PASSWORD = 'secret'