Default Schema Issue

  • When I have a user defined to a database with a default schema other the dbo, why does the  default schema not used to find a and unqualified table when they are in the sysadmin server role?

    User "X" is in the sysadmin role.

    Has database user "X" has a default schema set to "Default_Schema"

    There is a table in the database named Default_Schema.Test

    But when user X executes "select * from Test" I get table not found.  But when I execute "select * from Default_Schema.Test" table is found.  Basically "select * from Test" is equating to "select * from dbo.Test", which doesn't exist.  But when I remove user "X" from the sysadmin role "select * from Test" finds the table Default.Test.

    Looks like any user in the sysadmin role. 

    Gregory A. Larsen, MVP

  • This was removed by the editor as SPAM

  • Greg,

    I too facing the same problem.. Did u get any solution..

     

    Thanks in advance.

    Hari

  • No I have yet to find a solution, or a reason why this happens.

    Gregory A. Larsen, MVP

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply