none
During installation of Stocktrader 5.0 Test Connection failed on SQL Server 2008 R2 (Express)

    Question

  • Hello,

    I have downloaded the sample application Stocktrader 5.0.
    During the installation, I am trying to install the database into the SQL Server 2008 R2 instance.
    Remotely I can connect to this instance with the Sql Management Studio over tcp/ip.

    The connection string used by the MSI installer is as follows:  
    server=tcp:mySQLServer\mySQLInstance,1433;database=Master;user id=sa;password=saPassword;Pooling=false;

    This connection string seems to fail during the installation.
    Setup keeps telling me that the connection cannot be made because of:
    A network-related or instance-specific error occurred while establishing the connection to SQL Server.
    The server was not found or was not accessible.  Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Providor, error 0 - No connection could be made because the target machine actively refused it.)

    When I test this connection string with the .NET SQLConnection object, it concurs that the connection cannot be made.
    However, when I remove the ",1433" form the connection string the connection can be made to the same server.
    How do I get the installer (MSI) to use the modified connectionstring?

    By-the-way, I get the same error when using MS SQLServer Express 2008: The test connection failed.

    Regards,

    Arjan Douwes

    lundi 17 octobre 2011 06:40

Toutes les réponses

  • You cannot in this release modify the connection string used in setup. I think a workaround for this issue is to name your instance with some name that includes the string "sqlexpress."  This might be an install of SQLExpress as the default (vs. named) instance; or a named instance such as "mySQLServerMachine\"mySQLExpressInstance."  (sqlexpress string will not be case sensitive, and just needs to be contained in the instance name I think to work).  So, I would try this, and let me know.  If the installer (or app components) find "sqlexpress" in the host name it will not auto-insert the "tcp:" prefix or the ",1433" postfix.  So I believe this workaround should work, but let me know.

     

    -Greg


    Greg Leake, Microsoft
    mercredi 19 octobre 2011 14:37