|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
xp_cmdshell doesn't workThis sql code doesn't work. set @cmd = 'D:\data\gegevensbeheer\produktie\AccountSynchroTrigger\AccountSynchroTrigger.exe ' set @cmd = @cmd + Cast(@PersoonID as nvarchar(10)) exec master.dbo.xp_cmdshell @cmd It has worked with a simpel exe program. This exe program adds user to the active directory. In that exe, I impersonate the user to the one that had enough rights in the AD. When I execute this exe on the server (command line), it works fine, but when I execute it in the query analyser, it doesn't. How Can I set a specific user with an sql statement or how can I solve this problem? thanks Filip PS: the exe is a c# 2.0 program. Read up on executiong xp_cmdshell in Books Online. It sounds like the usual
security issue. What version are you on? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp ML --- http://milambda.blogspot.com/ SQL Server 2000 SP4
Show quoteHide quote "ML" wrote: > Read up on executiong xp_cmdshell in Books Online. It sounds like the usual > security issue. > > What version are you on? > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp > > > ML > > --- > http://milambda.blogspot.com/ SQL Server 2000 SP4
On the folder where the exe is in, I've set full control to everyone. This to test if it was security. I find it strange, that even with the full control, I've got this problem. Show quoteHide quote "ML" wrote: > Read up on executiong xp_cmdshell in Books Online. It sounds like the usual > security issue. > > What version are you on? > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp > > > ML > > --- > http://milambda.blogspot.com/ the mssqlserver service is started with the administrator account
the lmssqlserver agent is started with the administrator account Show quoteHide quote "ML" wrote: > Does the SQL Server service account have sufficient privileges? > > > ML > > --- > http://milambda.blogspot.com/ the error messages are:
NULL Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at LessiusBLL.AccountBeheerBLL.MaakNieuweAccount(Int32 persoonId) at AccountsSynchroTrigger.Program.Main(String[] args) NULL Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at LessiusBLL.AccountBeheerBLL.MaakNieuweAccount(Int32 persoonId) at AccountsSynchroTrigger.Program.Main(String[] args) NULL no errors when executing command line on the server Show quoteHide quote "ML" wrote: > Any error messages? (i.e. what does "doesn't work" mean?) > > > ML > > --- > http://milambda.blogspot.com/ Have you asked this in a .Net related newsgroup?
It may be a .Net security issue. ML --- http://milambda.blogspot.com/ |
|||||||||||||||||||||||