In a VB.NET app the user has ownership of the SServer 2000 database and can see and update data. However, the user is blocked from running code with a SQLCommand.ExecuteReader line in it.
Does a user need any special security setup to run SQLCommand
In a VB.NET app the user has ownership of the SServer 2000 database and can see and update data. However, the user is blocked from running code with a SQLCommand.ExecuteReader line in it.
Does a user need any special security setup to run SQLCommand
Executing SQLCommand
Marfig
markp5511
Below is an article I ran across. I think it should explain under what security context the package executes depending upon your scenario. Once you determine the identity of account under which the DTS package is executing you can provide full permissions (for that account) to the folder where the text (import) file is located.
INF: How to Run a DTS Package as a Scheduled Job
ashleyf
Thanks for your quick answer.
The problem is with the following:
exec master.dbo.xp_cmdshell @RunPkg
where @RunPkg is a string based on the dtsrun command which imports a fixed-width text file.
The procedure works fine on our IT workstations, but cannot find either the package or the input file (I can't tell which) when run from the user's workstation. The dtsrun string by itself runs fine from the user's workstation.
We don't want to put dtsrun as a VB function because we want the server to do it, and because that would require adding Enterprise Manager services to the user's configuration.
It's not that we get an error. It's that the dtsrun doesn't operate as it should.
VTDanoKim
Could you indicate what the run time error is when you execute the command
KttocS
The only limitations would be related to whatever you are executing in the SqlCommand, not the fact that it's coming from SqlCommand. What does your CommandText look like, and what is the exact error message and call stack that you get Have you tried running Profiler on the SQL Server or checking the error log to see if any more information is available
Thanks,
Sarah
rsb_mda
Is the text file located on the workstation or a network resource From what I can determine there appears to be a security issue with respect to file access. It seems to be executing under a different identity when running from .NET, although I'm not sure at this point what it might be.
One other question, this is a VB app and not an ASP.NET app correct
tbh