Coffeehouse Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

SQL Console?

Back to Forum: Coffeehouse
  • User profile image

    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:

    This provides a web admin interface into your database server.

    I hope this helps.


  • User profile image

    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.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.