Generates a series of Transact-SQL statements (script) that can be used to backup this database. Set the properties of a created Backup object as desired and pass it to the GenerateBackupSQL method.
strScript = Database.GenerateBackupSQL ( [DumpSpec :=] Backup )
HRESULT pDatabase->GenerateBackupSQL (
LPSQLOLEBACKUP pBackup,
SQLOLE_LPBSTR pstrScript );
Element | Type | Description |
---|
strScript | String | Generated Transact-SQL backup script |
Backup | Backup | Created Backup object that specifies how to execute the database backup |
To schedule this backup script, set the Task.Command property to the string returned by this method.