Re: Cross database granting

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 03/05/04


Date: Fri, 5 Mar 2004 14:50:09 +0100

Creating a user in master will not increase in any way that a login's
connection will default to the master database. There already is a guest
user in master, meaning that all logins can access master.

You could enable cross database chaining ownership (whatever it is called,
there's a new security setting introduced in sp3 you need to enable - read
about it in sp3 readme) and then have the same database owner for the two
databases and the user in the app database should be able to execute
xp_cmdshell implicitly if called from a proc in the app database.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chris Buys" <chris@h-a-s.co.za> wrote in message
news:uJ11k1qAEHA.2800@tk2msftngp13.phx.gbl...
> Can I achieve the same effect without creating a user
> for the master database?  I don't want the user to inadvertently
> default to the master database.
>
> --------------------------------------
> Chris Buys
> Development
>
> HAS Software (Pty) Ltd
>
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote
in
> message news:#jJEUvqAEHA.220@TK2MSFTNGP09.phx.gbl...
> > Just create a user in the master database for your login and then grant
> EXEC
> > permissions.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> >
> >
> > "Chris Buys" <chris@h-a-s.co.za> wrote in message
> > news:e1c6jHqAEHA.1420@TK2MSFTNGP11.phx.gbl...
> > > Hi everybody.
> > >
> > > I'm using MSDE2000 and I want to use the 'xp_cmdshell' when I'm not
> > > logged in as the system administrator.
> > > This call will be implemented in a stored procedure and will call an
> > > executable
> > > on the servermachine that returns some data (not relevant to the
post).
> > >
> > > The problem is, is that I can't seem to GRANT the user I'm logging in
as
> > > the EXECUTE priviledge.  The user is not in the master database's user
> > list.
> > >
> > > Can any one please give my a code sample to establish this link?
> > >
> > > Thanks in advance
> > > Chris
> > >
> > > --------------------------------------
> > > Chris Buys
> > > Development
> > > HAS Software (Pty) Ltd
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Cluster will not fail over.
    ... Senior Database Administrator ... >> 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. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Trigger, alternative way to pass variable to trigger
    ... You don't have to execute the setUser command in the master database, ... create trigger trigger name ... to call stored procedure or execute sql commands and let it handle it the ... Pro SQL Server 2000 Database Design ...
    (microsoft.public.sqlserver.programming)
  • Re: Cross database granting
    ... enable cross-database chaining for your user database: ... > When I login as sa, ... > Chris Buys ... >> connection will default to the master database. ...
    (microsoft.public.sqlserver.programming)
  • Re: Cross database granting
    ... When I login as sa, ... > connection will default to the master database. ... > xp_cmdshell implicitly if called from a proc in the app database. ...
    (microsoft.public.sqlserver.programming)
  • RE: Refering Local DB Tables from Master Procedures
    ... Is there any way I can directly query user tables just like system tables, ... >> the master database. ... >> I granted public access to this procedure in the master database. ... >> records from syscolumn tables of that local database, ...
    (microsoft.public.sqlserver.server)

Quantcast