Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

xp_cmdshell and system account
USE master
EXEC xp_cmdshell 'copy c:\sqldumps\pubs.dmp  \\server2\backups\sq
ldumps',
NO_OUTPUT

I run above SP but did not work ... I have the right to access server2 but
the server2 running my command use of system account that is virtual and i
cannot grant it right ... how can I specific the server running the command
use of my account or a valid account ...

Executed as user: server2\SYSTEM.



Report this thread to moderator Post Follow-up to this message
Old Post
Thanks
08-30-05 08:23 AM


Re: xp_cmdshell and system account
xp_cmdshell runs under the security context of the SQL Server service
account when executed by sysadmin role members.  For non-sysadmin users,
xp_cmdshell runs as the SQL Agent proxy account.  You can't invoke
xp_cmdshell with a account other than these.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Thanks" <Thanks@discussions.microsoft.com> wrote in message
news:3099E781-04D2-4BA3-82F4- 4FB51BDAF37E@microso
ft.com...
> USE master
> EXEC xp_cmdshell 'copy c:\sqldumps\pubs.dmp  \\server2\backups\sq
ldumps',
>   NO_OUTPUT
>
> I run above SP but did not work ... I have the right to access server2 but
> the server2 running my command use of system account that is virtual and i
> cannot grant it right ... how can I specific the server running the
> command
> use of my account or a valid account ...
>
> Executed as user: server2\SYSTEM.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Guzman
08-30-05 08:23 AM


RE: xp_cmdshell and system account
Hi

As well as Dan's comments check that the files are not currently opened by
something else.

John

"Thanks" wrote:

> USE master
> EXEC xp_cmdshell 'copy c:\sqldumps\pubs.dmp  \\server2\backups\sq
ldumps',
>    NO_OUTPUT
>
> I run above SP but did not work ... I have the right to access server2 but
> the server2 running my command use of system account that is virtual and i
> cannot grant it right ... how can I specific the server running the comman
d
> use of my account or a valid account ...
>
> Executed as user: server2\SYSTEM.
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
08-30-05 08:23 AM


Re: xp_cmdshell and system account
Thanks for your answer. Actually, I am using administrator to run the
xp_cmdshell and the same situation occur. The xp_cmdshell runs as the sql
agent proxy account but not my adminstrator account. Can I specific the sql
server running the task with my administrator account? (NT2003 server, sql2K
)

"Dan Guzman" wrote:

> xp_cmdshell runs under the security context of the SQL Server service
> account when executed by sysadmin role members.  For non-sysadmin users,
> xp_cmdshell runs as the SQL Agent proxy account.  You can't invoke
> xp_cmdshell with a account other than these.
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "Thanks" <Thanks@discussions.microsoft.com> wrote in message
> news:3099E781-04D2-4BA3-82F4- 4FB51BDAF37E@microso
ft.com... 
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Thanks
08-30-05 12:23 PM


Re: xp_cmdshell and system account
> Executed as user: server2\SYSTEM.

It looks like your SQL Server service is running under the local system
account, which does not have access to network resources.  In order for a
sysadmin role member to execute an xp_cmdshell command that uses network
resources, you'll need to run the SQL Server service under a domain account.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Thanks" <Thanks@discussions.microsoft.com> wrote in message
news:0EBCB462-22DE-4F88-AA33- E693B432C10F@microso
ft.com...
> Thanks for your answer. Actually, I am using administrator to run the
> xp_cmdshell and the same situation occur. The xp_cmdshell runs as the sql
> agent proxy account but not my adminstrator account. Can I specific the
> sql
> server running the task with my administrator account? (NT2003 server,
> sql2K)
>
> "Dan Guzman" wrote:
> 



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Guzman
08-30-05 02:23 PM


Re: xp_cmdshell and system account
Note that our SQL server is automatically started when the Win 2003 server
is started, i.e. with the user localhost\SYSTEM. We thought about setting up
a dedicated user ID to start SQL server but we are really reluctant to do
that due to a number of reasons. What else could we do?

Much appreciate if you or anyone could shed some lights.

"Dan Guzman" wrote:
 
>
> It looks like your SQL Server service is running under the local system
> account, which does not have access to network resources.  In order for a
> sysadmin role member to execute an xp_cmdshell command that uses network
> resources, you'll need to run the SQL Server service under a domain accoun
t.
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "Thanks" <Thanks@discussions.microsoft.com> wrote in message
> news:0EBCB462-22DE-4F88-AA33- E693B432C10F@microso
ft.com... 
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Thanks
08-31-05 08:23 AM


Re: xp_cmdshell and system account
Hi

Check out
http://msdn.microsoft.com/library/d.../>
ew_6k1f.asp for the rights needed by these accounts.

What are your reasons not to use one?

John

"Thanks" wrote:

> Note that our SQL server is automatically started when the Win 2003 server
> is started, i.e. with the user localhost\SYSTEM. We thought about setting 
up
> a dedicated user ID to start SQL server but we are really reluctant to do
> that due to a number of reasons. What else could we do?
>
> Much appreciate if you or anyone could shed some lights.
>
> "Dan Guzman" wrote:
> 

Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
08-31-05 08:23 AM


Re: xp_cmdshell and system account
Hi,
U need to have logon services rights on the server ur sql is running.
Or u should have administrative writes.


hope this helps u.
from
killer


Report this thread to moderator Post Follow-up to this message
Old Post
doller
08-31-05 12:23 PM


Re: xp_cmdshell and system account
You can create a domain account for your SQL Server service with the minimal
permissions needed in order to improve security.  In addition to the rights
described in the link John posted, you'll need to grant the account the
needed permissions to the share.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Thanks" <Thanks@discussions.microsoft.com> wrote in message
news:E9620924-185F-4BD1-A6EF- 039F176F0E5E@microso
ft.com...
> Note that our SQL server is automatically started when the Win 2003 server
> is started, i.e. with the user localhost\SYSTEM. We thought about setting
> up
> a dedicated user ID to start SQL server but we are really reluctant to do
> that due to a number of reasons. What else could we do?
>
> Much appreciate if you or anyone could shed some lights.
>
> "Dan Guzman" wrote:
> 



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Guzman
08-31-05 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:51 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006