Switch Between Instance. i.e Default and Named

Yanıt Switch Between Instance. i.e Default and Named

  • 17 Mart 2012 Cumartesi 11:30
     
     

    Hai.

    my application work with Named instance SQLEXPRESS. i tried to execute that in another system which has both MSSqlserver and SQLSERVER

    where but my application is not working(database connection). i tried to stop MSSQLSERVER and tried to open application it is not working. even management studio is not getting connected with the server.

    How to use SQLSERVER as my primary Instance?

    or is there any way to use my attached database Application in Both or any instance like MSSqlserver and SQLSERVER...

    Thank You

    Please Help

Tüm Yanıtlar

  • 17 Mart 2012 Cumartesi 12:23
    Moderatör
     
     Yanıt

    Hello,

    You cannot attach the same database to 2 different SQL Server instances.

    Please, could you provide the connection string used by your application ? and could you explain how this connection string has been built ?

    SQLEXPRESS is the default name proposed during the installation of SQL Server Express.

    Very often, the name of the instance ( built by Visual Studio ) is often (local)\SQLEXPRESS or .SQLEXPRESS. It may be also with the format myComputerName\SQLEXPRESS ( where myComputerName is the name of the computer on which the SQL Server Express is installed )

    Please, could you explain what you mean with "MSSqlServer" and "SQLServer" ? Are they the names of your SQL Server instances or the part of the names of the SQL Server services ?

    All i hope for you is that , in the connection string , you have not user instance = true. You would be using an user instance database , not a real database which cannot be backuped/restored/attached in an easy way ( be careful the user instance feature is only supported by SQL Server Express Edition , not by a Web,Workgroup, Standard or any edition which is not free )

    As you want to use a SQL Server instance which is not on the same computer, you have to change the name of the computer and the name of the instance. For example, if the computer on which the SQL Server Express is installed  is myExpressComputer, and you want to move your database to a computer named myAnotherComputer with an instance name AnotherInstance, you should replace in your connection string  myExpressComputer\SQLEXPRESS by myAnotherComputer\AnotherInstance.

    Toclarify your thread, please, could you give the version (2005,2008,2008 R2,2012 with the last installed Service Pack) and the edition of your SQL Server instances MSSQLServer/SQLServer (Express,Web,Workgroup,Standard,...) ?

    We are waiting for your feedback to try to help you more efficiently.

    Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    • Yanıt Olarak İşaretleyen KJian_ 26 Mart 2012 Pazartesi 07:41
    •