-
Help! Stored procedure does not work on second server
I have a stored procedure that works on my development server but when I placed it on the server that is to be the prodcuction server i get the following response:
output ----------------
The name specified is not recognized as an internal or external command, operable program or batch file.
This is the procedure:
CREATE PROCEDURE sp_OutputClaim @OutFile varchar(255), @CurAns char(8) AS
declare @CmdLine varchar(255)
select FieldX into ##TempTable from Table where FieldY = @CurAns
select @CmdLine = "exec master..xp_cmdshell 'bcp tempdb.dbo.##TempTable out
c: est" + @OutFile + " /Uxx /Pxxx /Sxx /f c: estcp.fmt'"
exec (@CmdLine)
drop table tempdb..##TempTable
Thanks for any help !!!!
Rob
-
Help! Stored procedure does not work on second server (reply)
In your bcp statement, make sure that you fully qualify the path for bcp. I've had times where I had to fully type out the c:mssqlinncp.exe to make the program fire it off from xp_cmdexec or SQL Agent. It may be a long shot but, make sure that the account that is starting SQL Server, also has privilages to run bcp.
Hope this helps!
Brian Knight
htp://www.swynk.com/friends/knight
------------
Rob Fritz at 9/8/99 1:11:04 PM
I have a stored procedure that works on my development server but when I placed it on the server that is to be the prodcuction server i get the following response:
output ----------------
The name specified is not recognized as an internal or external command, operable program or batch file.
This is the procedure:
CREATE PROCEDURE sp_OutputClaim @OutFile varchar(255), @CurAns char(8) AS
declare @CmdLine varchar(255)
select FieldX into ##TempTable from Table where FieldY = @CurAns
select @CmdLine = "exec master..xp_cmdshell 'bcp tempdb.dbo.##TempTable out
c: est" + @OutFile + " /Uxx /Pxxx /Sxx /f c: estcp.fmt'"
exec (@CmdLine)
drop table tempdb..##TempTable
Thanks for any help !!!!
Rob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|