Re: Best Practice - xp_cmdshell question

smaas_at_newsgroups.nospam
Date: 11/15/04


Date: Mon, 15 Nov 2004 09:19:01 -0800

Dan,

The table is not owned by dbo - it is owned by an application account, and
the ownership has to remain, or the application will not function properly.
I'm still looking for an alternative way to write the file without using
xp_cmdshell...

"Dan Guzman" wrote:

> If the table is owned by 'dbo', you can allow the trigger to use xp_cmdshell
> without direct user execute permissions by changing your user database owner
> to 'sa' (using sp_changedbowner). With SQL 2000 SP3, you'll also need to
> enable the 'db chaining' (a.k.a. cross-database chaining) option un your
> user database. This will provide an unbroken ownership chain between your
> trigger and the xp_cmdshell extended stored procedure.
>
> Note that you should enable 'db chaining' in an sa-owned database when only
> sysadmin role members have permissions to create dbo-owned objects in that
> database.
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP



Relevant Pages

  • duplicating file structure to remote machine
    ... I need to copy all files from one redhat box to another remote box while ... maintaining appropriate ownership and permissions (perferably along with the ... user database). ...
    (comp.unix.shell)
  • duplicating file structure to remote machine
    ... I need to copy all files from one redhat box to another remote box while ... maintaining appropriate ownership and permissions (perferably along with the ... user database). ...
    (linux.redhat.misc)