The statement
ALTER AVAILABILITY GROUP
works in SSMS... (tsql) but when put inside a task, it says 'Cannot alter the availability group [<AGName>', because it does not exist or you do not have permission.".
the same user is running it in SSMS and also running job/package in [SQL Server Data Tools]
is there special requirements when running ALTER AG statements inside a package?
The statement simply is
USE MASTER
ALTER availability group <AGNAME> <commandDetails...>.....