execute the stored procedure sp_helpuser, for example
sp_helpuser 'domainname\username'
One of the resulting columns is DefSchemaName.
There is a similar proc sp_helpgroup to show the users in a group but does not include schema information.
Another way to get the schema information is
select name, default_schema_namefrom sys.database_principals uwhere u.name='username'
No comments:
Post a Comment