What user id is used when you use xp_cmdshell
by Julie » Tue, 16 Dec 2003 21:23:34 GMT
Dear All,
We have a requirement to copy files onto a virtual unix
drive. We will not be using DTS, instead we will use a
standard .bat command to copy the files over, and we are
doing this though SQL Server. This will be though the user
application i.e. the user presses a button which in turn
creates a file on the server, which in turn copies it onto
the virtual drive.
The users who do this will not be systems administrators.
My question is this, in the unix drive we will need to set
up users, what user should be set up on the virtual drive,
MSSQLServer, SQLExecutiveCmdExec, or SQLAgentCmdExec ?
Thanks in advance
J
Re: What user id is used when you use xp_cmdshell
by Tibor Karaszi » Tue, 16 Dec 2003 22:40:26 GMT
The user id context used is the proxy account you setup in EM, Management, Right-click Agent,
Properties, Job System.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://www.**--****.com/
Re: What user id is used when you use xp_cmdshell
by Julie » Tue, 16 Dec 2003 23:09:29 GMT
Thanks Tibor,
Thats really sweet of you.
J
in EM, Management, Right-click Agent,
oi=djq&as_ugroup=microsoft.public.sqlserver
message
user
onto
administrators.
set
drive,
Similar Threads:
1.Using xp_cmdshell by user with no sysadmin server role
2.Using xp_cmdshell to run application that uses domain credentials
I using MS SQLServer as a secure method of setting up system tasks and
processes for automated running. The intent is that all logins (ids
and passwords) are in a secure database table and are not sitting
around in batch files on the server.
Some of the tasks make use of network authentication, and this is where
the problem arises.
If I execute the command line from within SQLServer (via xp_cmdshell),
I get an error that says that the userid is missing. If I execute that
same command vid the CMD window, it works.
It appears that the shell that xp_cmdshell kicks off does not inherit
the domain authentication.
Aside from questions on why I am doing things this way as opposed to
using the windows scheduler or other tools, what do I need to do to
make sure that my domain credentials are passed?
3.Using a connection string with a User Id
I have an ASP.NET app that connects to AS2005. I would like to use a
connection string with a User Id similar to the way I would connect to
SQLServer, but I haven't been able to make this work.
The only way the app currently works for me is if I use impersonation,
but I'd rather not do this right now.
I've seen examples for connection strings that look like:
DataSource=myASserver;Catalog=myDB;Provider=msolap.3;User
Id=myId;Password=myPW;
but I haven't got it to work. Is this possible?
TIA,
Jim
4.Auditing using an application user id
I have created an Audit system, which is using triggers to saves changes to
my tables. All that works great, my problem is the user.
I my application I have an application User Id and I would actually like to
use that user in the audit system. Right now I am using the SQL user which
not is good enough, because they might not be the same as my application
user. Especially not if the application use a connection string with a sql
user, or if the data is being updated through a service.
All updates/deletes to my tables is being done through normal sql and not
through SP's and I can't change this. And if I could this would not fix the
problems with cascade deletes.
Does anybody have an idea of how I can put the user id somewhere and then
use it in the triggers?
Cheers
Henrik.
5.Using User ID to get list of allowed values
Hi,
I wish to restrict the allowed values for selection for a report parameter
based on the current user. The query is a selection from the database, I
just need to work out how I can pass the user id to the query. Users!UserID
fails in a query due to a syntax error.
ie.
SELECT
Key
,Value
FROM
Table
WHERE
UserID = Users!UserID
thanks
Matt
6. i am having trouble in creating new database using SQL CE
7. What version of SQL am I using?
8. grand total Issue when i am using Case in AS 2005