I did a backup of an SQL database using this code:
/* Perform a Full Backup of dbMT*/
BACKUP DATABASE dbMT
TO DISK =N'C:\SQL_backup\dbMT.BAK'
/* Perform a Tail Log Backup of dbMT*/
BACKUP LOG dbMT
TO DISK =N'C:\SQL_backup\dbMT.TRN'
WITH COMPRESSION, NORECOVERY
After that the database was stuck in stuck in “Restoring” state. I had to run this code to release it:
RESTORE DATABASE dbMT
FROM DISK = N'C:\SQL_backup\dbMT.BAK'
How can I do the backup without this happening?