use of scptxfr.exe in stored procedure

  • Hi All,

    My stored procedure look something like this. I'm running on sql server 7 and I have local server installed in my machine.

    CREATE procedure get_db_structure as

    exec master..xp_cmdshell 'scptxfr.exe /S [server_name] /d [database_name] /P sa /f c:\test_one_str.sql'

    GO

    Now I'm getting an error. Something like this:

    The name specified is not recognized as an

    internal or external command, operable program or batch file.

    NULL

    What am I doing wrong here? I thought I can use cmdshell to execute dos prompt command.

    Any thoughts on this?

    Thank you so much!

  • You can, but you will shell out to a folder based on the sql account.

    run xp_cmdshell 'dir' to find out where you are. You can then change folder or add a path to your executable.

    Steve Jones

    steve@dkranch.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply