We are planning to migrate an existing AG (2-node AG cluster, no shared storage) to a new SAN, and want to keep the same drive letters, say F and G . Note that all databases, including
the master, model and msdb are all on the same drive. The plan is as follows: Present new volumes to each node - say M and T Suspend data movement from the AG to the secondary Turn SQL off on the secondary Copy all data files to the new volumes Rename the M drive to F and rename the T drive to G Reboot the server SQL should come up with no issues since the drive and folder structure is the same. Resume data movement to the secondary. Failover the cluster to the secondary (the node that just moved to the new san) Repeat the same steps for the node as above. See any holes or pitfalls to this? There is no concern for transaction log bloat - - this will be done during a maintenance window, and is very low transaction. |
SAN Migration with existing Availability Group
Available storage disks already have data, can they be moved to another service without data loss?
Good morning,
I hope I'm in the right forum, as I'm not a SQL guy.
We have an issue where disks that are available for a cluster are not currently utilized by any resource. They do have databases on them though. I'm not sure of the history of how that happened, I work with a big I.T. group. Anyway, the storage team has verified there are active databases on those drives (in this case, they are mount points).
Would it be possible to add these drives to the cluster without an issue? The databases in this case are high priority.
OR would it be possible to move the databases, them add the drives, and move the databases back?
We are trying to figure out how to add those drives without causing any data loss or service interruption.
Maybe my search is lacking but I couldn't find too much online.
Thank you
Using BASIC AlwaysOn Availability & Transaction Log Shipping at the SAME TIME.
Hi, I have three servers, let's call it A, B, and C. I have one database and i'll name that as "DB".
Server A and B is in failover cluster and DB is in Availability Group (BASIC).
Now I want to send transaction log shipping from A to C, but I get this message.
"The backup operation on database 'DB' was skipped because it is part of an availability group and not its preferred backup replica."
It won't send transaction logs to server C and log shipping transaction does not work.
Is there any way to solve my transaction log problem?
Thank you so much.
SQL server AOAG
Hi,
We have configured AOAG with one secondary replica (Read-only option=YES).
I have given read & write access to the application user on primary DB. I can’t give it on secondary as it is a read-only copy.
One application is able to connect to the primary by using listener hostname at connection string without any issues.
Another application wants to use the secondary replica for only read statements. Hence, we are using secondary hostname at connection string. We are able to connect to the secondary server name by using SQL login. However, DB is not accessible. How to access the secondary DB with a SQL login?
I guess AOAG works as follows.
If we keep option: Read-only=YES, and at connecting string if you mention listener name and applicationintent=readonly, the AOAG will connect to secondary replica automatically when we run select statements. If it is yes, how to we will come to know that it is using secondary or primary.
Please correct me if I am wrong.
AlwaysOn Group and FCI
The following is from SQL 2012 books online. Does it mean One alwaysOn availability group can only have one FCI replica? Thanks.
The cluster nodes of an FCI can host only one replica for a
given availability group: If you add an availability replica on an FCI,
the WSFC cluster nodes that are possible FCI owners cannot host another replica
for the same availability group.Furthermore, every other replica must be hosted by an instance of SQL Server
2012 that resides on a different WSFC node in the same WSFC cluster. The only
exception is that while being migrated to another WSFC cluster, an availability
group can temporarily straddle two clusters.
Lijun
Availability Groups Add Azure Replica SQL 2016 SP1 on server 2016
As part of enhancing our SQL resilience we are intending to trial Availability Groups from on Premise to Azure.
I have created an on Premise VM running Server 2016 running SQL 2016 SP1 developer edition, I am trying to set up availability group between this and an Azue VM following this guide
https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-classic-sql-onprem-availability.
Availability group is created, however when I go to add an availability replica and select "Add Azure Replica" I do not get prompted for a management certificate as the documentation suggests. I can sign into my Azure subscription and select a platform image, I am choosing "SQL Server 2016 SP1 Developer Windows Server 2016".
However the VM size, Virtual Network and Virtual Netowrk subnet drop down boxes are blank they will not populate at all. I have checked our Azure AD logs and I can see my account being validated from SQL, but I cannot proceed any further as I cannot select anything else.
Could anyone offer any suggestions as to where I search next and what I could do to resolve this issue ?
Thanks
Endpoints not created in SQL 2016 on Windows 2016
Hi,
I just tried to create an availability group in SQL 2016 RTM build 2186 and found that no endpoints had been created so I couldn't make the secondary replica join the AG.
I had to manually create the endpoints on both nodes. I didn't need to do this for SQL 2012 on Windows 2012.
Chris
SQL Server Cluster install error
During a cluster install, received an error message: The cluster resource ‘SQL Server (SQLDBC1)’ could not be brought online due to an error bringing the dependency resource ‘SQL Network Name(SQLDBFC2)’ online. Refer to the Cluster Events in the Failover Cluster Manager for more information.
I've seen this error below andknow this is typically a permissions issue in AD. We've used the https://blogs.msdn.microsoft.com/psssql/2013/09/30/error-during-installation-of-an-sql-server-failover-cluster-instance/ AND https://technet.microsoft.com/en-us/library/dn466519(v=ws.11).aspx.
The CNN, however, had the correct permissions, and the VNN was created in AD during the SQL Server install process.
The final error appears to be: 00000bb8.00001e14::2016/12/16-20:26:07.749 ERR [RES] Network Name <SQL Network Name (SQLDBFC2)>: Online thread Failed: (0)' because of 'Initializing netname configuration for SQL Network Name (SQLDBFC2) failed with error -1073741790
Any ideas? Part of the cluster log is below:
00000bb8.000010e4::2016/12/16-20:26:06.884 INFO [RES] Network Name: [NNLIB] Object SQLDBFC2 already exists, using DC: \\2012AD2.somecompany.com00000bb8.000010e4::2016/12/16-20:26:06.920 INFO [RES] Network Name: [NNLIB] Trying to enable disabled object SQLDBFC2 on DC: \\2012AD2.somecompany.com (Flags 0000000000001002)
00000bb8.000010e4::2016/12/16-20:26:07.000 INFO [RES] Network Name: [NNLIB] Changing Password for object SQLDBFC2 on DC: \\2012AD2.somecompany.com, sam name: SQLDBFC2$, result: 3221225506
00000bb8.000010e4::2016/12/16-20:26:07.000 INFO [RES] Network Name: [NN] IdentityLocal End Impersonating
00000bb8.000010e4::2016/12/16-20:26:07.004 INFO [RES] Network Name <SQL Network Name (SQLDBFC2)>: AccountAD: OnInitializeEnd: -1073741790
00000bb8.000010e4::2016/12/16-20:26:07.004 INFO [RES] Network Name: Agent: OnInitializeReply, Failure on (46eed284-838d-453e-8750-82a46eb53f49,AccountAD): -1073741790
00000bb8.000010e4::2016/12/16-20:26:07.004 INFO [RES] Network Name <SQL Network Name (SQLDBFC2)>: Configuration: InitializeReplyCreation of NetName (type Singleton), result: -1073741790, IsCanceled: false
00000a88.000013f4::2016/12/16-20:26:07.004 INFO [GUM] Node 2: executing request locally, gumId:265, my action: /dm/update, # of updates: 1
How to check who still login to the SQL server and how to kick them out?
Dear SQL Server Expert,
We are using SQL Server 2008 for Hyperion DB. Currently, when we are doing some backup using the Life Cycle Management, there always some error whereby the DB is being used. I am thinking of how to check who is still login to the DB and find a way to kick them out.
Many Thanks
Regards,
H
Database in recovery mode
The last log for my database in sql error log is
Recovery of database 'DBNAME' (37) is 18% complete (approximately 111 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
Its been more than 7hrs now & still the recovery is not completed. My database is 7gb in size. When I check sp_who2 " i see the the DBCC session is blocked by -3 spid. The session is not getting killed & i don't get any info on how i can kill session blocked by spid -3. Any thoughts on this
SQL 2012 [Error 35250] Failed to join the database to the Availability Group
environment setup
- 2 SQL server instances node1 and node 2
- SQL server installed with default installation using local machine accounts *not domain account* on both nodes node1\administrator and node2\administrator
- [Hadr_Endpoint] endpoint configured and 5022 port added as an inbound port on both nodes
- error 35250 occurs while configuring the availability group?
Set Quorum settings using powershell
Log send rate is very low in AlwaysOn Configure servers
We have two geographical location configure SQL 2014 always on async mode with two instances (around 55 databases).
The first instances is running fine on both location and the estimated data loses time equal to zero and log send rate is around 500 KB/s avg but the another instance the estimated data loses time is around 8 hours and the log send rate is around 50 KB/s, don't know why., I have rebooted the secondary server once but the problem is still persists
Please help to get rid of this situation....???
How to backup for SQL server 2016 AlwaysOn
Hello
Current I have two server 2016 Alwayson with Asynchronous commit
For Primary :
- Can I backup Full and Different ?
- Can I clear log database when it full ?
For Secondary
- Can I backup Full and Different ?
- Can I clear log database when it full ?
Azure Replica Virtual Network does not populate with SQL 2014 SP2
I am trying to an Azure Replica to my SQL Server 2014 Enterprise AlwaysOn Availability Group and the Virtual Network is not being populated. This is a known issue for the RTM version of SQL 2014 and is resolved with CU5. However, I am running SP2, CU2 and I am still experiencing this issue, as shown in the image below.
Does anyone know if this error was re-introduced with a subsequent service pack or update? Or any idea what I might be doing wrong? I created both a new Resource Manager and Classic virtual network to use for this and neither one shows up.
Links that describe this issue with RTM release of SQL 2014 are below.
https://support.microsoft.com/en-us/kb/3004548
https://blogs.msdn.microsoft.com/alwaysonpro/2014/11/21/troubleshooting-the-add-azure-replica-wizard-in-sql-server-2014/
Always-On-Sudden Automatic Failover
Hi,
We are currently using SQL 2014 Always-On . We have cluster setup with three nodes , Node 1 and Node 2 have setup with Automatic failover , Node 3 is setup with manual failover. Node 1 is the primary node, 2 and 3 are secondary
Occasionally Sudden Automatic Failover happen to Node 2 which becomes the primary node. Node 1 becomes out of Sync and we have to restart the SQL Service on Node 1 to bring it back in sync.
We always check that at the time of these sudden failovers to see if there's any any particular network event ( like a switch down or loss of power), but usually the answer is that the network infrastructure is running normally.. Node 1 is a physical server and the server is up and running when this failover happen. We can confirm that because we can remote desktop to the machine of Node 1.
Not sure what's causing this. Below are some of the SQL Server log entries at the time of this failover:
1st message is usually this :
Message
A connection timeout has occurred on a previously established connection to availability replica 'Node3' with id [6C63DEA5-35E7-4C9A-A8B3-BE40752B1608]. Either a networking or a firewall issue exists or the availability replica has transitioned to the
resolving role.
two minutes later this message:
The local availability replica of availability group 'SynergyDB' is in a failed state. The replica failed to read or update the persisted configuration data (SQL Server error: 41029). To recover from this failure, either restart the local Windows
Server Failover Clustering (WSFC) service or restart the local instance of SQL Server.
Message in the cluster events from the failover cluster manager:
Cluster node 'NODE01' was removed from the active failover cluster membership. The Cluster service on this node may have stopped. This could also be due to the node having lost communication with other active nodes in the failover cluster. Run the Validate a Configuration wizard to check your network configuration. If the condition persists, check for hardware or software errors related to the network adapters on this node. Also check for failures in any other network components to which the node is connected such as hubs, switches, or bridges.
SQL 2014 Build #:12.0.4100.1
OS:Microsoft Windows Server 2012 R2 Standard Edition
Any help is much appreciated.Thanks,
database in SYNCHRONOUS_COMMIT remains in the SYNCHRONIZING state
We have a database that when configured in SYNCHRONOUS_COMMIT remains in the SYNCHRONIZING state forever (while the expected state is SYNCHRONIZED ).
I would like to point out that we experience this only since we removed this database from an existing AG (that includes several databases) and added it to a new AG dedicated for this database. The SQL Server instances involved remains the same as so is the workload.
Nothing in the errorlog and the only thing I have tried so far is to SUSPEND/ RESUME withe no success.
Thanks
-Yaniv
Yaniv Etrogi
site |
blog | linked in |
mail
Please click the Mark as Answer button if a post solves your problem! orVote As Helpful
SQL Server Cluster Resource Name
the Windows Cluster name and the SQL Server virtual Name need to be unique in the domain.
Does the SQL Server cluster resource group name need to be unique in the domain, or just within the cluster? Also, can you change the resource name ?
thanks
Availability Group latency query.
Greetings. I want to start tracking, and eventually alert on excessive AG latency. I've taken most of the query from this link and also modified it a bit to come up with the query below. However, it's not behaving quite as I'd expected. To test this I shut down the Secondary node in my AG. While the syncState and syncHealth values do change immediately when I rerun the query, no other values do. So my "seconds behind primary" values never gets above 0, and I also expected to see a discrepancy between the last_sent_time and last_recieved_time values, but they're always the same. My end goal is to be able to insert these values into a table and alert on the values, but I first need to make sure that my collection is correct. Should I simply rely on syncState and syncHealth for what I'm after, or is there better info to alert on?
Thanks!
SELECT AGS.NAME AS AGGroupName ,AR.replica_server_name AS InstanceName ,HARS.role_desc ,Db_name(DRS.database_id) AS DBName ,AR.availability_mode_desc AS SyncMode ,DRS.synchronization_state_desc AS SyncState ,DRS.synchronization_health_desc as SyncHealth ,DRS.last_hardened_time ,DRS.last_redone_time ,DRS.log_send_queue_size ,DRS.redo_rate ,DRS.redo_queue_size AS 'Redo_Queue_Size(KB)' ,last_sent_time, last_received_time /* if the last_hardened_lsn from the primary server == last_hardened_lsn from secondary server then there is NO LATENCY */ ,'seconds behind primary' = CASE WHEN EXISTS ( SELECT DRS.last_hardened_lsn FROM ( ( sys.availability_groups AS AGS INNER JOIN sys.availability_replicas AS AR ON AGS.group_id = AR.group_id ) INNER JOIN sys.dm_hadr_availability_replica_states AS HARS ON AR.replica_id = HARS.replica_id ) INNER JOIN sys.dm_hadr_database_replica_states DRS ON AGS.group_id = DRS.group_id AND DRS.replica_id = HARS.replica_id WHERE HARS.role_desc = 'PRIMARY' AND DRS.last_hardened_lsn = DRS.last_hardened_lsn ) THEN 0 ELSE datediff(s, last_hardened_time, getdate()) end FROM sys.dm_hadr_database_replica_states DRS LEFT JOIN sys.availability_replicas AR ON DRS.replica_id = AR.replica_id LEFT JOIN sys.availability_groups AGS ON AR.group_id = AGS.group_id LEFT JOIN sys.dm_hadr_availability_replica_states HARS ON AR.group_id = HARS.group_id AND AR.replica_id = HARS.replica_id ORDER BY Db_name(DRS.database_id)
Thanks in advance! ChrisRDBA
SQL Server Cluster Resource Name
the Windows Cluster name and the SQL Server virtual Name need to be unique in the domain.
Does the SQL Server cluster resource group name need to be unique in the domain, or just within the cluster? Also, can you change the resource name ?
thanks