Can I change the default schema for NT user?

  • Hi folks,

     

    Is there a way to change the default schema of the user, connected with NT auth. on SQL2000? By default, if the user is not a member of ‘sysadmin’ role, they will be working in their own schema. If I were to connect with NT auth. for example, my default schema is ‘DOMAIN\user’. Is there a way for me to tell SQL2000 that I want to operate in, say ‘dbo’ schema by default (without adding ‘dbo’ prefix to all my queries and DDL statements)?

      

    Thanks in advance,

    -- Vladimir.

  • No, in SQL Server 2000 this is not possible. You will be able to do it in SQL Server 2005 however.

  • It's best practise to qualify objects with the schema anyway.

    If it is absolutely necessary, you could try "sp_addalias", but I can't remember how it's used (been so long...). I'm not sure if it'll do what you want.

    This is for backwards compatibility with SQL 65 behaviour before the days of roles and multiple role membership, but it's your call...

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

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