The " :setvar " only works in SQL command mode, within normal SQL execution in the management studio
it throws the error > Incorrect syntax near ':' <
Now, need to change the query window to SQLCMD mode and run the query.
ie: In SSMS menu items, Query->SQLCMD mode
/*
Deployment script for master
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
:setvar DatabaseName "msdb" :setvar DSRDatabaseMailProfile "Production Hub (DSR ODS)"
No comments:
Post a Comment