I have a scenario where a user can log in to SQL Server through their Windows group. The user has no login and there is no user in the database.
Then I would like to get the name of the window group through which the user gets logged in. However, Does anyone have to do this? This user will return the rows for any group (in the rows You can return all the possible groups you see with the following question: You will also return a line for sub Ogkrta be a member of another AD group that are not registered with SQL Server. You will be advertising for it. suser_sname () returns the actual user name
suser_sid () does not help me.
announcement @ user sinnee; SET @user = SUSER_SNAME (); Xc xp_logininfo @ user, 'all';
permission path column will have zero-value) but this will be your own username (my case
permission path for that line). Can:
SELECT * master.sys.server_principals WHERE type = 'g'; - type_desc = 'WINDOWS_GROUP'
No comments:
Post a Comment