none
equivalent of sp_configure and exec master..xp_cmdshell 'bcp... in T-sql 2000

    Question

  • This works well in sql 2005 but not in sql 2000. What s the equivalent in T-Sql 2000 pls?

    use master;
    GO
    EXEC sp_configure 'show advanced option', '1';
    reconfigure
    exec sp_configure 'xp_cmdshell',1
    reconfigure

    exec master..xp_cmdshell 'bcp mosaikDB742.dbo.FilelistInput in C:\Dev\Mosaik\SQl\Filelist.csv -T -c -Uusername -Ppassword -Sinstance'

    exec sp_configure 'xp_cmdshell',0
    reconfigure

    EXEC sp_configure 'show advanced option', '0';
    reconfigure

    Thanks a lot for your help.
    Friday, January 05, 2007 7:48 PM

Answers

  • What error message / problem symtoms do you observe?  Are you having trouble with this statement in particular:

    exec sp_configure 'xp_cmdshell',1

    In SQL Server 2005 the server comes default configured with XP_CMDSHELL disabled; in SQL Server 2000 this is not a configurable feature.  If this is what is giving you problem, skip this step when you are in a SQL Server 2000 server.


    Dave

    Friday, January 05, 2007 8:12 PM
    Moderator

All replies

  • What error message / problem symtoms do you observe?  Are you having trouble with this statement in particular:

    exec sp_configure 'xp_cmdshell',1

    In SQL Server 2005 the server comes default configured with XP_CMDSHELL disabled; in SQL Server 2000 this is not a configurable feature.  If this is what is giving you problem, skip this step when you are in a SQL Server 2000 server.


    Dave

    Friday, January 05, 2007 8:12 PM
    Moderator
  • that s exactly what caused the pb

    thanks

    Saturday, January 06, 2007 5:47 PM