SQL Server Admin 2014 :: How To Exit From Initializing / Recovery Pending Database In Secondary Replica

Sep 12, 2015

We have 2 switch between primary and secondary this morning.

after that one database in secondary went to "initializing / recovery pending".

How can i exit from this situation ?

View 3 Replies


ADVERTISEMENT

SQL Server Admin 2014 :: Read Only On Secondary Replica

May 5, 2014

Assume if i have a connection(Application intent readonly) starts with reading, writing and again reading data for a report. how it will works in SQL 2014 Always availability on?

View 3 Replies View Related

SQL Server Admin 2014 :: Cannot Failover AG To Secondary Replica

Aug 11, 2015

We are not able to failover the AG to secondary replica. The process gets timed out and AG goes to resolving mode. Had to reboot the box in order to switch the AG back to primary node. We even rebuilt the whole AG from scratch but the issue remains.

Failed to bring availability group 'xxxx' online. The operation timed out. Verify that the local Windows Server Failover Clustering (WSFC) node is online. Then verify that the availability group resource exists in the WSFC cluster. If the problem persists, you might need to drop the availability group and create it again. [SQLSTATE 42000] (Error 41131). The step failed.

Not much information is available in the logs.

Version : sql server 2014 sp1

View 6 Replies View Related

SQL Server Admin 2014 :: Can Have Secondary Replica As Read / Write Mode?

Oct 14, 2014

We have a reporting database which is refreshed daily from prod backup and later creating new tables/views/indexes as part of the refresh job. Is there a better approach we can implement in sql 2012/2014 for this scenario since we are planning to migrate to sql2014.

View 5 Replies View Related

SQL Server Admin 2014 :: Joining DB On Secondary Replica Resulted In Error

Oct 12, 2015

I am working on adding DBs to the AG but for some reason I am getting this error.

"Joining DB on secondary replica resulted in error"

Msg: The remote copy of the database is not recovered far enough to enable DB mirroring or to join AG. Missing log records have to be applied to the remote DB by restoring the current log backups" Which I did. I took the log backup of DB1, restored it on DB2 with no recovery, but still I am getting the same error.

View 3 Replies View Related

SQL Server Admin 2014 :: Grant User Read Access To Secondary Replica?

Sep 15, 2015

I have 3 servers taking part in an AlwaysOn AG.

I want to grant a user READ access to only one replica, and certainly not to the principle.

How do I go about doing this?

View 4 Replies View Related

SQL Server Admin 2014 :: AlwaysOn HA - Database Stuck In Initializing After Failover

Oct 23, 2015

We had to failover our primary db server for maintenance to our secondary replica. The primary was rebooted during maintenance. We failed back after the maintenance and one of the databases is not synchronizing.

I checked sys.dm_hadr_database_replica_states, and it is showing that it is INITIALIZING.

It has been in this state for more than 45 mins now. The last_sent_time, last_received_time, last_hardened_time and last-redone_time are all stuck with a time stamp 45 mins ago.

They haven't changed. How do i resume this database and bring it back in sync?

I tried suspending and resuming the data movement, but hasn't worked.

View 6 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Replica Database For Reporting

Feb 1, 2015

We have a 2 node clustered instance(SQL 2014) with 26 databases and we would like to enable alwayson for one of the databases for reporting (only one secondary and do not need high availability setup). I'm thinking if the reporting application/queries can explicitly connect to the secondary database(Instance namedatabase name) without using a listener and setup the secondary in asynchronous commit mode. Read about the REDO thread blocking due to reporting workload. How does this affect if I implement the secondary in this way.

View 3 Replies View Related

SQL Server Admin 2014 :: Exit From Not Synchronizing Primary Database In Availability Group

Jan 27, 2015

I Create an availibility Group with a primary and a secondary. (For test)

Then run Planed Failover.

Switched to secondary. That's ok.

After that I update some tables on secondary (That now is primary)

I Run Again Planed Failover on server 2.

Switched. OK

But primary database Get (Not synchronizing) Status.

And in primary I don't have that updates.

How to sync these databases and exit from Not synchronizing.

View 5 Replies View Related

Recovery :: Set Synchronization Time From Primary To Secondary Replica

Sep 28, 2015

As per our client requirement we want to set synchronization time from primary replica to secondary replica after 20 minutes. Is it possible in MSSQL AlwaysOn Availability Groups in SQL Server 2012?

View 6 Replies View Related

SQL Server Admin 2014 :: How To Disable Reboot Pending Through Command

Mar 16, 2015

Any command through that can I delete/disable the DWORD value "Pendingfilerename operations" so that while I start the SQL Install work, it does not fail due to this and can write this as one of the precheck options.

View 0 Replies View Related

SQL Server Admin 2014 :: Set Up AlwaysOn Replica For Reporting

Jun 17, 2015

I would like to setup replica for one of the databases for reporting. The current environment is a 2 node cluster(active/passive). I would like to add a 3rd node that can server as a secondary replica. The secondary replica will be on asynchronous commit mode.

The database that needs to have alwayson setup has column level encryption enabled.

Other Questions,

* Do I need to backup and restore the service master key on secondary server in order to have the column level encryption to work on secondary server?
* What would be preferred Quorum settings?
* What is the setting for 'readable secondary' for primary and replica db?
* What should be the setting for 'Connections in Primary Role' for primary and replica db?
* We are trying to setup without a Listner. Do I need to setup AG Listener? Can the application exclusively use the [secondary instance name].[replica DB name] without a listener?

View 4 Replies View Related

SQL Server Admin 2014 :: Unable To Shrink Log On Simple Recovery Mode Database

Jul 27, 2015

I have a database that I am trying to recover space from, it consists mostly of unallocated space, but I can’t seem to get that unused space released.

Database size: 40,245.13 MB
DatafileMB: 38,063.63, DataAvailableMB: 37,085.15
LogfileMB: 2181.51

Sysfiles shows:
fileidgroupidsizemaxsizegrowthstatusperfname
114872144-112820SomeDB
202792332684354561010486420SomeDB_log

The DB is in simple recovery mode. There are no open transactions (used dbcc opentran).

The server is running SQL Server 2014 and the DB is in compatibility mode SQL Server 2008 (100). It was upgraded to 2014 a month or two ago.

I have tried to re-size the log to 100mb, but any way I have tried (none gave errors), the log file remains the same size. I have tied to shrink the log file (through the UI and via DBCC commands) without success; no errors, but also no change in file size.

I have checked Log Reuse Waits, just in case, and as expected it showed “NOTHING” (select log_reuse_wait_desc, name from sys.databases)

I tried running a checkpoint, but that did not allow any resize or shrink to work.

I have tied creating large transactions to move the used point in the log file, in case this was the issue. I did this by creating tables that I drop after large inserts. While it shows me that the log space % used increased, the log file still does not allow the space to be reduced.

The following is what I was using for the transactions to get the log used.

BEGIN TRAN
select a.* into testtable from sysobjects a, sysobjects b, sysobjects c
ROLLBACK TRAN

Each insert creates 93,576,664 rows.

Running dbcc SQLPerf(logspace) :
DBLogSize(MB)LogSpaceUsed(%)Status
SomeDB2181.534.204890

Running dbcc loginfo:
RecoveryUnitIdFileIdFileSizeStartOffsetFSeqNoStatusParityCreateLSN
0211437342728192602640
02114373427211437424645701280

Do I just need to continue running large transactions until the log space used gets high enough to get the “end point” in the log to really move? Is there an easier way to accomplish this (I have several DBs that have the almost identical problem), what I am using moves the Log Space Percent Used about a percent on each execution.

View 9 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Read-Only Replica Routing

Jun 22, 2015

Having an annoying AG/AO problem with the read only routing side of it.

Let me give some specifics first:

2 SQL Server Instances, Not Clustered.
Availability Group is named 'Ireland'

There is a primary Replica and a Secondary Replica, named:

'IrelandPrimary' and 'IrelandSecondary'

There is a listener configured with the name 'ListenIreland' on Port 14330 (the two 3's are correct)

Read Only Routing URLS are configured as follows:
IrelandPrimary tcp://Ireland.dom.local:49891ALL
IrelandSecondary tcp://Ireland.dom.local:49841ALL

So now my problem:

When I try to connect using the ApplicationIntent=Readonly; or even using -K ReadONLY in sqlcmd I get the error telling me that my connection was actively refused.

This is connecting to the Listener, not the instance itself - that works fine. I'm at a bit of a loss now.

To explain what I am trying to achieve is a for a connection to be redirected to the secondary replica when its set for read-intent.

I've just noticed that it only fails when I specify ApplicationIntent=ReadOnly; If I omit the Intent It connects to the read-write database instead.

View 3 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Read Only Replica - SP Execution Error

Oct 8, 2015

We have always on setup in our environment with read only replica. The primary database has 2 schema one is a dbo and other xyz. We have some store procs created in dbo schema and xyz schema. These store procs are being used by SSRS reports to retrieve the data (select only) no data changes will be made.

when we run the store proc from the read only server the storeprocs in the dbo schema run fine but xyz schema are failing with the message saying failed to update the database as this is a read only...

View 1 Replies View Related

SQL Server Admin 2014 :: Is Bulk Logged Recovery Model Support Point In Time Recovery

Dec 23, 2014

is bulk logged recovery model support point in time recovery

View 9 Replies View Related

SQL Server Admin 2014 :: AlwaysOn - Amount Of Data To Move To Replica Node

Aug 4, 2015

Background information: SQL 2014 Ent. highly volatile OLTP environment. We generate 10 - 12 GB compressed transaction log backup files every 15 minutes.

Currently - we have two-node A/P cluster residing on flash array. Need to leverage AlwaysOn to offload processing. Replica server with have Flash storage. Replica node has same CPU and memory footprint. 10GB connection between nodes. Anyone generating such large transaction log for 15/30 minute time period?

View 0 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Secondary Down -> Whole Cluster Goes Down

Oct 25, 2015

We had a big issue today during maintenance work in our SQL environment.

So our environment:
- 2x SQL Server 2014 Enterprise on Windows Server 2012 R2 (SRV1 and SRV2)
-- Both Hyper-V VMs on different Hosts
-- Both configured to an Windows Failover Cluster and AlwaysOn Availability Group (AG1)
-- AG Listener: AG1_lis
-- No shared storage (each Hyper-V Host has its own local storage)
-- Asynchronous Mode
-- SRV1 is primary, SRV2 is secondary SQL node

What happened?
- Shutting down Windows on SRV2 due hardware maintenance
- Cluster goes offline, AG1 goes offline
-- Error message: "Stopped listening on virtual network name 'AG1_lis'."
-- Error message: "The availability group database "DatabaseXY" is changing roles from "PRIMARY" to "RESOLVING" because the mirroring session or availability group failed over due to role synchronization."

Results?
- AG1_lis wasn't available for our applications and they stopped working properly because database connection was lost!

I think, I HOPE, this is not the normale behaviour when one node is shutting down (especially the secondary node!)

View 1 Replies View Related

SQL Server Admin 2014 :: AlwaysON Secondary Full Backup?

Nov 12, 2014

Recently I have faced one DBA interview, below is the question they asked me.

" Does AlwaysON secondary replica support Full backup, if it is not why"?

I know AlwaysON secondary replicas support only copy_only and tlog backups, why they wont support full backup?

View 9 Replies View Related

SQL Server Admin 2014 :: Read Only DNS Listener Failover Automation From Primary To Secondary

Mar 23, 2015

I have a 2 node cluster with 2 standalone 2k14 instances having alwayson setup. As per client requirement we have created a client access point with a cname alias in dns to connect to secondary replica. Now, everytime whenerver the roles switch over one has to manually move this resource from the previous secondary node to the new secondary node. This is tedious, and should not be done manually either, so I am looking for a way to automate it so that as soon as the role switches over, the resource group after some time should also switch over to the current secondary.

Env details
xa (current primary)
y2a (secondary)

client access point (resource group): aglreadtest

View 2 Replies View Related

SQL Server Admin 2014 :: Primary Filegroup For System Objects / Secondary For Data

Jul 27, 2015

I have been creating databases in SQL 2008 with a primary filegroup for the system objects and a secondary, marked Default, for the data.

We are preparing a migration to SQL 2014, and the administrator is complaining he won't adopt this structure on the new servers because 'there is no benefit' and 'a backup cannot be restored (!?)'.

View 2 Replies View Related

SQL Server 2008 :: Database In Recovery Pending

Jun 12, 2015

I have a DB shown as recovery pending when running the following:

SELECT Name, state_desc
FROM sys.databases;

The DB was created by someone outside of our team using the Full Recovery model & I can see that no transaction log backups have been taken for this, causing the log to growth to a large size.

The MDF is only 5,120kb but the TRN has grown to 10,773,120kb

When I checked the Server I could see the data area had run out of space so I have freed up some space for this so now have 2.5gb available as a short term solution.

The MDF & LDF files are still visible & when checking the SQL log the DB is being reported as having a Full Transaction Log.

Essentially I want to change the Recovery Model from Full to Simple, Reduce the size of the transaction log & bring the DB back online. Luckily this DB is only used by a handful of users but I still need to get it up & running asap.

View 9 Replies View Related

SQL Server Admin 2014 :: How Data Writes In Multiple Secondary Files If There Is No Filegroup Created

Nov 12, 2014

I read , When sql server Database having multiple data files within single filegroup then sql server writes data in multiple proportional file algorithm where the amount of data written to a file is proportionate to the amount of free space in that file, compared to other files in the filegroup.

so if there is no filegroups created and multiple secondary files are attached in databse , is there same way data stored and writes data in multiple files by the same algorithm or any different way.

View 2 Replies View Related

SQL 2012 :: Backup On Primary Replica In Case Of Secondary Replica Is Down

Jun 9, 2014

I have 2 SQL Server replicas configured on SQL Server 2012 AlwaysOn. e.g. SQL1 & SQL2.

I have configured backup job on both SQL Server with the following statement. and the job occurs every 10 minutes.

•declare @DBNAME sysname,@sqlstr varchar(500)
set @DBNAME = 'dba'
IF (sys.fn_hadr_backup_is_preferred_replica(@DBNAME)=0)
BEGIN
--Select 'This is not the preferred replica, exiting with success';

[Code] ...

I turned off SQL2 for Windows maintenance. So there is only SQL1 is online. Afterwards. I checked the backup folder and didn't see any new backup files was created after SQL2 was offline. I rerun the job. It still doesn't backup database on the Primary Replica. Then I searched on SQL Server Book online. It says

Prefer Secondary

Specifies that backups should occur on a secondary replica except when the primary replica is the only replica online. In that case, the backup should occur on the primary replica. This is the default option.

According to what it says, it should backup on the Primary Replica.

View 2 Replies View Related

SQL Server Admin 2014 :: Is It Realistic To Base Recovery On Mdf And Ldf Backups

Dec 15, 2014

My recommendation to my manager is to base recovery on .bak and .trn files. However the .mdf and .ldf files can be backed up without being detached and I am wondering about the value of these file backups. He has set up backups to external drive of the .mdf and .ldf but not of the .bak and .trn files that I have set up. His recovery strategy is based on complete backup of the machine and bare metal recovery. I am finding it hard to defend my preference for going about recovery with a new SQL Server installation, then restoring .bak files. Has tried recovery from .mdf and .ldf? Please note that all the database files (system and user) are on a single drive, I think this was set up to allow the machine to be clustered. We are intending to do a test rebuild of the machine from his backups.

View 9 Replies View Related

DB Engine :: Database In Recovery Pending

Jun 30, 2015

i've change the database log file from E drive to Drive due to insufficient space.without attaching the log file i've shutdown the sytem. becz it's gone in hand mode.post resuming its showing recovery pending.i'm unable to get online db.

View 15 Replies View Related

Recovery :: Logship Database Failed To Restore On Secondary Server Error

Aug 4, 2015

I'm working on SQL 2012 Box, which is having Logshipping failed on secondary database, the secondary database was in stand by mode right now but no more restore operation performed on this database since 2 weeks! We checked in the SQL error log and found the error code 14421, severity 16, stat: 1

How to reset the logship back to normally, do I need to disable the jobs before proceed any operation!

View 7 Replies View Related

DB Engine :: 2012 Database Stuck In Recovery Pending Status?

Jan 12, 2013

I have a SQL cluster which ran out of disk the other day.  I threw plenty more disk at the SAN.  However, 1 of the databases came back with Recovery Pending and has been over 24 hours.  I have tried to backup the database with no success.  I don't have a clean backup from the day it occured so would have a good amount of work missing.

Running a dbcc check returns the following:

Msg 945, Level 14, State 2, Line 1

Database 'sqldb' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.

I have not tried a dbcc check with REPAIR_ALLOW_DATA_LOSS as there seems to be a high risk of losing whatever was going on.  how I can get the db back online?

View 10 Replies View Related

Recovery :: Replica Server Not Available

Aug 11, 2015

I'm new to Sql Server and want to install SQL server alwayson clustering on my test environment. I followed the steps by this site: [URL] ....

On each node I can connect to SQL Server but why my 2nd node is not available so that I can add it as my 2ndary Replica?

According to this site, till "Always-On Availability Group Configuration" everything was successful.

View 6 Replies View Related

SQL 2012 :: Secondary Replica In AG

May 27, 2015

in my secondary server the database which is in restoring state , when i checked in always on dash board "This secondary database is not joined to the availability group" ,

View 3 Replies View Related

SQL Server Admin 2014 :: Restoring A Database Even If No Database Or Backup Encryption

Sep 3, 2014

I did tried the encryption on server "A" for database "AdventureWorks2012". Then I tried to restore to server "B". There was the certificate issue, and I thought "of course : it's encrypted ! Let's deactivate it". So here I go "ALTER DATABASE AdventureWorks2012 SET ENCYRPTION OFF".I look at sys.databases : not encrypted.I backup using no encryption, I verify using msdb.dbo.backupset : not encrypted.

I move my backup to my other server where encryption was never configured (so no certificate, nothing...), and I have the error :
Msg 33111, Level 16, State 3, Line 1

Cannot find server certificate with thumbprint '0xFA130E58C999C4919B8975999C83A75A403B11D8'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

View 6 Replies View Related

SSIS CDC Components On Asynchronous Secondary Replica

Jan 15, 2015

MSDN states the following on: Readable Secondary Replicas (AlwaysOn Availability Groups) for SQL Server 2014:

Limitations and Restrictions:

Change tracking and change data capture are not supported on secondary databases that belong to a readable secondary replica:

Change tracking is explicitly disabled on secondary databases.
Change data capture can be enabled on a secondary database, but this is not supported.

This confuses me: You can not track the changes. However you can enable CDC?

The scenario I am trying to achieve is to use SSIS CDC components on an asynchronous secondary replica. Is this possible? If not what would be other viable approaches?

View 0 Replies View Related

SQL 2012 :: Dump Every 1 Minute In Secondary Replica?

Jun 9, 2015

SQL is generating dump every 1 min with error

EXCEPTION_ACCESS_VIOLATION reading address 0000000000000020 at

Server is running SP2 CU2.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved