how to go to sql server2005 command prompt

  • hi friends,

    i am using sql server2005 newly and i don't know how to go to sql server2005 command prompt. if any body knows plz tell me.

    thanks in advance,

    ram.

  • Not sure what you mean by command prompt. If you mean the equivalent of Query Analyzer you go to SQL Server Management Studio, connect to a database server and click on New Query or select it from the file menu under New. If you mean osql you should be able to run this from a windows command prompt.

  • Do you mean running scripts from the command prompt? Check out the functionality of sqlcmd.exe.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • If you want to execute DOS commands from within SQL Server use this:

    execute master.dbo.xp_cmdshell ' '

    But xp_cmdshell must be enabled on the server level.

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

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