|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
User's default schemaI can query who the current user is (sp_who or select current_user) -- is
there a a way to determine their default schema? Thank you! "dev648237923" <dev648237923@noemail.noemail> wrote in message select default_schema_namenews:Ogi3SmCrGHA.4680@TK2MSFTNGP02.phx.gbl... >I can query who the current user is (sp_who or select current_user) -- is >there a a way to determine their default schema? > from sys.database_principals where principal_id = user_id() and type = 'U' David Look at sp_helpuser.
Tom Show quote "dev648237923" <dev648237923@noemail.noemail> wrote in message news:Ogi3SmCrGHA.4680@TK2MSFTNGP02.phx.gbl... >I can query who the current user is (sp_who or select current_user) -- is >there a a way to determine their default schema? > > Thank you! > Hi
How about this: SELECT default_schema_name FROM sys.database_principals WHERE name = user_name() -- Show quoteHTH Kalen Delaney, SQL Server MVP "dev648237923" <dev648237923@noemail.noemail> wrote in message news:Ogi3SmCrGHA.4680@TK2MSFTNGP02.phx.gbl... >I can query who the current user is (sp_who or select current_user) -- is >there a a way to determine their default schema? > > Thank you! > |
|||||||||||||||||||||||