Q&A for administrators and users of the CiviCRM Constituent Relationship Management software
SELECT [object] = o.name, [column] = c.name FROM sys.columns AS c INNER JOIN sys.objects AS o ON c.[object_id] = o.[object_id] WHERE c.name LIKE '%UserId';