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

Log shipping - Fails after daily maintenance jobs - restore from a known good backup

$
0
0

Microsoft SQL Server 2014 - 12.0.4100.1 (X64)   Apr 20 2015 17:29:27   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) 

Log-Shipping works fine whole day with default 15 minutes interval

However, soon daily maintenance jobs (DBCC, Indexing etc) runs on live during off-peak hour and LS_Restore try to apply TRN logs generated after that maintenance, it fails only for couple of databases - NOT for ALL DBs from same Primary server to same secondary server

Following is the error in LS_restore job history

Date12/05/2016 01:45:00
LogJob History (LSRestore_LSSeconday\SQLDB1_ReportDatabaseLive)

Step ID1
ServerLSSeconday\SQLDB3
Job NameLSRestore_LSSeconday\SQLDB1_ReportDatabase
Step NameLog shipping restore log job step.
Duration00:01:17
Sql Severity0
Sql Message ID0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted0

Message
2016-05-12 01:46:16.99*** Error: Could not apply log backup file '\\dbbackups\transaction_logs\ReportDatabaseLive\ReportDatabase_20160512003001.trn' to secondary database 'ReportDatabaseLive'.(Microsoft.SqlServer.Management.LogShipping) ***
2016-05-12 01:46:16.99*** Error: An error occurred while processing the log for database 'ReportDatabaseLive'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
An error occurred during recovery, preventing the database 'ReportDatabaseLive' (14:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
RESTORE LOG is terminating abnormally.
Processed 0 pages for database 'ReportDatabaseLive', file 'ReportDatabaseLive_Data' on file 1.
Processed 1 pages for database 'ReportDatabaseLive', file 'ReportDatabaseLive_Log' on file 1.(.Net SqlClient Data Provider) ***
2016-05-12 01:46:16.99*** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
2016-05-12 01:46:16.99*** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2016-05-12 01:46:17.01Skipping log backup file '\\dbbackups\transaction_logs\ReportDatabaseLive\ReportDatabase_20160512003001.trn' for secondary database 'ReportDatabaseLive' because the file could not be verified.
2016-05-12 01:46:17.01*** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
2016-05-12 01:46:17.01*** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2016-05-12 01:46:17.01The restore operation was successful. Secondary Database: 'ReportDatabaseLive', Number of log backup files restored: 0
2016-05-12 01:46:17.01*** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
2016-05-12 01:46:17.01*** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2016-05-12 01:46:17.01Deleting old log backup files. Primary Database: 'ReportDatabase'
2016-05-12 01:46:17.01*** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
2016-05-12 01:46:17.01*** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

So any thoughts please?

thanks.


For quick review of new features, try virtual labs: http://msdn.microsoft.com/en-us/aa570323


SQL Server AlwaysOn Error:35250

$
0
0

Dear Friends,

I am configuring AlwaysOn in my test environment but getting the following error.

Msg 35250, Level 16, State 7, Line 1
The connection to the primary replica is not active.  The command cannot be processed.

I followed the below link to solve the issue but no luck

https://blogs.msdn.microsoft.com/alwaysonpro/2013/12/09/create-availability-group-fails-with-error-35250-failed-to-join-the-database/

I checked the SQL LOG for error in node1 appears as The Service Broker endpoint is in disabled or stopped state.

checked the same at node2 for error appears as below:

Database Mirroring login attempt failed with error: 'Connection handshake failed. An OS call failed: (80090350) 0x80090350(The system cannot contact a domain controller to service the authentication request. Please try again later.). State 66.'. [CLIENT: my server IP address(node1)].

Kindly check and suggest to move forward.

Regards,
Raveendra



SQL Server 2014 Cluster fail back not working

$
0
0

Hi,

I deployed a SQL Server 2014 on a 2 node cluster environment for one of the client. After deployment I verified everything is working fine except the automatic disk fail back.

OS: Windows Server 2012 R2

Environment: VMware v Sphere 5.5

Disks: C Drive for OS, E Drive for SQL Binaries Installation, L drive for Logs, P drive Database, T Drive for TempDB, Q Drive for Quorum, M Drive for MSDTC

Disk Type: C Drive, E Drive, Q Drive, M Drive are Just mounted as RAW disks. Only L Drive, P Drive, T Drive are CSVs

Issue1: Both Node1 & Node2 is Up and running fine, Node1 is preferred owner. MSDTC, SQL, Disks are failover to Node2 when Node1 is down. When Node1 up automatically failback (Except the CSVs)

If I bring Node 2 down Including disks everything failback to Node1 automatically.

If I manually move the disks from Node2 to Node1, able to move the disks successfully.

Also I can see disk dependency for MSDTC, but for SQL services No disks listed as dependencies.

Now my question is this the way the SQL Cluster works? Or do I missed something to make the disks as dependencies for SQL Server Service.

Issue 2: While Installing the SQL on Node1 while mentioning the path for DB, Logs, TempDB by default I got path like C:\Clusterstorage\Volume1,2,3 etc......When I explore I found one folder got created in  C Drive with the name Clusterstorage and inside I can see the shortcuts for the disks (Volume1, volume2, volume3) only for CSVs.. But changed the path using the Local drive letter like P:\ L:\ T:\ etc....I mean in the installation wizard I changed the path from

"C:\ClusterStorage\Volume1" as L Drive used for Logs

"C:\ClusterStorage\Volume2" as P Drive used for Database

"C:\ClusterStorage\Volume3" as T Drive used for TempDB

Is it fine if I use the drive letters like this?

Thanks in advance for helping

Best Regards

Krishna


Thanks & Regards Krishnakumar B

Getting error while configuring availability group wizard

$
0
0

HI,

I am trying to configure alwayson feature with Windows Server 2008 R2, and SQL Server 2014.

By these following points :

I have setup two servers with all the prerequisites (primary, secondary) , and one domain server.

1. DOMAIN SERVER (som.com) has one user account within this two (primary,secondary) server has logged into it.

2.Installed SQL server 2014 with instance name to both the systems.

3.I have created cluster on primary server and added two nodes.

4.Configure Quorum browser the shared folder from domain server.

5.Then checked alwayson feature and restart SQL server service.

6.Then took the backup from primaryDB to SecondaryDB as restoring mode.

7.Then configure New Availability Group Wizard

But at the last I am getting these error.

Please Help!

Thanks

Abhijeet Kumar Sharma

SQL Server Disaster Recover from on-premises servers to the Azure

$
0
0

Hi,

We are planning an implementation of disaster recovery to the Azure. We have the following sql servers: SQL Server 2008 R2 and SQL Server 2012. I've read that there is a possibility of DRC implementation built-in to SQL Server 2014 (I mean AlwaysOn from on-premises server architecture to Azure through VPN connection). But what about the older versions? Is there a recommended/well-tested way to do it? We need to prepare an online possibility.

I will appreciate your recommendation.

SQl 2016 Basic Availiability Groups basic questions

$
0
0

Trying to understand SQL 2016 Basic Availiability Groups (BAGs), coming from SQL 2008 R2 environment with no clustering, no mirroring, just regular backups. I am not a DBA and we are a small company. Been reading TechNet, various SQL blogs.  I understand the 2-node no-read, no-backup situation, but it's one step better than we have now and affordable. Looking to architect and budget for 2017 upgrades/migrations (SharePoint 2016 and some non-Microsoft platforms). I have some really basic questions:

Each primary database would be in a BAG with its secondary. So if we have 20 databases, we would have 20 BAGs, yes?

Can we have one SQL server that would host the secondary databases for two different primary database servers? (ergo, three server cluster) Example: SharePoint databases on SQL1, non-SharePoint databases on SQL2, and the secondary databases of both on SQL3. With Windows clustering only, not also SQL clustering.

Thanks,

Joan

SQL Server 2008 R2 Add Failover Cluster Node Service Accounts Grayed out - can't pass

$
0
0

I installed SQL Server 2008 R2 x64 (slipstreamed with SP3) onto one 'node' in Windows Server 2012 R2 Datacenter.  That worked mostly ok, except it won't start as clustered.  I checked ALL of the users and passwords in services and they are all DOMAIN ones (for Agent, SQL Server, Analysis) and start up as standalone.

Tried to do "Add a Failkover Cluster Node" on other node, and on the Service Accounts page SQL Server Agent account name is entirely blank.

When I try to ENTER the passwords, it says :
The credentials you provided for the SQL Server Agent service are invalid...

Same for Analysis service.

For SQL Server service it says the specificed credentials are not valid.

I can't change the SQL Server Agent account name, which is entirely blank.

And I cannot get beyond this.

Question on DR Test Scenarion with Alwayson Availability Groups SQL 2014

$
0
0

I have 3 Node cluster

Server1(primary) / Server2(replica) located in Chicago.

Server3(replica) Located in out of region.

I have 10 databases part of AG1 group.

Server1 to Server2 replication is Sync but to Server3 is ASYNC. I want to simulate a dr test where network links are going to be broken gracefully and ungracefull (2 scenarios

Scenario 1(gracefull network broken)
obviously the data movement has stopped. databases in AG1 group are required to read/write.

question1: how do I simulate network outage? I was thinking of stopping the cluster network resource - not sure if that possible.

question2: dbs in AG1 group are required to be in read/write state. what are my options for doing this and when Dr test is completed - during fallback - how do I reesrtablish AG data movement as those dBS were opened up for readwrite?/ I am guessing I need to remove the replica and re-add it?

Thanks!


At what point do I remove the Secondary node from my Availability Group?

$
0
0

Greetings. 

Right, wrong, or indifferent I have an AG for a large Data Warehouse environment. Every night about 4500 ETL jobs do their thing. About two hours in to the ETL jobs tonight I needed to reboot the Secondary node. Now I did this knowing my main DB would then be In Recovery for a while after that, but was thinking along the lines of a couple hours. Based on what I'm seeing in my log file, I'm looking at 60 hours until this guy recovers. 

What I do have in my favor (by pure luck) is a LOT of room for the Log to grow (> 1TB). Also around 9AM most of these jobs will stop running, so things should speed up. 

Obviously if I didn't have gobs of free space laying around my options would be less. Out of curiosity though, would there be any benefit to just dropping the Secondary from the AG and then re-adding it after the ETL jobs re finished?

Thanks!


Thanks in advance! ChrisRDBA

Install Windows updates on SQL Server 2012 with High Availability

$
0
0

Hello Everyone

I have SQL server 2012 with Always on Availability groups. I have one primary and one secondary replica. I want to install Microsoft windows updates on both machines. But want to know if there are any prerequisites to perform updates for Always on.

Any suggestions are appreciated.

Thanks

Cannot force failover to remote location

$
0
0

Hello,

We have a 3 node cluster, 2 nodes local and the third in our DR center.  We are testing the AlwaysOn functionality.  We perfomed a crash test of the local nodes once and were able to bring everything up on the C node in the remote data center.  Upon the second test of exactly the same parameters, we cannot bring up the C node in the remote data center.

This is sql server 2012 sp2, on a windows 2012R2 server.

When running "ALTER AVAILIBILITY GROUP [NAME] FORCE_FAILOVER_ALLOW_DATA_LOSS" we receive the following error:

Msg 15151, Level 16, State 1, Line 1

Cannot alter the availability group 'OPS – Agrp', because it does not exist or you do not have permission.

The Ops - AGrp cluster resource is offline.  Our errors in the event viewer are not descriptive - 1205 and 1069.

Automatic failover to C node?  No.  Synchronous?  Yes.  Is_failover_ready? = 1

Any ideas?  Any thoughts appreciated.


Dianne


Looking for advice on how to handle backups

$
0
0

I am a little unclear on how some of the backup functions in SQL Server 2014 work. First, let me describe my goal.

We have a Dynamics CRM 2016 On Premises server and a SharePoint 2013 On Premises server.  Our SQL Server provides database services for both.  I want to create weekly full database backups of all databases associated with both products, and run transaction log backups hourly.  In case of major failure, our longest possible period of data loss is one hour (and likely to be no loss at all if we can recover the tail logs).

When creating an SQL server backup, there is the option to append a backup to an existing backup file.  There is also the option to define how long backups are good for before they expire.

I am interested in the expiration function because I don't want to keep backups indefinitely.  The storage requirements could get cost prohibitive.  Also, bloating the msdb database with backup history can harm performance.

I am unclear on the interaction between an expired backup within a particular backup file.  I am trying to decide if I should keep all full database backups in a single file per database and all transaction log backups in a single file per database.

Here's my question: if I keep all my database backups in a single file, and all my transaction log backups in their own file for a particular database, and I set the expiration of a backup for 3 months, will SQL Server mark the space inside the backup file occupied by a backup greater than 3 months old as free space, and overwrite it as needed?  If that's the case, then I would only need a background task to run to remove backup history for expired backups from msdb.

Second question: If every backup goes into its own backup file, timestamped, will point in time recovery still work just like it would if I relied on a backup file with multiple backups in it?

Third question: this is a terminology question.  When SQL Server refers to a "backup set", is that a single backup at a particular point in time, or is it a backup file with multiple backups present in it?

Unable to detach DB formerly in an availability group

$
0
0

I removed a database from the availability group secondary and primary.

However, attempts to detach the database fails because it says if is being replicated when the database no longer exists in the availability group.

Thanks

Multiple Instances and AlwaysOn Availability Groups

$
0
0

Hi,

I have 2 SQL Servers: A & B
Each has 2 instances and each instance is part of an database AlwaysOn Availability Group

Server A - instance 1, AlwaysOn Group1 & instance2, AlwaysOn Grroup2
Server B- instance 1, AlwaysOn Group 1 & instance2, AlwaysOn Grroup2

I configured 2 AlwaysOn groups, which worked for a brief amount of time:

Server A - had instance 1 (primary) and instance 2 (secondary)
Server B - had instance 1 (secondary) and instance 2 (primary)

However after a few minutes, Server A instance 1 (secondary) changed to the not synchronized state and I'm struggling to add Server A instance 1 as a replica in AlwaysOnGroup1

Can someone tell me if I'm doing something wrong? Can I have 2 instances participating in separate AlwaysOn Database Availability Groups on the same server?

I'm wondering maybe the configuration is failing because one server holds a primary and the other a secondary - perhaps each server should hold only a primary or secondary?

Thanks

alwayson failover to secondary instance users unable to connect to application through Listener

$
0
0

Hello team,

We have configured the 2 instance AAG. whenever the failover happpend to primary to seconday replica. User are unable to connect through listener. So we have to again failover to primary. Could you please let me know what is the issue.

Thanks in advanced.


AlwaysOn Failure : exception 41005

$
0
0

While rebooting the secondary side of the failover cluster, the primary availability group hung with the database "resolving".

I found these messages in the SQL server log on the Primary AG. Any idea what error 41005 is?

Source  spid9s

Message
Failed to update Replica status within the local Windows Server Failover Clustering (WSFC) due to exception 41005.

Source  spid52

Message
The state of the local availability replica in availability group 'MSDGRLE_AG' has changed from 'PRIMARY_NORMAL' to 'RESOLVING_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

With AlwaysOn Failover clustering I cannot add a generic service to both the prod cluster and the dr cluster

$
0
0

I have always on configured between my production cluster and my dr cluster.  Each site has 2 nodes as part of its cluster. So altogether the WSFC has 4 nodes.

SQL works fine and availability groups are setup and working as expected.

The problem is that I have a service which must run on both the production and the dr cluster. But since technically this is the same cluster , I can only add the service once. Either on the DR side or the production side.

How can I run the same generic service clustered in both production and dr?

BTW. I am not able to change the name of the service.

SQL Server 2012/2014 AlwaysOn

$
0
0

How to configure TDE on already implemented Always On environment?

Sql Server 2014 Always ON

$
0
0

Hi guys i got the next issue and i would like you to help me understand the problem or solve it

The infraestructure is 2 Lenovo Server X3650 M5 installed with Windows 2012 R2 (ROK by Lenovo License), licesing per core for Sql Server 2014 Standar Edition (both on Spanish language)

The thing is have installed many sql server clusters, but never done an always on before, so i have read de documentation from ms and also other pages and have seen videos too.

I installed the everything without any errors (even de microsoft cluster service in both servers), then i have installed the sql server server as and standalone instance in both servers, configure everthing, but when I go to look for the Enable Always ON check box (on sql server configuration manager, right click over sql server, then properties) i found a text that says the the features of Always ON requires Enterprise Sql Server 2012(no WOW x86 or x64), and that windows or sql are not metting one or many requirements.

I also tried to enable by Powershell but the message is the same.

Could you help me please, could it be that i need Enterprise Sql Server? Maybe de ROK license have some limitations?

Thanks. 


[Database Mirroring]: Transfer Server Logins, Database Users, Stored Procedures, User Defined Functions to remote instance

$
0
0

Hi Everyone,

Hope you're all well. We're hoping that any of you could help us with the below scenario:

Short context:

Environment: SQL Server 2008 R2 named instances and databases (including SharePoint) mirrored using Database Mirroring High Performance Asynchronous mode (it’s a requisite of who approached us) to a different server in a remote site. Same scenario for other SQL Server 2012 named instances and databases (for clarity sake: 2008 R2 servers mirror with 2008 R2 servers and 2012 with 2012, there is no mirror being made between different SQL Server versions).

Challenge: Copy server logins (including all attributes, but mainly SID and server roles), database users (again, all attributes, but mainly owned schemas and roles) and SQL Server Agent Jobs, daily, to assure a delta <= 24 hours in case there is a need to activate the mirrored databases.

Tested approaches that failed:

   

   - SSIS:

      - Transfer Logins Task: It creates the logins but it doesn’t copy server roles;

      - Transfer Jobs Task: Fails with the majority of the jobs with error "The target database is a mirror database" and the jobs are not created in the remote instance.

 - Jobs: SQL Server Agent Job that executes a PowerShell script that uses “sqlps” module to leverage CmdLets that connect to the main instances and outputs the jobs T-SQL to a *.sql file:

      - Same as Transfer Jobs Task above (in a test environment, we tried to make the databases available and execute the T-SQL in the *.sql file but we still got a result that is not the desired one, but seeing a different error message, of course);

   - Logins: SQL Server Agent Job that executes the stored procedure "sp_help_revlogins":

      - Creates server logins with the same password and SID but fails to copy server roles, database users, owned schemas (we know, this sp just creates the users at server level).

   - Logins: SQL Server Agent Job and Linked Server (DR > PRD) that executes the stored procedures documented in http://www.sqlsoldier.com/wp/sqlserver/transferring-logins-to-a-database-mirror:

      - Same as above;

   - Logins: SQL Server Agent Job and Linked Server (DR > PRD) that executes the stored procedure documented in http://media.tomaslind.net/2014/02/SctiptLogins.txt :

      - Same as above.

   - Logins: Manually right-click the server login or database user and selecting "Create to New Query Editor":

     - Same as above.

   -Logins: Chrissy LeMaire’s fantastic PowerShell “dbatools”:

      - Same as above as “Copy-SqlServerRoles” is still under development and we lack scripting skills to complete it.

Thank you,

Regards,


RC


Viewing all 4532 articles
Browse latest View live


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