Backing Up a SQL Server Database Directly Onto a Remote Server

The below statement tells the SQL Server that once the backup of first database is complete proceed with the second and so on. This procedure continues until we have reached the last database present in the sysdatabases table in the master database.

FETCH NEXT FROM DATABASE_BACKUP INTO @Name
END

The next statement tells the SQL Server to release the row set.

CLOSE DATABASE_BACKUP

The below statement releases the resources asociated with the cursor.

DEALLOCATE DATABASE_BACKUP

If there are any suggestions for improvement please leave a comment or contact me directly at singhsatnam84@yahoo.com.

]]>

Leave a comment

Your email address will not be published.