SELECT * FROM sys.schemas. select s.schema_id, s.name as schema_name from sys.schemas s inner join sys.sysusers u on u.uid = s.principal_id where u.name='DataBaseUserUserName' order by s.name.

  stackoverflow.com

  www.mssqltips.com

  github.com

SELECT name FROM sys.sysusers WHERE name = 'username' The sys.server_principals system view provides information about server-level principals, including logins and server roles.

  tech.sadaalomma.com

  dba.stackexchange.com

  www.codeproject.com

  learn.microsoft.com

Schemas include default db_* , sys, information_schema and guest schemas. select s.name as schema_name, s.schema_id, u.name as schema_owner from sys.schemas s inner join sys.sysusers u.

  dataedo.com

  www.sqlteam.com

FROM sysusers. also you want to be using the sys.database_principals catalog view and not sysusers.

  www.sqlservercentral.com

Page generated - 0.348402977 (d468bcfbe5c62dee52dc90695a133490)