Using ado I use this:
VB Code:
strExecute = "BACKUP DATABASE ['database name"] " strExecute = strExecute & "TO DISK = 'path" ' " strExecute = strExecute & "WITH INIT" ', STATS " Dim AdoCmd As New ADODB.Command With AdoCmd .ActiveConnection = 'active connection .CommandType = adCmdText .CommandTimeout = 0 .CommandText = "use master" .Execute .CommandText = strExecute .Execute Set .ActiveConnection = Nothing End With Set AdoCmd = Nothing
Can it be turned to T-SQL so I could just execute it asynchronously and dont wait till it is finished backing-up the sql server database?




Reply With Quote