SQL 2012 :: AG Making Secondary The New Primary
Sep 23, 2015
"If we fail over a SQL AG group on a failover cluster from one node to another making the secondary the new primary, is there any reason why we would have to fail it back over to the old primary node?"
View 2 Replies
ADVERTISEMENT
Apr 11, 2014
Looking for info on ole/requirement of primary and secondary replica under SQL Server 2012 AlwaysOn.
View 4 Replies
View Related
Oct 3, 2014
I have a SP that runs on the primary in 18 min and 45 min on the secondary( poorly written cursor,trying to fix it).Both machines are Exactly the same.I ran them in the middle of the night when no one was on the Sec. Node as we use it for reporting.
PLE: 7,000+
AVG Disk sec/write below .01
AVG Disk sec/read below .01
CPU below 5%
both machines set a max dop 4
View 2 Replies
View Related
Aug 6, 2014
I was working on a job to send me info each morning about database file free space and was noticing some odd things when looking at the log file VLFs for one of my databases in an AlwaysOn availability group.When I run DBCC LOGINFO on the secondary replica for this database, I get what I expect and most VLFs have a status of 0 (indicating the VLFs are reusable or unused). When I run DBCC LOGINFO on the primary replica, all of the VLFs have a status of 2 (active or recoverable).
Since log backups on the secondary replica in AlwaysOn still truncate the log in the primary replica, I would expect that the VLFs in the primary replica would also be mostly in a reusable or unused state. My log file sizes are the same size on each server and my backups are completing successfully. what might be causing the VLFs on the primary replica to have a status of 2 in DBCC LOGINFO when taking log backups from the secondary replica?
View 6 Replies
View Related
Jul 20, 2015
In my environment always on is there. Today I observed that primary server fail over to secondary server .now the secondary server acting as primary role.
Can I know when is fail over is happened and who did the fail over. Is there any script to find this?
View 4 Replies
View Related
Oct 2, 2014
I have a scenario where a customer is going to be using Log Shipping to the DR site; however, we need to maintain the normal backup strategy on the current system. (i.e. Nightly Full, Every 6 Hour Differential and Hourly Transaction Log backup)I know how to setup Transaction Log Shipping and Fail-over to DR and backup but now the local backup strategy is going to be an issue. I use the [URL] .... maintenance solution currently.
Is it even possible to do regular backups locally keeping data integrity for your backup strategy with Transaction Log Shipping enabled?
View 2 Replies
View Related
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
Apr 20, 2015
I have not used log shipping before and find myself in a position where I need to reboot the secondary node and then the primary node and I don't actually need to failover.
Is there anything I need to be aware of. When rebooting the secondary node I assume the transactions will be held in the primary nodes log till the secondary comes back and just carry on once back up?
When rebooting the primary node nothing needs to be done and the log shipping will just start again once it has come back?
View 3 Replies
View Related
Jan 24, 2015
i have created a new login in primary server and provided dbowner permission to primary db.how do i transfer this login to secondary server and assign the same permission to secondary db ?
View 2 Replies
View Related
Dec 31, 2006
Hello,
I would like to know how do I carry out this two cases in efficient way:
1. I have two SQL 2005 servers running. One as primary, one as secondary. I would like to synchronize or replicate the transactions at real-time.
2. When primary goes down, I would like my secondary server to take place in needless of IP changes and application settings.
If you have a good architecture on this, please share with me. I am not sure whether my questions are clear enough or not. I also will be reading some articles about these. Thank you in advance.
Regards,
Paing
View 4 Replies
View Related
Apr 15, 2015
Is index created on only primary key or it can be created on secondary key ?
View 2 Replies
View Related
Apr 10, 2006
Hi all..!If I want to split an SQL DB into several physical files (as its 500GBdisk ran out of space, won't even run shrinks any more, and we boughtanother 500GB disk to add to the PC)then what is the difference between:Adding another File to the primary group which will reside on the newgroup;Adding another file in another group.We do not want to set any db objects (Tables, indexes)to a secondary file, as this will involve lengthy data movingoperations. We would like the DB to continue working from where it isutilizing the added space in a contigous (striped) manner.Will striping occur in both cases? as I understand striping it meansthat our stuck SQL Server will awake back to life as it will now have500GB more data for its DB, even though we haven't set any of itsobjects (tables, indexes) to explicitly use the secondary NDF file onthe new disk?or will it only utilize the new space if we set some objects to resideon that NDF?for example if we run large queries which crash now (due to lack ofspace) when we add the second drive will they start to work as theprocess will grow striped from the full drive to the new drive, even ifall the queries' source tables are all still set to the old drive?Thanks for any replies?
View 1 Replies
View Related
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
Jul 14, 2015
I have a database around 500 GB. right now the database have only one data file and one log, it has only one filegroup also.all the indexes and table are placed in Primary Filegroup . we are going to separate them. the planing is to move all the indexes to Secondary filegroup and all the table will be in Primary filegroup.But there will be a problem while implementing it because there are around 600 tables and each table have at least 2 non-clustered index , so is there any way to move all the index to Secondary Filegroup.
View 3 Replies
View Related
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
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
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
Apr 14, 2014
While configuring SQL Server 2012 Cluster with Always on, why do we need two secondary replicas.
The attached link will describe the actual query. [URL] ....
View 2 Replies
View Related
Mar 11, 2015
I am after T-SQL code which will simply load the next T-log backup file from a network share folder to a warm standby db on a secondary server.What is needed is a Third server (server x), to participate in log shipping (MULTIPLE TARGETS).
Primary SERVER (SERVER A)
Secondary SERVER (SERVER B) Log shipped to via GUI.
THIRD SERVER (SERVER X) which will contain the same log shipped db from server A.
This will simply restore the logs from a network share to keep the db up to date.
View 3 Replies
View Related
Nov 2, 2015
2 Boxes in HA, identical hardware (VMs) and both utilising identical storage systems (Nimble SANs).Was needing to do a copy only backup of a few databases for an escrow environment we have, so decided to perform this on the secondary box.Small ~10GB ish database first, seemed to be really slow, so opened resource monitor and noticed that disk read / write was getting limited to about 15MB/s so took a little while (the big one is over 1TB)
Tried this again on the primary it was done in seconds disk rate in the order of 250MB/s (same settings re compression etc).. I decided to make a copy of the backup file on the secondary, the copy disk to disk went in the region of 150MB/s , so it appears that SQL Server is the bottleneck?
View 3 Replies
View Related
Aug 21, 2014
In always on under availability group server name properties can see the option Readable Secondary. In that for secondary server the Readable Secondary Option is YES and for Primary it is Read-Intent. I believe Read-Intent allows only read only connections and YES allows all user connections.
View 0 Replies
View Related
Aug 21, 2014
In always on under availability group server name properties can see the option Readable Secondary. In that for secondary server the Readable Secondary Option is YES and for Primary it is Read-Intent. I believe Read-Intent allows only read only connections and YES allows all user connections.
What exactly it means for the primary and secondary?
View 3 Replies
View Related
Dec 12, 2014
How can I create secondary database on the server i.e. .ndf file?
View 2 Replies
View Related
Dec 21, 2014
I have been working with a BI colleague to access the readable secondary through SSRS. For some reason it keeps complaining that ApplicationIntent is not recognized keyword. I am starting to think it's something to do with the driver for SSRS.
View 1 Replies
View Related
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
Oct 14, 2015
Environment:-
Windows 2012 R2,
SQL 2012 (Primary Replica)
SQL 2012 (Seondary Replica)
SQL 2012 (Secondary Replica over WAN site)
There are database replicating on three SQL servers. WAN line is having performance issue because of limited bandwidth I have to remove SQL secondary replica over WAN site temporarily and add it again later when the WAN line is upgraded with between bandwidth What is the best practice to remove secondary replica and replicating database and add later from SQL management studio without interruptions on databases?
View 6 Replies
View Related
Jul 14, 2015
Inside my sp on the Primary server are 3 commands:
exec msdb..sp_start_job @job_name = N'JobA' --
Running on Primary ServerEXEC Server2.msdb.dbo.sp_start_job @job_name = N'JobB';Running on Secondary ServerSelect * from Server2.Table --
Running on Secondary Server
So far the commands are working just fine when I kick them off one at a time. But when I kick off the sp as a whole I notice that the timing just isn't keeping up. For instance, Step 3 is running before Step 2 is finished. It appears that as the Primary Server kicks off Step 2, it doesn't seem to care about the outcome and moves right to Step 3 which in turn provides me erroneous data.How can I get Step 3 to wait until Step 2 is actually finished keeping in mind the Secondary server is part of this equation?
View 13 Replies
View Related
May 21, 2013
I have an AlwaysOn Availability group configured between 2 nodes (Synchronous)
Automatic failover was working fine until recently
I can failover between the nodes manually but automatic failover doesn't seem to be working. In my earlier test, I would shut down the SQL Service on the primary and within seconds, the secondary replica would take over. Recently I have performed the same test and the secondary replica enters the resolving state and the DB in unavailable.
I have tried everything here: [URL] ....
The only change I made was changing the availability mode from Synchronous to Asynchronous - Could that be the cause?
View 3 Replies
View Related
Sep 24, 2014
Do we have any way to insert,update,delete data from one table and update the changes onto second table. Also, while updating records into second table, can the data be encrypted.
I tried using view and it can insert, update, delete without any issues. But if i tried to encrypt any fields after inserting data into view, I am unable to do it.
For ex:
Table A:
EMPID LNAME FNAME
1 ABC DEF
2 DCE SKL
3 CKL DOP
Expecting output: by scrambling Lname FILED
Table B - vIEW TABLE
EMPID LNAME FNAME
1 CBD DEF
2 ECD SKL
3 LKC DOP
Tried below methods
CREATE Tableb_vw ON TableB
Instead of Insert
AS
Begin
update TableA
set Lname = (
--UserName = 'User' + substring(convert(varchar(32), UsersTrID), 1, 8)
SELECT REPLACE(LEFT(Lname, 2), '''', 'Z') AS LNAME)
FROM TableA
end
What I would like to get:
1. Can we update base tables and encrypt second table data while inserting or updating data
2. If not supported using base tables, can we do using views to encrypt view data [Some fields]
View 0 Replies
View Related
Jun 27, 2015
Secondary replica database(setup in async mode) of AlwaysON went in "restricted mode" during weekly reindex operation.
So I have tried below steps
1) Executed following statement on the same secondary replica database where the issue exists
alter database <DBNAME> set multi_user with rollback immediate
but it failed with the error saying "The operation cannot be performed on database "dbname" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group. ALTER DATABASE statement failed."
2) Primary database is multi_user but still tried following command on primary replia database(thinking it will replicate)
alter database <DBNAME> set multi_user
but no luck. The secondary alwaysON database shows (synchronizing) as the alwaysON is set in async mode but the command doesn't replicate across secondary
so we are left with the only option to re-setup alwaysON but I want to avoid it as database size is huge..
any other options or am I missing anything?
MCP,MCDBA(SQL 2000),MCTS(SQL 2005),MCITP(SQL 2005)
View 2 Replies
View Related
Mar 28, 2014
What happens when an automatic failover occurs, in a two server AlwaysOn Availability Group configuration, where the secondary replica is configured as read-only?
Will it only allow read-only connections, or will it become read-write and can accept INSERT, UPDATES and DELETES when assigned the new role as Primary?
Is it correct that adding a third server/node, that just acts as passive and should be used for automatic failover, to support true HADR, would NOT need another license .. and that licenses would only be required for the previous Primary and Secondary (Read-Only) replicas?
View 3 Replies
View Related
Jun 3, 2015
I checked the server and found that LS restore job failing and Backup and copy jobs running fine without any issue. and also observed that Copy folder the trn file existing on secondary server. i try to restore trn file im getting the error. and observed that last log backup file that it restored at the secondary database on May2nd,2015.
2015-06-02 12:25:00.72*** Error: The log in this backup set begins at LSN 761571000000022500001, which is too recent to apply to the database. An earlier log backup that includes LSN 721381000002384200001 can be restored.
From Restore job histort details below.
Message
2015-06-02 12:25:00.72*** Error: The file 'xxxx\_20150530104503.trn' is too recent to apply to the secondary database 'database'.(Microsoft.SqlServer.Management.LogShipping) ***
2015-06-02 12:25:00.72*** Error: The log in this backup set begins at LSN 761571000000022500001, which is too recent to apply to the database. An earlier log backup that includes LSN 721381000002384200001 can be restored.
RESTORE LOG is terminating abnormally.(.Net SqlClient Data Provider) ***
2015-06-02 12:25:00.73Searching for an older log backup file. Secondary Database: 'database'
2015-06-02 12:25:00.73*** Error: Could not find a log backup file that could be applied to secondary database 'database'.(Microsoft.SqlServer.Management.LogShipping) ***
2015-06-02 12:25:00.74Deleting old log backup files. Primary Database: 'database'
View 3 Replies
View Related
Jan 8, 2015
How can I count the rows when I make new table. Here is my code:
SELECT EMPLOYEE_ID, LAST_NAME, SALARY, JOB_ID, COMMISSION_PCT, DEPARTMENT_ID, COUNT(TO_CHAR(HIRE_DATE, 'DAY')) AS NUM_EMPLOYEES
FROM EMPLOYEES
WHERE TO_CHAR(HIRE_DATE, 'Day') = 'Monday'
GROUP BY EMPLOYEE_ID, LAST_NAME, SALARY, JOB_ID, COMMISSION_PCT, DEPARTMENT_ID;
Here is the table: [URL] ....
I have 10 rows, so I would like under NUM_EMPLOYEES to be displayed 10 on each row.
View 5 Replies
View Related