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