0
I am working on a task that requires creation of a scheduled SQL Job. I am following the documentation here: https://learn.microsoft.com/en-us/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?source=recommendations&view=sql-server-ver16
Upon trying to access the SQL Server Agent by logging into the server via SSMS, I am unable to view the Agent. Searched about this issue on the web, I came across this: https://blog.sqlauthority.com/2018/11/29/sql-server-sql-server-agent-missing-in-sql-server-management-studio-ssms/
which says that one of the possible reasons may be that the Login account connecting to SSMS is not a part of SysAdmin role in SQL Server and thus SQL Server Agent would not be visible.
I thus ran the query -
Select IS_SRVROLEMEMBER('Sysadmin')
and got the output as 0 which meant that the login was not a Sysadmin. Read further and came across this link that talks about SQL Server Agent fixed database roles: https://learn.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles?redirectedfrom=MSDN&view=sql-server-ver16.
Tried doing the following two things:
1.Creating a fresh login with sysadmin role - but unable to do so. Getting an error that I do not have permission.
- Altering role of current login to one of the three SQL Server Agent fixed database roles.
ALTER ROLE SQLAgentUserRole ADD MEMBER <login name>

Again, getting the above error. Can someone please help me on this? Am I doing the right thing? Is there something I am missing?