<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Adam Machanic : database mirroring</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/tags/database+mirroring/default.aspx</link><description>Tags: database mirroring</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Database Mirroring: FQDNs are Your Friends!</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2007/06/13/database-mirroring-fqdns-are-your-friends.aspx</link><pubDate>Thu, 14 Jun 2007 00:09:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:1463</guid><dc:creator>Adam Machanic</dc:creator><slash:comments>4</slash:comments><comments>http://www2.sqlblog.com/blogs/adam_machanic/comments/1463.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/adam_machanic/commentrss.aspx?PostID=1463</wfw:commentRss><description>&lt;P&gt;On a recent project for a customer, I learned an imporant Database Mirroring lesson:&amp;nbsp;fully-qualified domain names (FQDNs)&amp;nbsp;are &lt;EM&gt;essential&lt;/EM&gt;!&lt;/P&gt;
&lt;P&gt;Both Books Online and the mirroring wizard indicate that it's OK to specify the participating servers as IP addresses--so that's what I did.&amp;nbsp; The witness came up fine, and the principal came up fine.&amp;nbsp; Mirroring started, and I did a few manual failovers.&amp;nbsp; Great!&lt;/P&gt;
&lt;P&gt;But now I added the witness server and suddenly things started breaking down. The mirror instance couldn't connect with the witness, and the witness was throwing strange errors like:&lt;/P&gt;
&lt;P&gt;Database mirroring connection error 4 'An error occurred while receiving data: '64(The specified network name is no longer available.)'.' for 'TCP://Server2:7024'.&lt;/P&gt;
&lt;P&gt;...where "Server2" in this example is the mirror. Notice that the error doesn't include the IP address, but rather the server's name?&lt;/P&gt;
&lt;P&gt;After banging my head against the table for a day or so, I wrote to about 50 people asking for help.&amp;nbsp;No&amp;nbsp;answers, and&amp;nbsp;I thought I was out of luck until &lt;A class="" href="http://www.sqldownunder.com/SDU18FullShow.mp3"&gt;Don Vilen&lt;/A&gt; was kind enough to reply. Turns out, the problem is simple to fix: Don't use IP addresses, ever.&amp;nbsp; Always use FQDNs!&amp;nbsp; Thanks, Don!!&amp;nbsp; Once the FQDNs were used, instead of the IP addresses, everything came up as expected and automatic failovers started working perfectly.&lt;/P&gt;
&lt;P&gt;To find your server's FQDN, you can use "ipconfig" from the command prompt, and append the server name to the connection-specific DNS suffix.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I hope this post helps someone else avoid the frustration I went through.&amp;nbsp;It was a rough couple of days trying to debug this problem and having to tell a customer that their planned&amp;nbsp;HA solution might not work is not a fun situation to be in.&lt;/P&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=1463" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/adam_machanic/archive/tags/database+mirroring/default.aspx">database mirroring</category></item></channel></rss>