RE: Setuser failed?



You not answered the question. You said nothing...

i have 2 sql2005 with sp2
on the first i can use setuser 'sa' on the second can't, with the same error.
why need it?
because i use With execute as owner in procedures and i have another problme with xp_cmdshell

if i run xp_cmdshell its works, but in the SP not, i would like to try in he name of SA, i type
setuser 'sa'
exec master..xp_cmdshell 'dir c:\'
setuser

but setuser failed...

From http://www.developmentnow.com/g/116_2007_1_0_0_927529/Setuser-failed.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
.



Relevant Pages

  • Error attempting to unlock unowned resource
    ... I saw all KB to see if some query type are similar to mine, ... I couln't simply reproduce the problem without calling the first, ... exec sp_droptype N't_code' ...
    (microsoft.public.sqlserver.server)
  • Re: security based on value of X inside a table!
    ... > EXEC sp_addlogin 'UserE','E' ... > GRANT EXECUTE ON dbo.TestProc TO UserE ... > GRANT EXECUTE ON dbo.TestProc TO UserH ... > SETUSER 'UserE' ...
    (microsoft.public.sqlserver.security)
  • Re: security based on value of X inside a table!
    ... > EXEC sp_addlogin 'UserE','E' ... > GRANT EXECUTE ON dbo.TestProc TO UserE ... > GRANT EXECUTE ON dbo.TestProc TO UserH ... > SETUSER 'UserE' ...
    (microsoft.public.sqlserver.security)