I could have sworn I did this before from the sys views or data management views and found the info somewhere. Yet I cannot locate my code and maybe I just did this with extended properties in the past to find that as everywhere online I am reading that this cannot be done except by tracing object creation. Can anyone tell me how if they know can you find the user that created a procedure in TSQL in SQL server 2008 R2 or higher?
EG: I know that the sys.objects you can find the name of your object and when it was modified like so:
Select Top 10 * from sys.objects o (nolock) where type = 'V' -- View and name like '%Finance%' -- Finance in the name of the object somewhere
I know that there are two tables that have info on user accounts (I know one of the tables you used to get users from is being deprecated, not sure if it is one of these):
Select Top 10 * from sys.server_principals p (nolock) where p.type = 'U' Select top 10 * from sysusers
Is there are way to find the SID of an object of who created it or similar? I am finding 'NO' online when checking this site and others. Does anyone know?