How to execute sqlcmd

  • Hi All,

    I am running below command in sqlcmd but it is not giving any message just line numbers.

    sqlcmd -i C:\MyFolder\MyScript.sql -o C:\MyFolder\MyOutput.txt

    Please let me know how to execute this.

    Thanks.

  • Try adding which server you want the file to execute in:

    -S <ComputerName>

    __________________________________________
    The price of light is less than the cost of darkness.

  • Hope loginid and password also to be supplied

    pls refer the link below

    http://technet.microsoft.com/en-us/library/ms162773.aspx

    Regards
    Durai Nagarajan

  • How is your set up in the sys.sp_configure?

    you can run this for any case:

    exec sys.sp_configure 'show advanced options',1

    reconfigure with override

    go

    exec sys.sp_configure 'xp_cmdshell',1

    reconfigure with override

    go

    Regards

    IgorMi

    Igor Micev,My blog: www.igormicev.com

Viewing 4 posts - 1 through 3 (of 3 total)

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