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

Using Synonyms on AG's.

$
0
0

Greetings. I currently have a 2 node Availability Group that houses some big warehouse type of DB’s. It’s not uncommon to see DB1 populate DB2:

Use db1

Go

Insert into db2.dbo.table_1 values ‘ssfsfsfsf’

This all works as expected. However, we want to split these DB’s away from each other to reduce CPU impact on any one instance. Of course though we don’t want to have to go and change all the connection strings in our SSIS Packages.  By default this would now require going to a 4 part naming convention like so:

Insert into newServerName.db2.dbo.table_1 values ‘ssfsfsfsf’

Again though, we are trying to avoid this. That said I was thinking to use synonyms. This works as expected, until a failover occurs, and the synonym is redirected to the local Read Only version of DB2.

So in other words, SQL Server is behaving exactly as it should, but I need a way to work around it.

Example below:

USE [master]

GO

/****** Object:  LinkedServer [DB2]    Script Date: 10/28/2015 11:43:46 AM ******/

--note this is pointed to the AG Listener name, for failover purposes.

EXECmaster.dbo.sp_addlinkedserver@server =N'DB2', @srvproduct=N'sqlserver', @provider=N'SQLNCLI', @datasrc=N'myAGListenerName', @catalog=N'DB2'

 /* For security reasons the linked server remote logins password is changed with ######## */

use DB1

go

CREATESYNONYM table_1

FOR DB2.dbo.table_1

GO

--both of these insert statements work, and go to the expected DB

insertinto DB2.dbo.table_1(c1) values ('foo')

insertinto table_1(c1)values ('foo')

--do failover of the AG

--this still works, as table_1 actually resides on the new Primary of the AG

insertinto table_1(c1)values ('foo')

--this no longer works, as there is a Read Only version of DB2 on the local server

insertinto DB2.dbo.table_1(c1) values ('foo')

Msg 3906,Level 16, State 1, Line 1

Failed toupdatedatabase"DB2" because thedatabaseis read-only.

Again, SQL Server is behaving exactly as it should. However, this synonym is now fairly worthless, as it can't handle failing from one node to the other in the AG

Any ideas?


Thanks in advance! ChrisRDBA


Monitoring AlwaysOn HA setup with HyperV

$
0
0

Hi friends.

I have configured AlwaysOn HA setup with HyperV environments without shared disk and using quorum voting in file share witness.

1. I want to monitor AlwaysOn HA setup and AO Group database on daily basis.

2. To configure email alerts for proactive monitoring if unusual events occur.

Please provide suggestions and scripts for monitoring in that AO setup as well as AO group database 

Thanks

SQL Server Service in Cluster remains in Restart Pending OR Failed - Help needed urgently

$
0
0

Hi All,

We have a 2 Node SQL Server 2012 Cluster - on Active, Passive mode running on Windows Server 2008 R2 Operating Systems.

The cluster was all working fine for many weeks and suddenly after certain unexpected restart, the node 1 or node 2 does not work properly. In the Resources Window, the Disk is online, the overall cluster is online, but the SQL Server Service and SQL Server Agent Service are in Failed State. When I tried bringing them online, for about 10 minutes - it goes to "Pending" state and then again it goes back to Failed mode. During the Pending state, SQL Server Management Studio connects successfully but after it goes to Failed State, it stops connecting.

Tried all possible option changes, but unable to find a correct solution :(

Looking forward to your support...

Thanks a lot again!

Karthick


Karthick

AlywasOn Availability Groups NIC cards

$
0
0

Hello,

Do i need to use two nic cards for my production of sql server alwayson availability group?

Thanks

Qanna

File Share Witness Quorum

$
0
0

Hi Guys,

is it ok if i will not configure a file share witness quorum for may availability group setup?

Thanks,

Qanna

LSalert job status is failed.

$
0
0
Recently we have configured SQL server , earlier name of SQL server was for EX : "XXX" and after migration of database we renamed it after older one to "YYY". Now the problem is that we have configured log shipping for one database. Database LSbackup , copy , restore runs fine , but on primary server we found that LSalert is in failed status with message "backup threshold of 60 minutes and has not performed a backup log operation for 3755 minutes. But the lsbackup runs every 15 minutes with no failure. After digging further found that monitor table in MSDB was using old database server entry i.e "XXX" , we have changed it to "YYY" still alert job is in failed status. Looking for more ways to troubleshoot.

SQL Server Cluster Resource Fails to come Online and Pending Online State

$
0
0

Hi

We have SQL cluster installed on top of windows cluster on VM environment.

Node1 and Node2 under Windows Failover Cluster. SQL instance is currently on node2 the instance is up and running, but SQL Cluster service remains online pending and it restarts the instance on every 5 minutes.

SQL Browser service are running successfully

TCP/IP ports are enabled and configured

If we start the SQL server agent it is on for seconds and stopped immediately  

Cluster Service is attempt to connect to the SQL service every few minutes (setting in SQL cluster resource) for the IsAlive check, if this fails then the SQL resource is restarted even if the instance was online. Hope this is what happening exactly.

Some info from Error cluster log as well

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

[sqsrvres] ODBC Error: [08001] [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].  (268435455)
00001024.00053314::2015/10/30-19:57:50.772 ERR   [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] ODBC Error: [HYT00] [Microsoft][SQL Server Native Client 11.0]Login timeout expired (0)
00001024.00053314::2015/10/30-19:57:50.772 ERR   [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] ODBC Error: [08001] [Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (268435455)
00001024.00053314::2015/10/30-19:57:50.772 INFO  [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] Could not connect to SQL Server (rc -1)

 


Working as a Senior Database Analyst & Architect at Ministry of Higher Education in KSA

Log shipping across two different forests!

$
0
0

Hello,

How can I setup log shipping for a database between two servers on two different forests?

note:

  • there is VPN between the two networks.
  • no trusts established between the two forests.

SQL Datbase and Log Backups for ALwaysOn Databases

$
0
0

For an AlwaysOn Database, when setting up database backups and log backups, should I setup jobs to run on every node where the database may run.

Thank you,

Transaction Log backup requirement/ workaround for adding DB to Availability Group.

$
0
0

Greetings. Like everyone else, I've always  taken a Full backup, followed by a Transaction Log backup, and restored them in noRecovery mode to the Secondary server, to add a DB to an Availability Group.

However, I ran into a scenario today where that wasn't possible. The scenario was needing to add a DB to an AG in a non-prod environment, using backups created several months ago in the Prod environment. 

This simply wouldn't work. SQL Server would yell at me to first take a TLog backup and apply it to the Secondary server. As you can imagine that didn't work well. 

So I turned to Google. I came up with some ideas on trying various things, which I did to no avail. However, in trying various things I accidentally discovered a workaround that I'm still scratching my head over.....

As long as I first recover my Full backup onto the Secondary server (in noRecovery of course), THEN (and only then) restore the Primary server (in Recovery of course), I am able to add the DB to the AG as desired. 

I've been able to reproduce both the issue and the solution several times. My question is why? Why would this make any difference at all? How could this impact being able to add a DB to an AG or not?

All insights are welcome!


Thanks in advance! ChrisRDBA

disk not shown by sql cluster

$
0
0

hi 

i am trying to cluster two sql node server on hyper-v both virtual and my situation is below : 

  • two hyper-v host connected to vnxe storage 
  • two hyper-v are mapped to 3 LUN ( SQL Data , SQL logs , Quorurm)
  • connectivity between hyper-v and storage direct fiber 
  • three LUN are mapped to the virtual SQL01 and SQL02  as VHDX and configure it on virtual machine as  IDE below is the picture 
  • LUNs are presented to the guest SQL01 and SQL02  and visible through disk management

when create the fail over cluster i am not getting the disk to add them to cluster 

getting the below error when validate the storage : 

No Disks suitable for cluster disks were found, For diagnostic information about disks available run the Validate config wizard’

any idea 

also , regarding this LUN how i can make them shared on the host side ?

AlwaysOn Availablity Groups and Transactional Replication Licensing Question.

$
0
0

“The secondary server used for failover support does not need to be separately licensed for SQL Server as
long as it is truly passive. If it is serving data, such as reports to clients running active SQL Server workloads,
or performing any “work” such as additional backups being made from secondary servers, then it must be
licensed for SQL Server.”

My question is that if I set up Transactional Replication between the Primary and a Reporting Server, to make it so replication works after a failover I need a downstream distributor and the Secondary needs to be setup as a Publisher as well.

Is the Secondary still truly 'passive' in this scenario? Does it affect the license requirements of the Secondary?

Thanks,

John Lancashire, Direct Wines Ltd.

AlwaysOn Listener - Force connection to Secondry for AD group

$
0
0
Hi all,

I have a two node HA Always on group using a Listener.  I would like to force a certain AD group to always be forced to the secondry node as they would only ever need to run select statements.  If there an easy way to do this without using logon triggers?


SQL Server 2008 R2 Cluster (2 Instances) update to SQL 2012

$
0
0

SQL 2008 R2 Enterprise Ed Cluster (2 Instances Active / Active)

Hi everybody.

I need useful information on :

How to move SQL Server 2008 R2 ENTERPRISE Ed. 2 Instances cluster to SQL Server 2012 STANDARD Ed..

REQUIREMENTS (Please, only a request: do not ask way this mix. That is a requirement! Sorry.)

1) The Upgrade refers only to 1 (ONE) instance (the other one remain SQL Server 2008 R2 ENT Ed.)

2) All the references (IP, Cluster / Instance name) MUST BE remain the same

3) Update must include SSIS (Integration Services and Reporting Services)

From SQL Documentation

There are 2 possible ways:

1) New Fresh installation

2) Upgrade in-place

QUESTION:

Based on your experiences which is the best way to update (New installation/Upgrade) SQL server 2008 R2 to SQL Server 2012 ?

Thanks


Maintenance task to copy bak file to secondary drive after backup is complete?

$
0
0

I need to copy a just-created bak file to another drive after the backup task has completed. I don't see anything in the job toolbox which helps with file system operations like this. But still it must be a common need...

There are ways to script this or use third part tools but I am looking for something native to the sql server 2012 SSMS toolset, if possible.

An alternate approach would be to run the backup job again, after the main backup, and change the destination to the alternate location. But I was thinking that another backup job would probably invoke more overhead on the server than a simple file copy operation. If I do end up taking this approach I could also use the cleanup task to toss older bak files in the alt dir.


.net framework

$
0
0
Why we need .net framework while installing sql server and how does it help? And also what are the task it performs?

backup SQL Server Instance including COMPLETE configuration

$
0
0

There is a lot of documention concerning data(base) backups, but I could not find information about how to backup a complete SQL Server instance (data + configuration) or the SQL server configuration (= everything, that is not user payload). Is it really that difficult or what is the best practice, I do not think, that you always re-configure your system after restoring, especially because you will forget some settings?

I found following things necessary to backup configuration:

server-wide:

  • security: login, roles, ...
  • server objects
  • server properties (e.g. collation, connection or memory settings; see SSMS "Server - Properties")

per database

  • database settings (SSMS - database - properties)
  • scheme

1. Is there anything missing?

In case of a severe system crash I would like to be able to recover the system using a full system image of the virtual machine. However I just create these images after significant changes (e.g. Windows service pack).

The SQL server should be backuped independently from these system images.

2. Even if I used SQL Server maintenance plan, choose "backup all databases" and additionally backup resources DB manually I think, that some configuration is still missing, right? Where are the security configuration and server properties saved? In my system database there are some tables, but there is very little content inside, so that the data from the views INFORMATION_SCHEMA* and sys.* obviously is not saved there.

>> SQL Server system objects, such as sys.objects, are physically persisted in theResource database, but they logically appear in the sys schema of every database. (https://msdn.microsoft.com/en-us/library/ms190940%28v=sql.120%29.aspx)

What does that mean: Are all DB/table schemes, logins, ... saved in resource DB?

3. Does a usual SQL Server full database backup also contain all settings concerning this database (database properties, logins, ...)?

4. Is there at least a way to backup ONLY the configuration (server-wide and database) without data? The only tool I could find is DACPAC, that exports a database's scheme and some other configuration, but e.g. the database properties  are not included:

>>By default, the database created during the deployment will have the default settings from the CREATE DATABASE statement. The exception is that the database collation and compatibility level are set to the values from the source database. (https://msdn.microsoft.com/en-us/library/jj554810%28v=sql.120%29.aspx)

Best practice on OS memory reservation for a two node cluster having three SQL instance

$
0
0

Hi All,

We are running with a 2 node windows cluster having three SQL instances on it. 

OS: Windows server 2008R2 SP1

SQL : SQL server 2008R2 (10.50.6529)

Currently both nodes have 256 GB or memory and we are having multiple auto failover for resources. Could you please let us know what will be the best practice for OS memory reservation (OS+tools) so that we can set SQL max memory settings accordingly?

Regards,

INDRA

DR site for SQL server 2008 R2

$
0
0

Hello,

We have 1 application server installed on Windows Server 2008 R2  and SQL 2008 R2 installed on Windows Server 2008 R2

we need to implement a DR for the SQL server, what is the best way to do that?

Adding users to Availability Group

$
0
0

I am in the process of rolling out a pair of SQL 2014 servers. I have setup an Availability Group, Listener and databases. It's my understanding that I will be giving the listener name to our developers so that they can do their work. In testing, I noticed that If I am using Studio Manager and connected to the the AG using the listener name, when I setup a user in security the user is only added to the active primary node. Is there a way to add a user to both servers in one shot instead of having to install on both servers? 

Thanks,

TD

Viewing all 4532 articles
Browse latest View live


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