Anda di halaman 1dari 75

Contents

 SQL Server AlwaysOn errors (errors in SQL Server)


 SQL Server AlwaysOn (errors in SQL Server Configuration Manager)
 SQL Server AlwaysOn (New Availability Group wizard errors)
 SQL Server AlwaysOn (SSMS errors)
 SQL Server AlwaysOn (performance issues)
 SQL Server AlwaysOn errors (network)
 SQL Server AlwaysOn errors (Application issues)
 SQL Server AlwaysOn errors (cluster log)
 SQL Server AlwaysOn errors (Windows messages obtained through “net helpmsg”)
 SQL Server AlwaysOn errors (WMI errors)
 SQL Server AlwaysOn (patching/updates in SQL 2012)

Tips to search this document: Try searching on error number, or on part of error message, or on performance issue like “hang”, wait type like
“HADR_SYNC_COMMIT”, or on database state like “RECOVERY_PENDING” (without quotes).

Ideally this information is available through below logs:

 Executing TSQL etc. commands through SQL Management Studio.


 SQL ERRORLOG files
 SQL default traces in LOG folder
 Event logs
 Cluster logs.

SQL Server AlwaysOn errors (errors in SQL Server)

error severity description


Database '%.*ls' is enabled for
database mirroring or has joined
an availability group. The name of
957 17 the database cannot be changed.
The target database, '%.*ls', is  If dm_hadr_availability_replica_states.role_desc=3(INVALID), then
participating in an availability check service broker. Because Availability group is using Service Broker
group and is currently not to communicate between SQL Server then need to check Service Broker
accessible for queries. Either data first. Open SSMS>“Server Objects” > “Endpoints”, there are two
movement is suspended or the “Service Broker” folder>Expand both, and if the state is Stopped or
availability replica is not enabled Disabled, then can change the state to Started.
for read access. To allow read-  Similar steps as in error 35250.
976 14 only access to this and other
The target database ('%.*ls') is in
an availability group and is
currently accessible for
connections when the application
intent is set to read only. For
more information about
application intent, see SQL Server
978 14 Books Online.
The target database ('%.*ls') is in
an availability group and currently
does not allow read only
connections. For more
information about application
intent, see SQL Server Books
979 14 Online.
Unable to access the '%.*ls'
database because no online
secondary replicas are enabled for
read-only access. Check the
availability group configuration to
982 14 verify that at least one secondary
replica is configured for read-only
access. Wait for an enabled r

Unable to access database '%.*ls'  Check SQL ERRORLOGs, event logs, etc. for network, storage related
because its replica role is messages etc.
RESOLVING which does not allow
connections. Try the operation
983 14 again later.
The remote copy of database
"%.*ls" is not recovered far
enough to enable database
mirroring or to join it to the
availability group. You need to
apply missing log records to the
remote database by restoring the
current log backups from the
1408 16 principal/prim
Database "%.*ls" requires
database logs to be restored
either on the future mirror
database before you can enable
database mirroring or on a
secondary availability database
before you can join it to the
availability group. Restore current
1409 16 log backups from
Database "%.*ls" database is not
in full recovery mode on each of
the server instances. The full
recovery model is required for a
database to participate in
database mirroring or in an
1465 16 availability group.
Database "%.*ls" is read-only on
one of the server instances which
is incompatible with participating
in database mirroring or in an
availability group. Set the
database to read-write mode, and
1466 16 retry the operation.
Database "%.*ls" database is in
emergency or suspect mode on
one of the partners which is
incompatible with participating in
database mirroring or in an
1467 16 availability group.
The operation cannot be
performed on database "%.*ls"
because it is involved in a
database mirroring session or an
availability group. Some
operations are not allowed on a
database that is participating in a
database mirroring session or in
1468 16 an availabilit
Database "%.*ls" is an auto-close
database on one of the
partnerswhich is incompatible
with participating in database
mirroring or in an availability
1469 16 group.
The %S_MSG database "%.*ls" is  This is an informational message only. If there is a problem, then look
changing roles from "%ls" to "%ls" for additional messages.
because the mirroring session or
availability group failed over due
1480 10 to %S_MSG. This is an
informational message only. No
user action is required.

Database "%.*ls" database is in


single user mode which is
incompatible with participating in
database mirroring or in an
availability group. Set database to
multi-user mode, and retry the
1488 16 operation.
File '%ls' cannot be reused until
after the next BACKUP LOG
operation. If the database is
participating in an availability
group, a dropped file can be
reused only after the truncation
LSN of the primary availability
replica has passed the drop LSN of
1833 16 the
RESTORE cannot operate on
database '%ls' because it is
configured for database mirroring
or has joined an availability group.
If you intend to restore the
database, use ALTER DATABASE to
remove mirroring or to remove
the database from its availability
3104 16 gro
 If the second %ls is RESTORING, then one option is below.
1) Asked the customer to stop the SQL Server Service.
2) Had the customer rename the actual files on disk with a "_old" suffix so that
The database '%ls' is marked %ls the sql server would not find them and have the db come up suspect.
and is in a state that does not 3) Asked the customer to start the SQL Server Service.
3402 10 allow recovery to be run. Once the server came back up we were able to delete the database.
4) Had the customer create a new database with the same name and location
as the original database. Used the output from sysaltfiles to verify this.
5) Had the customer stop the SQL Server Service.
6) Had the customer rename these new database files by appending a "_new"
on the end of the file.
7) Had the customer take the old database files with the "_old" suffix and
changed them back to the original name.
8) Had the customer start the SQL Server Service.
The operating system returned  Verify error in %ls at DOS prompt with “net helpmsg”. Then proceed
the error '%ls' while attempting depending on this error.
3633 16 '%ls' on '%ls' at '%hs'(%d).
 Before you can drop the database, you need to remove it from the
availability group. If AG exists, try ALTER AVAILABILITY GROUP
[AGname] REMOVE DATABASE [DbName]. If AG does not exist, try
The database '%.*ls' is currently removing with ALTER DATABASE [DbName] SET HADR OFF.
joined to an availability group.  If replica_id and group_database_id in sys.databases show as null, then
Before you can drop the this may be due to earlier meta-data when database was part of an AG
database, you need to remove it so stop SQL Server, rename the database files and start SQL Server.
3752 16 from the availatility group. Then you should be able to remove the database.
Failed to remove a FILESTREAM
file. The database is a primary
database in an availability group.
Wait for the FILESTREAM data
files to be hardened on every
secondary availability replica.
5529 16 Then retry the drop file operation.
The ALTER AVAILABILITY GROUP
command failed because it
contained multiple MODIFY
REPLICA options: %ls. Enter a
separate ALTER AVAILABILITY
GROUP ... MODIFY REPLICA
command for each replica option
10786 16 that you want to modify.
13251 10 availability group
The READ_ONLY_ROUTING_URL
'%.*ls' specified for availability
replica '%.*ls' is not valid. It does
not follow the required format of
'TCP://system-address:port'. For
information about the correct
routing URL format, see the
CREATE AVAILABILITY GROUP
19401 16 docum
The availability replica '%.*ls'
specified in the
READ_ONLY_ROUTING_LIST for
availability replica '%.*ls' does not
exist. Only availability replicas
that belong to the specified
availability group '%.*ls' can be
added to this list. To get the
19403 16 names of ava
Failed to create, join or add  May occur if AG involves two or more SQL failover instances. Check
replica to availability group possible owners of SQL resource on both/more so as to verify no node
'%.*ls', because node '%.*ls' is a name overlap. There should not be node-overlap.
possible owner for both replica TSQL: SELECT * FROM sys.dm_os_cluster_nodes;
'%.*ls' and '%.*ls'. If one replica is Powershell: get-clusterownernode -resource "XXXBSQL"
failover cluster instance, remove Powershell: set -clusterownernode -resource "XXXASQL" -owners
the overlapped node from its NODE1,NODE2
19405 16 possible owners and try ag
 If the changed state is PRIMARY_PENDING, then check
The state of the local availability sys.dm_hadr_database_replica_states. If database_state_desc =
replica in availability group '%.*ls' RECOVERY_PENDING (synchronization_health_desc will be
has changed from '%ls' to '%ls'. NOT_HEALTHY), then try “ALTER DATABASE db SET HADR RESUME;”.
The replica state changed because Else if this is the only replica (no secondary replica), then (consider first
of either a startup, a failover, a taking a database snapshot as a backup if required) try “ALTER
19406 10 communication issue, or a cluster DATABASE db SET HADR OFF;” to remove AlwaysOn so as to then
error. For more information, see manually recover database with SQL service or database restart (ALTER
the availabi DATABASE ONLINE).
TSQL: ALTER DATABASE DbName SET HADR RESUME;
TSQL: ALTER DATABASE DbName SET ONLINE;
TSQL: RESTORE DATABASE DbName WITH RECOVERY;
 If the changed state is RESOLVING_NORMAL, check for additional
messages.
The lease between availability
group '%.*ls' and the Windows
Server Failover Cluster has
expired. A connectivity issue
occurred between the instance of
SQL Server and the Windows
Server Failover Cluster. To
determine whether the
19407 16 availability group is fail
The availability group listener
(network name) with Windows
Server Failover Clustering
resource ID '%s', DNS name '%s',
port %hu failed to start with a
permanent error: %u. Verify port
numbers, DNS names and other
related network configuration,
19452 16 then retry
The availability group listener
(network name) with Windows
Server Failover Clustering
resource ID '%s', DNS name '%s',
port %hu failed to start with this
error: %u. Verify network and
19453 16 cluster configuration and logs.
The availability group listener
(network name) with Windows
Server Failover Clustering
resource ID '%s', DNS name '%s',
port %hu failed to stop with this
error: %u. Verify network and
19454 16 cluster configuration and logs.
The WSFC cluster does not have a
public cluster network with an
IPv4 subnet. This is a requirement
to create an availability group
DHCP listener. Configure a public
network for the cluster with an
IPv4 subnet, and try to create the
19455 16 listener.
None of the IP addresses  Added a new IP address (with different subnet) manually to the existing
configured for the availability Listener [to be tested].
group listener can be hosted by
the server '%.*ls'. Either configure
a public cluster network on which
one of the specified IP addresses
can be hosted, or add another
19456 16 listener IP address which can b
The WSFC nodes that host the
primary and secondary replicas
belong to different subnets. DHCP
across multiple subnets is not
supported for availability replicas.
Use the static IP option to
configure the availability group
19458 16 listener.
The availability group listener
with DNS name '%.*ls' is
19460 16 configured to use DHCP. For
listeners with this configuration,
IP addresses cannot be added
through SQL Server. To add IP
addresses to the listener, drop the
DHCP listener and create it again
config
The listener with DNS name
'%.*ls' for the availability group
'%.*ls' is already listening on the
TCP port %u. Please choose a
different TCP port for the listener.
If there is a problem with the
listener, try restarting the listener
19468 16 to correct the problem
The specified listener with DNS
name, '%.*ls', does not exist for
the Availability Group '%.*ls'. Use
an existing listener, or create a
19469 16 new listener.
The WSFC cluster could not bring  Check for associated errors like error 19476.
the Network Name resource with
DNS name '%ls' online. The DNS
name may have been taken or
have a conflict with existing name
services, or the WSFC cluster
service may not be running or
may be inaccessible. Use a
19471 16 different
The attempt to create the  Check for associated errors like error 41009.
network name and IP address for
the listener failed. The WSFC
service may not be running or
may be inaccessible in its current
19476 16 state, or the values provided for
the network name and IP address
may be incorrect. Check the state
of the WFSC cluster and validate
the network name and IP address
with the network administrator.
The availability group '%.*ls'
already has a listener with DNS
name '%.*ls'. Availability groups
can have only one listener. Use
the existing listener, or drop the
existing listener and create a new
19477 16 one.
The configuration changes to the
availability group listener were
completed, but the TCP provider
of the instance of SQL Server
failed to listen on the specified
port [%.*ls:%d]. This TCP port is
already in use. Reconfigure the
19486 16 availability group listener
The availability group associated
with Virtual Network Name '%s'
21872 16 has no replicas.
The virtual network name '%s' has
been used to identify the
redirected publisher for original
publisher '%s' and database '%s'.
The availability group associated
with this virtual network name,
however, does not include the
21880 16 publisher database.
The database '%s' at the
redirected publisher '%s' for
21882 16 original publisher '%s' and
database '%s' belongs to a
HADRon availability group and
must be redirected to its
associated HADRon Virtual
Network Name.
The query at the redirected
publisher '%s' to determine
whether the publisher database
'%s' belonged to an availability
group failed with error '%d', error
21883 16 message '%s'.
The query at the redirected
publisher '%s' to determine the
health of the availability group
associated with publisher
database '%s' failed with error
21884 16 '%d', error message '%s'.
The query at the redirected
publisher '%s' to determine
whether the publisher database
'%s' belonged to an availability
group failed with error '%d', error
21887 16 message '%s'.
Unable to query
sys.availability_replicas at the
availability group primary
associated with virtual network
name '%s' for the server names of
the member replicas: error = %d,
21892 16 error message = %s.',
The database '%.*s' is a readable
secondary database in an
33445 16 availability group and cannot be
enabled for FILESTREAM non-
transacted access.
The FILESTREAM database
configuration cannot be changed
for database '%.*s'. The database
is either a mirror database in
Database Mirroring, or is in a
secondary replica of an AlwaysOn
availability group. Connect to the
33446 16 server instance that hosts the pr
FILESTREAM File I/O access is
enabled, but no listener for the
availability group is created. A
FILESTREAM PathName will be
unable to refer to a virtual
network name (VNN) and,
instead, will need to refer to a
physical Windows Server Failover
33449 10 Clustering (
FILESTREAM File I/O access is
enabled. One or more availability
groups ('%ls') currently do not
have a listener. A FILESTREAM
PathName will be unable to refer
to a virtual network name (VNN)
and, instead, will need to refer to
33450 10 a physical Windows Server F
A connection for availability group  This is an informational message only. If there is a problem, then look
'%ls' from availability replica '%ls' for additional messages.
with id [%ls] to '%ls' with id [%ls]
has been successfully established.
This is an informational message
35202 10 only. No user action is required.
Could not start the AlwaysOn
Availability Groups transport
manager. This failure probably
occurred because a low memory
condition existed when the
message dispatcher started up. If
so, other internal tasks might also
have experienced errors. Check
35205 16 the SQL
 If there is a login failed for domain\node$ account around same time,
then it may be because NT AUTHORITY\SYSTEM account lacked the
required permissions to failover the availability group. To failover the
group to the other node, NT AUTHORITY\SYSTEM must have permission
to connect to SQL (CONNECT SQL), failover the availability group (ALTER
A connection timeout has ANY AVAILABILITY GROUP) and execute sp_server_diagnostics (VIEW
occurred on a previously SERVER STATE). The NT AUTHORITY\SYSTEM account is used to
established connection to automatically execute sp_server_diagnostics. Another option is to add
availability replica '%ls' with id the account to sysadmin role in SQL Server.
[%ls]. Either a networking or a CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH
firewall issue exists or the DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english];
availability replica has ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT
35206 10 transitioned to the resolving role. AUTHORITY\system];
Connection attempt on
availability group id '%ls' from
replica id '%ls' to replica id '%ls'
failed because of error %d,
35207 16 severity %d, state %d.
Failed to modify options for
availability replica '%.*ls' in
availability group '%.*ls'. The
specified availability group does
not contain an availability replica
35210 16 with specified name. Verify that
availability group name and
availability replica name are c

The %ls operation is not allowed


by the current availability-group
configuration. This operation
would exceed the maximum
number of %d synchronous-
commit availability replicas in
availability group '%.*ls'. Change
one of the existing synchronous-
35212 16 commit
The %ls operation is not allowed
by the current availability-group
configuration. This operation
would exceed the maximum
number of %d automatic failover
targets in availability group
'%.*ls'. Change one of the
existing synchronous-commit
35213 16 replicas to th
The thread pool for AlwaysOn
Availability Groups was unable to
start a new worker thread
because there are not enough
available worker threads. This
may degrade AlwaysOn
Availability Groups performance.
Use the "max worker threads"
35217 16 configuration option
Could not process the operation.
AlwaysOn Availability Groups
replica manager is waiting for the
35220 16 host computer to start a Windows
Server Failover Clustering (WSFC)
cluster and join it. Either the local
computer is not a cluster node, or
the local cluster
Could not process the operation.
AlwaysOn Availability Groups
replica manager is disabled on
this instance of SQL Server. Enable
AlwaysOn Availability Groups, by
using the SQL Server
Configuration Manager. Then,
restart the SQL Server service, and
35221 16 retry t
Could not process the operation.
AlwaysOn Availability Groups
does not have permissions to
access the Windows Server
Failover Clustering (WSFC) cluster.
Disable and re-enable AlwaysOn
Availability Groups by using the
SQL Server Configuration
35222 16 Manager. The
Cannot add %d availability
replica(s) to availability group
'%.*ls'. The availability group
already contains %d replica(s),
and the maximum number of
replicas supported in an
35223 16 availability group is %d.
Could not process the operation.
AlwaysOn Availability Groups
failed to load the required
Windows Server Failover
35224 16 Clustering (WSFC) library. Verify
that the computer is a node in a
WSFC cluster. You will need to
restart the SQL Server instance to
reload
Could not process the operation.
The instance of SQL Server is
running under WOW64 (Windows
32-bit on Windows 64-bit), which
does not support AlwaysOn
Availability Groups. Reinstall SQL
Server in the native 64-bit edition,
35225 16 and re-enable AlwaysOn Availab
Could not process the operation.
AlwaysOn Availability Groups has
not started because the instance
of SQL Server is not running as a
service. Restart the server
instance as a service, and retry
35226 16 the operation.
The attempt to set the failure
condition level for availability
group '%.*ls' failed. The specified
level value is out of the valid
range [%u, %u]. Reenter the
command specifying a valid
35228 16 failure condition level value.
The attempt to set the health
check timeout value for
availability group '%.*ls' failed.
The specified timeout value is less
than %u milliseconds. Reenter the
command specifying a valid
35229 16 health check timeout value.
Cannot create an availability
group containing %d availability
35233 16 replica(s).
None of the specified replicas for
availability group %.*ls maps to
the instance of SQL Server to
which you are connected. Reenter
the command, specifying this
server instance to host one of the
replicas. This replica will be the
35237 16 initial primary replica.
Database '%.*ls' cannot be added
to availability group '%.*ls'. The
database does not exist on this
SQL Server instance. Verify that
the database name is correct,
35238 16 then retry the operation.
The ALTER DATABASE <database-
name> SET HADR SUSPEND (or
SET HADR RESUME) statement
failed on database '%.*ls' of
availability group '%.*ls''. Either
the availability group does not
contain the specified database, or
the database has not joined the
35239 16 availab
 TSQL to unjoin is “ALTER DATABASE db SET HADR OFF”. Note that
failing over thus making it a secondary, and then retrying ALTER
DATABASE HADR is not an option, because the alter database will then
Database '%.*ls' cannot be joined give error 921 that database has not been recovered yet.
to or unjoined from availability  If this replica can be made a secondary, then fail over thus making it a
group '%.*ls'. This operation is not secondary, and then drop replica when in this secondary role. TSQL is
supported on the primary replica “ALTER AVAILABILITY GROUP AgName REMOVE REPLICA ON
35240 16 of the availability group. ‘ReplicaName’;”.
 If no secondary replica for failover and getting this error on primary,
then “DROP AVAILABILITY GROUP AgName”. This will automatically
drop listener. If do not want listener dropped, then create a temporary
AG adding same name, then try the “DROP AVAILABILITY GROUP”.
Cannot complete this ALTER
DATABASE <database-name> SET
HADR operation on database
'%.*ls'. The database is not joined
to an availability group. After the
database has joined the
availability group, retry the
35242 16 command.
Failed to set resource property
'%.*ls' for availability group
'%.*ls'. The operation
encountered SQL Server error %d.
When the cause of the error has
been resolved, retry the ALTER
AVAILABILITY GROUP command
35243 16 later.
Database '%.*ls' cannot be added
to availability group '%.*ls'. The
database is currently joined to
another availability group. Verify
that the database name is correct
and that the database is not
joined to an availability group,
35244 16 then retry the operati
Failed to create the availability
group. A SQL Server instance
name could not be validated
because the dynamic link library
(DLL) file '%ls' could not be
35246 16 located (Windows System Error
%d). Verify that the specified
server instance exists. If it exists,
th

Failed to create the availability


group. A SQL Server instance
name could not be validated
because the dynamic link library
(DLL) file '%ls' could not be loaded
35247 16 (Windows System Error %d).
An attempt to add or join a
system database, '%.*ls', to an
availability group failed. Specify
only user databases for this
35249 16 operation.
 Check SQL ERRORLOG to verify SQL is listening on the ports. If SQL is
listening on port, check if SQL is listening on all IPs (e.g. not “Server is
listening on [ 192.192.192.192 <ipv4> 5022]”) (should ideally be “Server
is listening on [ 'any' <ipv4> 1433]”). If not listening on any/all IPs for
port, then two options. One option is to recreate hadr_endpoint to
The connection to the primary listen on ALL ip. Second option is to enter the replication adapter IP in
replica is not active. The DNS for the configured endpoint).
35250 16 command cannot be processed.  Check ping, telnet, nslookup to replica(s).
An error occurred while accessing
the availability group metadata.
Remove this database or replica
from the availability group, and
reconfigure the availability group
to add the database or replica
again. For more information, see
35254 16 the ALTER AVAILABILITY G
AlwaysOn Availability Groups
Send Error (Error code 0x%X,
"NOT OK") was returned when
sending a message for database
ID %d. If the partner is running
and visible over the network,
retry the command using
correctly configured partner-
35257 16 connection parameters
Database '%.*ls' is already
participating in a different
35259 16 availability group.
During an attempted database
recovery, an availability database
manager was not found for
database id %d with availability
group ID %d and group database
ID %ls. Recovery was terminated.
The most likely cause of this error
35260 16 is that the availability group
Attempt to perform an AlwaysOn
Availability Groups operation on a
system database, '%ls', failed.
System databases are not
supported by AlwaysOn
35261 16 Availability Groups.
Skipping the default startup of  This is an informational message only. If there is a problem, then look
database '%.*ls' because the for additional messages.
database belongs to an availability
group (Group ID: %d). The
database will be started by the
availability group. This is an
informational message only. No
35262 17 user action is required.
AlwaysOn Availability Groups data  Link redirects to http://msdn.microsoft.com/en-
movement for database '%.*ls' us/library/ff877956.aspx and the mention steps should be followed to
has been suspended for the resume data movement.
following reason: "%S_MSG" SSMS: AlwaysOn High Availability node>Availability Groups
(Source ID %d; Source string: node>expand availability group>Availability Databases node>right-click
'%.*ls'). To resume data database>Resume Data Movement>OK.
movement on the database, you TSQL on secondary: ALTER DATABASE database_name SET HADR
will need to resume the database RESUME;
35264 10 manually. For infor
AlwaysOn Availability Groups data  This is an informational message only. If there is a problem, then look
movement for database '%.*ls' for additional messages.
has been resumed. This is an
informational message only. No
35265 10 user action is required.
AlwaysOn Availability Groups  This is an informational message only. If there is a problem, then look
connection with %S_MSG for additional messages.
database established for %S_MSG
database '%.*ls' on the availability
replica with Replica ID: {%.8x-
%.4x-%.4x-%.2x%.2x-
%.2x%.2x%.2x%.2x%.2x%.2x}. This
is an informational message only.
35266 10 No user action is
AlwaysOn Availability Groups  This is an informational message only. If there is a problem, then look
connection with %S_MSG for additional messages.
database terminated for %S_MSG
database '%.*ls' on the availability
replica with Replica ID: {%.8x-
%.4x-%.4x-%.2x%.2x-
%.2x%.2x%.2x%.2x%.2x%.2x}. This
is an informational message only.
35267 10 No user action is r
A previous RESTORE WITH
CONTINUE_AFTER_ERROR
operation or being removed while
in the SUSPECT state from an
availability group left the '%.*ls'
database in a potentially damaged
state. The database cannot be
joined while in this state. Restore
35275 16 the database
Failed to allocate and schedule an
AlwaysOn Availability Groups task
for database '%ls'. Manual
intervention may be required to
resume synchronization of the
database. If the problem persists,
you might need to restart the
35276 17 local instance of SQL Server.
The attempt to join database
'%.*ls' to the availability group
was rejected by the primary
database with error '%d'. For
more information, see the SQL
Server error log for the primary
35279 16 replica.
Database '%.*ls' cannot be added
to availability group '%.*ls'. The
database is already joined to the
specified availability group. Verify
that the database name is correct
and that the database is not
joined to an availability group,
35280 16 then retry the ope
Database '%.*ls' cannot be
removed from availability group
'%.*ls'. The database is not joined
to the specified availability group.
Verify that the database name
and the availability group name
are correct, then retry the
35281 16 operation.
Availability replica '%.*ls' cannot
be added to availability group
'%.*ls'. The availability group
already contains an availability
replica with the specified name.
Verify that the availability replica
name and the availability group
35282 16 name are correct, t
Availability replica '%.*ls' cannot
be removed from availability
group '%.*ls'. The availability
group does not contain an
availability replica with the
specified name. Verify that the
availability replica name is
35283 16 correct, then retry the operation.
Availability replica '%.*ls' cannot
be removed from availability
group '%.*ls', because this replica
is on the local instance of SQL
Server. If the local availability
replica is a secondary replica,
connect to the server instance
35284 16 that is currently hostin
AlwaysOn Availability Groups
transport for availability database
"%.*ls" failed to decompress the
log block whose LSN is %S_LSN.
This error can be caused by a
corrupt network packet or a
compression version mismatch.
The database replica has been put
35287 16 in
AlwaysOn Availability Groups log
apply for availability database
"%.*ls" has received an out-of-
order log block. The expected
LSN was %S_LSN. The received
LSN was %S_LSN. The database
replica has been put into the
SUSPENDED state. Resume the
35288 16 availabil
Nonqualified transactions are  This is an informational message only. If there is a problem, then look
being rolled back in database for additional messages.
%.*ls for an AlwaysOn Availability
Groups state change. Estimated
rollback completion: %d%%. This
is an informational message only.
35299 10 No user action is required.
The Windows Server Failover  Net helpmsg on the %d value, and proceed accordingly. May also be
Clustering (WSFC) resource accompanied by Microsoft-Windows-FailoverClustering messages in
control API returned error code event log. Check cluster log.
%d. The WSFC service may not be  If there error is in cluster in Windows Azure, then it may be because
running or may not be accessible Windows Azure currently does not support more than one IP address
in its current state, or the per VM, which is required by the availability group listener to resolve to
specified arguments are invalid. the availability group owner node. This is documented in
For information about this error http://msdn.microsoft.com/en-us/library/jj870962.aspx (High
41009 16 code,
Availability and Disaster Recovery for SQL Server in Windows Azure
Virtual Machines).

Failed to obtain the Windows  Check if Windows cluster service is running.


Server Failover Clustering (WSFC)  Net helpmsg on the %d value, and proceed accordingly.
node handle (Error code %d). The
WSFC service may not be running
or may not be accessible in its
current state, or the specified
cluster node name is invalid. For
41015 16 information about this erro
An availability group replica
already exists on the Windows
Server Failover Clustering (WSFC)
node '%.*ls'. Each WSFC node can
contain only one replica of an
availability group. Please choose
another WSFC node to host the
41039 16 new replica.
Failed to remove the availability
group replica '%.*ls' from
availability group '%.*ls'. The
availability group does not
contain a replica with the
specified name. Verify the
availability group and replica
names and then retry the
41040 16 operation.
The availability group '%.*ls'  If AG still exists, DROP AVAILABILITY GROUP.
already exists. This error could be  Open regedit, backup the entry from the old Availability Group that
caused by a previous failed starts with HADR_Ag_???? key, then delete this key [to be tested].
CREATE AVAILABILITY GROUP or  Try with new name for Availability Group.
DROP AVAILABILITY GROUP
41042 16 operation. If the availability
group name you specified is
correct, try dropping the
availability group a
For availability group '%.*ls', the
value of the name-to-ID map
entry is invalid. The binary value
should contain a Windows Server
Failover Clustering (WSFC)
resource ID, a WSFC group ID, and
their corresponding lengths in
41043 16 characters. The availability g
Availability group name to ID map
entry for availability group '%.*ls'
cannot be found in the Windows
Server Failover Clustering (WSFC)
store. The availability group
name may be incorrect, or the
availability group may not exist in
41044 16 this Windows Server Fa
Cannot add database '%.*ls' to
the availability group '%.*ls',
because there is already a
database with the same name in
the availability group. Please
verify that the database and
availability group names specified
41045 16 are correct.
Cannot add replica '%.*ls' to the
availability group '%.*ls', because
there is already a replica with the
same name in the availability
group. Please verify the replica
and availability group names
41046 16 specified are correct.
AlwaysOn Availability Groups:  This is an informational message only. If there is a problem, then look
Local Windows Server Failover for additional messages.
Clustering service has become
unavailable. This is an
informational message only. No
41048 10 user action is required.
AlwaysOn Availability Groups:  This is an informational message only. If there is a problem, then look
Local Windows Server Failover for additional messages.
Clustering node is no longer
online. This is an informational
message only. No user action is
41049 10 required.
AlwaysOn Availability Groups:  Notice this error says cluster “service” not node.
Waiting for local Windows Server  Check services.msc if cluster service is started on that node. If not
Failover Clustering service to started, then start the service.
start. This is an informational  This is an informational message only. If there is a problem, then look
message only. No user action is for additional messages.
41050 10 required.
AlwaysOn Availability Groups:  This is an informational message only. If there is a problem, then look
Local Windows Server Failover for additional messages.
Clustering service started. This is
an informational message only.
41051 10 No user action is required.
AlwaysOn Availability Groups:  Notice this error says cluster “node” not service.
Waiting for local Windows Server  If node is paused in Failover Cluster Manager, resume it.
Failover Clustering node to start.  This is an informational message only. If there is a problem, then look
This is an informational message for additional messages.
41052 10 only. No user action is required.
AlwaysOn Availability Groups:  This is an informational message only. If there is a problem, then look
Local Windows Server Failover for additional messages.
Clustering node started. This is an
informational message only. No
41053 10 user action is required.
AlwaysOn Availability Groups:  This is an informational message only. If there is a problem, then look
Waiting for local Windows Server for additional messages.
Failover Clustering node to come
online. This is an informational
message only. No user action is
41054 10 required.
AlwaysOn Availability Groups:  This is an informational message only. If there is a problem, then look
Local Windows Server Failover for additional messages.
Clustering node is online. This is
an informational message only.
41055 10 No user action is required.
Availability replica '%.*ls' of
availability group '%.*ls' cannot
be brought online on this SQL
Server instance. Another replica
of the same availability group is
already online on the local
Windows Server Failover
Clustering (WSFC) node. Each
41056 16 WSFC node
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is for additional messages.
starting. This is an informational
message only. No user action is
41058 10 required.
AlwaysOn: Availability group  This is an informational message only. If there is a problem, then look
'%.*ls' was removed while the for additional messages.
availability replica on this instance
of SQL Server was offline. The
local replica will be removed now.
This is an informational message
41059 10 only. No user action is required.
The Cyclic Redundancy Check
(CRC) value generated for the
retrieved availability group
configuration data from the
Windows Server Failover
Clustering (WSFC) store does not
match that stored with the data
for the availability group with ID
41060 16 '%.*ls'. The av
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is for additional messages.
stopping. This is an informational
message only. No user action is
41061 10 required.
The ID of availability group '%.*ls'
in local data store is inconsistent
with that in the Windows Server
Failover Clustering (WSFC) data
store. The availability group may
have been dropped and recreated
while the SQL Server instance was
41062 16 offline, or while
Windows Server Failover
Clustering (WSFC) detected that
the availability group resource
with ID '%.*ls' was online when
the availability group was not
actually online. The attempt to
synchronize the WSFC resource
state with the availability group
41063 16 state f
Cannot bring the Windows Server  In DOS prompt, run “Net helpmsg” on the %d value, and proceed
Failover Clustering (WSFC) accordingly.
41066 16 resource (ID '%.*ls') online (Error
code %d). The WSFC service may
not be running or may not be
accessible in its current state, or
the WSFC resource may not be in
a state that could accept the r
The existence of availability group
data for the availability group
'%.*ls' in the Windows Server
Failover Clustering (WSFC) store
could not be determined. The
local WSFC node may be down, or
a previous CREATE AVAILABILITY
GROUP or DROP AVAILABILITY
41069 16 GROU
Configuration data for the
availability group with Windows
Server Failover Clustering (WSFC)
resource ID '%.*ls' is not found in
the WSFC data store. The
availability group may have been
dropped, or a previous CREATE
AVAILABILITY GROUP or DROP
41070 16 AVAILABILI
Cannot read the persisted
configuration of AlwaysOn
availability group with
corresponding Windows Server
Failover Clustering (WSFC)
resource ID '%.*ls'. The persisted
configuration is written by a
higher-version SQL Server that
41071 16 hosts the primary availabi
The ID of availability group '%.*ls'
in local data store does not exist
in the Windows Server Failover
Clustering (WSFC) data store. The
availability group may have been
dropped but the current WSFC
node was not notified. To resolve
41072 16 this error, try to r
The database '%.*ls' cannot be
removed from availability group
'%.*ls'. This database does not
41073 16 belong to the availability group.
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is for additional messages.
preparing to transition to the
primary role in response to a
request from the Windows
Server Failover Clustering (WSFC)
cluster. This is an informational
message only. No user action is
41074 10 required
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is for additional messages.
preparing to transition to the
resolving role in response to a
request from the Windows Server
Failover Clustering (WSFC) cluster.
This is an informational message
41075 10 only. No user action is requir
AlwaysOn: Availability group  This is an informational message only. If there is a problem, then look
'%.*ls' is going offline because it is for additional messages.
being removed. This is an
informational message only. No
41076 10 user action is required.
Failed to delete SQL Server
instance name to Windows Server
Failover Clustering node name
map entry for the local availability
replica of availability group '%.*ls'.
The operation encountered SQL
Server error %d and has been
41080 16 terminated. Refer to the SQL
Failed to destroy the Windows
Server Failover Clustering group
corresponding to availability
group '%.*ls'. The operation
encountered SQL Server error %d
and has been terminated. Refer
to the SQL Server error log for
41081 16 details about this SQL Server error
AlwaysOn Availability Groups  This is an informational message only. If there is a problem, then look
startup has been cancelled, for additional messages.
because SQL Server is shutting
down. This is an informational
message only. No user action is
41089 10 required.
 Lease expired event from the cluster. Lease cannot be renewed maybe
because the SQL Server was busy. Will need to checks default traces
AlwaysOn: The local replica of etc. General suggestions include updating statistics, index rebuild, set
availability group '%.*ls' is going max memory if not set.
offline because either the lease  Possible causes include loss of lease, possible network issues and
expired or lease renewal failed. sp_server_diagnostic query timeout.
This is an informational message  This is an informational message only. If there is a problem, then look
41091 10 only. No user action is required. for additional messages.
AlwaysOn: The availability replica  This is an informational message only. If there is a problem, then look
manager is going offline because for additional messages.
41092 10 %ls. This is an informational
message only. No user action is
required.
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is going for additional messages.
offline because the corresponding
resource in the Windows Server
Failover Clustering (WSFC) cluster
is no longer online. This is an
informational message only. No
41093 10 user action is required.
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is for additional messages.
restarting because the existing
primary replica restarted or the
availability group failed over to a
new primary replica. This is an
informational message only. No
41094 10 user action is required.
AlwaysOn: Explicitly transitioning  Verify pre-requisite (for AlwaysOn) Windows fixes are installed.
the state of the Windows Server
Failover Clustering (WSFC)
resource that corresponds to
availability group '%.*ls' to Failed.
The resource state is not
consistent with the availability
41095 10 group state in the instance of SQL
AlwaysOn: The local replica of
availability group '%.*ls' is being
removed. The instance of SQL
Server failed to validate the
integrity of the availability group
configuration in the Windows
Server Failover Clustering (WSFC)
41096 10 store. This is expected if th
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is going for additional messages.
offline. This replica failed to read
the persisted configuration
because of a version mismatch.
This is an informational message
41097 10 only. No user action is required.
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is for additional messages.
restarting, because it failed to
read the persisted configuration.
This is an informational message
41098 10 only. No user action is required.
AlwaysOn: The local replica of  This is an informational message only. If there is a problem, then look
availability group '%.*ls' is going for additional messages.
offline. This replica failed to read
the persisted configuration, and it
has exhausted the maximum for
restart attempts. This is an
informational message only. No
41099 10 user action is required.
The availability group '%.*ls'
and/or its local availability replica
does not exist. Verify that the
specified availability group name
is correct, and that the local
availability replica has joined the
availability group, then retry the
41100 16 operation.
The availability group with
Windows Server Failover
Clustering resource ID '%.*ls'
and/or its local availability replica
41101 16 does not exist. Verify that the
specified availability resource ID is
correct, and that the local
availability replica has joined the
Failed to persist configuration
data of availability group '%.*ls' in
the Windows Server Failover
Clustering (WSFC) cluster. The
local availability replica either is
not the primary replica or is
41102 10 shutting down.
Startup of the AlwaysOn
Availability Replica Manager has
been terminated, because the
'FixQuorum' property of Windows
Server Failover Clustering (WSFC)
is not present. The prerequisite
QFE hotfix, KB 2494036, might not
yet be installed on your Windows
41103 10 Ser
Failover of the availability group
'%.*ls' to the local replica failed
because the availability group
resource did not come online due
to a previous error. To identify
that error, check the SQL Server
error log and the Windows Server
41104 16 Failover Cluster logs
Cannot create an availability
replica for availability group
'%.*ls'. An availability replica of
the specified availability group
already exists on this instance of
41106 16 SQL Server. Verify that the
specified availability group name
is correct and unique, the

Availability group '%.*ls' failed to


create necessary events for the
WSFC Lease mechanism.
Windows returned error code
(%d) when obtaining handles for
Lease events. Resolve the
windows error and retry the
41107 16 availability group operation.
An error occurred while removing
availability group '%.*ls'. The
DROP AVAILABILITY GROUP
command removed the
availability group configuration
from the local metadata.
However, the attempt to remove
this configuration from the
41108 16 Windows Server Failover Clust
Could not enqueue a task (SQL OS
error: 0x%x) for process actions
for the availability group '%.*ls'.
Most likely, the instance of SQL
Server is low on resources. Check
the SQL Server error log to
determine the cause of the
41109 17 failure. Retry the operation l
AlwaysOn: The availability replica  This is an informational message only. If there is a problem, then look
manager is starting. This is an for additional messages.
informational message only. No
41110 10 user action is required.
AlwaysOn: The availability replica  This is an informational message only. If there is a problem, then look
manager is waiting for the for additional messages.
instance of SQL Server to allow
client connections. This is an
informational message only. No
41111 10 user action is required.
A Windows Server Failover
Clustering (WSFC) API required by
availability groups has not been
loaded. AlwaysOn Availability
Groups replica manager is not
enabled on the local instance SQL
Server. If the server instance is
41112 16 running an edition of SQL Server t
Cannot failover availability group
'%.*ls' to this instance of SQL
Server because a failover
command is already pending on
the local replica of this availability
group. Wait for the pending
failover command to complete
before issuing another command
41113 16 on t
Cannot create an availability
group named '%.*ls' because it
41114 16 already exists in a system table.
Cannot create the availability
group named '%.*ls' because its
availability group ID (ID: '%.*ls')
41115 16 already exists in a system table.
Cannot create an availability
group named '%.*ls' with replica
ID '%.*ls' because this ID already
41116 16 exists in a system table.
Cannot map local database ID %d
to the availability database ID
'%.*ls' within availability group
'%.*ls'. This database is already
41117 16 mapped to an availability group.
Cannot map database ID %d to
the availability database ID '%.*ls'
within availability group '%.*ls'.
Another local database, (ID %d). is
already mapped to this availability
41118 16 database.
Could not find the availability
41119 16 group ID %d in the system table.
The local availability replica of
availability group '%.*ls' cannot
accept signal '%s' in its current
replica role, '%s', and state
(configuration is %s in Windows
Server Failover Clustering store,
local availability replica has %s
41121 10 joined). The availabil
Cannot failover availability group
'%.*ls' to this instance of SQL
Server. The local availability
replica is already the primary
replica of the availability group.
To failover this availability group
to another instance of SQL Server,
41122 16 run the failover c
Operation on the local availability
replica of availability group '%.*ls'
failed. The local copy of the
availability group configuration
41126 16 does not exist or has not been
initialized. Verify that the
availability group exists and that
the local copy of the
Attempt to set database mapping
state where the local database id
%d is not mapped to any
41127 16 availability group.
Failed to perform database
operation '%s' on database '%.*ls'
(ID %d) in availability group
'%.*ls'. The database might be in
an incorrect state for the
operation. If the problem
persists, you may need to restart
41128 16 the SQL Server instance.
Failed to schedule or execute
database operation '%s' on
database '%.*ls' (Database ID: %d)
in availability group '%.*ls' (SQL
OS error: %d). The instance of
SQL Server may have insufficient
resources to carry out the
database operation. If the
41129 16 problem p
Operation '%s' on a database
'%.*ls' (Database ID: %d) in
availability group '%.*ls' failed
with SQL Server error %d (Error
details: "%.*ls"). The operation
has been rolled back. See
previous error messages in the
SQL Server error log for more
41130 16 details.
Failed to bring availability group  Check logs for additional errors.
'%.*ls' online. The operation
timed out. Verify that the local
Windows Server Failover
Clustering (WSFC) node is online.
Then verify that the availability
group resource exists in the WSFC
41131 10 cluster. If the problem persis
Cannot join database '%.*ls' to
availability group '%.*ls'. The
specified database does not
belong to the availability group.
Verify the names of the database
and the availability group, and
retry the command specifying the
41132 16 correct names.
Cannot remove database '%.*ls'
from availability group '%.*ls'.
Either the database does not
belong to the availability group, or
the database has not joined the
group. Verify the database and
availability group names, and
41133 10 retry the command.
Cannot bring the availability
group '%.*ls' online. The local
instance was not the previous
primary replica when the
availability group went offline, not
all databases are synchronized,
and no force failover command
was issued on the local availability
41134 16 r
Startup of AlwaysOn Availability
Groups replica manager failed due
to SQL Server error %d. To
determine the cause of this error,
check the SQL Server error log for
41135 10 the preceding error.
Failed to join the availability
replica to availability group '%.*ls'
because the group is not online.
Either bring the availability group
online, or drop and recreate it.
41136 16 Then retry the join operation.
Abandoning a database operation  This is an informational message only. If there is a problem, then look
'%ls' on availability database for additional messages.
'%.*ls' of availability group '%.*ls'.
The sequence number of local
availability replica has changed
(Previous sequence number: %u,
current sequence number: %u).
41137 10 This is an informational mes
Cannot accept AlwaysOn 
Availability Groups operation
operation on database '%.*ls' of
availability group '%.*ls'. The
database is currently processing
another operation that might
change the database state. Retry
the operation later. If the
41138 17 condition per
Failed to set database information  This is an informational message only. If there is a problem, then look
for availability group %.*ls. The for additional messages.
local availability replica is not the
primary replica, or it is shutting
41139 10 down. This is an informational
message only. No user action is
required.

Availability group '%.*ls' cannot


process the ALTER AVAILABILITY
GROUP command, because the
local availability replica is not the
primary replica. Connect to the
server instance that is currently
hosting the primary replica of this
41140 16 availability group, an
Failed to set availability group  This is an informational message only. If there is a problem, then look
database information for for additional messages.
availability group %.*ls. The local
availability replica is not the
primary, or is shutting down. This
is an informational message only.
41141 16 No user action is required.
 Select availability group databases and select option to resume data
movement. This will work if cluster was not started in forced_quorum
mode.
 Check if *_FailoverCluster_health_XeLogs confirm that the cluster was
started in forced_quorum mode (forced_quorum True in
availability_replica_automatic_failover_validation event).
The availability replica for o When a cluster is started in forced_quorum mode (net.exe start
availability group '%.*ls' on this clussvc /forcequorum, OR Failover Cluster Manager>left
instance of SQL Server cannot pane>right-click Windows cluster>choose Force Cluster
become the primary replica. One Start>Confirm by clicking Yes.) on primary replica, the
or more databases are not availability group is required to be started by issuing command
synchronized or have not joined ALTER AVAILABILITY GROUP <AGNAME>
the availability group, or the FORCE_FAILOVER_ALLOW_DATA_LOSS;. Because this is the
WSFC cluster was started in Force original primary, despite issuing force allow data loss, NO data
41142 16 Quorum loss occurs
o When a cluster is started in forced_quorum mode on secondary
replica, first check
sys.dm_hadr_database_replica_cluster_states.is_failover_ready
on secondary. If this value is 1, and be assured no data loss will
occur. If this value is not 1 (for example because it’s
asynchronous commit), then can check
sys.dm_hadr_database_replica_states.last_commit_time, so as
to know estimate start time of data loss. The
sys.dm_hadr_database_replica_states.last_hardened_lsn value
may be used to consider other secondaries for failover. Then
can initiate failover with ALTER AVAILABILITY GROUP
<AGNAME> FORCE_FAILOVER_ALLOW_DATA_LOSS; on
secondary.
o TSQL: SELECT database_name, is_failover_ready
FROM sys.dm_hadr_database_replica_cluster_states
WHERE replica_id = (SELECT replica_id
FROM sys.availability_replicas
WHERE replica_server_name = '<Replica server
name>')
 Otherwise, once all local secondary databases are joined /synchronized,
a planned manual failover can be performed to this secondary replica
(without data loss).
Cannot process the operation.
The local replica of availability
Group '%.*ls' is in a failed state. A
previous operation to read or
update persisted configuration
data for the availability group has
failed. To recover from this
41143 16 failure, either restart
The local availability replica of
availability group '%.*ls' is in a
failed state. The replica failed to
41144 16 read or update the persisted
configuration data (SQL Server
error: %d). To recover from this
failure, either restart the local
Windows Server Failov
Cannot join database '%.*ls' to  This is an informational message only. If there is a problem, then look
availability group '%.*ls'. The for additional messages.
database has already joined the
availability group. This is an
informational message. No user
41145 10 action is required.
Failed to bring Availability Group
'%.*ls' online. The Windows
Server Failover Clustering (WSFC)
service may not be running, or it
may not be accessible in its
current state. Please verify the
local WSFC node is up and then
41146 16 retry the operation.
AlwaysOn Availability Groups was  This is an informational message only. If there is a problem, then look
not started because %ls. This is for additional messages.
an informational message. No
41147 10 user action is required.
Cannot add or join database
'%.*ls' to availability group '%.*ls'.
The database does not exist on
this instance of SQL Server. Verify
the database name and that the
database exists on the server
instance. Then retry the
41148 16 operation, specifying the correc
Operation on the availability  This is an informational message only. If there is a problem, then look
group '%.*ls' has been cancelled for additional messages.
or terminated, either because of a
41149 16 connection timeout or
cancellation by user. This is an
informational message. No user
action is required.
Failed to take availability group
'%.*ls' offline. The Windows
Server Failover Clustering (WSFC)
service may not be running, or it
may not be accessible in its
current state. Verify the local
WSFC node is up and then retry
41150 16 the operation.
Error accessing the Availability
Groups manager. The local
Availability Groups manager has
not been initialized. Wait until
the Availability Groups manager is
in a state that allows access, and
41151 16 retry the operation.
Failed to create availability group  Check this document for error number mentioned in %d.
'%.*ls'. The operation
encountered SQL Server error %d
and has been rolled back. Check
the SQL Server error log for more
details. When the cause of the
error has been resolved, retry
CREATE AVAILABILITY GROUP
41152 16 command
Failed to create availability group
'%.*ls'. The operation
encountered SQL Server error %d.
An attempt to roll back the
operation failed. Check the SQL
Server error log for more details.
41153 16 Then execute the DROP
AVAILABILITY GROUP command
to clean up any

Cannot failover availability group


'%.*ls' to this SQL Server instance.
The availability group is still being
created. Verify that the specified
availability group name is correct.
Wait for CREATE AVAILABILITY
GROUP command to finish, then
41154 16 retry the op
Cannot failover availability group
'%.*ls' to this instance of SQL
Server. The availability group is
being dropped. Verify that the
specified availability group name
is correct. The availability group
may need to be recreated if the
41155 16 drop operation was
Cannot drop availability group
'%.*ls' from this instance of SQL
Server. The availability group is
either being dropped, or the local
availability replica is being
removed from the availability
group. Verify that the specified
41156 16 availability group name is
Cannot remove the local
availability replica from
availability group '%.*ls' from this
instance of SQL Server. The
availability group is either being
41157 16 dropped, or the local availability
replica is being disjoined. Verify
that the specified availability g

Failed to join local availability  Check for SQL/Windows messages around same time.
replica to availability group
'%.*ls'. The operation
encountered SQL Server error %d
and has been rolled back. Check
the SQL Server error log for more
details. When the cause of the
error has been resolved, retry the
41158 16 A
Failed to join local availability
replica to availability group
'%.*ls'. The operation
encountered SQL Server error %d.
An attempt to rollback the
operation failed. Check SQL
Server error log for more details.
Run DROP AVAILABILITY GROUP
41159 16 command to cl
Failed to designate the local
availability replica of availability
group '%.*ls' as the primary
replica. The operation
encountered SQL Server error %d
and has been terminated. Check
the preceding error and the SQL
Server error log for more details
41160 16 about
Failed to validate the Cyclic
Redundancy Check (CRC) of the
configuration of availability group
'%.*ls'. The operation
encountered SQL Server error %d,
and the availability group has
been taken offline to protect its
configuration and the consistency
41161 16 of
Failed to validate sequence
number of the configuration of
availability group '%.*ls'. The in-
memory sequence number does
not match the persisted sequence
number. The availability group
and/or the local availability
replica will be restarted
41162 16 automatical
An error occurred while waiting
for the local availability replica of
availability group '%.*ls' to
transition to the primary role.
The operation encountered SQL
OS error %d and has been
terminated. Verify that the
Windows Server Failover
41163 16 Clustering (WS
An error occurred while waiting
for the local availability replica of
availability group '%.*ls' to
transition to the resolving role.
The operation encountered SQL
OS error %d and has been
41164 16 terminated. Verify that the
Windows Server Failover
Clustering (

A timeout error occurred while


waiting to access the local
availability replica of availability
group '%.*ls'. The availability
replica is currently being accessed
by another operation. Wait for
the in-progress operation to
41165 16 complete, and then retry the
An error occurred while waiting to
access the local availability replica
of availability group '%.*ls'. The
operation encountered SQL OS
error %d, and has been
terminated. Verify that the local
availability replica is in the correct
41166 16 state, and then retr
An error occurred while
attempting to access availability
replica '%.*ls' in availability group
'%.*ls'. The availability replica is
not found in the availability group
configuration. Verify that the
availability group and availability
41167 16 replica names are
An error occurred while
attempting to access availability
replica with ID '%.*ls' in
availability group '%.*ls'. The
availability replica is not found in
the availability group
41168 16 configuration. Verify that the
availability group name and
availability repl

An error occurred while


attempting to access the
availability group database with
ID '%.*ls' in availability group
'%.*ls'. The availability database
is not found in the availability
group configuration. Verify that
the availability group name and
41169 16 avail
Post-online processing for
availability group '%.*ls' has been
terminated. Either post-online
processing has already
completed, the local availability
replica is no longer the primary
replica, or the availability group is
41170 10 being dropped. This is an infor
Failed to create availability group
'%.*ls', because a Windows Server
Failover Cluster (WSFC) group
with the specified name already
exists. The operation has been
rolled back successfully. To retry
creating an availability group,
41171 16 either remove or rename
An error occurred while dropping  In DOS prompt, run “Net helpmsg” on the %d value, and proceed
availability group '%.*ls' from accordingly.
Windows Server Failover
Clustering (WSFC) cluster and
from the local metadata. The
41172 16 operation encountered SQL OS
error %d, and has been
terminated. Verify that the
specified availability gr

An error occurred while removing


the local availability replica from
availability group '%.*ls'. The
operation encountered SQL OS
error %d, and has been
terminated. Verify that the
specified availability group name
is correct, and then retry the
41173 16 command
Failed to acquire exclusive access
to local availability group
configuration data (SQL OS error:
%d). If the problem persists, you
might need to restart the instance
41176 10 of SQL Server.
The availability replica of the
specified availability group '%.*ls'
is being dropped. Wait for the
completion of the drop command
41177 16 and retry the operation later.
Cannot drop availability group
'%.*ls' from this SQL Server
instance. The availability group is
currently being created. Verify
that the specified availability
group name is correct. Wait for
the current operation to
complete, then retry the
41178 16 command if
Cannot remove the local
availability replica from
availability group '%.*ls' from this
instance of SQL Server. The
availability group is currently
being created. Verify that the
specified availability group name
is correct. Wait for the current
41179 16 operati
Attempt to access non-existent or
uninitialized availability group
with ID '%.*ls'. This is usually an
internal condition, such as the
availability group is being dropped
or the local WSFC node has lost
quorum. In such cases, and no
41180 16 user action is requir
The local availability replica of
availability group '%.*ls' did not
become primary. A concurrent
operation may have changed the
state of the availability group in
Windows Server Failover Cluster.
Verify that the availability group
41181 16 state in Windows Serv
Failed to set the local availability
replica of availability group '%.*ls'
as joined in Windows Server
Failover Clustering (WSFC)
database. Either the local
availability replica is no longer the
primary, or the WSFC service is
41182 16 not accessible. Verify tha
Failed to modify availability
replica options for availability
group '%.*ls'. Before the
availability group configuration
could be updated, the operation
encountered SQL Server error %d.
The operation has been rolled
back. Refer to the SQL Server
41183 16 error
Failed to modify availability
replica options for availability
group '%.*ls'. The availability
group configuration has been
updated. However, the operation
encountered SQL Server error %d
while applying the new
configuration to the local
41184 16 availability re
Replica option specified in ALTER
AVAILABILITY GROUP '%.*ls'
MODIFY DDL is same is cached
41185 10 availability group configuration.
Availability group '%.*ls' cannot
process an ALTER AVAILABILITY
GROUP command at this time.
The availability group is still being
created. Verify that the specified
availability group name is correct.
Wait for CREATE AVAILABILITY
41186 16 GROUP command to finis
Availability group '%.*ls' cannot
process an ALTER AVAILABILITY
GROUP command at this time.
41187 16 The availability group is being
dropped. Verify that the specified
availability group name is correct.
The availability group may need
to be recreated if it was
Availability group '%.*ls' failed to
process %s-%s command. The
operation encountered SQL
Server error %d before the
availability group configuration
could be updated, and has been
rolled back. Refer to the SQL
Server error log for details. Verify
41188 16 that
Availability group '%.*ls' failed to
process the %s-%s command. The
availability group configuration
has been updated. However, the
operation encountered SQL
Server error %d while applying
the new configuration to the local
41189 16 availability replica, and has
Availability group '%.*ls' failed to
process %s-%s command. The
local availability replica is not in a
state that could process the
command. Verify that the
availability group is online and
that the local availability replica is
41190 16 the primary replica, the
The local availability replica of
availability group '%.*ls' cannot
become the primary replica. The
last-known primary availability
41191 16 replica is of a higher version than
the local availability replica.
Upgrade the local instance of SQL
Server to the same
Creating and scheduling a worker
task for AlwaysOn Availability
Groups failed due to lack of
resources (SQL OS error %d).
Processing of new actions might
be delayed or stalled until the
resource limits are resolved.
Reduce the memory or thread
41192 17 count on
Cannot join database '%.*ls' to
availability group '%.*ls'. The
database is in the process of being
removed from the availability
group. When the remove-
database operation completes,
the database will no longer be
joined to the availability group.
41193 10 Then
An error occurred while waiting
for the local availability replica for
availability group '%.*ls' to
complet post-online work. The
operation encountered SQL OS
error %d and has been
terminated. Verify that the
Windows Server Failover
41194 16 Clustering (WSFC) c
Availability group '%.*ls' failed to  This is an informational message only. If there is a problem, then look
process the WSFC lease-renewal for additional messages.
command. The local availability
41195 16 replica lease is no longer valid to
process the lease renewal
command. Availability replica
lease expired. This is an
informational message only. No
user a
Failed to create availability group
'%.*ls', because a Windows Server
Failover Cluster (WSFC) group
with the specified name already
exists. An attempt to rollback the
operation failed. Check the SQL
Server error log for more details.
41196 16 To manually clean
The specified command is invalid
because the AlwaysOn Availability
Groups feature is not supported
by this edition of SQL Server. For
information about features
supported by the editions of SQL
Server, see SQL Server Books
41199 16 Online.
The WSFC cluster is offline, and
this availability group is not
available. This issue can be caused
by a cluster service issue or by the
41402 16 loss of quorum in the cluster.
41403 16 Availability group is offline.
The availability group is offline,
and is unavailable. This issue can
be caused by a failure in the
server instance that hosts the
primary replica or by the WSFC
availability group resource going
41404 16 offline.
Availability group is not ready for
41405 16 automatic failover.
The availability group is not ready
for automatic failover. The
primary replica and a secondary
replica are configured for
automatic failover, however, the
secondary replica is not ready for
an automatic failover. Possibly the
41406 16 secondary replica is unavail
In this availability group, at least
one secondary replica has a NOT
SYNCHRONIZING synchronization
state and is not receiving data
41408 16 from the primary replica.
In this availability group, at least
one synchronous replica is not
currently synchronized. The
replica synchronization state
could be either SYNCHONIZING or
41410 16 NOT SYNCHRONIZING.
In this availability group, at least
one availability replica does not
currently have the primary or
41412 16 secondary role.
In this availability group, at least  Check connectivity as in error 35250.
one secondary replica is not
connected to the primary replica.
The connected state is
41414 16 DISCONNECTED.
This secondary database is not
joined to the availability group.
The configuration of this
41424 16 secondary database is
incomplete. For information
about how to join a secondary
database to an availability group,
see SQL Server Books Online.
This secondary replica is not
joined to the availability group.
For an availability replica to be
successfully joined to the
availability group, the join state
must be Joined Standalone
Instance (1) or Joined Failover
Cluster (2). For information about
41428 16 ho

SQL Server AlwaysOn (errors in SQL Server Configuration Manager)

An error occurred while loading the AlwaysOn High  May get this error if don't have the appropriate
Availability properties [return code: 0x80070005]. permission. Try right click ‘SQL Server Configuration
Manager’ and select ‘Run as Administrator’.
 Proceed depending on error code. This is generally
Unable to save the AlwaysOn High Availability settings a WMI code e.g. 0x80041033.
[return code: 0x80041033].
The AlwaysOn Availability Groups feature requires the  Verify OS is Windows 2008 or later version.
x86(non-WOW) or x64 Enterprise Edition of SQL  If OS is Windows 2008 or Windows 2008 R2, install
Server 2012 (or later version) running on Windows Windows hotfix KB 2494036, if not already
Server 2008 (or later version) with WSFC hotfix KB installed.
2494036 installed. This SQL Server edition and/or
Windows Server System does not meet one or more
of the requirements
SQL Server AlwaysOn (New Availability Group wizard errors)

 When validating WSFC quorum vote configuration, the AlwaysOn


Availability Group Wizard shows a warning if any of the following
conditions are true:
o The cluster node that hosts the primary replica does not have
a vote. If this vote is not required for that environment, then
this message may be ignored. Powershell command to check
vote is “Get-ClusterNode | f1 Name, Nodeweight”.
o A secondary replica is configured for automatic failover and its
cluster node does not have a vote. If this vote is not required
for that environment, then this message may be ignored.
o KB2494036 is not installed on all cluster nodes that host
availability replicas. This patch is required to add or remove
votes for cluster nodes in multi-site deployments. However, in
single-site deployments, it is usually not required and you may
safely ignore the warning.
The current WSFC cluster quorum o While setting up the availability group in the wizard, you
vote configuration is not configured a replica to asynchronous availability mode. This
recommended for this availability warning is only reported in SQL 2012 RTM, not in SP1 of SQL
group. 2012 RTM.
For more information, see the o While setting up the availability group in the wizard, you
following topic in SQL Server Books configured a replica for manual failover mode. This warning is
Online: only reported in SQL 2012 RTM, not in SP1 of SQL 2012 RTM.
http://go.microsoft.com/fwlink/?Li  Check the link. Redirects to http://msdn.microsoft.com/en-
nkId=224159. us/library/hh270280.aspx
Checking for the database files on  Check if database-file paths are identical on source and on destination
the secondary replica resulted in servers. If different, manual (rather than using AG wizard) restore may
an error. be required with WITH MOVE syntax.
(Microsoft.SqlServer.Management.
HadrTasks)
------------------------------
Program Location:
at
Microsoft.SqlServer.Management.
Hadr.TestDatabaseFileExisting.Do
Work()
at
Microsoft.SqlServer.Management.
TaskForms.SimpleWorkItem.Run()
============================
=======
The following database files
already exist on the server instance
that hosts secondary replica HA-
VM3\TEST1:
\\path\file.mdf
\\path\file_log.ldf

(Microsoft.SqlServer.Management.
HadrTasks)
------------------------------
Program Location:
at
Microsoft.SqlServer.Management.
Hadr.TestDatabaseFileExisting.Do
Work()
An error was encountered while  Run cluster validation report and ensure there are no errors.
modifying the quorum settings.
Your cluster quorum settings have
not been changed.
There was an error configuring the
file share witness '\\XXX\ABC'.
Unable to save property changes
for 'File Share Witness'.
File share associated with file share
witness resource cannot be hosted
by this cluster or any of its nodes

SQL Server AlwaysOn (SSMS errors)

Back up database task backs up the  Consider using the maintenance plan Wizard to create a backup job
database availability groups since it checks the sys.fn_hadr_backup_is_preferred_replica function
contained in the set, you receive a call and automatically includes the following script logic. This logic is if
warning message like the one the default backup the current replica replica (the return value to 1)
below. grants the COPY_ONLY option in your backup and not backup default
This backup type is not supported backup replicas. The maintenance plan Wizard when you create a
in the secondary this task will fail if database backup using the scripts are automatically added.
executed on the secondary.
IF (NOT sys.fn_hadr_backup_is_preferred_replica(@DBNAME))
SQL Server Management Studio, in BEGIN
Object Explorer, expand the Select 'This is not the preferred replica, exiting with success';
availability of high-availability – RETURN 0 – This is a normal, expected condition, so the script returns
availability – AlwaysOn group – success
group – properties END
Backup preferences page screen BACKUP DATABASE @DBNAME TO DISK=<disk>
capture WITH COPY_ONLY;
AlwaysOn.  This is a known issue. Consider specifying
'ApplcationIntent=ReadOnly’ “ApplicationIntent=ReadOnly” everytime you make connection to SQL
doesn't work for registered server server 2012.

SQL Server AlwaysOn (performance issues)


 This is a limitation of Windows 2008 R2 cluster. This issue
does not occur in Windows 2012. PowerShell can be used in
Windows 2008 R2 to add the disk and it will work. Will need
to modify the Possible Owners for the resource, as by default
it will have all nodes checked.
Powershell 1: add-clusterresource -Group "Available Storage"
- Cluster "myclustername" -Name "diskname" -ResourceType
"Physical Disk"
Powershell 2: get-clusterresource "diskname" -Cluster
"myclustername" | set-clusterparameter DiskPath "F:"
Disks are not detected if there is only one node #F: is the drive letter assigned in disk management for the
at the secondary site. disk.
Slow synchronization. Waittime for  If KB2723814 not applied, then try the KB workaround of
HADR_SYNC_COMMIT grows anywhere from suspend secondary replica and then resume, so that
500ms to 900ms (compared to less than 15-20 AlwaysOn knows that availability mode has changed back to
ms). synchronous commit.
 This is by design. Suggestion is to create the job at both
Primary and Secondary and enable them. Include logic in job
step that checks the role_desc in
sys.dm_hadr_availability_replica_states of the database. If
role_desc is primary then execute the job, and if role_desc is
secondary then exit out of the job.
TSQL: select role_desc from
SQL Server Agent Jobs do not automatically sys.dm_hadr_availability_replica_states where is_local=1 and
failover, when participating in AlwaysOn role=1;
 As expected. Increment "the maximum number of failures
during this period" count. Its default value on n node cluster
is n-1.
Reason why the secondary replica becomes  The secondary connects to the Primary and not the other way
unavailable when SQL Server service is stopped around. If secondary is trying to connect to the primary, and
on primary node (node2). primary is down, the state will be RESOLVING. For example, if
OR the SAN was taken offline that hosted the AlwaysOn database
AlwaysOn failback is not working. on the primary, the secondary was no longer able to connect
to that database, so was not synchronized and could not
come online. This is an expected behavior (By Design).

 While checking root cause, ensure latest SQL/Windows fixes


and can set the following on availability groups so they are
not adversely effected by any non-yielding events
temporarily:
o Set the availability group FAILURE_CONDITION_LEVEL
to 1 which will reduce the SQL Server symptoms that
can result in health detection failure alert.
o To specifically address the lease timeout, increase the
availability group HEALTH_CHECK_TIMEOUT setting
to a higher setting (e.g. 90 seconds) than the default
30 seconds. The signal interval for the lease is 1/3 the
Primary replica database becoming HEALTH_CHECK_TIMEOUT so a 10 sec gap can result
unresponsive in lease expiration.
Questions on secondary replicas. The function  Check if @@SERVERNAME returns correct value on that
sys.fn_hadr_backup_is_preferred_replica server.
returns 0 no matter what the backup preference TSQL: SELECT @@SERVERNAME;
is set to.
 TSQL: EXEC master.dbo.sp_addlinkedserver @server =
N'MYLISTENER', @srvproduct=N'SQL2012',
@provider=N'SQLNCLI11', @datasrc=N'MYLISTENER',
@provstr=N'Provider=SQLNCLI11.1; Data
Source=myListener;ApplicationIntent=READONLY',
@catalog=N'DB1'
o As in the previous version in order to use the SQL
Server Native Client (11.x) in SQL Server Feature Pack
2012 2012 must be installed. Microsoft® SQL Server®
2012 Feature Pack http://www.microsoft.com/en-
us/download/details.aspx?id=29065 .
o SQL Native Client (SNAC) can also be installed on
Linked server configuration with AlwaysOn application server by running SQL Setup and installing
listener ‘Client Tools Connectivity.’ Client Tools includes
components for communication between clients and
servers, including network libraries for DB-Library,
OLEDB for OLAP, ODBC, ADODB, and ADOMD+.
o SQL Native Client DLL is available
"C:\Windows\System32\sqlncli11.dll"

Application encounters ODBC error after  SQL Native Client 11.x does support the new connection
AlwaysOn group is failed over to secondary. parameters. Older versions of SQL Native Client do NOT
Works fine when AlwaysOn group is on primary. support ApplicationIntent parameter. Upgrade SQL Native
[Microsoft][ODBC SQL Server Driver][SQL client on the client application server.
Server]The EXECUTE permission was denied on Please search this document for “SQL Native client” for install
the object 'FN_ADJUSTED_DATE', database steps. This will upgrade ODBC etc. components on application
'iDeliver', schema 'dbo'.. (IES 10901) (WIS server.
10901)
 Check if memory messages in SQL ERRORLOG which indicates
possible memory pressure. If such messages exist, then
ensure sp_configure ‘max server memory’ is set - point to
note is that CLR is part of BP memory in 2012. If you’re using
***Stack Dump being sent to CLR, it should be accommodated within Max Server Memory.
E:\MSSQL11.MSSQLSERVER\MSSQL\LOG\SQLDu If memory messages present and if LogPool memory appears
mp0007.txt to be high, are the replicas connected through a fast
* BEGIN STACK DUMP: network? Also, it is possible that it is so heavily transactional
* Location: that the number of log records generated is high and with the
HadrAvailabilityGroupReplica.cpp:943 amount of databases it pushes this memory above the roof.
* Expression: *pcbActualData <= As such, you may want to consider increasing the
cbRemainingBuffer memory/RAM on the box.
 Check the max and min server memory correctly.
FAIL_PAGE_ALLOCATION 1 in SQL ERRORLOG TSQL: EXEC sp_configure 'max server memory';
when using AlwaysOn Functionality.
 Check ‘Replica:Transaction Delay counter’, ‘Replica:Log Send
Slow commit performance problem for replica Queue’ perfmon counters.
in synchronous commit mode.
 AlwaysOn Availability Groups background worker thread
waiting for new work to be assigned. This is an expected wait
when there are ready workers waiting for new work, which is
High HADR_WORK_QUEUE wait. the normal state.
 Check perfmon counters average log bytes flushed / sec, log
bytes received /sec. If log bytes received /sec is much higher,
then this may indicate that the log scan could be a
High HADR_LOGCAPTURE_WAIT wait. bottleneck.
 ipconfig /flushdns
HostRecordTTL is now being set to 60, RegisterAllProvidersIP
is set to 0 (default is 1, value change requires the cluster
service to be cycled or the CAP resources restarted), but the
DNS is still returning wrong IP on Ping cmd for over a minute.
windows issue (cluster attribute?)
After failing over from one subnet to another in Import-Module FailoverClusters
AG, the ping command (to listener) from the Get-ClusterResource yourListenerName|Set-
remote client is not resolving to newly current ClusterParameter RegisterAllProvidersIP 0
active IP. DNS entry for the Listener virtual cluster /cluster:<ClusterName> res <NetworkNameResource>
shows both the IP’s /priv RegisterAllProvidersIP=0
 SID may be different for the user in both instances.
TSQL: SELECT name, sid FROM sys.database_principals;
Always on Availability Group. Application is TSQL: CREATE LOGIN [LLL] WITH PASSWORD='dddd',
using SQL Login to access the databases. The DEFAULT_DATABASE=[master],
application is not able access the database after DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF,
the database is failed over to the secondary. CHECK_POLICY=OFF,SID=0xABC;
SQL Server AlwaysOn errors (network)

 NetStat output may show hundreds of entries in


TIME_WAIT state leading to buffer/port exhaustion
 Add registry setting for MaxUserPort
http://support.microsoft.com/kb/196271
TCP Provider, error: 0 - An operation on a socket could  Add registry setting for TCPTIMEWAITDELAY.
not be performed because the system lacked  App/IIS restart, machine reboot are additional
sufficient buffer space or because a queue was full. options.

SQL Server AlwaysOn errors (Application issues)

 Filter driver (like anti-virus etc.) may be causing the


slowness in connection. Check if anti-virus is up to
Application reconnects takes 1mins and 30 seconds, date, and if SQL files are excluded as indicated in
even though Failover on dB takes 6 to 10 seconds. http://support.microsoft.com/kb/309422 .
Application/osql using AlwaysOn database gets  This is expected. Application should have
disconnected when executing a failover of the connection retry logic.
Availability Group.
 If Java based application, then Java does not have
command timeout (be default, it is not limited). But
.net has 30 sec default command timeout, that's
why .NET has no issue. Set commandtimeout in
Application hang after AlwaysOn group failover. Java.
 Check if Routing URL is defined for each server, and
if Routing List was also not defined.
Application connects to primary replica every time  If the database part is omitted (in connection string
even when the parameter Connection Intent =Read that has AG listener), readonly routing does not
Only is specified in the connection string. work
SQL Server AlwaysOn errors (cluster log)

 Status 5 is Access Denied


 In Windows AD, check for CNO (cluster network
object) permissions.
 For example, below to grant the "create computer
objects" to the cluster virtual host (virtual cluster
name) for the OU in Active Directory on
"Computers" and "DomainServer" OU that was
created. [To be tested]

Instructions [to be tested]


1) Log into the Domain Controller machine.
2) Select Start - Administrative Tools - Active Directory
users and computer.
--> Active Directory users and computer screen displays.
3) Display-select advanced features.
4) Select the appropriate domain - Computers.
5) Verify that the cluster virtual hosts.
6) Select the appropriate domain - Computers - right click -
Properties.
--> Computers Properties screen appears.
7) Security tab-click the Advanced button.
--> Advanced Security for Computers "screen appears.
8) If you have access permissions tab - cluster virtual host
registration registration no "Edit" button if you choose the
[RES] Network Name <SPEPD_Tier2>: Unable to "add" button.
update password for computer account DCR-SPEPD + Case "add": conducted a check in the "computer", click
on DC \\ DC-04.xxxx.org, status 5. the "object type" button, search for cluster virtual hosts.
[RHS] Online for resource SPEPD_Tier2 failed. --> [Permission entries on Computers] screen is displayed.
9) Target: Select this object and all child objects check the
permission "create computer objects" and click the "OK"
button.
--> Returns to the advanced security for Computers
"screen.
10) Click "OK" button after clicking "the apply" button.
--> Returns to the Computers Properties screen.
11) And click the "OK" button and exit the Active Directory
users and computer screen.
INFO [RES] Network Name: [NNLIB] NetUserAdd  net helpmsg 8557 says "Your computer could not
object aglisten11 on DC: \\DC.contoso.com, result: be joined to the domain. You have exceeded the
8557 maximum number of computer accounts you are
ERR [RES] Network Name: [NNLIB] Failed to create allowed to create in this domain. Contact your
Computer Object aglisten11 in the Active Directory, system administrator to have this limit reset or
error 8557 increased."
 NT AUTHORITY\SYSTEM account lacked the
required permissions to failover the availability
Cluster log has "[RES] SQL Server Availability Group: group. To failover the group to the other node, NT
[hadrag] Run 'EXEC sp_server_diagnostics 10' returns AUTHORITY\SYSTEM must have permission to
following information" "ERR [RES] SQL Server connect to SQL (CONNECT SQL), failover the
Availability Group: [hadrag] ODBC Error: [42000] availability group (ALTER ANY AVAILABILITY
[Microsoft][SQL Server Native Client 11.0][SQL GROUP) and execute sp_server_diagnostics (VIEW
Server]The user does not have permission to perform SERVER STATE).
this action. (297)" Please view error 35206 for additional details.
 Check this document for “lease” related
errors/troubleshooting. This may be a performance
Lease renewal failed with timeout error issue.
ERR [RES] SQL Server Availability Group  This may be a performance issue.
<WSDBMEMAVG>: [hadrag] Availability Group is not
healthy with given HealthCheckTimeout and
FailureConditionLevel
ERR [RES] SQL Server Availability Group
<WSDBMEMAVG>: [hadrag] Resource Alive result 0.
ERR [RES] SQL Server Availability Group: [hadrag]
Failure detected, diagnostics heartbeat is lost

SQL Server AlwaysOn errors (Windows messages obtained through “net helpmsg”)

 If database has FILESTREAM/FileTable, then check if


8dot3 name creation is enabled for applicable
drive(s). If it is enabled, disable it.
The requested operation could not be completed due DOS command1: fsutil 8dot3name query C:
665 to a file system limitation DOS command2: fsutil 8dot3name set C: 1
 Checked if IP is already in use. May require a
new/unused IP depending on what is being done.
5057 The cluster IP address is already in use.  Check permission for cluster network object CNO.
 Depending on the resource type, this generally
requires involvement of Windows team.
 For multi-subnet cluster, check the HostRecordTTL
property for network name. If it’s set to 1200 (20
minutes), suggested value is 300 (5 minutes).
 Try to remove SQL from this issue. For example, if
this is a network name or an IP address resource,
then try creating a Client Access Point with same
name and IP if possible, and see it comes online. If
The resource failed to come online due to the failure it does not come online, then this requires
5942 of one or more provider resources. investigation by Windows team.
 net helpmsg 8557 says "Your computer could not
be joined to the domain. You have exceeded the
maximum number of computer accounts you are
allowed to create in this domain. Contact your
system administrator to have this limit reset or
increased."
For example, when a listener is created, a
Computer Object is automatically created in Active
Directory. Even after Listener is dropped, that
Computer Object may remain in Active Directory.
The other thing to know is that by default,
authenticated (domain) users are limited to create
10 Computer Objects in the domain. Once they hit
Your computer could not be joined to the domain. the limit, attempting to create the 11th will fail
You have exceeded the maximum number of with this error. User needs permission to create
computer accounts you are allowed to create in this more than 10 Computer Objects or, more likely,
domain. Contact your system administrator to have user needs to engage the Windows network team
8557 this limit reset or increased. to clean up these Computer Objects.

SQL Server AlwaysOn errors (WMI errors)

 May get this error if don't have the appropriate permission. Try
right click ‘SQL Server Configuration Manager’ and select ‘Run as
Administrator’.
 Verify wbemtest queries are working against root/default, cimv2
0x80070005 and SQL namespaces.
 At the same time of error, check if app event log has message
"Windows Management Instrumentation has stopped
WBEM_E_SHUTTING_DOWN WMIPRVSE.EXE because a quota reached a warning value. "
2147749939 (0x80041033) --> User has (Microsoft-Windows-WMI, event id 5612). If this message is
requested an operation while WMI is in present, then this issue may be because WMIPrvse process is not
0x80041033 the process of shutting down. able to create the required number of handles, it may be shutting
down before completing the entire process. Increase the
maximum number of handles per host in WMI.
Steps to increase max number of handles per host:
•Go to Start--> Run and type wbemtest.exe.
•Click Connect.
•In the namespace text box type "root" (without quotes).
•Click Connect.
•Click Enum Instances…
•In the Class Info dialog box enter Superclass Name as
"__ProviderHostQuotaConfiguration" (without quotes)
and press OK. Note: the Superclass name includes a
double underscore at the front.
•In the Query Result window, double-click
"__ProviderHostQuotaConfiguration=@"
•In the Object Editor window, double-click
HandlesPerHost.
•In the Value dialog, type in 8192
•Click Save Property.
•Click Save Object.
•Close Wbemtest.
•Restart the Windows Management Instrumentation
service.
Note: There should not be any impact as such, since this is a 64
bit server and we have ample resources on the server. This
change means: the WMIPrvse which was eligible to create 4096
handles at the max will be able to make 8196 handles at the max
only if required. Even if something makes the WMIprvse host to
leak handles it will not cross 8192 handles. Handles consumed are
proportional to amount of resources consumed; especially Pool
resources. But I don’t see that being a problem unless, we have a
large number of WMIPrvse leaking handles all at the same time
and the system does not have much RAM/Processor. However, I
would not recommend changing the default values unless there is
a similar demand or any other reason to increase the default
value.

SQL Server AlwaysOn (patching/updates in SQL 2012)

AG on Standalone Instance

Patching steps:

1. Patch the secondary replica (B)


2. Bring the secondary replica online (will be new version)
3. Log the original synchronization configurations for each replica. Change the secondary replica and primary replica to “Synchronous
Commit” mode, waiting for the secondary replica (B) to be “synchronized.”
a. This will ensure there is no data loss during failover.
b. You can check dashboard or dmv: dm_hadr_database_replica_states for the status
4. Issue a failover through SSMS or T-SQL to failover the AG to the secondary replica. So now the new primary is B, the new secondary is
A
5. Patch the original primary replica (A)
6. Bring the original primary replica (A) online (will be new version )
7. Wait for A to become “Synchronized”
8. Failover the AG back to A
9. Change each replica’s synchronization mode to the original configurations you logged in step3.

Caveat list:
 Before you patch, you can still keep automatic/manual failover setting no change. Just a reminder: if during patching time, primary is
down, automatic failover may fail if the secondary hasn’t completed the patching.

 If primary and secondary replicas are in multisubnet, your client may experience a little bit longer time of disconnection or timeout
during failover.
 Please do remember to switch back to your original synchronization mode.
AG on FCIs (Failover Cluster Instances)

FCI on AG deployment Example


 Primary replica(A): FCI1
o Node1 – active
o Node2 - passive
 Secondary Replica(B): FCI2
o Node3 – active
o Node4 - passive

Choose between one of the following two options:

Longer downtime, less steps


(FCI rolling patching).

Patching steps (basic):


1. Patch Node4
2. Move FCI2 from Node3 to Node4
3. Patch Node3
4. Move FCI2 from Node4 to Node3
5. Patch Node2
6. Move FCI1 from Node1 to Node2
7. Patch Node1
8. Move FCI1 from Node2 to Node1

Optimized downtime, more steps


(Leverage AG failover patching).

Patching steps (optimized):


1. Patch Node4
2. Move FCI2 from Node3 to Node4
3. Patch Node3
4. Move FCI2 from Node4 to Node3
5. Log the original synchronization configurations for each replica. Change the secondary replica and primary replica to “Synchronous
Commit” mode, waiting for the secondary replica (B) to be “synchronized”.
6. Manually failover AG from FCI1 to FCI2 (now the new primary is on FCI2, the new secondary is on FCI1)
7. Patch Node2
8. Move FCI1 from Node1 to Node2
9. Patch Node1
10. Move FCI1 from Node2 to Node1
11. Manually failover AG from FCI2 back to FCI1
12. Change each replica’s synchronization mode to the original configurations you logged in step #5.

Caveat list:
** Please use basic patching steps if primary and secondary are on different data centers/subnets **
 FCI rolling patch guarantees zero data lost
 Use synchronous commit secondary on a high latency network would impact OLTP performance
 AG failover cross subnets might cause up to 20 seconds delay on client first connections.

Anda mungkin juga menyukai