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

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.

MSSQL HA article

$
0
0
Hello
I have a presentation about  high high availability sqlserver. I need a series of powerful slides and articles.

Pivot

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

Switching Back From the Secondary Back to the Primary Node

$
0
0

Hello,

We have 2 node SQL2k12 x64 AlwaysOn cluster (ServerA and ServerB. ServerA is the primary and should be the primary at any given point of time unless there is a fail-over to the secondary). Due to some networking issues (which is being looked at), the fail-over from the primary to the secondary happens quite frequently. No data loss so far. Would like to create a script which checks the current status of the primary node and see whether it is currently the primary or the secondary node. If it is secondary node (replica_server_name in the below shown script is other than ServerA, it should execute the script to fail-over back to the primary node after certain time interval (say after 30 min). Below script will show the name of the current primary node (replica_server_name). So, basically, I think there is need for a IF, THEN ELSE statement included. Can you please help on this?

IF SERVERPROPERTY ('IsHadrEnabled') = 1
BEGIN
SELECT
   AGC.name -- Availability Group
 , RCS.replica_server_name -- SQL cluster node name
 , ARS.role_desc  -- Replica Role
 , AGL.dns_name  -- Listener Name
FROM
 sys.availability_groups_cluster AS AGC
  INNER JOIN sys.dm_hadr_availability_replica_cluster_states AS RCS
   ON
    RCS.group_id = AGC.group_id
  INNER JOIN sys.dm_hadr_availability_replica_states AS ARS
   ON
    ARS.replica_id = RCS.replica_id
  INNER JOIN sys.availability_group_listeners AS AGL
   ON
    AGL.group_id = ARS.group_id
WHERE
 ARS.role_desc = 'PRIMARY'
 order by rcs.replica_server_name
END

Thanks.

Victor


Victor

SQLServer 2012 AAG - Removing Replicas after the Node has been evicted from WSFC

$
0
0

We initially had a 3 node SQLServer 2012 AAG (Primary1, Secondary2 and DR1) at our DataCenter . In the process of migrating to a new data center at a different physical location, we set up 3 more nodes and evicted the DR node and added the new set of 3 replicas (Secondary3, Secondary4 and DR2).

Here is a summary:

Already Existing: Primary1, Secondary2 and DR1 in the AAG

New Nodes: Secondary3, Secondary4 and DR2

Added Replicas: Secondary3, Secondary4 to the AAG

Changed Primary Replica : Secondary3 to Primary Replica – Primary2 and made Primary1 Secondary Replica Secondary1

Evicted: DR1  and removed from AAG à Had to evict first since SQLServer 2012 AAG supports only 5 replicas at a time

Added Replicas: DR2

At this point time we have : Primary2, Secondary2, Secondary4, DR2, Secondary1

Things looked good so far.

Now is where the problem starts:

Nodes Secondary1 (old Primary) and Secondary2 were evicted from WSFC before they could be removed from AAG leaving these replicas as Orphan. Because of this, the AAG thinks that the two replicas still exist and is not truncating the logs of the databases and due the this the Drives are filling up.

In SSMS, Availability Groups à Availability Replicas I see the two replicas being X-ed (in red) out. Does this mean, I can remove the replicas (Right clickà Remove from Availability Group) without it affecting the AAG negatively?

Thanks,

rgn

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 4532 articles
Browse latest View live


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