Command Prompt Utility

  • Junior Galvão - MVP

    SSCertifiable

    Points: 6376

    Comments posted to this topic are about the item Command Prompt Utility

  • SQL_Hunt

    SSC-Dedicated

    Points: 33261

    I use this utility quite often to call procs from sql. Scored 1 mark.

    Thanks.

  • Dave Green

    SSC-Addicted

    Points: 496

    It's perhaps worth noting that this utility is to be removed in a future SQL Server version according to this MSDN page. The suggestion is to use sqlcmd in new work, which also uses ODBC when invoked from the command line.

  • Koen Verbeeck

    SSC Guru

    Points: 258907

    Easy one for me, as I encountered it at a client a few years back. Converting scripts to use SQLCMD instead gave a big performance boost.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Ed Wagner

    SSC Guru

    Points: 286957

  • This was removed by the editor as SPAM

  • SQLRNNR

    SSC Guru

    Points: 281210

    D_A_Green (6/1/2015)


    It's perhaps worth noting that this utility is to be removed in a future SQL Server version according to this MSDN page. The suggestion is to use sqlcmd in new work, which also uses ODBC when invoked from the command line.

    FWIW - it is still there in 2016 (at least at the moment CTP2 since that is what is available).

    It also looks like this utility is gonna be like profiler and the text data type. Both of those (for example) have been deprecated for a long time like osql and are also still present in 2016.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • TomThomson

    SSC Guru

    Points: 104763

    Not a good question. The command line utilities using ODBC are SQLCMD and BCP and the deprecated OSQL. In fact BCP and SQLCMD are the two traditionally classed as ODBC utilities. If both BCP and OSQL are to be on the list of options qw should have tick boxes and have to select 2 answers. If only one answer is allowd, the other correct answers ought not to be on the list.

    Tom

  • sestell1

    SSChampion

    Points: 10230

    TomThomson (6/1/2015)


    Not a good question. The command line utilities using ODBC are SQLCMD and BCP and the deprecated OSQL. In fact BCP and SQLCMD are the two traditionally classed as ODBC utilities. If both BCP and OSQL are to be on the list of options qw should have tick boxes and have to select 2 answers. If only one answer is allowd, the other correct answers ought not to be on the list.

    Thanks Tom, I thought BCP was an ODBC utility... thought I was going crazy. :crazy:

    I found this:

    "The bcp utility is written by using the ODBC bulk-copy"

    https://msdn.microsoft.com/en-us/aa337544.aspx

  • david.gugg

    SSCertifiable

    Points: 5624

    I agree with TomThomson - This msdn page says "The bcp utility is written by using the ODBC bulk-copy".

    I'd say that means it does indeed use an ODBC connection to the database.

    https://msdn.microsoft.com/en-us/aa337544.aspx


    [font="Tahoma"]Personal blog relating fishing to database administration:[/font]

    [font="Comic Sans MS"]https://davegugg.wordpress.com[/url]/[/font]

  • TomThomson

    SSC Guru

    Points: 104763

    sestell1 (6/1/2015)


    TomThomson (6/1/2015)


    Not a good question. The command line utilities using ODBC are SQLCMD and BCP and the deprecated OSQL. In fact BCP and SQLCMD are the two traditionally classed as ODBC utilities. If both BCP and OSQL are to be on the list of options qw should have tick boxes and have to select 2 answers. If only one answer is allowd, the other correct answers ought not to be on the list.

    Thanks Tom, I thought BCP was an ODBC utility... thought I was going crazy. :crazy:

    I found this:

    "The bcp utility is written by using the ODBC bulk-copy"

    https://msdn.microsoft.com/en-us/aa337544.aspx

    I'm glad someone agrees with me - sometimes I think I'm getting old and forgetful about some of this stuff.

    It's also interesting that a default SQL Server 2014 install puts BCP.exe (and SQLCMD.exe) into C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn - the fact that they are in a subfolder below the ODBC folder rather gives the game away. And yes, that's for SQL Server 2014, despite the 110 instead of 120 - see https://msdn.microsoft.com/en-us/library/ms143547%28v=sql.120%29.aspx.

    Tom

  • Junior Galvão - MVP

    SSCertifiable

    Points: 6376

    Thanks.

  • Junior Galvão - MVP

    SSCertifiable

    Points: 6376

    D_A_Green,

    Ok, I agree your sugestion.

  • Junior Galvão - MVP

    SSCertifiable

    Points: 6376

    Hi Ed,

    Yes, like, thanks for comment.

  • Junior Galvão - MVP

    SSCertifiable

    Points: 6376

    Hi TomThompson,

    At any time I am suggesting the use of this utility.

    Thanks for comments.

    Regards.

Viewing 15 posts - 1 through 15 (of 21 total)

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