Re: xpsql.cpp
From: Bil (biljanat@nbrm.gov.mk)
Date: 12/24/02
- Next message: tom potts: "Re: Default temporary file location"
- Previous message: linda deng[MS]: "RE: How trace logon failed"
- In reply to: Gert E.R. Drapers: "Re: xpsql.cpp"
- Next in thread: Dan Guzman: "Re: xpsql.cpp"
- Reply: Dan Guzman: "Re: xpsql.cpp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Bil" <biljanat@nbrm.gov.mk> Date: Tue, 24 Dec 2002 09:45:44 +0100
Dan and Gert, thank you very much for helping on this issue. Gert, you are
right, proxy account was not there (on one server wasn't there; there are
two servers that have to be identical one to another; on the other server
there was a proxy account, but configured poor; that's why I received
diferent outputs from those two machines). Now I configured well proxy
account on both machines, and the stored procedure that calls xp_cmdshell
(for bcp) now works well, invoked by non-system account.
But, there is still an open question:
I run a stored procedure sp_test, with user B0 (non-sysadmin domain
account). I expected that the output will be the proxy account. But the
output is the account that Sql Server is running with. This is dangerous,
because this account is domain administrator and a member of sysadmin fixed
role in Sql Server. So, like even if I run xp_cmdshell with non-sysadmin
account (B0), and a proxy account is configured (which is non-sysadmin and
not administrator), it goes on the command shell with the account that SQL
Server runs with (domain administrator and a member of sysadmin fixed role
in Sql Server)! Why thoes it work this way?
CREATE PROCEDURE [dbo].[sp_test] AS
execute master..xp_cmdshell "echo %username%"
GO
Thank you for cooperation.
Regards,
Biljana
"Gert E.R. Drapers" <GertD@SQLDev.Net> wrote in message
news:#HjJNpIqCHA.1376@TK2MSFTNGP12...
> This is caused by the fact that a non sysadmin role member is trying to
> execute xp_cmdshell. (By default this is not granted.) The error means
that
> you proxy account is not there, because it is by default disabled and not
> created (this is exactly the opposite of SQL Server 7.0, where it is
always
> enabled and created).
>
> run the following TSQL command to get the proxy account information:
> exec master.dbo.xp_sqlagent_proxy_account N'GET'
>
> It should return nothing if I am right. If it is empty call:
> exec master.dbo.xp_sqlagent_proxy_account N'SET', N'domainname',
> N'username', N'password'
>
> Or use SQL Enterprise Manager to set it, it is on the SQL Agent property
> page, Job System tab
> Uncheck the "Only users with SysAdmin priviliges..." checkbox and click on
> the Reset Proxy Account button after this.
>
> GertD@SQLDev.Net
>
> "Bil" <biljanat@nbrm.gov.mk> wrote in message
> news:#Bx9RzopCHA.1612@TK2MSFTNGP09...
> > I have Win2K and SQL2000 installed on that machine.
> >
> >
> > "Bil" <biljanat@nbrm.gov.mk> wrote in message
> > news:OhbyzxopCHA.1876@TK2MSFTNGP10...
> > > When I run bcp command, I receive this message:
> > >
> > > Msg 50001, Level 1, State 50001
> > > xpsql.cpp: Error 1326 from LogonUserW on line 488
> > >
> > > Does anybody have any experience concerning this issue?
> > >
> > > Thanks in advance.
> > >
> > >
> >
> >
>
>
- Next message: tom potts: "Re: Default temporary file location"
- Previous message: linda deng[MS]: "RE: How trace logon failed"
- In reply to: Gert E.R. Drapers: "Re: xpsql.cpp"
- Next in thread: Dan Guzman: "Re: xpsql.cpp"
- Reply: Dan Guzman: "Re: xpsql.cpp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]