cwchilders
MIS
SQL7/NT4. I am calling a sp from an insert trigger. My sp invokes "Exec xp_cmdshell" to bcp an OUTPUT query to a file. It worked fine (for 18 months), until I failed over to a clustered server (Legato Co-standby Server). I have failed back to the original server, and tried resetting the local proxy account and it's advanced permissions per the MS KB. The error is intermittent. It does not write the file when breaking: I have the event log capturing all file access for SQLAgentCmdExec, and am missing writes when the error occurs. Can I trace or trap this error? I only have user reports to go by. I assume xpsql.c is xp_cmdshell? Could xp_cmdshell (xpsql70.dll) be corrupt? I love intermittent errors!!?
Thanks,
Bill
--
Snippet:
SET @bcpSTR = 'bcp "SELECT Call_Number, Date_Received, Actual_Incid_Location, Narrative FROM VER2_CAD..Active_Calls (NOLOCK) WHERE VER2_CAD..Active_Calls.Call_Number = ''' +@Call_Number+ ''' " queryout "'
SET @bcpSTR = @bcpSTR + @CCFR_SHARE + @Record + '.inc01" -U sa -P -c -t' +@FS
EXEC master.dbo.xp_cmdshell @bcpSTR
Thanks,
Bill
--
Snippet:
SET @bcpSTR = 'bcp "SELECT Call_Number, Date_Received, Actual_Incid_Location, Narrative FROM VER2_CAD..Active_Calls (NOLOCK) WHERE VER2_CAD..Active_Calls.Call_Number = ''' +@Call_Number+ ''' " queryout "'
SET @bcpSTR = @bcpSTR + @CCFR_SHARE + @Record + '.inc01" -U sa -P -c -t' +@FS
EXEC master.dbo.xp_cmdshell @bcpSTR