Saving Windows Logon to SQL Server Table

Are there any recommendations for storing Windows logins in SQL server tables (for example, the AddUser field for the audit table)? I saw tables using sysname, varchar (255), etc.

ps Sorry in advance if this has already been answered. I could not find or formulate the right query to see this.

+6
types sql-server login
source share
3 answers

Have you considered saving user SID ?

+7
source share

Does this answer your question: Maximum length of a Windows username ?

+1
source share

I do not know the standard standard, as a rule, I will see that they are stored as varchar (255), although on the systems I worked on.

0
source share

All Articles