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

Cannot create AlwaysOn High Availability Group

$
0
0

I cannot successfully create Always on High Availability Group because the Netbios name  of the server is more than 15 characters. Getting the error message below;<o:p></o:p>

Cannot bring the Windows Server Failover Clustering (WSFC) resource (ID 'aXXXXXXX-f8dc-4b2a-90dd-6b0a705e8994') online (Error code 5018).  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 request.  For information about this error code, see "System Error Codes" in the Windows Development documentation.<o:p></o:p>

Failed to designate the local availability replica of availability group 'EXXXX'as the primary replica.  The operation encountered SQL Server error 41066 and has been terminated.  Check the preceding error and the SQL Server error log for more details about the error and corrective actions.<o:p></o:p>

Failed to create availability group 'EXXXX'.  The operation encountered SQL Server error 41160 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 command. (Microsoft SQL Server, Error: 41066)

The SQL server is in production so i cannot at this point rename the server. Any work around please?

Thanks


secondary_lag_seconds

$
0
0

For always-on , if the secondary replica is set the sync-commit, the secondary_lag_seconds (from DMVsys.dm_hadr_database_replica_states)  is always be 0 ?????

and this number is the different between the "last_commit_time" of primary replica and secondary replica ?

ODBC 64 bit connect to Always on read replica

$
0
0

Hi Currently we have sql server 2016 R2  and always on , two node cluster(node 2 is read only ). now business need to connect read only site using Listener name  to "read only " replica for reporting. When connect to  ODBC driver , not sure the connection goes to secondary read only site. Then how to configure ODBC to connect read replica for reporting purpose. This setup required for power BI desktop users to connect to database from their laptops 

Any experts ideas would be highly appreciated . 

 

Setting up Primary and Secondary at same time for Availability Group

$
0
0

Hi all,

I'll test this once my setup is complete but it'd be good to get any ideas meanwhile.

Basically I want to know if it is possible to take a full and log backup from one server and restore it on a separate Availability Group primary and secondary and then use that setup to add the database to the availability group. All the documentation mentions the need to restore to the primary, take a full and log backup from the primary and then use that to seed the secondary.

Setting up both at the same time would be faster and be transactionally consistent - I just need to know if this is supported / works?

Thanks,

Paul

SQL Server Failover Cluster Instances in a replica set cannot be configured for automatic failover

$
0
0
When the secondary replica instance is a windows clustered instance, why it's not supported automatic failover ?

Always-on "session timeout" vs "SameSubnetThreshold"

$
0
0

What's the relationship between always-on config "session timeout " (default 30) and windows cluster config

SameSubnetDelay     : 1000   (default)
SameSubnetThreshold : 10   (default)

SQL AlwaysOn Failed Over Primary in Restoring Mode

$
0
0

Last night we had an ESX server bounce and my 2 cluster AOAG failed over.

Everything is running fine on the secondary, however, the primary is now in data loss state and showing as in Restoring mode on the local console.

Any suggestions?

Would failing over to Restoring mode be a bad idea or is it OK?

Our DBA is on vacation so I'm trying to pick this up but I'm not experienced with AOAG at all.

Is it a bad idea to failover with the data loss state or is that just a generic warning? Am I going to lose all data after the failover?

SQL Server - Log file not shrinking in AlwaysOn group

$
0
0
We have three-node AO setup in SQL Server. Primary node, one secondary node in Sync mode and another secondary node in Async mode.
Main Database on Primary node, log file-size is 434GB, Used 99.91%. Log backups is happening every hour only on Primary node.

Ran following query on Primary and Secondary servers.
SELECT log_reuse_wait_desc
FROM sys.databases
WHERE name = 'Main DB Name'

Primary node
log_reuse_wait_desc
------------------------------------------------------------
AVAILABILITY_REPLICA

Secondary-1 node (Sync mode)
log_reuse_wait_desc
------------------------------------------------------------
LOG_BACKUP

Secondary-2 node (Async mode)
log_reuse_wait_desc
------------------------------------------------------------
AVAILABILITY_REPLICA

While other DBs (much smaller than main DB) in AO groups log usage is very minimum (1 to 10%) and can be shrunk, main DB log usage continuously showing more than 99% and not shrinking.

I am guessing since log_reuse_wait_desc is showing "AVAILABILITY_REPLICA" on Primary Node, means not all the log is transferred to Secondary replica, and so its still full.

I checked Redo Queue Size in Secondary-1 Node showing 27GB, Secondary-2 is showing nothing. So most likely Secondary 1needs to get all logs from Primary. The problem is Redo Queue Size in Secondary-1 Node is increasing and not decreasing as what I through it should. Also log-file on Primary node is slowly increasing which is going to fill-up whole disk-space.

Now Secondary-1 Node showing LOG-BACKUP. How do I solve this issue? Should I take Log backup on Secondary-1 Node and check?

SQL Server - Log file not shrinking in AlwaysOn group

$
0
0
We have three-node AO group in SQL Server. Primary node, one secondary node in Sync mode and another secondary node in Async mode.
Main Database on Primary node, log file-size is 434GB, Used 99.91%. Log backups is happening every hour only on Primary node.

Ran following query on Primary and Secondary servers.
SELECT log_reuse_wait_desc
FROM sys.databases
WHERE name = 'Main DB Name'

Primary node
log_reuse_wait_desc
------------------------------------------------------------
AVAILABILITY_REPLICA

Secondary-1 node (Sync mode)
log_reuse_wait_desc
------------------------------------------------------------
LOG_BACKUP

Secondary-2 node (Async mode)
log_reuse_wait_desc
------------------------------------------------------------
AVAILABILITY_REPLICA
While other DBs (much smaller than main DB) in AO groups log usage is very minimum (1 to 10%) and can be shrunk, main DB log usage continuously showing more than 99% and not shrinking.
I am guessing since log_reuse_wait_desc is showing "AVAILABILITY_REPLICA" on Primary Node, means not all the log is transferred to Secondary replica, and so its still full.
I checked Redo Queue Size in Secondary-1 Node showing 27GB, Secondary-2 is showing nothing. So most likely Secondary 1needs to get all logs from Primary. The problem is Redo Queue Size in Secondary-1 Node is increasing and not decreasing as what I through it should. Also log-file on Primary node is slowly increasing which is going to fill-up whole disk-space.
Now Secondary-1 Node showing LOG-BACKUP. How do I solve this issue? Should I take Log backup on Secondary-1 Node and check?

Logshipping: Free space do not propagate to secondary

$
0
0
I have this strange scenario wherein we have a logshipping setup. The data files which were shrunk on primary do not get propagated to secondary. Do we know the reason? Both ends we have SQL 2008 R2 version.

Logshipping: Free space do not apply to secondary

$
0
0
I have this strange scenario wherein we have a logshipping setup. The data files which were shrunk on primary do not get applied to secondary. Do we know the reason? Both ends we have SQL 2008 version.

sys.availability_groups column version

$
0
0

what is the column version meaning in DMV sys.availability_groups

xevent on AG

Error While creating Availability Group (Error 19435, 41044)

$
0
0

Dear all,

I have a big issue with a new availability group installation/configuration. It does an error and do not create the group...

It seems that the group goes online and then is killed by the failover cluster... But I don't see why. I do have searched the web about my issue but I have tried everything proposed :

1. Grand privileges to NT AUTHORITY\SYSTEM (Connect SQL to, View server state to, Alter any availability group to

2. Local admin for the agent /engine service account on Windows and on the SQL database

3. Delete my cluster and recreated it

4. Tried creating the group without the listener

5. Have exactly the same Hardware configuration (HDD / RAM / CPU)

Here the log from the SQL Server (from SSMS)

08/13/2019 09:07:01,spid55,Unknown,Always On: WSFC AG integrity check failed for AG 'AG-SQLIPSN-DEV' with error 41044<c/> severity 16<c/> state 1.
08/13/2019 09:07:01,spid55,Unknown,Error: 19435<c/> Severity: 16<c/> State: 1.
08/13/2019 09:07:01,spid55,Unknown,The state of the local availability replica in availability group 'AG-SQLIPSN-DEV' has changed from 'RESOLVING_NORMAL' to 'NOT_AVAILABLE'.  The state changed because either the associated availability group has been deleted<c/> or the local availability replica has been removed from another SQL Server instance.  For more information<c/> see the SQL Server error log<c/> Windows Server Failover Clustering (WSFC) management console<c/> or WSFC log.
08/13/2019 09:06:01,spid55,Unknown,The state of the local availability replica in availability group 'AG-SQLIPSN-DEV' has changed from 'NOT_AVAILABLE' to 'RESOLVING_NORMAL'.  The state changed because the local availability replica is joining the availability group.  For more information<c/> see the SQL Server error log<c/> Windows Server Failover Clustering (WSFC) management console<c/> or WSFC log.
08/13/2019 09:04:39,spid15s,Unknown,Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
08/13/2019 09:04:39,spid15s,Unknown,Always On Availability Groups: Local Windows Server Failover Clustering node is online. This is an informational message only. No user action is required.

Here the logs from the Cluster :

EVENT ID : 1254 Error - Clustered role 'AG-SQLIPSN-DEV' has exceeded its failover threshold. It has exhausted the configured number of failover attempts within the failover period of time allotted to it and will be left in a failed state. No additional attempts will be made to bring the role online or fail it over to another node in the cluster. Please check the events associated with the failure. After the issues causing the failure are resolved the role can be brought online manually or the cluster may attempt to bring it online again after the restart delay period. EVENT ID : 1205 Error - The Cluster service failed to bring clustered role 'AG-SQLIPSN-DEV' completely online or offline. One or more resources may be in a failed state. This may impact the availability of the clustered role. EVENT ID : 1069 Error - Cluster resource 'AG-SQLIPSN-DEV' of type 'SQL Server Availability Group' in clustered role 'AG-SQLIPSN-DEV' 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.

I am totally lost on why it doesn't work. My previous AlwaysOn configuration went fine without any issue and we did the same thing for this one...

The only thing I could think of is to begin the all process again (deleting everything -> DNS records, AD records, Quorum share , Cluster) and start again... But I am not sure it would work...

Hope anyone can help,

Best Regards,

Jon

primary_role_allow_connections_desc

$
0
0

What's the difference for the following

primary_role_allow_connections_desc : ALL vs Read-write

secondary_role_allow_connections: Read-only and all ?


SQL Server Upgrade from SQL Server 2012 to SQL 2017 Failed

$
0
0

Hello, 

I am doing a SQL Server Upgrade from SQL 2012 to SQL 2017, while I did for two passive (node 3,4) it worked. Interestingly the instance where i setup prevent failback moved to the upgraded node and when i try to failover it was not failing over to the Node 1, Then  i was attempting installation for the node 1, the installer itself was not initializing, it was closing unexpectedly saying SQL Server setup Failed due windows update failure. From the Summary.txt, I found "Error Microsoft.sqlserver.configuration.setupextension.rundiscoveryaction failed". I am half done now, need to see the possible action. 

I am looking for possible solution for this, without thinking of the Uninstall and add node solution for the rest of the nodes. Kindly help advise if you come across this situation and how you fixed 

Thanks 



Thank you... MOMEN

Types(CPU/RAM type) of IaaS required for for replicas and primary node in a SQL AG?

$
0
0

Types(CPU/RAM type) of IaaS required for for replicas and primary node in a SQL AG?

For Basic SQL AG for SQL 2016 Standard version, the replica node (can be a less powerful IaaS- less CPU/RAM)?

For SQL AG for SQL 2016 Data Center version, can the replica nodes be less powerful the primary node within the same data center (zone)?   

If we use a distributed AG with SQL 2016 Data Center version, can the replicas be less powerful for the fowarder node at the DR site?   Can the other replicas both at the primary replicas in the primary data center and be less powerful (less RAM/CPU) than the primary node?


dsk

Link server configured to connect Always on read only connection to secondary replica

$
0
0

Hi  we have always on server 2016 R2 configured and read only routing also configured . Basically "user1" connect from client server and display as secondary  server. That ensured the read only routing is working 

sqlcmd.exe -S  LSNRname -d databasename -E -K ReadOnly

1>    Go

2>    Select @@servername

3>    Go

--------------------------

Question is on same client server(other 2016 R2 SQl server) I need to create a linked server to always on. and i created as follows. 

EXEC sp_addlinkedserver 
@server = N'Linkservername, 
@srvproduct=N'SqlServer',
@provider=N'SQLNCLI11', 
@datasrc=N'Listenenrname ', 
@provstr=N'ApplicationIntent=ReadOnly', 
@catalog=N'DBname';

.Linked server created. 

then I run following command to see which server is accessing from clinet server 

select * from OPENQUERY ( [Linkservername] ,'select @@servername' )

Its returned the correct servername.

Q1. I am not sure what user is use to connect which assess DB from the link. When select "Be made using the login's current security context"

Q2 . Secondly when I try to add user on  , then I am getting error. But please note I connect  using SSMS  same user specifying   listenername + ApplicationIntent=ReadOnly  and connected correctly.  Not sure why. Any one has any idea would be great . 

 





Create SQL user on Availability group database and permission not found after fail over

$
0
0

Hi we have always on 2016 R2 and two databases on added to always on group. now The application users create instance level and granted on primary replica(db_datareader) , This user has create on secondery  replica as well. When failover to secdery replca the usr get following error message as not accessible.  But db level ( user security I can see the same user already on) but instance level permission lost as image on secondery  node  . But when fail back to primary node  the user can access. Noy sure why is this happen . Cant redo grant  manual permission again and again. any idea. 



sql server FCI on Azure windows server 2012 VMs

$
0
0

Hi there,

I need you guys help.

I already searched some guidance for how to configure sql server failover cluster instance with windows server 2012 Azure VMs but didnt find any useful links.

In technet site, there is only for windows server 2016 but I need a document for windows server 2012 versions.

If you know some useful links for this case, please reply me.

Thank you

Viewing all 4532 articles
Browse latest View live


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