Reply to Re: textcopy.exe failure

Your name:

Reply:


Posted by Erland Sommarskog on 03/07/07 22:46

Connie (csawyer@rwbaird.com) writes:
> Erland, The reason I am doing this is to extract a blob from a sql
> server table and store it into a location on our server. Here is what
> is in the sp_textcopy:
> CREATE PROCEDURE sp_textcopy (
> @srvname varchar (30),
> @login varchar (30),
> @password varchar (30),
> @dbname varchar (30),
> @tbname varchar (30),
> @colname varchar (30),
> @filename varchar (30),
> @whereclause varchar (40),
> @direction char(1))
> AS
> DECLARE @exec_str varchar (255)
> SELECT @exec_str =
> 'C:\Progra~1\Micros~1\MSSQL\Binn\textcopy.exe /S ' + @srvname
> +
> ' /U ' + @login +
> ' /P ' + @password +
> ' /D ' + @dbname +
> ' /T ' + @tbname +
> ' /C ' + @colname +
> ' /W "' + @whereclause +
> '" /F ' + @filename +
> ' /' + @direction
> EXEC master..xp_cmdshell @exec_str
> GO
>
> I believe that I must be having some sort of right issue on the
> Production server where I am now trying to run this. It works
> perfectly in Development.

No, it's not a permissions issue. But it would be as simple that on
the production box, SQL Server is not installed on the C disk. Or
that the 8.3 name for C:\Program Files\Microsoft SQL Server is
different. The first thing to try is replace the 8.3 parts with the
long names. Next is to check where textcopy is located on the
production server.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация