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

Unable to see named instance via AG Listner

$
0
0

Good morning,

I'm a little confused with my Always On High Availability setup and cant understand what's happening.

I have a default SQL instance and have setup an Availability Group listener (AGLIST1).  It has the IP address of 192.168.1.11 listening on port 1433.  SQL is also setup to use the default port, 1433.

There is also a named instance on the same set of servers, and has an Availability Group listener configured (AGLIST2).  This has the IP address 192.168.1.12, and is configured to port 1501.

As above, both the AG Listener AND SQL Server itself, are configured for port 1501.

My issue comes when connecting to the AGListeners. 

I can connect to AGLIST1 quite happily. However, AGLIST2 requires a port specifying.

I presume that this is because I've set the Listener up to use port 1501, which means that I have to connect to AGLIST2,1501.

What I WANT to happen is that if I connect to AGLIST1 then it connects to the DEFAULT instance, and AGLIST2 will connect me directly to the named instance and not need a port defining.  I cant figure out how to get this behaviour (or even if it's possible). 

When trying to set up the listener, i cant have both listening on port 1433 which makes me think it isnt possible.

Regards,

Andy



WSFC ROLES Keep switching from Primary Server to Secondary

$
0
0

Hi 

Wonder if someone can help, today or HA environment starting switching the roles over from the primary to the secondary causing us to have an outage as the servers stayed as they where. 

We are running SQL Server 2019 CU4.

Example

Node1 Primary

Node 2 Secondary

Role fails from Node 1 to Node 2 but the servers do not failover.

If anyone can help me to prevent this I would be grateful.

Thanks

Clive


AlwaysOn AG-sys.dm_hadr_database_replica_states last set lsn and last received lsn is different

$
0
0

Hi 

We have always on production 2016.SP2 Enterprise version.

I have notice  through dynamic view sys.dm_hadr_database_replica_states last set lsn and last received lsn is different( only on database Id  5). But looks like all healthy. I am not sure why this appearing. . Is there any way to force(commit/checkpoint on primary site) and allow to send logs  to secondary site then the LSN number to be matched in both sides? any expert idea. Thank you very much 

select database_id,replica_id,synchronization_state_desc,last_sent_lsn,last_sent_time,last_received_lsn,last_received_time,end_of_log_lsn,last_commit_lsn from sys.dm_hadr_database_replica_states

Checked in 10.05am today:  Last pictures shows that last harden time ,last redone time  in secondary as 2020-06-19 10:01:00.937. But primary site remain 05.02am this morning 

SQL Server 2012 restore excluding filestream

$
0
0

I have a SQL Server 2008 database which has filestream.

I need to backup this database excluding filestream and restore the database on SQL Server 2012.

I use file group = 'primary' in my backup script.

This works when I am backing up the database without filestream and restoring on to SQL Server 2008, as per instructions of the URL.

However, when I run the scripts to restore to 2012, i get the following errors:

Msg 3634, Level 16, State 1, Line 3
The operating system returned the error '3(The system cannot find the path specified.)'while attempting 'FindFirstFile'on X

Msg 5520, Level 16, State 1, Line 3
Upgrade of FILESTREAM container ID 65537in the database ID 10 failed because of container size recalculation error. Examine the previous errorlog entries for errors,and take the appropriate corrective actions.

Msg 5056, Level 16, State 6, Line 3
Cannot add, remove,or modify a filein filegroup 'FileStreamFileGroup' because the filegroup isnot online.
Msg 3013, Level 16, State 1, Line 3RESTOREDATABASEis terminating abnormally.

I think it has something to do with SQL upgrading the database from 2008 to 2012.

Any ideas? Any help would be much appreciated.

SQL Availability Group Listener computer object remains in Active Directory after deletion.

$
0
0

SQL Version: 2016 SP2-CU13

Hello.

I am having difficulty with SQL Listeners computer objects remaining in Active Directory after the Listener (and Availability Group) have been deleted from SQL via TSQL.

The command I am running:

ALTER AVAILABILITY GROUP [@agname]
REMOVE LISTENER N'@listener';
DROP AVAILABILITY GROUP [@agname]

The command is successful and the Availability Group and Listener no longer appear in any of the system tables in SQL but it does remain in AD in a disabled state.

Is there a way to have it removed from Active Directory instead of remaining in a disabled state? I could have it remove with a PowerShell command (Remove-ADComputer -Identity $listener), but I don't want to manipulate AD this way. I would rather SQL took care of it if possible.

It does remove the DNS entry.

Thank you.

How to sync AlwaysOn AG in primary site with AlwaysOn AG in DR?

$
0
0
The primary site has 2 database servers connected to a SAN. both nodes running on SQL server 2016. Both the servers are configured to function as an always on availability group as opposed to a Fail over Cluster.

The DR has an identical setup; 2 nodes, a SAN. both nodes configured as an always on availability group.

In order to sync primary with DR, both the AGs were configured as a distributed AG, however the documentation, implementation steps, lack of monitoring options around a distributed AG deem us to have a very little confidence over implementing it in production. we've also noticed that the available views and management studio options sometimes show inaccurate status information about the distributed AG. Hence the below questions :
1. is distributed AG a matured solution suitable to implement on a production environment ? how to properly implement it ?
2. What are the other alternatives available for synchronizing a primary site AG with a DR AG ?
3. is AG better than FOC ?.

SQL Cluster Drives moving automatically

$
0
0

Hi,

We have 4 different SQL Clusters and every SQL cluster have 2 nodes, the issue is SQL cluster drives are moving

automatically to other node, we have to move preferred owner manually.

OS: Server 2008 R2 Standard for 3 SQL cluster

      server 2016 standard for 1 SQL cluster.

Storage : Unity 300

Site: DR site

Could you please help on this issue.

Regards

Vajram Gajengi

Unable to add a node the Cluster from Failover Cluster Manager in Windows Server 2019

$
0
0

When  tried to add a node (SQL Server) to the  Cluster from Failover Cluster Manager in Windows Server 2019, gettting the below error message.

failed to access remote registry on database server ensure that the remote registry service is running and have remote communication enabled.




Validate Software Update Levels in Windows Fail Over Cluster for SQL

$
0
0

Validate Software Update Levels in Windows Fail Over Cluster for SQL

The cluster reports say -  There was an error retrieving the QFE information from node. But in the end, it says All the servers (SQL Node 1 & Node 2) have the same software update. Please advise.

add availability zone to sql cluster

$
0
0

Hi all,

I'm using sql cluster active/passive shared storage since 2010,

sql version was upgraded since 2011 and now is stable to sql2016 (latest CU)

inside cluster instance there are 5 DB,   

  • 4 DWH databases from 1.4 TBytes up to 3.2 Tbytes
  • 1 OLTP database about 250 Gbytes

in 2018 we started e DR site with a clone of DELL Compellent Shared storage + bracade + servers

in DR site there is also Rubrik appliance (live mount feature). principal data room is connected by a couple of 10gbit cables +  WFA backup 1 Gbit

for DWH databases we based our HA policy on rubrik with TLOG backup every 2 hour

up to now also the OLTP db is backup only via rubrik.
We would like to obtain synchronous replication on this OLTP DB, is it possibile to add availabilty group to the cluster ?
what other technologies could achieve such result ?

thanks in advance

Diego

 


Diego scaravaggi (Freelancer)

Job failed. The target database ('XXX') is in an availability group and is currently accessible for connections when the application intent is set to read only.

$
0
0

Hi,

One of my job is failed and error is

Executed as user: yyy. The target database ('xxx') is in an availability group and is currently accessible for connections when the application intent is set to read only. For more information about application intent, see SQL Server Books Online. [SQLSTATE 42000] (Error 978).  The step failed.

I know when connecting through SSMS can use application intent = read only, but How to set application intent = read only to the sql server agent jobs?


Naresh

Scheduled backup using SQL Server Dev Edn

$
0
0
I would like to perform a scheduled/recurring backup of a user database on a named-instance.  The platform is SQL Server 2017 Developer Edition.  Don't ask why I want to backup in Developer Edition (treating it as though it was a prod environment); I just follow orders ;-)  I'm finding that scheduled backups of database on named instance doesn't work in Dev Edition.  Yes, I get it... a limitation probably by design.  I tried scheduling the backup in SQL Agent.  I also tried Windows Task Scheduler to run SQLCMD and call a stored proc.  No luck. I'm just asking if anyone tried and can confirm that it doesn't work, if the limitation is documented, and if anyone knows a workaround.  Thanks.

Deploy SQL Cluster on virtual machine

$
0
0

Deal all ,

we are planning to deploy SQL Cluster on virtual machine based on xen server , currently we have issue with shared storage and we need to switch to always on availability groups , for such kind on deployment we dont need to have a shared storage 

if any one can share with us the deployment guide on how it show work ? 

so far we have assigned a LUN for both Virtual Server from SAN Storage Fiber Connectivity and make both Virtual Server LUN identical in space ,letter as well .

thanks 

De-fragmentation / Shrink Production database

$
0
0

Hello,

I have a production server which has 4 dbs. Of this one of the database is huge DB1-80tb and others are DB2,DB3,Db4-500gb each. They are a part of Always ON and have HA & DR options. We noticed there is 45tb of white space available and Now my question is we are looking at options to shrinking the 80tb db and retain the white space. What is the possible way to achieve this & steps to follow. Is this a thing that we can do if so how and what are the effects of it. Please advice. Thank you.


NJPA

SQL 2019 HA/DR - FCI vs Availablity Groups

$
0
0

We have 2 VMWare sql servers (both Enterprise) which I need to configure for HA (patching, upgrades) and D/R.  My current D/R solution is backup/restore and I already have code to sync my Logins and Jobs to the DR servers (happens nightly).

I would like to ask whether AG is a simpler solution overall (I guess I would need distributed AG for D/R).  Since we're starting from scratch I need to choose the most straightforward architecture overall, because in addition to configuring/maintaining these servers I also design our table structures and write a lot of our backend procs/funcs.

thx v much,

Kathy


Application connecting to previous primary node after failover

$
0
0

Dear Experts,

I have a 2 node Always ON AG setup.

Application works fine when the Node1 is primary.

Whenever I failover the AG to Node2,application errors out stating cannot connect to Read-only database, by which I assume that the application is still trying to connect to the previous primary node Node1.

Application connection string is using listener IP:port .

Failover and failback happens without issues.

Any guidance is highly appreciable.

Thanks

Javeed


Javeed Ahmed

change the owner of database on the secondary -- Always on group

$
0
0

I tried to change but get an error-- Cannot change on read-only database.

How to fix this problem? Need to set 'sa' as owner of every database.

Don't want to fail over to change

After adding database to always-on, I find the database owner not sa but my username. 

I can change on the primary but not secondary.


Cross-DB transaction and Always on

$
0
0
   

I want to implement Always on from 1 primary server to a DR site on maby DBs, the AG will be one for each DB, and the synchronization mode for most of the AG will be synchronized. Failover will be done manually, and will always include all the DBs. we will never have some DBs active in one site, and others in the other site.

If a disaster will happen, in order to return to the primary, we are not expecting to use the auto recover of the mirror, but recreate the DB.

We have some cross-DBs transactions. My question is what will be if a disaster will happen in a middle of a cross DB transaction, will the transaction end or will rollback in both DBs, or could I find the DBs in a partial data lost situation. (meaning in one DB the command which was part of the transaction will end, and in the other will not exists).

I saw this article http://msdn.microsoft.com/en-us/library/ms366279(v=sql.110).aspx which worries me.

I have 2 scenarios:

1. Always on with synchronize mode on 2 seperate AG, both on the same server, replicas are to the same server, no automatic failover, when failover one AG, we fail over the other one as well. Each AG on one DB(i.e. DB A is under AG_A, DB B is under AG_B), I have a cross-database transaction. Can I be sure that the transaction will be on the same state on both replicas in the DR site, if a disaster happens in the middle of the cross DB transaction?

2. As above, but asynchronize mode. Will it keep the same state of the transaction on both replicas? will it help if I will have one AG to cover both DBs (when the mode is asynchronized)?

Unable to configure Logshipping database due to multiple datafile path

$
0
0

Hi,

I am trying to configure a database with SQL Server Logshipping. The database has 2 data file and 1 logfile.

Datafile & Logfile location is below-

E:\SQLServer_Datafile

F:\SQLServer_Datafile

G:\SQLServer_Logfile

While giving datafile location for logshipping database I am able to provide only one location for datafile like below. So While restoring the database is not able to create database in logshipping instance as second datafile is not getting space in 'E' drive as both datafile is trying to occupy in 'E' drive. Please let me know how to create logshipping database which has multiple datafile path.

Always on on TOP of SQL Server FCI

$
0
0

I have SQL Server 2012 Fail over Cluster with Shared storage. Now i want to add Always on  on top of this environment. Could you please help me. 

how can i resolve this

Viewing all 4689 articles
Browse latest View live


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