October 6, 2017 at 12:08 pm
Hi
Sorry a bit new to T-SQL!
I have the following store procedure
EXECUTE sp_sqlbackup @Databases = 'all', @URL = 'https://storage.blob.core.windows.net/sqlbackup', @Credential = 'Backup', @Backup = 'FULL'
I would like to execute with variable for @URL, so instead of having @URL = 'https://storage.blob.core.windows.net/sqlbackup' having something of the lines of
variable = 'https://storage.blob.core.windows.net/sqlbackup'
EXECUTE sp_sqlbackup @Databases = 'all', @URL = variable, @Credential = 'Backup', @Backup = 'FULL'
Can this be done?
Regards
October 6, 2017 at 12:15 pm
Raxso1 - Friday, October 6, 2017 12:08 PMHi
Sorry a bit new to T-SQL!I have the following store procedure
EXECUTE sp_sqlbackup @Databases = 'all', @URL = 'https://storage.blob.core.windows.net/sqlbackup', @Credential = 'Backup', @Backup = 'FULL'I would like to execute with variable for @URL, so instead of having @URL = 'https://storage.blob.core.windows.net/sqlbackup' having something of the lines of
variable = 'https://storage.blob.core.windows.net/sqlbackup'
EXECUTE sp_sqlbackup @Databases = 'all', @URL = variable, @Credential = 'Backup', @Backup = 'FULL'Can this be done?
Regards
Sure it can.DECLARE @URL1 varchar(200) = 'https://storage.blob.core.windows.net/sqlbackup'
EXECUTE sp_sqlbackup @Databases = 'all', @URL = @URL1, @Credential = 'Backup', @Backup = 'FULL'
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply