Hi, I am trying to resize the oplog and increase the min retention hrs of my Atlas cluster (M30) via db.adminCommand in the mongosh shell, but am receiving MongoServerError: not authorized on admin to execute command... . The user I’m connecting with has the ‘atlasAdmin’ and ‘dbAdminAnyDatabase’ roles.
I have also attempted to grant the ‘clusterAdmin’ role to the user via db.grantRolesToUser but receive the same authorization error.
Any help in achieving the aim of reconfiguring the oplog settings would be much appreciated, thanks.
You may be running the command on admin db
oplog is a collection under local db
You have to switch to local db
Also there are unsupported commands on Atlas clusters
Check mongo documentation