Re: Alter User for domain user



Try:

ALTER USER [domain\username] WITH DEFAULT_SCHEMA=SchemaName

or

ALTER USER 'domain\username' WITH DEFAULT_SCHEMA=SchemaName


--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau


"David Walker" <none@xxxxxxxx> wrote in message
news:Xns9A9666B02562FDavidWalker@xxxxxxxxxxxxxxxx
SQL 2005: If I try to do this:

ALTER USER domain\username WITH DEFAULT_SCHEMA=SchemaName

I get a message that says "invalid syntax near '\'".

The syntax for ALTER USER says that the first parameter is the user name,
and according to the list of users listed in Security/Users in Management
Studio, there IS a user called "domain\username". So this command should
work!

The underlying issue is that I'm trying to assign a default schema to the
account of the individual user "domain\username". Per KB article 918346, I
have given this individual user account permissions; the permissions are
not assigned by membership in a group.

I know that "you cannot assign a default schema in SQL Server 2005 to a
Windows-authenticated set of users" (same KB article).

Can I accomplish what I am trying to do, that is, have the user "domain
\username" get a default schema assigned?

Thanks.

David Walker


.



Relevant Pages

  • Re: Need help on how to organize users and objects
    ... Yes Oracle is a bit different than Sql Server, but I think you will get the ... It doesnt become part of any schema until you assign it. ... a new developer started to work. ... need the COMMON database which stores tables with generic data and generic ...
    (microsoft.public.sqlserver.security)
  • Re: 3 Simple Security SQL Statements
    ... In SQL 2005, when you create an object, you specify the schema that the ... Kalen Delaney, SQL Server MVP ... Schema for a database role, that seems like the best setup. ... EXEC sp_addrolemember 'WebUsersRole', 'WebUser' ...
    (microsoft.public.sqlserver.security)
  • Re: Model Driven Architecture, bussiness rules in DB?
    ... authorization schema. ... neither does SQL Server. ... For instance when you grant access to a table you should be able ... accessing applications? ...
    (comp.databases.ingres)
  • Re: SQL Server to .xsd
    ... > output an XSD from an entire database schema, ... > "Val Mazur" wrote: ... >> Do you need to get schema of specific table in a SQL Server? ...
    (microsoft.public.data.ado)
  • Re: How to access SQL Server 2005 with Query Analyzer (SQL 2000)
    ... Query Analyzer does not fully support new SQL Server 2005 features. ... it does not recognize schema names in the Object Browser. ... > SQL Server databases use the concept of schemas. ...
    (microsoft.public.sqlserver.clients)