targus
2007-01-13 02:28:42 UTC
I need help with setting up security permissions. I created a CLR
based stored procedure to write a file on a network share. I have
tried Execute As but can only write a file locally on the database
server filesystem so far.
I believe the process is supposed to run as if the user had logged in
using the Execute As login id. Can someone tell me if I'm way off base
here?
--This works.
exec TableToFile 'c:\temp\test.txt', 'select * from book';
--this fails
exec TableToFile '\\myservershare\temp\test.txt', 'select * from book';
--This still fails
Execute As Login = 'mydomainlogin';
exec TableToFile '\\myservershare\temp\test.txt', 'select * from book';
Revert;
Is this the right way to use the Execute As feature?
based stored procedure to write a file on a network share. I have
tried Execute As but can only write a file locally on the database
server filesystem so far.
I believe the process is supposed to run as if the user had logged in
using the Execute As login id. Can someone tell me if I'm way off base
here?
--This works.
exec TableToFile 'c:\temp\test.txt', 'select * from book';
--this fails
exec TableToFile '\\myservershare\temp\test.txt', 'select * from book';
--This still fails
Execute As Login = 'mydomainlogin';
exec TableToFile '\\myservershare\temp\test.txt', 'select * from book';
Revert;
Is this the right way to use the Execute As feature?