Quantcast
Viewing all 4689 articles
Browse latest View live

Creating Availability Group Listener failed with error "Cannot complete this function"

Hello Experts,

After I created an Availability Group in Always On High Availability in SSMS, I was trying to create a listener in Availability Group Listeners. In the creation wizard after put in the name, select Static IP type in IP addresses and click OK, I got failure:

Creating availability group listener resulted in an error.
ADDITIONAL INFORMATION:
Create failed for Availability Group Listener ‘AG-test-A’. (Microsoft.SqlServer.Smo)

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

The WSFC cluster could not bring the Network Name resource with DNS name 'AG-test-A' 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 different DNS name to resolve name conflicts, or check the WSFC cluster log for more information.

The attempt to create the network name and IP address for the listener failed. If this is a WSFC availability group, the WSFC service may not be running or may be inaccessible in its current state, or the values provided for the network name and IP address may be incorrect. Check the state of the WSFC cluster and validate the network name and IP address with the network administrator. Otherwise, contact your primary support provider. (Microsoft SQL Server, Error: 19471)

I've researched on this error and can't get answer on the error in my case:

First of all, I read the Event Viewer with event ID = 1194: Status = Cannot complete this function

The text for the associated error code is: Cannot complete this function.

Please work with your domain administrator to ensure that:

- The cluster identity 'SQLAACtest$' has Create Computer Objects permissions. By default all computer objects are created in the same container as the cluster identity 'SQLAACtest$'.

- The quota for computer objects has not been reached.

- If there is an existing computer object, verify the Cluster Identity 'SQLAACtest$' has 'Full Control' permission to that computer object using the Active Directory Users and Computers tool.

From Cluster.log, I also got the error message:

[Verbose] 00001cf4.000009a8::2020/03/25-05:56:59.068 ERR   [RES] Network Name: [NNLIB] Object SQLtest-A creation using LDAP failed on DC \\testserver.firm.mycompany.com. status = 1003

In command prompt type in Net helpmsg 1003, the result is the same: Cannot complete this function.

What is the reason to caused the listener creation failed? What should I do according to the message showing in the log files?

Thanks,


 


lw


AAG DB restore using Azure backup

Hi there,

Can anyone point me in the direction of a step by step guide to restore a SQL database which is in an AAG using Azure backup please? I can only find instructions using native SQL backup. I have an AAG with 1 primary and 1 secondary server with a synchronous connection. They are Server 2016 VM’s.

My thinking is that I need to carry out the following – I am not a DBA so I need confirmation of the process please.

Restore the SQL database using Azure portal using “Alternate location” and specify the SQL instance in which the database is on (ensure restored DB is called something different). Then pick the relevant log file point I want to restore from. Do I select “Restore with NoRecovery” enabled or disabled here?

Once restore is complete - in SSMS on primary server - evict the database from the AAG.

Rename the original defective DB on Primary to something else or delete it.

Rename the restored DB to the original DB name.

On secondary SQL server rename or delete the original defective DB from the list of Databases.

On primary - add the restored DB to the AAG. At the “Select your data synchronisation preference” select “Full” and browse to a location that the primary and secondary can connect to. Do I need to create a new share for this or is there already an existing share somewhere they already use for synchronising I can use? Here will be where a full backup will be taken and then restored onto the secondary then added to the AAG?

Does this sound right – anything else I need to do or I have done wrong?!

Manual failover without data loss not working in SQL2019

Hi,

I was wondering if you can help. I have setup two Linux SQL2019 CU3 instances on Ubuntu with HA enabled and I get an error when I execute: ALTER AVAILABILITY GROUP [ag6x52] SET (ROLE = SECONDARY); to manually failover over to the secondary replica.

The message is:
Msg 41104, Level 16, State 5, Line 1
Failover of the availability group to the local replica failed because the availability group resource did not come online due to a previous error.

My AG is as follows

Create AVAILABILITY GROUP ag6x52
   WITH (CLUSTER_TYPE = NONE )
   FOR REPLICA ON
   N'sql52' WITH (
      ENDPOINT_URL = N'tcp://172.16.6.52:5022',
      AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
      FAILOVER_MODE = MANUAL,
      SEEDING_MODE = AUTOMATIC
   ),
   N'sql52b' WITH ( 
      ENDPOINT_URL = N'tcp://172.16.5.52:5022', 
      AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
      FAILOVER_MODE = MANUAL,
      SEEDING_MODE = AUTOMATIC
  );

To failover over I ran the following TSQL

ALTER AVAILABILITY GROUP [ag6x52] 
     MODIFY REPLICA ON N'sql52b' 
     WITH (AVAILABILITY_MODE = SYNCHRONOUS_COMMIT);

SELECT ag.name, 
   drs.database_id, 
   drs.group_id, 
   drs.replica_id, 
   drs.synchronization_state_desc, 
   ag.sequence_number
FROM sys.dm_hadr_database_replica_states drs, sys.availability_groups ag
WHERE drs.group_id = ag.group_id; 

The above query shows that the state of all the databases as SYNCHRONIZED

Select is_failover_ready, * from sys.dm_hadr_database_replica_cluster_states

The above query shows the is_failover_ready field for all databases as 1

Next I execute

ALTER AVAILABILITY GROUP [ag6x52] SET (REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT = 1);

which is completed successfully. Then I execute 

ALTER AVAILABILITY GROUP [ag6x52] SET (ROLE = SECONDARY);

which returns the error

Msg 41104, Level 16, State 5, Line 32
Failover of the availability group 'ag6x52' 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, cluster logs and system event logs. For information about how to view events and logs for a Windows Server Failover Clustering (WSFC) cluster, see Windows Server documentation.

Please note that the databases are in Synchronized state and there is no cluster (Pacemaker) in place.

Thanks


mdf file corruption on primary replica

Suppose I have a database have two file group . one of the file in the second filegroup is corrupt in the primary replica .

I failover the AG to another replica .

So now is it possible to restore the corrupt file only ?

what if that's the same case happen in secondary replica ? can restore the single corrupt file from backup and do the recovery ?

Change iSCSI to VHDs

Hi,

Is it possible to change iSCSI drives to the new VHDs attached to hyper-v SQL 2016 Cluster nodes and copy the data from DB, LOG and Quorum from iSCSI to VHDs and then remove ISCSI drives?

Thanks.

AlwaysOn Issue

Hi,

I found the below error:

When i get the alert immediately check and found below error. not any other errors:

Error: 35250, Severity: 16, State: 13.
The connection to the primary replica is not active.  The command cannot be processed.
Error: 35250, Severity: 16, State: 13.
The connection to the primary replica is not active.  The command cannot be processed.

Immediately i logged into server and when i check for dashboard, everything looks good.

I didn't find any error either in Primary or Secondary.

AG Group point-in-time recovery

If I want to do a point-in-time recovery of a AG database, what's the proper procedure ??

If it possible to point in time recovery of to a secondary replica 's database , and sync back to primary replica ?

Update Server nodes, Cluster, Listener IP address of AvailabilityGroup environment

We got 2-node AlwaysOn environment in same subnet but due to risks identified with network configuration, these Server nodes (both) will be moved to a new subnet (each node to different subnet) and we need to update all the IP addresses (Server nodes, Cluster, Listener) and also now the environment will become a Multi-Subnet environment. 

Most of the posts mainly talk about moving 1-node to a new subnet but couldn't anything where both nodes being moved to new subnets.

I understand we will need additional IP's for listeners (multi-subnet) but can anyone provide a high-level steps (and order) in changing all these IP address and the impact to SQL when each of these steps are implemented ?



Log backup in AlwayOn 2016

Hi,

We are taking log backups for every 15 mins and Full backup weekly.

My question is, what happens if failover happens before next log backup schedule?

Does it quick full backup or contine with log backup as per the schedule?

We are using SQL Server 2016 ENT with Primary+1 Secondary?


SQL 2012 installation for Failover Cluster failed

While installation of SQL 2012 on FOC validation fails on "Database Engine configuration" page with following error:

------------------------------
The volume that contains SQL Server data directory g:\MSSQL11.MSSQLSERVER\MSSQL\DATA does not belong to the cluster group.
------------------------------

Want to know how does SQL installation wizard queries volumes configured with Failover Cluster. does it:

- Enumerate "Physical Disk" resources in FOC

- does it enumerate all Storage Class resources in FOC for getting the volume list

- or it depends on WMI (Win32_Volume) to get volumes ?

The wizard correctly discovers volume g:\ in its FOC group on "Cluster Resource Group" and "Cluster Disk Selection" page. but gives the error on Database configuration page.

Any help in this would be appreciated.

Thanks in advance

Rakesh


Rakesh Agrawal

Distributed Availability Group - Secondary AG is in disconnected state

I've configured AG1 with PROD_DB1 & PROD_DB2, AG2 with DR_DB1 & DR_DB2. Endpoint configured with service account. 

Database is synchronized on DR_DB1 & Restoring state on DR_DB2. I cannot execute following query on DR_DB2

ALTERDATABASE [db1] SET HADR AVAILABILITYGROUP = [ag2];

because of AG2 is in disconnected state. Looks like below:

1distributedag1ag1 ASYNCHRONOUS_COMMITCONNECTEDPRIMARYONLINEHEALTHY
2distributedag1ag2 ASYNCHRONOUS_COMMITDISCONNECTEDSECONDARYNULLNOT_HEALTHY

I only opened 5022 port between Prod & DR site with following endpoint ip address.  Joined secondary cluster with distributed configuration.

1. Should I need to open 1433 port between sites?

2. From which settings should I look for troubleshooting in this situation?

database level health detection

Set secondary Log Shipping

Hi, 

I have a DB cluster based on Windows Server 2008 R2 and SQL server 2008 (version 10.0.4064.0) and I set a log shipping with the same software level.

Now I would add a new Log Shipping on Windows Server 2012 R2 and SQL 2012 (version 11.0.7001.0)

From the Production DB I set the new server as Log Shipping, and I see that the Transaction Log files are copied on both Log Shipping servers.

I have a question, if I run a report from two Log Shipping I see this differences, how can set the new with the same parameters of the old?

Old Log Shipping Server:

Image may be NSFW.
Clik here to view.
old Log Shipping

New Log Shipping Server:

Image may be NSFW.
Clik here to view.
New Log Shipping

SQL2012 Cluster upgrade to SQL2016 cluster upgrade installation steps

SQL2012 Cluster upgrade to SQL2016 cluster upgrade installation steps best practices

Unable to set listener IP on Multiple Availability Groups

Hi All,

I have 3 Databases and for each Database I have set up Availability Group. On 1st Group I have setup listener IP. Using the same Listener IP I am able to access other Groups as well. But when I am trying to add same Listener IP to other Groups it is giving me error. Can any one recommend the steps what I am missing here. Also i tried to Add other Listener IP to other Groups that is also not working. Please suggest


Firewall ports for endpoints

We're bringing up a new 2017 AlwaysOn AG cluster.  2 HA and 1 DR nodes.  Each node will host multiple instances.  Named instances will have non-default ports.  Node1/Instance1 will use the same port number as Node2/Instance1 and Node3/Instance1, and so forth.  Each AG listener will use the port number of the SQL instance where it is hosted.  Our firewall team will open the ports between client devices and destination cluster nodes, and also for listeners and the cluster virtual server.

Do mirroring endpoints -- 5022, 5023, etc. -- require firewall ports to be opened like the ports that are used for the SQL instances and listeners?

Thanks.


Recover deleted rows with no backup

Hi,

I am a rookie at SQL Server and I have deleted by mistake all rows from some tables usingDelete <Table> from a database that has no backup...ever but it's on FULL MODE.

I have seen some samples of how to restore data using LSN, but I just can't understand the procedure, and I have no money to buy an expensive software (like ApexSQL) to get my data back.

I followed instructions on how to do it in here:

https://www.sqlshack.com/how-to-take-advantage-of-sql-servers-transaction-log/

Any simpler way or a REAL free tool to do it?

Thanks in advance.


G.Waters


Always on , data sync in parallel or serial

Hi , We have 2016 SP2 CU3  enterprise version awlays on configured. DB  contained some varbinary, image  type data tables  which DB expecting to grow annually 2TB. probably will store pdf bills with the DB.  expecting to remain 2 year data with archive plan.  so questions 

Q1.can we manage  the DB with such a big size with always on sync. 

Q2. Is that alwayson sync is parallel or serial . 

Q3. We plan to have backup on primary as expecting secondary may have delay  with data. in this case  if not setup backup from secondary , then L drive get fill up  often. What is the solution ? setup log backup and full backup on secondary  site as well?   

any one can help we great. 

regards

Choosing Log Shipping or Transactional Replication for DR and Reporting.

Hi All,

Business need to have a DB (AM1-DC1) with Data replication enabled from PROD DB (AM2-DC2). This would be needed to perform any DR test and for reporting purpose. The Database size is around 300GB, What is the best technology to choose Log Shipping or Transactional Replication. (OR) Let me know, what questions we need to ask to Business for choosing a HA. Please advise. 


Vinai Kumar Gandla

How not to have sql to restart on the same node but failover on 1st failure in a cluster

Hi,

By default sql tries to restart on the same node in case of a failure, next it does failover.

Personally I am good with the default behavior , but I am being asked a interesting question - is it possible to have sql NOT try a restart on the same node and just failover in case of a failure?

And where is it done from, is it this:

In cluadmin-SQL Server Properties-Policies-

There is a option

1. Max restarts in the specified period - Will making it zero do the needful?

Or there is some other way? Thanks.


D

Viewing all 4689 articles
Browse latest View live


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