1

Topic: xp_cmdshell proxy account

Hello.
Faced for itself not clear situation at stored procedure performance.
Initial data:
There is a DB "ERP" in which there is a stored procedure p_update_work in it there is a call xp_cmdshell
I open SSMS, I write:

use erp
go
exec p_update_work

All fulfills on hurrah!
Now I do a copy of DB ERP in ERP_TEST
I open SSMS, I write:

use erp_test
go
exec p_update_work

Also I receive in the answer:
Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1
The xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the ' ##xp_cmdshell_proxy_account## ' credential exists and contains valid information.
I understand, what a problem in the rights, prompt where to look?

2

Re: xp_cmdshell proxy account

MAULER;
Help to read on xp_cmdshell, instead of to guess. You the administrator, at you other conditions of performance.

3

Re: xp_cmdshell proxy account

If in a copy does not work, not the administrator, probably. A copy on what server?

4

Re: xp_cmdshell proxy account

Vladislav Kolosov;
So I the same administrator also launch  from basis-copy. From the point of view of the security account exchanged nothing.

5

Re: xp_cmdshell proxy account

Kolosov wrote:

If in a copy does not work, not the administrator, probably. A copy on what server?

Copy on the same server. On the same  ( unique)

6

Re: xp_cmdshell proxy account

MAULER;
Unique explanation which I find that you are connected to bases under different logins. One , the second - not .

7

Re: xp_cmdshell proxy account

Vladislav Kolosov;
Yes login same. I even do not ungear the console.

8

Re: xp_cmdshell proxy account

MAULER wrote:

Vladislav Kolosov;
So I the same administrator also launch  from basis-copy. From the point of view of the security account exchanged nothing.

And let's up, the colleague.

Use master
EXEC sp_helpsrvrolemember ' sysadmin'
select suser_name (), user_name ()

9

Re: xp_cmdshell proxy account

Well interpose into this procedure select system_user, user
(Into place xp_cmdshell)
Launch and check up, same or not

10

Re: xp_cmdshell proxy account

Can there still what  type WITH EXECUTE AS DBO it is registered?
And the basis was c, and at  it, certainly, flied?

11

Re: xp_cmdshell proxy account

_ wrote:

it is pure pro forma: "print @@ version" in studio
ERP and ERP_TEST on one server?
"##xp_cmdshell_proxy_account##" - is? On  it is registered in adjustments? In secpol on  host NT-uchyotka for a proxy it is adjusted?

1) Microsoft SQL Server 2008 (SP3) - 10.0.5520.0 (INTELS X86)
Jul 11 2014 0:30:03 PM
Copyright (c) 1988-2008 MICROSOFTS CORPORATION
Standard Edition on Windows NT 6.0 <X86> (Build 6002: Service Pack 2) (VM)
2) both DB on one server.
3) "##xp_cmdshell_proxy_account##" - is? - Write where to look?
On  it is registered In adjustments? - in adjustments of that?
In secpol on  host NT-uchyotka for a proxy it is adjusted? - In Security Policy? If yes, where exactly?

12

Re: xp_cmdshell proxy account

Andy_OLAP wrote:

it is passed...
And let's up, the colleague.

Use master
EXEC sp_helpsrvrolemember ' sysadmin'
select suser_name (), user_name ()

Type here it here in a bare type (i.e. not from procedure) on the same server;
But in different bases, can return a miscellaneous?
  in studio, the expert-writer .

13

Re: xp_cmdshell proxy account

So at us with  bases?

select name, is_trustworthy_on
from sys.databases
where name in (' erp ', ' erp_test ');

14

Re: xp_cmdshell proxy account

Yasha123;
!!!!
Here where the dog rummaged!))))

15

Re: xp_cmdshell proxy account

Thanks!