ReadOnly routing not working in SQL 2012

  • Hello -

    I have a SQL 2012 AG configured where I have 2 DBs in synch mode.

    Server1 is Primary and DBs are Read-Write and Server2 is Secondary where both my DBs are configured as Readable.

    Now when I run my application with the below connectionstring, my read queries dont get directed to Server2 where my Secondary DB is hosted even though I am using Listener name [AGListener] in DataSource and have used 'applicationintent=readonly' in the string.

    Read output is getting displayed, but from the Primary Server Server1.

    Connection String:

    Provider= SQLNCLI10; Data Source=AGListener; Persist Security Info= false; Integrated Security = SSPI; Initial Catalog=SecondaryDB; applicationintent=readonly

    Can you share some insights into why this is not working as expected ?

    Thanks

    Kishore

  • This isn't something I've set up in my Availability Group work so far, but here's a blog post where someone ran into a similar issue.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks Grant. The link helped a lot. I had to configure the READ_ONLY_ROUTING_URL and READ_ONLY_ROUTING_LIST to make it work.

    Cheers !!

    Kishore

Viewing 3 posts - 1 through 2 (of 2 total)

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