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.

Pages: 1 2




Array

No comments yet... Be the first to leave a reply!