Coffeehouse Thread

3 posts

SQL Console?

Back to Forum: Coffeehouse
  • User profile image
    darklotus

    Ok, this may be a very silly question, but i am curious about the answer. Is there a console utility for SQL 2000/MSDE? I know other flavers of database servers have a shell type console for administration. Does MS SQL 2000 have a similar program?

  • User profile image
    Andrew Davey

    Run cmd.exe

    Change directory to
    C:\Program Files\Microsoft SQL Server\80\Tools\Binn

    Then type:
    osql -E

    This will launch a command line tool that lets you execute SQL against your server. The -E is telling osql to use the Windows NT authentication for the server login.

    (Or type "osql -?" to see a list of commands)

    The command line interface inside osql works by you entering a number of sql commands and typing "go" to run them. e.g.

    > use test_database
    > select * from test_table
    > go

    Type "quit" to exit the osql console

    I have just spent a couple of days fighting with MSDE and so learnt most of this the hard way. If you have Visual Studio .NET then the Server Explorer is very handy for creating and managing simple databases.

    Also, check out:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=C039A798-C57A-419E-ACBC-2A332CB7F959&displaylang=en

    This provides a web admin interface into your database server.

    I hope this helps.

    Andrew

  • User profile image
    stephbu

    Back in the dark ages (well SQL 4.21 around 1993ish) ISQL (now OSQL) was all you had.  You soon learned to love it, and all the nuances of verbose DDL.

    SQL Query Analyzer's binary name is of course ISQLW - ISQL for Windows Smiley.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.