Re: Alter User for domain user



David Walker (none@xxxxxxxx) writes:
I still would like for my username to have a default schema. When I
connect to the server with Windows Authentication, the default schema is
not mapped. (I used to have the dbo role, but that's not the case any
more. I know that a user with the dbo role doesn't have a default
schema.)

All users have a default schema, including dbo. But you can't change
the default schema for dbo to anything else than dbo.

I'm not really sure what your problem may be, as I don't know all your
steps. But I did a test, and I was indeed able to set up a default
schema different from dbo for a Windows login. Here is my test script:

create login [YAZORMAN\Laban] from windows
create user [YAZORMAN\Laban]
go
alter user [YAZORMAN\Laban] with DEFAULT_SCHEMA = thatschema
go
create table hyfs(a int NOT NULL)
create table thatschema.hyfs (b int NOT NULL)
GRANT SELECT ON SCHEMA::thatschema TO [YAZORMAN\Laban]
go
EXECUTE AS LOGIN = 'YAZORMAN\Laban'
go
select * from hyfs -- Lists a result set with a column b
go
REVERT



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • RE: Migrating from Win2k DCs to Win2k3 DCs; ADPrep question
    ... Windows Server 2003 CD, we need to confirm the following things in Q314649 ... Exchange 2000 Schema Changes Are Installed Before You Run the ... Windows Server 2003 adprep /forestprep Command ...
    (microsoft.public.windows.server.migration)
  • Re: upgrade a Windows 2003 DC to R2
    ... MS-KBQ293783_Cannot Upgrade Windows 2000 Server to Windows Server 2003 with ... > when doing adprep forestprep. ... > "attributeId" attribute value for objects defined in Windows 2000 schema ...
    (microsoft.public.windows.server.active_directory)
  • Re: adprep /forestprep failure
    ... We raised the functional level to Windows ... We did have another Windows 2000 Server SP 4 domain controller ... Adprep was unable to extend the schema. ... is the Schema Owner, but is deleted. ...
    (microsoft.public.windows.server.active_directory)
  • Re: 2k8 AD from 2k AD
    ... The schema update will work or not and if not you get an error message to fix the problem. ... you can restore the server from system ... if the upgrade fails you can completely ... You need to be aware that the minimum DFL for Windows ...
    (microsoft.public.windows.server.active_directory)
  • Re: Feasability
    ... you add machine accounts to groups in windows 2000 by ... extending your AD schema. ... If you will be planning on creating Server Locator Points or Management ...
    (microsoft.public.sms.admin)