SQL Server Performance

Command line utilities

Discussion in 'SQL Server 2008 General Developer Questions' started by sqldev, Jun 16, 2009.

  1. sqldev New Member

    Hi,
    I would like to know the Command-line utilities available in SQL Server 2008, something similar to SQL*Plus, which
    is available in Oracle.
    Also, is it possible to have Prompts in DML Statements, where user will provide dynamic data like
    SQL*Plus in Oracle.
    INSERT INTO T1(F1, F2, F3)
    VALUES(&1, &2, &3)
    Please give me the various options avilable regarding this, thank you.
  2. FrankKalis Moderator

    Not entirely sure what SQL*Plus is, but I would guess that the SQL Server Management Studio comes closes to that. However, there is no way to interact with a DML statement like you mentioned. You have to supply the values before you execute the statement.
  3. Adriaan New Member

    Granted, it was SQL*Plus for Oracle 7 or 8, but it has to be the worst interface I ever had to struggle with. Actually made the SQL 6.5 tool look like da bomb.
    ***
    It seems like Oracle allows you to use undeclared variables, with those &1 place holders. Just use local variables in your script.
  4. kboodu New Member

    There are two command line utilities for executing SQL Commands againstMicrosoft SQL Server - isql and osql. However, they do not provide allthe same functionality that SQL*Plus provides.
    SQL Server doesn't support replaceable parameters from the command line, or at least I haven't found a solution. Usually I generate strings of SQL commands and execute them one at a time through ISQL or OSQL. Maybe something like Windows Scripting Host can come closer...or maybe even PowerShell.
    Hope this helps.
    Tim
    kboodu
  5. deepakontheweb New Member

    use osql in SQL Server for command line. Its powerful and can execute script files having batches or commands as well from command line interface.. read more at http://msdn.microsoft.com/en-us/library/aa214012(SQL.80).aspx
  6. FrankKalis Moderator

    Since this is posted in the SQL Server 2008 forum, what about using sqlcmd.exe?
  7. ronwarshawsky New Member

    ***DELETED... related to a product advertisement
  8. satya Moderator

    Ron
    Advertistements are not allowed on technical posts, your post is edited. Please adhere to forum policies.
  9. ronwarshawsky New Member

    Hello Satya,
    Please allow reference to the SQLS*Plus (http://www.memfix.com) - this is a free tool that exaclty addresses initial question.
    Thank you,
    Ron
  10. satya Moderator

    Ron
    I believe I will go easy on this one at this point, I shall put this in Moderator forum for more clarification. Until then it will stay....

Share This Page