Re: Little database user account script need help...



Andy (aweaver@xxxxxx) writes:
Oh, and sorry if my question was ambiguous, it was: How can I make it so
that the user can view their database in the Microsoft SQL Server
Management Studio in even though I have:

set @sql = 'DENY VIEW ANY DATABASE TO ' + QUOTENAME(@login_name)

set for them.

In this case, the users must be the owner of the databases.


ALTER AUTHORIZATION DATABASE::db TO someuser

--
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

  • Error: 18456, Severity: 14, State: 16
    ... to connect to SQL Server 2005 Express Edition from the command line. ... CreateDatabase.sql when run in Management Studio successfully creates ... the database that I require so I know the error doesn't lie there. ...
    (microsoft.public.sqlserver.connect)
  • Error when Logging on - Error: 18456, Severity: 14, State: 16
    ... to connect to SQL Server 2005 Express Edition from the command line. ... CreateDatabase.sql when run in Management Studio successfully creates ... the database that I require so I know the error doesn't lie there. ...
    (microsoft.public.sqlserver.security)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: schema compare problem
    ... mapped the system databases setting database role membership to db_owner. ... we are trying to connect to local .MDF files ... If we attach the .MDF file to SQL Server Express, ... Management Studio Express - No. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cluster will not fail over.
    ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
    (microsoft.public.sqlserver.clustering)

Loading