Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all 4689 articles
Browse latest View live

Main Site using SQL Cluster, need AlwaysOn for DR

$
0
0

Hi All,

At my HQ I'm using 2 node configured SQL failover cluster SQL Server 2012 SP3 multiple instance (Active - Active)

I want to build 1 node at DR site running on top SQL Server 2016, but I want to use AlwaysOn capabilities. Any recommendation about the design configuration ? is it supported running different version ?

many thanks for your help


Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Krisna Ismayanto | My blogs: Krisna Ismayanto | Twitter:@ikrisna


Sync_logins stored proc does not work in Always On

$
0
0

hi,

On a daily basis at 2:00 AM this sp is executed regardless a failover happened or not and most of times I am receiving errors:

I find three casusitry

1-Could not drop login domain\user as the user is currently logged i as the user is currently logged in.

Amended looking for sessions and applying KILL before to do the DROP and CREATE

2-The server principal domain\user already exists.

It does not make any sense because my stored procedure is callingsp_validatelogins

3-Cannot find the login domain\user, because it does not exist or you do not have permission.

same than point 2.

I am wondering how to trigger this sp only when a failover happen

CREATE PROCEDURE [dbo].[ScriptLogins]

AS

SET NOCOUNT ON

DECLARE
	@StatementToRun VARCHAR(MAX) = ''
	,@CurrentRow INT
	,@TotalRows INT
	,@sid VARBINARY(85)
	,@name SYSNAME
	,@type CHAR(1)
	,@is_disabled INT
	,@default_database_name SYSNAME
	,@hasaccess INT
	,@denylogin INT
	,@password_hash VARBINARY(256)
	,@PasswordHashString NVARCHAR(300)
	,@SIDString NVARCHAR(100)
	,@is_policy_checked VARCHAR(3)
	,@is_expiration_checked VARCHAR(3)
	,@RoleName SYSNAME
	,@LoginName SYSNAME
	,@PermState NVARCHAR(60)
	,@PermName SYSNAME
	,@Class TINYINT
	,@ClassDesc NVARCHAR(60)
	,@MajorID INT
	,@SubLoginName SYSNAME
	,@SubEndPointName SYSNAME

/**********************************************************************
Usage:

Run from the instance that the logins will be created on:
DECLARE @StatementToRun VARCHAR(MAX)
SELECT @StatementToRun = StatementToRun FROM OPENQUERY("linkedservername", 'EXEC master.dbo.ScriptLogins')
EXEC (@StatementToRun)
**********************************************************************/

/**********************************************************************
Credits:

Created by Tomas Lind 2014
http://media.tomaslind.net/2014/02/ScriptLogins.txt

Most of the functionality in this procedure is copied from two sources:

Microsoft Support: sp_help_revlogin
(http://support.microsoft.com/kb/918992)

SQLSoldier: dba_CopyLogins
(http://www.sqlsoldier.com/wp/wp-content/uploads/Scripts/dba_CopyLogins.sql)

**********************************************************************/


/**********************************************************************
@sp_validatelogins
Results from sp_validatelogins is used to filter out users
no longer in AD.
**********************************************************************/
DECLARE @sp_validatelogins TABLE
    (
        [sid] VARBINARY(85) NOT NULL
        ,NTLogin SYSNAME NOT NULL
    )
 
INSERT INTO @sp_validatelogins
EXEC sp_validatelogins


/**********************************************************************
@Logins
The logins to transfer
**********************************************************************/
DECLARE @Logins TABLE
	(
		LoginId INT IDENTITY(1,1) NOT NULL PRIMARY KEY
		,[sid] VARBINARY(85) NOT NULL
		,[name] SYSNAME NOT NULL
		,[type] CHAR(1) NOT NULL
		,is_disabled INT NOT NULL
		,default_database_name SYSNAME NOT NULL
		,hasaccess INT NOT NULL
		,denylogin INT NOT NULL
		,password_hash VARBINARY(256) NULL
		,is_policy_checked VARCHAR(3) NULL
		,is_expiration_checked VARCHAR(3) NULL
	)
INSERT
	@Logins ([sid], [name], [type], is_disabled, default_database_name, hasaccess, denylogin, password_hash, is_policy_checked, is_expiration_checked)
SELECT
	principals.[sid]
	,principals.[name]
	,principals.[type]
	,principals.is_disabled
	,principals.default_database_name
	,logins.hasaccess
	,logins.denylogin
	,sqllogins.password_hash
	,CASE sqllogins.is_policy_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END
	,CASE sqllogins.is_expiration_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END
FROM
	sys.server_principals AS principals
LEFT OUTER JOIN
	sys.syslogins AS logins
ON
	principals.[name] = logins.[name]
LEFT OUTER JOIN
	sys.sql_logins AS sqllogins
ON
	principals.principal_id = sqllogins.principal_id
WHERE
	principals.[type] IN ('S', 'U', 'G') --S = SQL login, U = Windows login, G = Windows group
AND
	principals.[sid] <> 0x01 --sa even if it is renamed
AND
	principals.[name] NOT LIKE '##%' --system users
AND
	principals.[name] NOT LIKE 'BUILTIN%' --system users
AND
	principals.[name] NOT LIKE 'NT %' --system users
AND
	SUBSTRING(principals.[name], 1, ABS(CHARINDEX('\', principals.[name])-1)) <> SUBSTRING(@@SERVERNAME, 1, ABS(CHARINDEX('\', @@SERVERNAME)-1)) --local machine users
AND
	principals.[name] NOT IN (SELECT NTLogin FROM @sp_validatelogins) --users no longer in AD.


/**********************************************************************
@Roles
The roles to transfer
**********************************************************************/
DECLARE @Roles TABLE
	(
		RoleId INT IDENTITY(1,1) NOT NULL PRIMARY KEY
		,RoleName SYSNAME NOT NULL
		,LoginName SYSNAME NOT NULL
	)

INSERT
	@Roles (RoleName, LoginName)
SELECT
	role_principals.name
	,login_principals.name
FROM
	sys.server_role_members AS role_members
JOIN
	sys.server_principals AS role_principals
ON
	role_members.role_principal_id = role_principals.principal_id
JOIN
	sys.server_principals AS login_principals
ON
	role_members.member_principal_id = login_principals.principal_id
WHERE
	login_principals.[type] IN ('S', 'U', 'G') --S = SQL login, U = Windows login, G = Windows group
AND
	login_principals.[sid] <> 0x01 --sa even if it is renamed
AND
	login_principals.[name] NOT LIKE '##%' --system users
AND
	login_principals.[name] NOT LIKE 'BUILTIN%' --system users
AND
	login_principals.[name] NOT LIKE 'NT %' --system users
AND
	SUBSTRING(login_principals.[name], 1, ABS(CHARINDEX('\', login_principals.[name])-1)) <> SUBSTRING(@@SERVERNAME, 1, ABS(CHARINDEX('\', @@SERVERNAME)-1)) --local machine users
AND
	login_principals.[name] NOT IN (SELECT NTLogin FROM @sp_validatelogins) --users no longer in AD.
AND
	role_principals.[type] = 'R'


/**********************************************************************
@Permissions
The permissions to transfer
**********************************************************************/
DECLARE @Permissions TABLE
	(
		PermissionId INT IDENTITY(1,1) NOT NULL PRIMARY KEY
		,LoginName SYSNAME NOT NULL
		,PermState NVARCHAR(60) NOT NULL
		,PermName SYSNAME NOT NULL
		,Class TINYINT NOT NULL
		,ClassDesc NVARCHAR(60) NOT NULL
		,MajorID INT NOT NULL
		,SubLoginName SYSNAME NULL
		,SubEndPointName SYSNAME NULL
	)

INSERT
	@Permissions (LoginName, PermState, PermName, Class, ClassDesc, MajorID, SubLoginName, SubEndPointName)
SELECT
	Tprincipals.name COLLATE database_default
	,Tpermissions.state_desc
	,Tpermissions.[permission_name]
	,Tpermissions.class
	,Tpermissions.class_desc
	,Tpermissions.major_id
	,TServerPrincipal.name COLLATE database_default
	,Tendpoints.name COLLATE database_default
FROM
	sys.server_principals AS Tprincipals
JOIN
	sys.server_permissions AS Tpermissions
ON
	Tprincipals.principal_id = Tpermissions.grantee_principal_id
LEFT OUTER JOIN
	sys.server_principals AS TServerPrincipal
ON
	TServerPrincipal.principal_id = Tpermissions.major_id
AND
	Tpermissions.class = 101
LEFT OUTER JOIN
	sys.endpoints AS Tendpoints
ON
	Tendpoints.endpoint_id = Tpermissions.major_id
AND
	Tpermissions.class = 105
WHERE
	Tprincipals.[type] IN ('S', 'U', 'G') --S = SQL login, U = Windows login, G = Windows group
AND
	Tprincipals.[sid] <> 0x01 --sa even if it is renamed
AND
	Tprincipals.[name] NOT LIKE '##%' --system users
AND
	Tprincipals.[name] NOT LIKE 'BUILTIN%' --system users
AND
	Tprincipals.[name] NOT LIKE 'NT %' --system users
AND
	SUBSTRING(Tprincipals.[name], 1, ABS(CHARINDEX('\', Tprincipals.[name])-1)) <> SUBSTRING(@@SERVERNAME, 1, ABS(CHARINDEX('\', @@SERVERNAME)-1)) --local machine users
AND
	Tprincipals.[name] NOT IN (SELECT NTLogin FROM @sp_validatelogins) --users no longer in AD.


/**********************************************************************
Add the logins to the script
**********************************************************************/
SELECT @TotalRows = COUNT(*), @CurrentRow = 1 FROM @Logins

WHILE @CurrentRow <= @TotalRows BEGIN

	SELECT @sid = [sid] ,@name = [name] ,@type = [type] ,@is_disabled = is_disabled ,@default_database_name = default_database_name ,@hasaccess = hasaccess, @denylogin = denylogin, @password_hash = password_hash, @is_policy_checked = is_policy_checked, @is_expiration_checked = is_expiration_checked
	FROM @Logins
	WHERE LoginId = @CurrentRow

	IF (@type IN ('G', 'U')) BEGIN --NT authenticated account/group
		SET @StatementToRun = @StatementToRun +
			CHAR(13) + CHAR(13) + '
			IF EXISTS (SELECT * FROM sys.server_principals WHERE [name] = ''' + @name + ''') BEGIN
				DROP LOGIN ' + QUOTENAME(@name) + '
			END
			IF EXISTS (SELECT * FROM sys.databases WHERE [name] = ''' + @default_database_name + ''') BEGIN
				CREATE LOGIN ' + QUOTENAME(@name) + ' FROM WINDOWS WITH DEFAULT_DATABASE = [' + @default_database_name + ']' + '
			END
			ELSE BEGIN
				CREATE LOGIN ' + QUOTENAME(@name) + ' FROM WINDOWS WITH DEFAULT_DATABASE = [master]
			END'
	END
    ELSE BEGIN --SQL Server authentication
		SET @PasswordHashString = '0x' + CAST('' AS XML).value('xs:hexBinary(sql:variable("@password_hash"))', 'nvarchar(300)')
		SET @SIDString = '0x' + CAST('' AS XML).value('xs:hexBinary(sql:variable("@sid"))', 'nvarchar(100)')

		SET @StatementToRun = @StatementToRun +
			CHAR(13) + CHAR(13) + '
			IF EXISTS (SELECT * FROM sys.server_principals WHERE [name] = ''' + @name + ''') BEGIN
				DROP LOGIN ' + QUOTENAME(@name) + '
			END
			IF EXISTS (SELECT * FROM sys.databases WHERE [name] = ''' + @default_database_name + ''') BEGIN
				CREATE LOGIN ' + QUOTENAME(@name) + ' WITH PASSWORD = ' + @PasswordHashString + ' HASHED, SID = ' + @SIDString + ', DEFAULT_DATABASE = [' + @default_database_name + ']' + '
			END
			ELSE BEGIN
				CREATE LOGIN ' + QUOTENAME(@name) + ' WITH PASSWORD = ' + @PasswordHashString + ' HASHED, SID = ' + @SIDString + ', DEFAULT_DATABASE = [master]
			END'

			IF (@is_policy_checked IS NOT NULL) BEGIN
				SET @StatementToRun = @StatementToRun + '
			ALTER LOGIN ' + QUOTENAME(@name) + ' WITH CHECK_POLICY = ' + @is_policy_checked
			END
			IF (@is_expiration_checked IS NOT NULL) BEGIN
				SET @StatementToRun = @StatementToRun + ', CHECK_EXPIRATION = ' + @is_expiration_checked
			END

	END

	IF (@denylogin = 1) BEGIN -- login is denied access
		SET @StatementToRun = @StatementToRun + '; DENY CONNECT SQL TO ' + QUOTENAME(@name)
    END
    ELSE IF (@hasaccess = 0) BEGIN -- login exists but does not have access
		SET @StatementToRun = @StatementToRun + '; REVOKE CONNECT SQL TO ' + QUOTENAME(@name)
    END
    IF (@is_disabled = 1) BEGIN -- login is disabled
		SET @StatementToRun = @StatementToRun + '
			ALTER LOGIN ' + QUOTENAME(@name) + ' DISABLE'
    END

	SET @CurrentRow = @CurrentRow + 1
END


/**********************************************************************
Add the roles to the script
**********************************************************************/
SELECT @TotalRows = COUNT(*), @CurrentRow = 1 FROM @Roles

WHILE @CurrentRow <= @TotalRows BEGIN
	SELECT @RoleName = RoleName, @LoginName = LoginName
	FROM @Roles
	WHERE RoleId = @CurrentRow

	SET @StatementToRun = @StatementToRun + 
	CHAR(13) + '
			EXEC sp_addsrvrolemember @rolename = ' + @RoleName + ', @loginame = ' + QUOTENAME(@LoginName)

	SET @CurrentRow = @CurrentRow + 1
END


/**********************************************************************
Add the permisssions to the script
**********************************************************************/
SELECT @TotalRows = COUNT(*), @CurrentRow = 1 FROM @Permissions

WHILE @CurrentRow <= @TotalRows BEGIN
	SELECT @LoginName = LoginName, @PermState = PermState, @PermName = PermName, @Class = Class, @ClassDesc = ClassDesc, @MajorID = MajorID, @SubLoginName = SubLoginName, @SubEndPointName = SubEndPointName
	FROM @Permissions
	WHERE PermissionId = @CurrentRow

	SET @StatementToRun = @StatementToRun + 
	CHAR(13) + '
			' + @PermState + ' ' + @PermName + ' ' +
			CASE @Class WHEN 101 THEN 'ON LOGIN::' + QUOTENAME(@SubLoginName) WHEN 105 THEN 'ON ' + @ClassDesc + '::' + QUOTENAME(@SubEndPointName)  ELSE '' END +
			' TO ' + QUOTENAME(@LoginName)

	SET @CurrentRow = @CurrentRow + 1
END

SELECT @StatementToRun AS StatementToRun
GO

Thanks,

SSAG Database regularly falls in either "Not Synchronizing" or "Restoring" mode...

$
0
0

Hello,

I’ve setup my new SCOM 1807 lab with my databases (OperationsManager&OperationsManagerDW) in 2 independent SQL Server 2016 Always On Availability groups. Here are the variables behind my problem:

 

  • my lab is running in Hyper-V on my laptop computer; and
  • I regularly put my laptop to sleep and, on rare occasions, it gets patched and rebooted without my being able to gracefully shut down my lab;
  • I regularly leave my second database server, DB2, offline, running both availability groups on my primary database server, DB1

 

Now normally, one wouldn’t expect the above to pose a problem. That said, I regularly see one or both of my databases in one of the following modes, which renders my lab completely useless:

 

  • Not Synchronizing
  • Restoring

 

When this happens, I have to shut down the entire lab, and bring it back online. Sometime, I need to do this a few times before everything returns to normal operations…until the problem returns…

 

Does anyone have any insights as to what might be going on?

SQL Server 2016 & Cluster Active/Active

$
0
0

Hi

I researched about SQL 2016 Cluster Active-Active and I read High availability options on https://msdn.microsoft.com/en-us/library/ms190202.aspx but cannot see SQL Cluster with Active/Active nodes. Our business requirements are:

  1. SQL Cluster 2016
  2. Two node members of cluster
  3. SQL Cluster contain one SQL instance with one DB1
  4. Our requirement is that both nodes are active simultaneously DB1.

My question is, if is possible configure SQL Cluster to have active DB1 on both nodes at the same time(Active/Active)?

Thanks.


Cluster Quorum mode : Fileshare witness

$
0
0

If I am having a 4 node cluster (multi-site), and and Cluster witness is File share witness

what's the tolerance level of this cluster?

SQL Server 2016 & Active/Active Clustering

$
0
0

Hi

I researched about SQL 2016 Cluster Active-Active and I read High availability options on https://msdn.microsoft.com/en-us/library/ms190202.aspx but cannot see SQL Cluster with Active/Active nodes. Our business requirements are:

  1. SQL Cluster 2016
  2. Two node members of cluster
  3. SQL Cluster contain one SQL instance with one DB1
  4. Our requirement is that both nodes are active simultaneously DB1.

My question is, if is possible configure SQL Cluster to have active DB1 on both nodes at the same time(Active/Active)?

Thanks.

Database In recovery mode

$
0
0

I had to restart the database service from SSMS because it's using up the available memory on the server causing extreme slowness. After I restarted the services, I notice 1 of my instance got stuck 'In Recovery' & while checking SQL log, I notice that it's requiring 4 hours to complete the recovery!

Recovery of database 'xxx' (8) is 25% complete (approximately 16172 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.

Is there anyway to speed this up & what causes my database to stuck at recovery stage when I perform reboot from SSMS and not killing the DB services from Windows Service.

How to deal with creating new partition on a new filegroup while the location is different between the primary and secondaries?

$
0
0

I have AG in SQL 2012 EE.

As we are in a process of creating new servers and decommission the old ones, The drives where the data files locate (MSSQL_Data) in the primary is different from the one of the replicas (i.e. in the primary the location of MDF+NDF files are on J where in the secondaries the drive is G).

When first initialed I used the "With move" in the restore from full backup step. After the DBs where synchronized, a new filegroup was created due to table partition plan, but then the secondary could not synchronize.

How do I keep the secondary replica synchronized after adding a new FG in the primary in a drive that doesn't exist in the replica?

Thanks 


Unable to make changes to Managed Backups in SQL Server 2016

$
0
0

Hi

I have a SQL Server 2016 instance in Azure with managed backups enabled. After following the guide (https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/enable-sql-server-managed-backup-to-microsoft-azure?view=sql-server-2016) I managed to get it working (after a few attempts).

Since then I have tried to follow the guide on another SQL 2016 instance and I get the following error

Msg 45207, Level 17, State 17, Procedure sp_add_task_command, Line 102 [Batch Start Line 3]
The operation failed because of an internal error. Value cannot be null.
Parameter name: sasToken Please retry later. 
    at Microsoft.WindowsAzure.Storage.Auth.StorageCredentials..ctor(String sasToken)
   at Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.FileService.VerifyContainerURL(String containerURL, SqlConnection conn)
   at Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.SmartBackup.ConfigureDbOrInstance(SmartBackupConfigParameters config, LogBaseService jobLogger, SqlConnection conn)

On the server where it is working it is only configured to be enabled on some of the databases. I have tried to manually add the databases using msdb.managed_backup.sp_backup_config_basic but this also errors with the same message.

Finally I tried to abandon managed backups by just running 

EXECUTE msdb.managed_backup.sp_backup_config_basic NULL, 0, NULL, NULL

But this also errors with the same message. I now have managed backups backing up half of the databases. Without reinstalling SQL, is there a way to fix this?

I know I am not the only person with these errors...

https://feedback.azure.com/forums/908035-sql-server/suggestions/32901835-unable-to-setup-managed-backup-on-sql-2016-using-a

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1fa124f9-0eb5-49bb-be05-e0f96009518a/managed-backups-to-azure-cryptdecrypt-errors-in-log?forum=sqldisasterrecovery

Thanks

Sam

How ot shift log file on another drive in AlwaysOn environment

$
0
0

Hi,

We have 2 nodes AlwaysOn configuration ( SQL Server 2016 EE with Windows Server 2012 R2). By mistake on primary server, the data file & log file both are on same drive. Now, we want to shift the log file on another drive.
Please suggest the steps to resolve this issue.
 
Thnaks
dk


Data repication to SQL from Proprietary DB

$
0
0

Hi

I am looking to establish tables replication from proprietary DB to SQL DB near real time. I am not sure what method I cound get it.  I fould this artical may help me to do table sync from propritery DB to SQl Server. But I noted on propritery DB tables
do not have any "Id" column to identify raws uniquely.
Q1. Can we create in Sql Server side "sequence" which create unique id when insert a record.
CREATE SEQUENCE [<schema_name>.] <sequence_name>
Then create a trigger on table when add a records then add new sequence no to relevent raw. (We do not able to change the application codes)

Q2.Any other way to do replicate data(change data uptodate) on this scenario 

link:

https://www.mssqltips.com/sqlservertip/1704/using-merge-in-sql-server-to-insert-update-and-delete-at-the-same-time/

many Thanks


Need your opinion on Hyper V Cluster and SQL

$
0
0

Hello, I have been given the task of creating a Hyper V cluster and some app servers. 

I have a 3 node hyper V clustered together and connected to SAN Switch for Storage.

Now for the VM part i have some concerns, Need to have 2 node SQL Cluster as VM, i think i have to go with VHD sets but do i have to create the drives as fixed or dynamic? 

The SAN is all SSDs FYI 

Say i need 1 TB of data, 500 for Log and 500 for Temp files, do i have to create all of them as fixed size disks? If yes will there be any issues when doing live migrations? I hope not, since its a CSV , but your opinion please.

We do need always on and here is what I did so far. Added storage LUN to the hyper v cluster and made them as csv Created couple of shared storage for data and log files for the Sql vm from the cluster manager onto the csv created earlier.

Now my understanding is that both the SQL should see the shared VHD set available to them right? Or I am missing something?

I am doing a lot of research on this as well and all of your feedback and guidance is very much appreciated. Thank you


ferouze

CDC is not working in SQL server 2014 SP2 CU10

$
0
0

Hi All,

I have few issues in CDC looks like not working as expected.

I have enabled CDC in few tables.When I try to query it shows no records.

select * from cdc.ap_vendors_max_CT;

Is something wrong with this CDC tables?I can't see any records.

Please help me out.

Thanks

MK



Basic Availability Groups can do Automatic Failover ? , Is Windows Clustering a Requirement for BAG

$
0
0
  1. I will be using SQL Server 2017 the latest version out ,
  2. This version does not supports Mirroring as that was marked deprecated with the release of SQL Server 2014
  3. Now I don’t or rather say I will not be using Enterprise Edition of SQL Server for AADConnect DB
  4. Now what options I am left with to setup high availability for AADConnect DB
  5. I have checked there is a feature of “Basic Availability Group” (BAG) available with SQL Server 2016/2017 versions
  6. I have doubts or need to clear understanding on the usage of this BAG
    1. Does this provide for Automatic Failover
    2. Does this require Windows Clustering and Witness for Automatic failover or not
  7. I have checked few articles on this
    1. Top 7 Questions about Basic Availability Groups

https://blogs.technet.microsoft.com/msftpietervanhove/2017/03/14/top-5-questions-about-basic-availability-groups/

  1. Basic Availability Groups (Always On Availability Groups)

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/basic-availability-groups-always-on-availability-groups?view=sql-server-2017

There are Limitations mentioned on this link, however does not mention anything on Windows Clustering or Witness requirements

Limitations

  1. Basic availability groups use a subset of features compared to advanced availability groups on SQL Server 2016 Enterprise Edition. Basic availability groups include the following limitations:
  2. Limit of two replicas (primary and secondary).
  3. No read access on secondary replica.
  4. No backups on secondary replica.
  5. No integrity checks on secondary replicas.
  6. No support for replicas hosted on servers running a version of SQL Server prior to SQL Server 2016 Community Technology Preview 3 (CTP3).
  7. Support for one availability database.
  8. Basic availability groups cannot be upgraded to advanced availability groups. The group must be dropped and re-added to a group that contains servers running only SQL Server 2016 Enterprise Edition.
  9. Basic availability groups are only supported for Standard Edition servers.
  10. Basic availability groups can not be part of a distributed availability group.

  1. Prereqs, Restrictions, Recommendations - Always On Availability Groups

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability?view=sql-server-2017

However this link clearly lists out that Windows Clustering is a requirement for AlwaysOn Availability Group (Basic Availability Group is based or rather say are subset of this only)

  1. Availability Modes (Always On Availability Groups)

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-always-on-availability-groups?view=sql-server-2017


An Extremist

SQL Server availability group. failed to move between nodes at multi subnet

$
0
0

Hi All,

I have SQL server 2016 and windows serv er 2016

I created availability group between to two primary and secondary replica

the primary and secondary replica are at two different subnet

I created listener IP with two IP. one IP for every subnet.

I succeeded to created to availability group but failed to failover between nodes

the attached images display the errors.

the following error from cluster event (failover cluster manager)

Cluster resource 'R@W_Cloudcare-AG_10.193.100.28' of type 'IP Address' in clustered role 'R@W_Cloudcare-AG' failed.

Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it.  Check the resource and group state using Failover Cluster Manager or the Get-ClusterResource Windows PowerShell cmdlet.

No matching network interface found for resource 'R@W_Cloudcare-AG_10.193.100.28' IP address '10.193.100.28' (return code was '5035').  If your cluster nodes span different subnets, this may be normal.

and errors from primary and secondary replica

2017-05-09 13:33:05.22 spid53      Always On: The local replica of availability group 'R@W_Cloudcare-AG' is 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 only. No user action is required.
2017-05-09 13:33:05.22 spid53      The state of the local availability replica in availability group 'R@W_Cloudcare-AG' has changed from 'PRIMARY_NORMAL' to 'RESOLVING_NORMAL'.  The state changed because the availability group is going offline.  The replica is going offline because the associated availability group has been deleted, or the user has taken the associated availability group offline in Windows Server Failover Clustering (WSFC) management console, or the availability group is failing over to another SQL Server instance.  For more information, see the SQL Server error log, Windows Server Failover Clustering (WSFC) management console, or WSFC log.
2017-05-09 13:33:05.22 Server      The availability group 'R@W_Cloudcare-AG' is being asked to stop the lease renewal because the availability group is going offline. This is an informational message only. No user action is required.
2017-05-09 13:33:05.22 spid67s     DbMgrPartnerCommitPolicy::SetSyncAndRecoveryPoint: C244F818-AF21-4088-9D70-40CC3FB72465:4
2017-05-09 13:33:05.22 spid68s     Always On Availability Groups connection with secondary database terminated for primary database 'R@W_Cloudcare' on the availability replica 'DBSERVER' with Replica ID: {c244f818-af21-4088-9d70-40cc3fb72465}. This is an informational message only. No user action is required.
2017-05-09 13:33:05.22 Server      The Service Broker endpoint is in disabled or stopped state.
2017-05-09 13:33:05.22 spid46s     The availability group database "R@W_Cloudcare" is changing roles from "PRIMARY" to "RESOLVING" because the mirroring session or availability group failed over due to role synchronization. This is an informational message only. No user action is required.
2017-05-09 13:33:05.22 Server      Stopped listening on virtual network name 'RAW_Cloudcare'. No user action is required.
2017-05-09 13:33:05.22 spid46s     State information for database 'R@W_Cloudcare' - Hardened Lsn: '(2516:230:1)'    Commit LSN: '(2516:228:2)'    Commit Time: 'May  9 2017  1:13PM'
2017-05-09 13:33:05.22 spid45s     DbMgrPartnerCommitPolicy::SetSyncAndRecoveryPoint: C244F818-AF21-4088-9D70-40CC3FB72465:4
2017-05-09 13:33:05.22 spid46s     Nonqualified transactions are being rolled back in database R@W_Cloudcare for an Always On Availability Groups state change. Estimated rollback completion: 100%. This is an informational message only. No user action is required.

2017-05-09 13:30:52.06 spid36s     [INFO] HkHostDbCtxt::Initialize(): Database ID: [5] 'R@W_Cloudcare'. XTP Engine version is 0.0.
2017-05-09 13:30:52.18 spid35s     A connection for availability group 'KSH_Cloudcare-AG' from availability replica 'DBSERVER' with id  [E3872794-81FD-45B4-8D0E-CC2F93702642] to 'KSHQ-DB' with id [8D4C6153-E437-4401-A426-5C8526A3449C] has been successfully established.  This is an informational message only. No user action is required.
2017-05-09 13:30:52.19 spid35s     A connection for availability group 'R@W_Cloudcare-AG' from availability replica 'DBSERVER' with id  [C244F818-AF21-4088-9D70-40CC3FB72465] to 'KSHQ-DB' with id [46CFEC67-0B12-4812-9157-BDB3C471D245] has been successfully established.  This is an informational message only. No user action is required.
2017-05-09 13:30:52.50 spid36s     [INFO] HkHostDbCtxt::Initialize(): Database ID: [5] 'R@W_Cloudcare'. XTP Engine version is 0.0.
2017-05-09 13:30:52.52 spid36s     Always On Availability Groups connection with primary database established for secondary database 'R@W_Cloudcare' on the availability replica 'KSHQ-DB' with Replica ID: {46cfec67-0b12-4812-9157-bdb3c471d245}. This is an informational message only. No user action is required.
2017-05-09 13:30:52.54 spid36s     The recovery LSN (2516:230:1) was identified for the database with ID 5. This is an informational message only. No user action is required.
2017-05-09 13:30:52.54 spid36s     2 transactions rolled forward in database 'R@W_Cloudcare' (5:0). This is an informational message only. No user action is required.
2017-05-09 13:30:54.58 spid35s     Always On Availability Groups connection with primary database established for secondary database 'R@W_Cloudcare' on the availability replica 'KSHQ-DB' with Replica ID: {46cfec67-0b12-4812-9157-bdb3c471d245}. This is an informational message only. No user action is required.
2017-05-09 13:30:56.60 spid35s     The recovery LSN (2516:230:1) was identified for the database with ID 5. This is an informational message only. No user action is required.
2017-05-09 13:30:56.74 spid35s     Always On Availability Groups connection with primary database established for secondary database 'R@W_Cloudcare' on the availability replica 'KSHQ-DB' with Replica ID: {46cfec67-0b12-4812-9157-bdb3c471d245}. This is an informational message only. No user action is required.
2017-05-09 13:30:56.76 spid35s     The recovery LSN (2516:230:1) was identified for the database with ID 5. This is an informational message only. No user action is required.
2017-05-09 13:33:00.70 spid84      The state of the local availability replica in availability group 'R@W_Cloudcare-AG' has changed from 'SECONDARY_NORMAL' to 'RESOLVING_PENDING_FAILOVER'.  The state changed because of a user initiated failover.  For more information, see the SQL Server error log, Windows Server Failover Clustering (WSFC) management console, or WSFC log.
2017-05-09 13:33:10.64 spid36s     A connection timeout has occurred on a previously established connection to availability replica 'KSHQ-DB' with id [46CFEC67-0B12-4812-9157-BDB3C471D245].  Either a networking or a firewall issue exists or the availability replica has transitioned to the resolving role.
2017-05-09 13:33:10.64 spid36s     Always On Availability Groups connection with primary database terminated for secondary database 'R@W_Cloudcare' on the availability replica 'KSHQ-DB' with Replica ID: {46cfec67-0b12-4812-9157-bdb3c471d245}. This is an informational message only. No user action is required.


plz help.


How to do patching on AlwaysOn servers

$
0
0

Good morning Experts,

How to do patching on AlwaysOn servers for synchronous mode and asynchronous mode


Kiran

SQL 2014 Always On

$
0
0

Hi,

We would like to set up Listener for our AlwaysOn databases. 

NB At the moment, the SQL 2014 servers has the these features installed:

- Failover-clustering

- Failover cluster module for windows PS

The Failover Cluster Management Tools is not installed. (not sure why).

Question: Is the Failover Cluster Management Tools a prerequisite for setting up Listener in SQL 2015 (WS2012)? 

Is there a Microsoft document for setting up Listener for SQL 2014?

Cheers


Alwasyon DB maintenance jobs

$
0
0
Have to setup DB Maintenance jobs  like DBCC check db, rebuild index , update stats etc . where do we create on primay or seconday or on both server 

Share storage for cluster add another disk

$
0
0

Hi, I'm testing this incredible technology on a HYPER-V ambient with 3 VM and all it's ok.. but I would like to attach another shared disk (1 for quorum and 1 another for MSDTC). I don't understood how can I make this action... 'cause using wizard no see other disks available. Ambient with shared disk in cluster was built from another person... not me, I'm testing SQL configuration.

Is it something that can I do with virtual disk of HYPER-V (CSV?), my problem is that I don't see any sharable disk.

Please let me know.

ALEN, Italy

SQL 2017 AlwaysOn AG IP question

$
0
0

Hello,

Over this past weekend, I created a test environment in my home lab.  This environment contains a 2-Node Windows Server 2016 Failover Cluster with each node having SQL Server 2017 Developer Edition installed with one AlwaysOn Availability Group created and configured.  There are actually three Windows Server 2016 in this test lab.  One domain controller and the 2 clustered nodes.  Here's my question:

While creating the 2-node WFSC, I remember there was a screen asking me to enter the Windows Server Cluster IP.  So I provided one.  While creating the AlwaysOn Availability Group, there was also a screen asking me to enter the AG name and an IP.  So I again provide a static IP for this which was different from the WFSC IP.  Once I got everything setup up & running, I was able to connect to SQL Server 2017 instance using only the AG Cluster name which is the whole point behind HA environment.  So in SSMS, I connect to the AG using only the AG Cluster name.  Everything working beautifully even after a manual failover to my secondary replica.   My question is, what is that static IP for the WFSC used for?  The one that they asked you when you setup the WFSC.

Thanks

Viewing all 4689 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>