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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • 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