none
SQL 2014 AOAG error message RRS feed

  • Question

  • Hi All,

    I hope someone can point me to right direction.

    In our environment we have asynchronous AOAG setup. We are running 2 instances on one VM (this is how I have inherited and I am not in favor of this setup). Our secondary node is not readable. We are trying to run a script on one of the db's on primary node. and getting below error message. 

    NULL

    Starting copy...

    SQLState = 37000, NativeError = 976

    Error = [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The target database, 'XXXXXXXX', is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enab

    led for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group.  For more information, see the ALTER AVAILABILITY GROUP statement in SQL

    Server Bo

    SQLState = S1000, NativeError = 0

    Error = [Microsoft][ODBC Driver 11 for SQL Server]Unable to resolve column level collations

    NULL

    BCP copy out failed

    NULL

         There is no info available in error log related to above message. This is what I have tried so far

    1. Removed db from AOAG on primary node, deleted on secondary node. Still same error.

    2. Dropped database from server. Restored and try without adding to AOAG still same error.

    3. Added restored db to AOAG , still same error.

    4. I have made sure that I am logged in on primary node.

    5. Most of recommendations on google says enable secondary replica to 'readable'. Which would not apply because same script is working as expected on other databases on server.

    Any help is appreciated.


    Thursday, May 23, 2019 4:35 AM

All replies

  • Hi,

    >>1. Removed db from AOAG on primary node, deleted on secondary node. Still same error.
    2. Dropped database from server. Restored and try without adding to AOAG still same error.

    Do you mean you get the same error "The target database, 'XXXXXXXX', is participating in an availability group and is currently not accessible for queries..." even the database is not participating in the AG? 

    Could you share more details about your script? And how do your run the script? 

    Best Regards,
    Puzzle
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 24, 2019 1:10 AM