Using below query we will get the SQL Server user id, user name, system user, session user, current user, user and server name.
SQL Server Code:
SQL Server Code:
select USER_ID() as [User Id], USER_NAME() as [User Name], SYSTEM_USER as [System user], SESSION_USER as [Session user], CURRENT_USER as [current user], USER as [User], SUSER_SID() as [suser sid], HOST_NAME() as [Server Name]
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.