none
Not Able to connect my secondary replicate to test read only RRS feed

  • Question

  • Hello everyone,

    I have set up two Nodes availability group running on WSFC with file share quorum.

    when I try to test using sqlcmd with Listener and -K readOnly I will get below error:

    C:\Windows\System32>sqlcmd -S APPLSNR -d Choice -K ReadOnly
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: No connec
    tion could be made because the target machine actively refused it.
    .
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or in
    stance-specific error has occurred while establishing a connection to SQL Server
    . Server is not found or not accessible. Check if instance name is correct and i
    f SQL Server is configured to allow remote connections. For more information see
     SQL Server Books Online..

    when Connect without -K ReadOnly, I am able to connect the Primary Node:

    C:\Windows\System32>sqlcmd -S APPLSNR -d Choice
    1> select @@servername
    2> go


    --------------------------------------------------
    ------------------------------------------------
    AEXVMSQLDB02\AEXSQLDB02


    (1 rows affected)

    I can ping the Listener Name (APPLSNR)

    please help!

    Availability Repicas:

    Server Instance           Role     Availability Mode        Failover Mode          Connection Primary Role         Readable Secondary

    Node 1                 Secondary   sync                          Manual                  Allow All Connection               Read-intent Only

    Node 2                 Secondary   sync                          Manual                  Allow All Connection               Read-intent Only

    Thursday, August 22, 2019 4:01 PM

All replies