June 16, 2017 at 10:14 am
Hello,
Trying to implement database mirroring. I keep getting an error message an error message.
Msg 1418, Level 16, State 1, Line 1
The server network address “TCP://myserver.domain.domain.domain.com:5022” can not be reached or does not exist. Check the network address name and reissue the command.
I checked a site to help troubleshoot. It says to restore the same database from the principal database with norecovery. When I try to do that, the database is stuck in restoring.
I am not sure how to troubleshoot this issue.
Any thoughts would be appreciated.
Thanks.
Tony.
.
Things will work out. Get back up, change some parameters and recode.
June 16, 2017 at 10:21 am
Check firewalls here. Make sure 5022 is open.
June 16, 2017 at 10:34 am
I did check the ports with telnet to port 5022.
I actually added a rule to allow incoming traffic for ports 1433,1434 and 5022 on both servers.
Each time I try to restore the database with norecovery, it just sits there saying "restoring". I guess part of my confusion is that I've never restored a database with norecovery. I always restore with recovery and with replace.
Thanks.
Tony.
Things will work out. Get back up, change some parameters and recode.
June 16, 2017 at 10:54 am
1. Restore the principal DB on your sSecondary instance with NORECOVERY
2. Restore a transaction log backup to the secondary also WITH NORECOVERY
3. Make sure the mirroring endpoints are started on both servers: select * from sys.database_mirroring_endpoints
4. You might need to grant access on the endpoints to the principal and secondary: https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-endpoint-permissions-transact-sql
The "restoring" state you see is correct, and once mirroring is established, depending on whether you choose High Performance or High Safety, will change it status description on the secondary.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
June 16, 2017 at 12:09 pm
Wow, I didn't think this would be so challenging.
I did the backup and restore the database onto the secondary.
I was finally able to do a transaction log restore on the secondary.
When I start the database mirroring, it goes through the process and says success.
The last step is to start mirror. At that point I get an error message that says, "database xxx cannot be opened. It is in the middle of a restore:"
Confusing.
Thanks.
Tony.
Things will work out. Get back up, change some parameters and recode.
June 19, 2017 at 10:45 am
That is expected for the standby copy of the database. What do you get for the database in select *
from sys.database_mirroring
June 19, 2017 at 1:02 pm
I have 13 rows all full of null values.
LOL! Now, I am really confused.
Things will work out. Get back up, change some parameters and recode.
June 19, 2017 at 2:16 pm
No, it is OK. All null means no database is currently mirrored.
Have you tried doing this with the commands? The commands are actually fairly simple. Once the database restores are done (and you probably don't need to redo those, unless more Log backups have happened on the master side), then all you need to do is run two commands:
On the standby server:alter database DBName set partner = 'TCP://PrimaryMachineName.ad.domain.com:5022'
and on the primary/master server, you runalter database DBName set partner = 'TCP://StandbyMachineName.ad.domain.com:5022'
Just make the substitutions for DBName, *MachineName and Domain, and you should be all set.
June 19, 2017 at 3:30 pm
Use the T-SQL. I had time to try this today, and got the same error from the GUI. Apparently there's some bug that the wizard is connecting to the mirror, not the principal. USing T-SQL to turn on mirroring worked find for me.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply