Domanda

Can we limit the number of users (For ex. 5) for a particular login Or Is there anyway to restrict the particular User using POLICY MANAGEMENT in SQL SERVER?

Please kindly help me to implement this.

È stato utile?

Soluzione

Don't think it could be done with PBM, but you can solve this by creating a logon trigger, and in the trigger do a quick query on sys.dm_exec_sessions, counting sessions with the original_login_name same as suser_sname().

Beware that an error in login trigger could prevent all logins and render the instance unaccessible. To fix this, start the service in single user mode (-m).

Hope it helps.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top