Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scptxfr.exe use in a procedure

Status
Not open for further replies.

mkey

Programmer
Joined
Oct 3, 2001
Messages
288
Location
CA
Hi All,
I need to get the database structure through a procedure.
Something like this:
CREATE procedure get_db_structure as
DECLARE
exec master..xp_cmdshell 'scptxfr.exe /S [server_name] /d [database_name] /PSA /F c:\test_one_str.sql'
GO
I'm getting an error message. Something like this:
'scptxfr.exe' is not recognized as an internal or external command,
operable program or batch file.

When I tried in the dos prompt (scptxfr.exe /S [server_name] /d [database_name] /PSA /F c:\test_one_str.sql) the command is working fine. I think something wrong with the xp_cmdshell. I assume xp_cmdshell is mainly use to execute dos commands. Does this mean we cannot use it for .exe? Any help is greatly appreciated.
mkey

 

Is the executable scptxfr.exe on the server? Have you tried the using the full path to access it? You can execute .EXE files with xp_cmdshell but don't execute programs that display messages boxes or request user input. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
HI,
The scptxfr.exe is in the following path:
d:\program files\mssql7\upgrade\. NOw I tried with the exact path as well. The server is in my local machine. So I don't think the scptxfr.exe has to be on the server.
I don't know what I'm doing wrong.
Thank you for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top