Computer Science Homework Solutions
Problem
#159944

Need a script that uses a cursor

I am trying to create a script that uses a cursor based on the select statement:
SELECT name, database_id FROM sys.databases

The scope of the script is to build and execute a BACKUP DATABASE statement for all of the databases identified in the SELECT name statement. I created the following backup statement:
BACKUP DATABASE model
TO DISK = 'C:DBBackupsmodel.bak'
WITH INIT

There should be a select statement included to print the value of the of the SQL variable holding the BACKUP DATABase command

Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$15.96)
Included in Download
  • Plain text response
  • Attached file(s):
    • backUpDatabases.sql
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
Browse