Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Tuesday, March 27, 2012

Error 18210 Backup up SQL Server 2005 Database to network drive

I have 2 different servers that run nightly backup jobs to a network drive using the UNC format. I am noticing the larger databases encountering the following errors on a regular basis

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

'\\fnfssql3\SQLBackups\MNSQL05\<database>.BAK'. Operating system error 64(The specified network name is no longer available.).

BACKUP failed to complete the command BACKUP DATABASE <database>. Check the backup application log for detailed messages.

There are 5 databases on this server all backed up by the same job and 3 of them wortk fine and 2 of them fail so it is not a permissions problem. Have there been any problems with backing up to a network drive in 2005?

Well, backing up to networks drives is not officially *supported*, thats why the browser only display the local drives.

The reason for that and the logical explanation why you shouldn′t do that is, because the network is less reliable than local drives. If you want to make sure the database is backuped to network, you will have to either make sure the windows where the backups are streamed to the network don′t interfer with each other or you use a local backup to a drive and copy the files later over. Thats the most reliable option beside using a NAS / SAN.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Network hic-up can do this. One can see such error without sql involved.

Try trapping the error and retry the operation. Also, try backing up locally as suggested by Jens.

|||

Backing up database to a UNC path is fully supported. You must be thinking of running the database from a network drive.

http://support.microsoft.com/kb/304261

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx

|||

Oj,

the reason why I put *supported* in stars is, that it is sure supported, but not reliable in terms of just having a network share associated on a UNC share. (I thought he explanation should made that clearer, sorry for the poor explanation :-) ) The reliablity descrease due to your mentioned outages on the network. Having big backup files for the transfer over the network is there not recommended undless you have a SAN or a NAS which ensures more reliablity for the transfer. I often used the UNC path backup too on customer sites but either tried to shape the task to copy the files to different time windows or used a local backup and copied the files over with a mechanism (like xcopy / robocopy) to restart in the case of a connection loss.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Wednesday, March 21, 2012

Error 14421

I have configured log shipping on SQL Server 2000, and all data is being
restored correctly on destination servers within 30 minutes.
The problem is the continuing failure of the Log Shipping Alert Job -
Restore task.
Every minute it records the error 14421 in the event log
The log shipping destination ______ is out of sync by 12345 minutes.
I have been told before that this error is not meaningful, and this appears
to be true since the data is being restored correctly.
However, some admin folks not knowledgeable about log shipping are troubled
by the huge quantities of RED in the event log, and I don't blame them.
They don't really accept a solution such as disabling the offending task,
since this smacks of concealing a problem rather than resolving it.
What can I do?
-Bill
I forgot to mention, I'm using SP3, which was supposed to correct this
problem.
I haven't had a chance to install SP4 on the primary yet.
One of the destination servers has SP4 - would that cause the error?
Thanks
Bill
|||Hi bill,
Please follow the following KB Article if u haven't gone thru
http://support.microsoft.com/kb/329133
INF: Troubleshooting SQL Server 2000 Log Shipping "Out of Sync" Errors
"bill" wrote:

> I have configured log shipping on SQL Server 2000, and all data is being
> restored correctly on destination servers within 30 minutes.
> The problem is the continuing failure of the Log Shipping Alert Job -
> Restore task.
> Every minute it records the error 14421 in the event log
> The log shipping destination ______ is out of sync by 12345 minutes.
> I have been told before that this error is not meaningful, and this appears
> to be true since the data is being restored correctly.
> However, some admin folks not knowledgeable about log shipping are troubled
> by the huge quantities of RED in the event log, and I don't blame them.
> They don't really accept a solution such as disabling the offending task,
> since this smacks of concealing a problem rather than resolving it.
> What can I do?
> -Bill
>
>

Error 14258: Cannot perform this operation while SQLServerAgent is starting. Try again later.

I'm getting the following error on two of my SQL Servers -

Error 14258: Cannot perform this operation while SQLServerAgent is starting. Try again later.

The only solution that I have seen is the same solution that Microsoft has published in the following article - KB303287 [http://support.microsoft.com/?scid=http%3a%2f%2fwww.support.microsoft.com%2fkb%2f303287%2fen-us%2f]

The solution is to unflag the use of NT Fibers. However, our software application provider is advising us against doing this. Is there another fix anywhere that I could get my hands on - another solution?

Thanks in advance.

SQLAgent jobs fails because of the reason that it waits for event to signal recovery is complete.

Currently the only solution is to switch to thread mode.

http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsqldev/html/sqldev_02152005.asp

Above article recommends that you stay away from fiber mode and focus your tuning efforts on other things. If you run into a situation where you feel strongly you need fiber mode, it's probably worth a call into Microsoft Product Support Services to confirm your diagnosis.

Thanks,

Gops Dwarak

|||

Thanks very much for the reply and for the extra information as well. My situation actually started when we attempted to create and use a local machine account to run the SQLSERVERAGENT service. I'm not sure if this brings more into play or not. I took the service back to using a different priviledged domain account to run the service and I'm not getting the errors currently.

I would, however, much rather run this service as a local user for security reasons. I have not yet taken a fresh look at Microsoft's best practices on this issue [the service account], but I will be taking a look at that as well.

thanks again.

|||

We are having the same problem with our SQL Server Agent as well, and our started when we switched from the system account to a user account that was setup specifically for SQL.

Our server has 4 processors so I think that is why the server was originally flagged to run in fiber mode, however, I think we are going to have to switch back to thread mode because there are so many processes that this is killing by staying in fiber mode.

Anyway, if you have found out any further information on this subject I would greatly appreciate any advice you might have.

Thanks,

Lee

|||

We are having the same problem with our SQL Server Agent as well,

The server is NOT flagged to run in fiber mode

Do you know how to fix it?

Thanks,

Oleg

|||

As mentioned above in the posts, change the log on account from local system account to a specified account, even if its the same account that you are signed on to the server. Worked like a charm for me..

thanks guys...

|||

Oleg

Have you referred to the article above and steps defined.

Also if you are using distributed transactions its might worth to enable the mSDTC to auto start.

|||

Right on! How Fibre Mode got switched on will be vexing me now. At least server agent is running and I can see what is going on. When server agent hangs with a 14258, it seems to be running in enterprise manager but none of my jobs show a history from the point of failure.

I may have popped on the checkbox when i was looking at sql server properties. When the server was bounced last week to finish a patch the agent did not come back when Fibre Mode was enabled and hung all my agent jobs. That's the best I can do. Careful when you browse a production machine... I have DTS packages running on shedule so this turned out to be a big deal.

I will see tomorrow if everything runs ok. At least the error is clear when I try to edit the jobs. I would think a melitious attack to have caused real damage so I blame myself. Nothing in the security logs tells me any different. Thanks.

Error 14258: Cannot perform this operation while SQLServerAgent is starting. Try again later.

I'm getting the following error on two of my SQL Servers -

Error 14258: Cannot perform this operation while SQLServerAgent is starting. Try again later.

The only solution that I have seen is the same solution that Microsoft has published in the following article - KB303287 [http://support.microsoft.com/?scid=http%3a%2f%2fwww.support.microsoft.com%2fkb%2f303287%2fen-us%2f]

The solution is to unflag the use of NT Fibers. However, our software application provider is advising us against doing this. Is there another fix anywhere that I could get my hands on - another solution?

Thanks in advance.

SQLAgent jobs fails because of the reason that it waits for event to signal recovery is complete.

Currently the only solution is to switch to thread mode.

http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsqldev/html/sqldev_02152005.asp

Above article recommends that you stay away from fiber mode and focus your tuning efforts on other things. If you run into a situation where you feel strongly you need fiber mode, it's probably worth a call into Microsoft Product Support Services to confirm your diagnosis.

Thanks,

Gops Dwarak

|||

Thanks very much for the reply and for the extra information as well. My situation actually started when we attempted to create and use a local machine account to run the SQLSERVERAGENT service. I'm not sure if this brings more into play or not. I took the service back to using a different priviledged domain account to run the service and I'm not getting the errors currently.

I would, however, much rather run this service as a local user for security reasons. I have not yet taken a fresh look at Microsoft's best practices on this issue [the service account], but I will be taking a look at that as well.

thanks again.

|||

We are having the same problem with our SQL Server Agent as well, and our started when we switched from the system account to a user account that was setup specifically for SQL.

Our server has 4 processors so I think that is why the server was originally flagged to run in fiber mode, however, I think we are going to have to switch back to thread mode because there are so many processes that this is killing by staying in fiber mode.

Anyway, if you have found out any further information on this subject I would greatly appreciate any advice you might have.

Thanks,

Lee

|||

We are having the same problem with our SQL Server Agent as well,

The server is NOT flagged to run in fiber mode

Do you know how to fix it?

Thanks,

Oleg

|||

As mentioned above in the posts, change the log on account from local system account to a specified account, even if its the same account that you are signed on to the server. Worked like a charm for me..

thanks guys...

|||

Oleg

Have you referred to the article above and steps defined.

Also if you are using distributed transactions its might worth to enable the mSDTC to auto start.

Error 14258: Cannot perform this operation while SQLServerAgent is starting. Try again later.

I'm getting the following error on two of my SQL Servers -

Error 14258: Cannot perform this operation while SQLServerAgent is starting. Try again later.

The only solution that I have seen is the same solution that Microsoft has published in the following article - KB303287 [http://support.microsoft.com/?scid=http%3a%2f%2fwww.support.microsoft.com%2fkb%2f303287%2fen-us%2f]

The solution is to unflag the use of NT Fibers. However, our software application provider is advising us against doing this. Is there another fix anywhere that I could get my hands on - another solution?

Thanks in advance.

SQLAgent jobs fails because of the reason that it waits for event to signal recovery is complete.

Currently the only solution is to switch to thread mode.

http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsqldev/html/sqldev_02152005.asp

Above article recommends that you stay away from fiber mode and focus your tuning efforts on other things. If you run into a situation where you feel strongly you need fiber mode, it's probably worth a call into Microsoft Product Support Services to confirm your diagnosis.

Thanks,

Gops Dwarak

|||

Thanks very much for the reply and for the extra information as well. My situation actually started when we attempted to create and use a local machine account to run the SQLSERVERAGENT service. I'm not sure if this brings more into play or not. I took the service back to using a different priviledged domain account to run the service and I'm not getting the errors currently.

I would, however, much rather run this service as a local user for security reasons. I have not yet taken a fresh look at Microsoft's best practices on this issue [the service account], but I will be taking a look at that as well.

thanks again.

|||

We are having the same problem with our SQL Server Agent as well, and our started when we switched from the system account to a user account that was setup specifically for SQL.

Our server has 4 processors so I think that is why the server was originally flagged to run in fiber mode, however, I think we are going to have to switch back to thread mode because there are so many processes that this is killing by staying in fiber mode.

Anyway, if you have found out any further information on this subject I would greatly appreciate any advice you might have.

Thanks,

Lee

|||

We are having the same problem with our SQL Server Agent as well,

The server is NOT flagged to run in fiber mode

Do you know how to fix it?

Thanks,

Oleg

|||

As mentioned above in the posts, change the log on account from local system account to a specified account, even if its the same account that you are signed on to the server. Worked like a charm for me..

thanks guys...

|||

Oleg

Have you referred to the article above and steps defined.

Also if you are using distributed transactions its might worth to enable the mSDTC to auto start.

sql

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian
sql

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian
sql

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian

Error 1418, fails to connect mirror server

II use the mirroring wizard to config all these three servers(windows authorization is used), the error logs in primary server and mirror server are showed as below

a) On primary server:

Error: 1474, Severity: 16, State: 1

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://mymirror.mydomain:5022'

b) On mirror server:

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'.

It states I do NOT have permission on this endpoint, but actually, I grant the permission to the endpoint on both primary and mirror server using command

GRANT CONNECT ON ENDPOINT::Mirroring TO [mydomain\myuser];

Also, I followed the article http://msdn2.microsoft.com/en-us/library/ms189127.aspx ,no firewall issue, the endpoint is created and started by checking sys.database_mirroring_endpoints

Hope someone can help me resolve this issue... Thank you very much..

What is the account that SQL server is running as?|||The account that SQL runs as is the one that it tries to login onto the other server as.|||Same issue here in our environment. Two database servers, one domain, one user, full permissions... Yet the connection is forcably terminated under an anonymous user.

Any troubleshooting guides out there? Any how-to articles? Seems to be a lack of information regarding mirroring errors and the entire setup process... Any help would be interesting.|||

In BOL there is a section that deals explicitly with setup errors for database mirroring.

Search for "troubleshooting database mirroring."

Thanks,

Mark

|||

I have exactly the same problem :

Date 5/21/2006 1:56:49 PM
Log SQL Server (Current - 5/21/2006 1:56:00 PM)

Source Logon

Message
Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.16.6.14]

That's from the error log of the mirror.

Both the principal and the mirror have sql running as the local service account for each machine respectively.

I've tried the wizard, I've tried TSQL, I've done all the troubleshooting steps you recommend. Can you please be very specific on what to do and what to put as logins when both principal and mirror run as each machines local service account.

Thanks!

Mark

|||

Sorry - nevermind - it helps to read the fine print. I had not seen anywhere that if you use the local service account you must use Certificates.

Once i did that it works just fine.

Hopefully, in future releases you'll make it easier to do that.

Thanks!

Mark

|||

Do you normally use Local System to run your SQL Server process?

Thanks,

Mark

|||Hello Mark,

Could you send me the documentation on how to do this (create certificates), I have read a few but having problems on the mirror node.|||i too would like to create certificates i have the same problem|||

I met the same problem.

This issue is due to the wrong login authority.when we excute the TSQL "ALTER DATABASE WorkDataBase SET PARTNER ='TCP://URL:7022'",this operating lead the SQL Server send a request to the mirror point with NT AUTHORITY\ANONYMOUS enven if the SQL Server service is running as the same domain user as the mirror point does.

And when I add a new login in mirror sql server as Sysadmin with the windows account "NT AUTHORITY\ANONYMOUS",it DOES work!But that means everyone can get the full control on that machine.

if someone got other answers,please write here.

|||

Hello everybody.

After 2 days experiencing problems I've finally got my first mirror working. A very basic one, but... works!

Following different sources, posts...etc I've compiled this sample guide for a Mirror Lab. Hope it can help someone in the future.

0) In this example we are inside a DOMAIN. We have a domain user called MRRUSR

1) Machine A, Machine B with Sqlserver installed. NO XP or other kind of firewalls ON.

2) MRRUSR is local admin in both machines. Also is a sysadmin user in both sqlservers.

3) MRRUSR is the MSSQLSERVER service account in both machines

4) Machine A is gonna be the PRINCIPAL, B the MIRROR.

5) Log on in my machine as MRRUSR

6) Open Sql server Studio. Connect to both machines using windows authenticacion.

7) Create a New Database in A (you may need to have sysadmin role to MRRUSR using sa) create a table, add some data

8) Backup the new DB (Full backup) with .bak extension

9) Backup the new DB (Transaction log) with .trn extension

10) Copy the both files to a location in B machine.

11) Restore .bak into a new DB using NORECOVERY option

12) Restore .trn into the previous DB using NORECOVERY option

13) Go to Machine A, open a new query

14) Take a look to the endpoints

SELECT type_desc, port FROM sys.tcp_endpoints;
SELECT name,role,state_desc FROM sys.database_mirroring_endpoints;

15) Delete existing ones (DROP ENDPOINT [NAME])

16) Create a new endopoint

CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5023)
FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION=DISABLED)

17) Start it

ALTER ENDPOINT [Mirroring]
STATE = STARTED
AS TCP (LISTENER_PORT = 5023)
FOR database_mirroring (ROLE = PARTNER);
GO

18) Do steps 13 to 17 in machine B.

19) Return to machine A. Query.

20) Lets link to our partner in machine B. First ensure you can see it with ping and telnet to the port.

ALTER DATABASE NAME
SET PARTNER ='TCP://MACHINENAME:5023'

21) Repeat step 20 from MACHINE B pointing to MACHINE A

22) Refresh the both databases in the UI, you should see the role and status of the mirror beside the database UI object.

23) Lets test them: Add some new data in Machine A database.

24) Then, right click over database, then mirror, then in the form select “FAILOVER”, then say yes.

25) Refresh the 2 databases in the UI you should see the new status and roles changed.

26) Open Machine B databse, the new data should be there.

Cheers!

Kelo

|||

Another one that has shorter steps (same idea)

http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

|||

IMPORTANT! To establish any mirroring session (with or without certificates) you must use FQDN (Fully Qualified Domain Names) machinename.domain.com.Before going on, be sure that you can reach the 3 machines with a single PING. Also, is a good practice to ensure that you can reach a telnet call over the FQDN + the port you plan to use (5022 in this example)

FIX: Over the post above. When establishing a mirroring session using machine accounts (not certificates, so you are inside a DOMAIN) ensure your 3 mssqlservices are running under NETWORK SERVICE account

|||Hi all,

I'd like to add something to this however it's beyond the scope of a basic mirror. When adding a Witness to your mirror to allow for automatic failover you may experience the error on the Principle and Mirror stating

Database Mirroring login attempt by user 'Domain\SQLExpressMachineName$.' failed with error: 'Connection handshake failed. The login 'Domain\SQLExpressMachineName$.' does not have CONNECT permission on the endpoint.


This is deceiving as the Mirroring Wizard creates endpoints on all 3 hosts. Basically the error above is stating that the Witness server does now have access to the Master database endpoints on the Principle and Mirror, therefore you'll need to add the host name of the Witness Server running SQL Server Express. This is done using the GRANT tsql command

master
go
create login [Domain/SQLExpressMachineName$]
go
grant connect on endpoint::mirroring to [Domain/SQLExpressMachineName$]

I had to do this even though all SQL Services were running as a network service.

Cheers,
Damian