Quantcast
Channel: Database Mirroring forum
Viewing all 1024 articles
Browse latest View live

Database state after mirroring

$
0
0

Hi all,

I have set up mirroring between two SQL 2012 servers.
After the mirroring was established, the state of the databases on both servers is Mirror, Synchronized / Restoring...
I expected this to be Mirror / Synchronised

Does someone has an idea how this happened and how I can resolve this?

Regards, Martin


SQL SERVER – Mirroring Error 1412 – The remote copy of database has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error:)

$
0
0

Dear All,

Kindly note that we are trying to do the below scenarion and getting the 1412 error:

- Full database backup of a 300GB database

- Log backup of the DB

- Compress and upload to azure server having SQL installed

- Restoring the DB with no reovery on aure

- Restoring the log on azure

- The back and restore process from on prem to cloud is taking around 3 days

- When we start hthe mirroring we are getting the 1412 error.

please support us if you have any solution

Regards,

Selim

Mirroring failing with error 1479 for all databases at once

$
0
0

I'm running SQL Server 2008 Enterprise on Windows 2008 Standard with a Hyper-V virtualised mirror on Windows 2008 R2 Datacentre and a witness running SQL Express on Windows 2008 Standard. All are at 10.0.5512 and 64bit. I am using High Safety with automatic failover (synchronous) mirroring on 37 databases. All servers have 1GB network links and are 1ms away from each other.

Since early January, approximately once to twice a day I see all the databases suddenly throw error 1479:

Error: 1479, Severity: 16, State: 1.

Database mirroring is inactive for database 'xxx'. This is an information message only. No user action is required.

The mirroring connection to "TCP://MIRROR.DOMAIN.com:5022" has timed out for database "xxx" after 10 seconds without a response. Check the service and network connections.

Within a few seconds, usually less than 10 I see another entry:

Starting up database 'xxx'.

Then a bunch of recovery messages, usually 0 transactions rolled back. Then a CHECKDB which finishes without errors then:

Database mirroring is active with database 'xxx' as the principal copy. This is an informational message only. No user action is required.

This happens for all databases that are mirrored and usually takes less than 20 seconds for the entire process.  There are no other error codes shown, except some 18456 where users have tried to access during the time the databases are unavailable.

I have a lock detector program running against the principal that shows queries stuck waiting on DBMIRROR_DBM_EVENT waits, and sometimes on DBMIRROR_WORKER_QUEUE.

I have tried moving the mirror to different switches and am fairly sure the network is fine as no other machines are interrupted in the same way, but I can't rule it out.

Looking at performance monitor on the mirror, during these incidents I see a spike (20 or 30 times higher than usual) in Processor Queue Length, % Disk Read Time, Page Faults/sec, and big increases (5-10 times higher than usual) in Current Disk Queue Length and Processor time. Available memory does not seem to increase or decrease at all.

Can anyone suggest what might be happening? Or what I should do to diagnose in more detail? Or what changes in those counters could mean?

Thanks!


Database Sync Techonologies / (Mirrored vs Replication)

$
0
0

I am exploring my options and wondering if "Mirroring" will support this.  If not, please tell me what technology I should be looking at (Replication? Sync Framework?).

Can I create a "mirrored" database on two servers (A and B) and have some of my apps connected to server A and others connected to B?  I'd like changes to A to propagate to B and vice versa in real time.  If either server goes down, I am OK with the app stopping.    Many of the videos show that the Mirrored database is not "usable" until a failure is detected.

I am attempting to migrate an Access Front End connected to SQL Server to the cloud and have found that complex Queries run dreadfully slow unless the database and SQLServer are in the same "domain".   During the migration, my thought is that if I can create a mirrored database, I can slowly migrate users over.  I have been converting my queries to SQL Views but this is very time consuming and making me rewrite much of my legacy code.


Ed

Log Shipping Copy Job Failure

$
0
0

I'm getting an error with Log Shipping.

SQL Server 2012

The Primary creates the backups.  The Secondary Copy Job fails on .trn files with this error:

Error: An unexpected network error occurred.  (mscorlib)

Permissions on the Secondary folders with the service account have been verified to be correct.  Both Primary and Secondary use the same service account.  Copying files manually thru windows works from primary to secondary.  Also it seems that a .wrk is created on the first run of the job on the secondary, but after that, no new .trn files are copied over.

Network has been checked and nothing wrong there.

Any solutions to this problem?



Database mirroring suspended SQL Server 2008 R2

$
0
0

 

Hi 

During my index rebuild job, I got this errors: 

 

2 database in mirror

 

 

3:15:01

srv1

'TCP://1-database.local:port', the remote mirroring partner for database 'database', encountered error 9003, status 15, severity 20. Database mirroring has been suspended.  Resolve the error on the remote server and resume mirroring, or remove mirroring and re-establish the mirror server instance.

srv2

 

3:15:0

Event ID 9003

The log scan number (348725:54965:4) passed to log scan in database 'database' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

 

 

 

Event ID 1454

Database mirroring will be suspended. Server instance '' encountered error 9003, state 15, severity 20 when it was acting as a mirroring partner for database 'database'. The database mirroring partners might try to recover automatically from the error and resume the mirroring session. For more information, view the error log for additional error messages.

 

I think that this is exactly the sam situation like in this article: http://support.microsoft.com/kb/2403218/en-us?sd=rss&spid=2855

- with one exception. I have HIGH SAFETY mode on my server!

Any ideas? 

 

 


Slaven Sola MCITP DBA,MCT

Question on Always on Availability Groups

$
0
0

I have a question about Always on:

Scenario:I have Primary SQL Server 2014 Ent edition and Secondary server SQL Server 2014 Ent edition( Alwayson Availability Groups Automatic Failover), which is working fine. Automatic failover happened in few seconds couple of times and we are happy.

my question is:

What about if Secondary goes offline(power off)  for 2 hours and come back online by itself. 

1.Do always on AG  Sync it self and make sure Primary and secondary data is in SYNC? NO DATA LOSS?

or 

2. do we have to MANUALLY RESUME?ALTER DATABASE database_name SET HADR RESUME for all databases?-DATA LOSS?

do we loose any data if we do option 2 above? 

fyi.T-logs running every 15 mins

Please let me know ur thoughts .


Queries running very slow on read only replica (Sometimes getting timeout error)

$
0
0

Hi All,

We are created read only replica on multiple databases to run reports.

Sometimes reports getting time out Error....

How can we resolve this issue, is there any other approaches to improve the report execution performance? 

Thanks in Advance...


DB FAIL-OVER

$
0
0

Db is not getting FAIL-OVER to mirror server immediately when the principal server is down.It is configured as automatic failover.

Could somebody let me share some knowledge if there are any reasons for this issue?


Is a service account required for SQL mirroring

$
0
0

Hi,

We have local admin rights and access to SQL servers. With our domain account we don't have access to sql. We need to configure mirroring for a new DB. However, we can't create the mirroring as a we get access denied. Is a service account required or is it just someone with rights to access the DB and create the mirror a one time action?

Thanks,

Sql select query

$
0
0

Hello guys I would like to ask you about how to select in sql server.

I have a table:

CREATE TABLE [dbo].[tblTxnDecreaseAmnt](
    [AccountID] [int] NULL,
    [TxnAmount] [nvarchar](50) NULL,
    [TxnDate] [datetime] NULL
) ON [PRIMARY]
GO
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (11, N'200', CAST(0x0000A64B00735B40 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (11, N'15', CAST(0x0000A64B008C1360 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (11, N'10', CAST(0x0000A64B008CA000 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (11, N'10', CAST(0x0000A64B008CA000 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (12, N'5000', CAST(0x0000A64B008CA000 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (12, N'5000', CAST(0x0000A64B008CA000 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (12, N'3000', CAST(0x0000A64B008ED280 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (13, N'300', CAST(0x0000A64B009F4D40 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (13, N'350', CAST(0x0000A64B00AFC800 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (13, N'12', CAST(0x0000A64B00C042C0 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (14, N'50', CAST(0x0000A64B00C5C100 AS DateTime))
INSERT [dbo].[tblTxnDecreaseAmnt] ([AccountID], [TxnAmount], [TxnDate]) VALUES (14, N'20', CAST(0x0000A64B00CDFE60 AS DateTime))


.I want to select AccountID who do txn >=3 times in a day and TxnAmount Decrease from one transaction to another transaction.

.The result I want is :


Please kindly help me, Thanks for in advance. And sorry my english is not very well.

select * from tblTxnDecreaseAmnt



Mirroring Attemp Fails with errors

$
0
0

Hello,

I have configured mirroring many times before on sql 2008 with no issues. I have two new clusters on sql 2012, and when I attempt to mirror the databases I get the following errors.

An error occurred while starting mirroring.
Additional information:
L., Alter failed for Database ‘MyDatabase’. (Microsoft.SqlServer.Smo)
L..> An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft. SqiServer . Connectionlnfo)
L., The server network address ‘TCP://my-mirror-server-cluster: 5022’ can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)

To get this error I have followed these steps;

I go to the primary sql cluster and take a full backup of the database. (The database is in full recovery mode)

I copy the database backup file to the desired SQL mirror cluster.

I restore the database on that cluster, and I give it the same name, and I restore with no recovery.

I go to the primary sql cluster and I configure mirroring security, pointing to the desired sql server for the mirroring instance. 

This successfully works. 

I click start mirroring and I get the error mentioned above.

I also checked the logs and I see this error repeated almost ten times at the time I start mirroring on the mirrored server logs;

07/25/2016 15:19:28,Logon,Unknown,Database Mirroring login attempt by user 'DOMAIN\SQLSVC.' failed with error: 'Connection handshake failed. The login 'DOMAIN\SQLSVC.' does not have CONNECT permission on the endpoint. State 84.'.  [CLIENT: x.x.x.x]

I verified the account SQLSVC has permissions in the SQL server security settings, and I do not know why it is failing.

Any help would be greatly appreciated.



Jacque Donald

MSSQL peer-to-peer replication only sync 1 way

$
0
0

Hi,

My name is Adi, i am trying to create peer to peer replication between 2 Microsoft SQL Server 2014 Enterprise edition on Windows server 2012 R2 VM. I follow this steps on 

- http://www.databasejournal.com/features/mssql/article.php/3814591/Peer-to-Peer-Replication-in-SQL-Server-2008-150-Configure-a-two-node-topology.htm

- http://www.sanssql.com/2013/11/sql-server-replication-configuring-peer.html

But i only manage to make the replication 1 way only.  Do you have any advice how to make it replicate 2 way ?

Regards,

Adi

How to find query or activity causing Log file growing extremly fast

$
0
0

Hi There,

I tried to identify particular activities causing log file growing extremely. I'm using a Job to report the size of Log file, and I can see when this happening, and it recurring every day at same time. But I cannot to identify which query or activities caused. I search all the jobs, but I couldn't find anything. I hope anyone can help me to identify it.

Thanks in advance,

Tony

Mirroring / Failover

$
0
0

We have a server/database here in the Local Site.

They we will set up a Database Mirroring with Failover at the DR Site.

The idea is to have the Witness Server in the remote DR Site.

So, when the local site goes down, Auto Failover will make the DR Database

But what happens if the Local Database in the local networking loses its access to the Witness server.

Will it be that

Principal - Disconnected   (because it cannot talk to the Witness Server anymore)

and

Mirror Database is Synchronized but somebody has the bring it to be alive, right?


Mirroring breaks after DR server restart : Check the network address name and that the ports for the local and remote endpoints are operational.

$
0
0

Description: mirroring break after drhost server restarted and now i am not able to setup mirroring for existing databases. please help on issue

I did following to setup mirror again

1. Disabled mirroring with command 

alter database dbaname set partner off;

2. Took backup of database and log and restored at DR

3. from DR - executed command

ALTER DATABASE Tsbdb SET PARTNER = 'TCP://prodhost:5022' - worked

4. from Primary - executed command

ALTER DATABASE Tsbdb  SET PARTNER = 'TCP://drhost:5023' - not working and giving error

The server network address "TCP://drhost:5023" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

I contacted with Network team and they said 5013 port is open in drhost but i am unable to do telnet from primary as well as DR.

like telnet drhost 5023 -- from prodhost not working

like telnet drhost 5023 -- from drhost not working

is there any specific service that restart port of mirror databases. please help on this

Ram

LogShipping, after 1-3 days not work

$
0
0

Hy!
I suffer with this for a long time ago and I don't understand what is the problem.

Steps:
(2016. 08. 19):
- restore orig db new server {Run DBCC CHECKDB.}
- set logshipping orig db {full backup, disable trlog create job ...}
- orig db full backup -> restore db on mirror sql server {RESTORE WITH NORECOVERY}
- enable trlog create job & trlog restore job

Working properly

2016. 08. 19 - 22: Working properly

2016. 08. 22, incorrect checksum. {not changed on server}

Working 1-3 days and then does not work. WHY? :|

Thanks for your help.

[images]

Message
2016-08-22 13:35:02.95*** Error: Could not apply log backup file '\\M...9\SQLLogShipping\xxx_20160822061000.trn' to secondary database 'xxx'.(Microsoft.SqlServer.Management.LogShipping) ***
2016-08-22 13:35:02.95*** Error: SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0xcb2253d4; actual: 0xebe24d54). It occurred during a read of page (1:7314706) in database ID 7 at offset 0x00000df3a24000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL12\MSSQL\DATA\xxx.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
RESTORE LOG is terminating abnormally.
Processed 0 pages for database 'xxx', file 'yyy' on file 1.
Processed 3688 pages for database 'xxx', file 'yyy_log' on file 1.(.Net SqlClient Data Provider) ***


Error 8474 State 11 - Old Witness Server

$
0
0

Hoping someone can offer a bit of advice.

We have a SQL server which used to be a witness, the server it was a witness to is not longer in use. Now since a couple of weeks back we started getting these in the event log at the same time every day - 4 in a row.

An error occurred in a Service Broker/Database Mirroring transport connection endpoint, Error: 8474, State: 11. (Near endpoint role: Target, far endpoint address: '')

But we have no idea why these have started now and what they mean as there is no main or mirror server connected and in the mirroring tables (mirroring / endpoints/witnesses/connections) there is nothing there. Any help would be great as not sure if something is using the same ports and causing this or an old reference to it being a mirroring witness.

Thanks in advance.

Nick

Mirroring Does Not Have Connect Permissions on the Endpoint

$
0
0

Our company mirrors over 500 databases on 30 different SQL instances and on Friday evening 8/19 around 9pm we received the error "Database mirroring connection error 4 '64(The specified network name is no longer available.)" on 10+ different instances. After this error the SQL log began posting the error "Database Mirroring login attempt failed with error: 'Connection handshake failed. The login <mirroring acct> does not have connect permission on the endpoint. State 84'".

Mirroring was running fine up to this point.

Our network engineers reported that they didn't log any network errors and the SQL Servers did not reboot.  I was able to run the command: "GRANT CONNECT ON ENDPOINT::Mirroring TO <mirroring acct>;" and they all came back online.

We have rebooted our mirrored instances many times in the past without incident.

My question is, what would cause the login to lose connect permissions?

Thanks in advance,

DBA4Life

Problem with Snapshots on Mirror

$
0
0
Hi All

We are running a Mirrored instance of SQL Server 2005 SP2 (in High
Performance mode) and using snapshots on the Mirror to provide a reporting
solution.

The problem is that quite frequently the Database Snapshot starts going
through a Recovery Process. This is causing large delays in the reporting
process.

The sequence of events in the SQL logs is
1. An Event for "Starting up Database Snapshotname"
2 A series of events "Analysis of Database Snapshotname is X% complete"
This can take up to 2 minutes
3. A series of events "Recovery of Database Snapshotname is X% complete"
This recovery process can take up to 1hr 45 minutes.

The database is running on new servers and there are no apparent disk
problems.

Can anybody advise on why a snapshot should start a recovery process
and how to prevent this
Regards

Patrick Flynn
Viewing all 1024 articles
Browse latest View live


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