Execute the BACKUP DATABASE statement to create the full database backup, specifying:

  • The name of the database to back up.
  • The backup device where the full database backup is written.
declare @databaseName nvarchar(1024);
declare @FileName nvarchar(1024);

set @FileName = 'C:\BIZERBA\DbBackup\ORTOFIN_' 
+ cast(@CD_TIPO_CONFEZIONAMENTO as varchar)  
+ '_' + convert(varchar,getdate(),112)+'.bak';
select @databaseName = 'ORTOFIN' ;

backup database @databaseName to disk = @FileName;