How to access SQL Server 2008 via Command Line in VS 2010

  • Is this possible?

    How as I wish to rename a table.

    Thanks

  • SQLCMD is the command line client for SQL Server.

    sp_rename is the stored procedure that renames objects.

    -- Gianluca Sartori

  • can you clarify?

    Do you want to rename a table by calling a command-line utility from with a program created in Visual Studio 2010.

    Or do you want to rename a table from a Visual Studio 2010 Command-Line prompt?

    And will you have Sql Server installed on the machine where you want to execute this.

  • Hi, thanks for the responses.

    Well I want to access the sql command prompt as I will want to do other things also.

    The problem is that I have no idea how to get to the sql command prompt from within Visual Studio.

    is there a button I can click on to run the sql command prompt?

  • The problem is that I have no idea how to get to the sql command prompt from within Visual Studio.

  • If you open any .sql file, visual studio will display a toolbar related to SQL commands. One of the items on the toolbar is a button "SqlCmd Mode" - in my version it is next to the Sql Command Source dropdown box.

    See screenshot - I just opened the first random SQL file in visual studio, without even opening a project and the SQL toolbar appears.

Viewing 6 posts - 1 through 5 (of 5 total)

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