Backup Maintenance Plan on SQL AlwaysOn Availability Group Secondary Read-Only node

I have 3 node SQL 2012 AlwaysOn Availability nodes with the 3rd node as Read-Only.
The backup job within SQL Maintenance plan is failing with the following error:
Failed:(-1073548784) Executing the query "declare @backupSetId as int
select @backupSetId =..." failed with the following error: "Cannot open backup device 'C:\\SQLDBName_backup_2014_06_08_170156_9292095.bak'. Operating system error 2(The system cannot find the file specified.).
VERIFY DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
I have verified the SQL AlwaysOn Backup preference to be "Prefer Secondary"
Is there any special steps/settings I need to do to setup and run the backups using maintenance plan in SQL AlwaysOn?

Hi,
I'm marking the reply as answer as there has been no update for a couple of days.
If you come back to find it doesn't work for you, please reply to us and unmark the answer.
Thanks.
Tracy Cai
TechNet Community Support

Similar Messages

  • SQL AlwaysOn Availability Group modifies preferred owner node on move/failover

    I have a two node Windows Server 2012 R2 failover cluster with two SQL Server 2012 Enterprise AlwaysOn Availability groups configured. Within the cluster I have configured a preference order on which node a AlwaysOn Availability Group should run.
    Get-ClusterGroup -Name "AlwaysOn1" | Set-ClusterOwnerNode -Owners "node1","node2";
    Get-ClusterGroup -Name "AlwaysOn2" | Set-ClusterOwnerNode -Owners "node2","node1";
    After configuring the preference and retrieving the preference order it is configured as it should be. When I do a failover the preference order is adjusted to first the node it currently runs on and second the other node instead of leaving the preference
    order as it was. It doesn't matter if I use the PowerShell "Move-ClusterGroup" or the "ALTER AVAILABILITY GROUP [AlwaysOn1] FAILOVER" T-SQL command. From the cluster log it is shown that the preference is modified after the resource
    has been moved.
    INFO  [GUM] Node 2: executing request locally, gumId:15859, my action: /rcm/gum/SetGroupPreferredOwners, # of updates: 1
    INFO  [RCM] rcm::RcmGum::SetGroupPreferredOwners(AlwaysOn1,<vector len='2'>
    The default groups within the cluster "Available Storage" and "Cluster Group" keep their preference setting when configured (only configured for testing to verify it has to do with the SQL Server Availability Group resource type).
    The Windows Server 2012 R2 servers are updated using the latest Windows Updates and SQL 2012 has build number 11.0.5556.
    For other cluster groups which I have configured in the past like file, Hyper-V (used for affinity to get VM's which have a lot of traffic between them within the same virtual switch to reduce latency and additional hops. it would be nice if vNext will have
    a affinity option for cluster groups besides the anti-affinity within the current version)
    I would like to know if someone could explain why the SQL Server Availability Group resource always modifies the group preference. I might understand this with a three node cluster where the first two are running in Synchronous commit mode and the third
    one in Asynchronous commit mode.
    Thanks in advance,
    Dennis van den Akker

    Hi Dennis van den Akker,
    Do not use the Failover Cluster Manager to manipulate availability groups, for example:
    Do not add or remove resources in the clustered service (resource group) for the availability group.
    Do not change any availability group properties, such as the possible owners and preferred owners. These properties are set automatically by the availability group.
    Do not use the Failover Cluster Manager to move availability groups to different nodes or to fail over availability groups. The Failover Cluster Manager is not aware of the synchronization status of the availability replicas, and doing so can lead to extended
    downtime. You must use Transact-SQL or SQL Server Management Studio.
    The related KB:
    Failover Clustering and AlwaysOn Availability Groups (SQL Server)
    https://msdn.microsoft.com/en-us/library/ff929171.aspx
    The similar thread:
    SQL Server Clustering 2008 (Multi Node)
    https://social.msdn.microsoft.com/Forums/sqlserver/zh-CN/c35fe863-3fed-4a6e-830b-b79aa032c198/sql-server-clustering-2008-multi-node?forum=sqldisasterrecovery
    Best Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • 2012 SQL AlwaysOn Availability Group - JDBC re-connection not happening in case of Multisubnet failover

    Hi There,
    Having some problem with MultiSubNet AG failover re-connection using SQL JDBC driver 4. Details given below.
    SETUP:
    We have a three node 2012 Windows Server Cluster, on top it we have 2012 SQL Sever AlwaysOn Availability Group. 
    Two nodes are in one subnet and other in a different subnet to make this as a multisubnet AlwaysOn AG.
    An AG Listener is configured with a DNS name and two VIP assigned (For two subnet) to it. We were able to failover from one subnet to other using the SQL Studio successfully.
    NEED:
    We have a java application which will be connected to AG Listener name. In case of failover, automatic re-connection to DB/AG Listener name should happen.
    For this we use  "sqljdbc4.jar" and added
    'multiSubnetFailover=true' in our connection string. The connection String is given below.
    cURL="jdbc:sqlserver://testsqlag:1433;databaseName=SalesDB;multiSubnetFailover=true;loginTimeout=200;applicationName=MyApp";
    THE PROBLEM:
    In case of AG failover, driver is not trying to re-connect to the AG Listener name. Not sure how to make it work. 
    Is this supported in SQL Server 2012 ?
    Thanks,
    Krishna.

    Hi Sean,
    Thanks for your answer.
    I looked at the link earlier, but it was not very clear that, whether the mssql jdbc driver will automatically re-connect to AG Listener name in case of failure of Primary replica which will result in Multisubnet failover.  Pasted the confusing statements
    from the link
    http://msdn.microsoft.com/en-us/library/gg558121(v=sql.110).aspx.
    Also, because a connection can fail because of an availability group failover, you should implement connection retry logic, retrying a failed connection until it reconnects.
    Connecting With MultiSubnetFailover :
    During a multi-subnet failover, the client will attempt connections in parallel. During a subnet failover, the Microsoft JDBC Driver for SQL Server will aggressively retry the TCP connection.
    Thanks,
    Krishna.

  • How to create backup maintenance plan for SQL 2014

    Depending on your backup product, it may include a hot backup for SQL - check that too

    I need to create a basic maintenance plan that backs up our DB nightly and also need some pointers on any other maintenance that should be done would be great. Obviously I'm very new to using SQL, trying to get my feet wet.
    This topic first appeared in the Spiceworks Community

  • AlwaysOn Availability groups and unable to backup LOG files

    Hi,
    I have an issue where we are using AlwaysOn availability groups, however my transaction log backup jobs are not working for any databases that are part of the groups.  Databases which are standalone backup fine.  I've tried using the builtin maintenance
    plans as well as the 'maintenance script' from Ola Hallengren which is my preference.
    All the jobs are reporting success even though nothing is bring written to disk, the jobs complete within a few seconds.
    If I backup the log files individually myself they work fine.  After
    going a bit of Googling this appears to have been a known issue that was fixed in CU7, unfortunately I'm running CU9 and still have the issue.
    I've tried changing the backup preference to any, as well as primary or secondary only to no avail.
    I'm using SQL Server SP1 CU9, 2 nodes in the group.  Anyone have any suggestions?
    Marcus

    Hi,
    I understand that you have tried every options in Backup Preferences. I still suggest you enable the “For availability database. Ignore Replica Priority for Backup and Backup on Primary Settings” when you define the maintenance plan and check how it works.
    This settings is off by default. And the maintenance plan will detect the availability group's AUTOMATED_BACKUP_PREFERENCE setting when deciding to backup a database or log if that database is defined in the group.
    'Given that an availability group's default AUTOMATED_BACKUP_PREFERENCE setting is 'SECONDARY, a maintenance plan, defined and running on a SQL Server instance hosting the primary replica, will NOT backup databases defined in the availability group.
    Reference:
    http://blogs.msdn.com/b/alwaysonpro/archive/2014/01/02/maintenance-plan-does-not-backup-database-or-log-of-database-that-belongs-to-availability-group.aspx
    Hope it helps.
    Tracy Cai
    TechNet Community Support

  • Alwayson Availability groups for a WSFC hosting mutliple SQL FCI's

    Hello,
    I have a question regarding SQL server FCI's and alwayson availability groups.
    Today I have a customer running a 2 node WSFC hosting 9 different SQL FCI's.
    Plan is to introduce on this setup SQL alwayson availability groups one per SQL FCI.
    Per SQL FCI, running on the 2 node WSFC, we are planning to introduce a dedicated
    alwayson availability group with 2 replicas. On replica as primary linked with the
    FCI and one replica as secondary on 1 extra node added to the WSFC.
    Question i have is, is this a supported configuration?
    Thanks in advance
    Regards
    Raf

    This is a supported scenario. However, make sure that no FCI node will run a SQL Server instance acting as a replica. This means you cannot install a standalone instance on one of the FCI nodes and make it an AG replica. You also cannot configure another
    FCI in the same WSFC to be a secondary replica in an AG. If you intend to configure AG per SQL Server FCI, you need to add another node in the WSFC and install a SQL Server instance on that node. This can be a SQL Server FCI (which means you need to add two
    more nodes instead of just one) or a standalone instance. Also, having an FCI in an AG configuration means that you lose the ability to do automatic failover on the AG-level. This is because the FCI takes care of automatic failover on the instance-level.
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • Maintenance plan for SQL Server 2012 Database in AlwaysOn Availability Group

    Hi all,
    I need assistance creating a maintenance plan that will backup a databases logs in order to prevent them from filling up the drive they are located on. I have looked at some blogs but they do not specifically show how this is done.
    My database is in an AlwaysOn Availability Group.
    Thank you very much for your help!
    Jake

    Hi all,
    I need assistance creating a maintenance plan that will backup a databases logs in order to prevent them from filling up the drive they are located on. I have looked at some blogs but they do not specifically show how this is done.
    My database is in an AlwaysOn Availability Group.
    Regular maintenance plan would work. Only thing to remember is that when you create log backup plan, there is a checkbox which says whether it should honor backup preference or not.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Is it possible to move to Alwayson Availability groups from existing sql server FCI ?

    Is it possible to move to Alwayson Availability groups from? existing sql server FCI ?
    If yes, how to move and what are the pre-requisites?

    Hi Rahul,
    Based on your description, we need to verify if you want to move from Failover Cluster Instances(FCI) and database mirroring to SQL Server Alwayson Availability groups. If so, it is possible.
    You can review the following articles to get more detailed information about this kind of migration.
    How To: Migrate from Failover Cluster Instances and Database Mirroring to SQL Server AlwaysOn
    – Part 1
    How To: Migrate from Failover Cluster Instances and Database Mirroring to SQL Server AlwaysOn
    – Part 2
    Thanks,
    Lydia Zhang

  • Will SCCM 2012 R2 , SCOM 2012 R2 and SCDPM R2 2012 support SQL 2012 AlwaysOn Availability Group ?

    Will SCCM 2012 R2 , SCOM 2012 R2 and SCDPM R2 2012 support SQL 2012 AlwaysOn Availability Group ?

    Hi,
    It is listed here:
    http://technet.microsoft.com/en-us/library/dn281933.aspx
    Configuration Manager 2012 r2 and DPM 2012 r2 does not support AlwaysOn.
    regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • Moving the Reporting Services and Report Server DB into AlwaysON Availability Group

    I have configured the new set of SQL 2012 AlwaysOn Availability Group and need to move the SSRS and it's Report Server DB into that Availability Group.
    Can anyone give tell me the steps to do this move?
    Can I just backup the ReportServer DB into the AG server then import that DB into the SSRS running on the new AlwasyOn AG SQL?

    Hello,
    Based on your description, it seems that you want to move the Report Server database to a different server. If so, both the reportserver and reportservertempdb databases must be moved or copied together. You can move the databases by using Detaching
    and Attaching or Backup and Restore.
    What's more, you should also backup the encryption keys for the report server database you want to move and then restore to the new server.
    You can configure report server databases in Always On Availability Group to be part of a replica; however Reporting Services will not automatically use a different replica for the report server databases when a failover occurs
    Reference:
    Moving the Report Server Databases to Another Computer
    Reporting Services with AlwaysOn Availability Groups (SQL Server)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Cross-domain AlwaysOn Availability Groups

    I had a colleague of mine comment in a meeting that SQL Server 2014 supports cross-domain data synchronisation using AlwaysOn Availability Groups.  I didn't contradict that immediately because, even though I thought it wasn't the case, I couldn't find
    any documentation either confirming or denying it.
    Looking at the Network Access section for troubleshooting AlwaysOn AG (http://msdn.microsoft.com/en-us/library/ff878308.aspx#NetworkAccess), the inference is that you
    can have AlwaysOn AG spanning different domains. However, one of the pre-requisities for creating a WSFC is that all servers that are to be added as cluster nodes are joined to the same Active Directory domain (http://technet.microsoft.com/en-us/library/dn505754.aspx).
    So I guess the question is - can you have a cross-domain implementation of AlwaysOn AG?  And if so, how?

    Check this blog -
    http://sqlha.com/2012/04/13/allans-alwayson-availability-groups-faq/
    Q: Do all of my WSFC nodes need to be part of the same domain?
    A: Yes. This will be a change for those who are looking to upgrade existing log shipping or DBM deployments where Instance A and Instance B are not in the same domain.
    The fact that all the participating nodes in an Always ON availability group has to be members of the same WSFC makes it clear that we cannot have cross domain Always ON.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Use service accounts at AlwaysOn Availability Groups

    Valued readers,
    We have a AlwaysOn Availability Group consisting of 2 SQL servers. Both servers have their own service account for the sql services. I read in all sorts of documents on the internet that it is recommended that the sql service account on all servers within
    the same availability group are using the same serviceaccount. This would have to do with registering the SPN of the virtual server for kerberos. What impact does it have if I don’t change the serviceaccount ?

    Hello Sean,
    No I do not think so. Do you mean this :
    “Find your service account and hit the Security tab
    Select “SELF” in the “Groups or user names” listbox
    Find “Write public information” in the “Permissions for SELF” listbox
    and check “Allow”
    After, you’ll need to restart SQL Server for the SPN to register. Use setspn -l domain\account to verify that the account has
    properly registered.
    Should you also register the virtual server name? And what about if you use different service accounts?
    With best regards, Albert

  • Initermittent Connection Timeout at Post-Login when connect to AlwaysOn Availability Group listener

    Hi,
    I'm using SQL 2014 AlwaysOn Availability Group and my ASP .Net application is connected to the database thru the availability group listener (tcp:[myHAGroup],14330).
    Things work most of the time, but recently I started to see the following Connection Timeout exception in Event Log. It looks like under heavy traffic the application can't connect to the availability group listener.
    Timestamp: 8/17/2014 10:07:28 AM
    Message: System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=2; handshake=0; [Login] initialization=0; authentication=0; [Post-Login] complete=15008; ---> System.ComponentModel.Win32Exception: The wait operation timed out
    --- End of inner exception stack trace ---
    I've checked SQL Profiler and don't see any memory or CPU peak at that time. Looks like somethings happened during the Post-Login stage, but I couldn't figure out what or why....
    I'm using 2 SQL servers (1 primary, 1 secondary): SQL 2014 ENT, 8GB RAM, 8 core 2.67 Xeon X5650.
    Application: ASP .Net, framework 4.0.
    All servers are VMWare virtualization servers, running on 1 virtual switch, so internal traffic should not be a problem.
    Comments/ideas are appreciated.
    Eric.

    Hi Eric Nguyen,
    According to your description and error message, we need to verify if there are some queries/transaction lock your database via SQL trace. If yes,
     you have to find out which queries are blocking and rewrite them/run them at other time to avoid blocking other processes.
    In addition, you can use performance monitor to track connection pool connections. If you set default connection limit and timeout limit with a small number, the error of “wait operation timed out” will occur. Meanwhile, you also need to monitor disk usage
    on SQL Server , and set the auto increment size of your transaction log and database with a fixed size instead of a percentage of the current files due to avoid transaction timeout. For more information, see:
    http://stackoverflow.com/questions/7743725/how-to-troubleshoot-intermittent-sql-timeout-errors
    There is an similar issue about connection failed from webservers to SQL Server AlwaysOn Listener, you can review it.
    http://stackoverflow.com/questions/23416492/connection-timeouts-when-using-multisubnetfailover-true
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Multi Site SQL High Availability group

    Hi,
    We have our primary Data Centre where we have 2 MS SQL 2012 Enterprise Servers and 2 SharePoint 2013 Enterprise servers.
    We have SQL High Availability group implemented on our primary Site (Site A)
    Site A has subnet of 192.168.0.0.
    We recently added a new DR Site (Site B). Site B we have MS SQL 2012 Enterprise Servers.  Site B have a subnet of
    172.1.1.0
    Both sites are connected via a VPN Tunnel. MS SQL 2012 Enterprise Server on Site B has been added in have SQL High Availability
    group of Site A.
    SQL High Availability group have 2 IPs 192.168.0.32 and 172.1.1.32. SQL Listener have 2 IPs 192.168.0.33 and 172.1.1.33
    We want to make sure that if Site A completely down then Site B work as an active Site. But when Site A down we are unable
    to ping High Availability group and Site B is unable to work as active site. SQL and SharePoint services are completely down.
    Site A has AD(Primary Domain  Controller) and Site B has ADC(Additional Domain Controller).
     Site A has witness server.
    We are using Server 2012 Data Centre
    Please suggest.
    Farooq

    SharePoint is not the same as any other applications. The DR site has to be a completely different farm from your production. This means that the SharePoint_AdminContent and config databases on both farms are different and should not be included in the Availability
    Group (they do not support asynchronous Availability Group.) Only content databases and other SharePoint databases supported in an Availability Group should be included as per this
    TechNet article. Have a look at this
    blog post for your networking configuration.
    The reason your Windows cluster service goes down in the DR data center when the when your primary data center goes down is because the cluster has no majority votes. You have 4 available votes in your cluster - 3 in the primary data center in the form of
    the 2 Availability Group replicas and the witness server and 1 in the DR data center. If the Windows cluster does not have majority of votes, it automatically shuts down the cluster. This is by design. That is why when this situation happens, you need to force
    the cluster to start without a quorum as described in
    this article (Windows Server 2012 R2 introduced the concept of dynamic witness and dynamic quorum to address this concern.) By default, the IP address of the Availability Group listener name will be registered on all of the DNS servers if the cluster is
    running Windows Server 2012 and higher (this is the RegisterAllProvidersIP property that Samir mentioned.) However, you need to flush the DNS cache on the SharePoint web and application servers and point them to the correct IP address on the DR server after
    failover. This is because the default TTL value of the Availability Group listener name is 20 minutes. 
    It is important to define your DR strategies and objectives when designing the architecture to make sure that the solution will meet your goals. This will also help you automate some of the processes in the DR data center when failover or a disaster occurs.
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • SCOM 2012 R2 Management Servers and SQL Server Availability Groups

    My team is in the middle of rolling out a brand new install of System Center Operations Manager 2012 R2.
    I have set up a SQL Server Availability group that is spread across multiple subnets and installed the initial management server per
    here. 
    As I have gone through attaching new management servers, I have noticed disturbing behavior.  When the AG fails over to another node, the management servers will lose connectivity unless I either recycle the service or it fails back to the original
    node.  This is not a security issue as I have set up permissions.  It says it cannot connect to the database anymore at all.
    Has anyone else seen this behavior?  Is there a setting I am missing somewhere?
    Thanks for your help.
    Dale

    Hi Dale,
    What about ApplicationIntent\Readonly?
    http://msdn.microsoft.com/en-us/library/hh205662(v=vs.110).aspx
    Still thinking about DNS, may be this could be for your case:
    http://www.sqlservercentral.com/Forums/Topic1449216-2799-1.aspx
    Natalya

Maybe you are looking for

  • Data DVD burn cancels

    I have tried repeatedly to burn a back-up data DVD of a playlist. The burn cancels in the first song. I have culled through the playlist and removed anything purchased online or shifted over from another desktop on the same computer. None of the song

  • How can I type on a PDF file? Do I need a specific version of Adobe to enter a text box?

    I would rather type my information onto the page rather than hand write it and I don't have access to a type writer. How can I type my info onto the application?? Please help!

  • The Problem in serialization.

    The serialization issue is a trivial one at the moment. However the threat of a version change is imminent considering the next release of JDK 6 "Mustang" may have considerable improvements especially on the Swing side. Therefore, I strongly encourag

  • HELP ON LOGIN AND UPLOAD PAGE

    hi there. I currently design a website for a rugby club, and need to allow access to the coach to upload the team every Thursday. There is no point in putting Dreamweaver on his PC so would like to add a page where he logs in (he will be the only one

  • Photoshop Elements 8 Help!

    Hi, It's my first time here. I had to clean my MacBook pro. and now I can't find the download of Photoshop Elements 8. I own the product few years ago. I saw that It's not abailable the mac download. I would like to know if I can get it. I need it. I