<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Erick &#187; mssql2000</title>
	<atom:link href="http://blog.xiongchuan.org/tag/mssql2000/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.xiongchuan.org</link>
	<description>Even a great life is only a life until you make it.</description>
	<lastBuildDate>Thu, 10 Mar 2011 14:44:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://blog.xiongchuan.org/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>Warning: mssql_connect(): Unable to connect to server解决办法</title>
		<link>http://blog.xiongchuan.org/warning-mssql_connect-unable-to-connect-to-server-resove.html</link>
		<comments>http://blog.xiongchuan.org/warning-mssql_connect-unable-to-connect-to-server-resove.html#comments</comments>
		<pubDate>Mon, 05 Oct 2009 07:14:59 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mssql2000]]></category>
		<category><![CDATA[mssql_connect]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=295</guid>
		<description><![CDATA[今天要用PHP去连接MSSQL2000，可惜出错，网上出现这样的错误的人真多，可是给出的解答较少，我整理下发出来。 Warning: mssql_connect(): Unable to connect to server:解决办法： 一、第一个要检查的是MSSQL2000的1433端口有没有起动。 进入DOS(开始菜单-运行-输入cmd)，转入 netstat -ano 回车 看看TCP 后面有没有1433,如果有就不管了，如果没有就打开MSSQL2000的企业管理器&#8212;工具&#8212;-SQL查询分析器， 输入 select @@version 按F5 查看输出的结果如： Microsoft SQL Server  2000 &#8211; 8.00.2039 (Intel X86)   May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 3) 如前面的Microsoft SQL Server  2000 &#8211; 8.00.2039，如果这样的就不管了，如果不是的，那就去打补丁吧。 网上都说打SP3的补丁，我是直接打的SP4的补丁，给出下载地址： [...]]]></description>
			<content:encoded><![CDATA[<p>今天要用PHP去连接MSSQL2000，可惜出错，网上出现这样的错误的人真多，可是给出的解答较少，我整理下发出来。<br />
Warning: mssql_connect(): Unable to connect to server:解决办法：<br />
一、第一个要检查的是MSSQL2000的1433端口有没有起动。</p>
<blockquote><p>进入DOS(开始菜单-运行-输入cmd)，转入 netstat -ano 回车<br />
看看TCP 后面有没有1433,如果有就不管了，如果没有就打开MSSQL2000的企业管理器&#8212;工具&#8212;-SQL查询分析器，<br />
输入 select @@version 按F5<br />
查看输出的结果如：<br />
Microsoft SQL Server  2000 &#8211; 8.00.2039 (Intel X86)   May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 3)</p></blockquote>
<p>如前面的Microsoft SQL Server  2000 &#8211; 8.00.2039，如果这样的就不管了，如果不是的，那就去打补丁吧。<br />
网上都说打SP3的补丁，我是直接打的SP4的补丁，给出下载地址：<br />
<a href="http://www.xdowns.com/soft/38/110/2006/Soft_34181.html" rel="external nofollow">http://www.xdowns.com/soft/38/110/2006/Soft_34181.html</a><br />
或者<br />
<a href="http://www.crsky.com/soft/5814.html" rel="external nofollow">http://www.crsky.com/soft/5814.html</a><br />
下载回来后，解压，进入点出setup.bat安装。完成后重启电脑，再按上面的方法，看看检查1433端口起动没有。<br />
至此，第一步保证1433正在被侦听。<br />
<span id="more-295"></span></p>
<p>二、PHP连接,mssql_connect();其中用PHP连接MSSQL的DLL文件可能版本低了，所以你要用一个新的DLL文件替换。ntwdblib.dll，我用的是XAMPP v1.70版本的，里面的这个文件的版本低，只能连接MSSQL 7.0所以我替换了新的，路径是xampp\apache\bin\,如果不放心可以同样把这个文件也替换到xampp\php\下面。文章结尾处提供下载。</p>
<p>三、重启APACHE，试试可以连接了吧，到些我是已经正常连接了。当然开启PHP的extension=php_mssql.dll扩展肯定是需要的，因为用的是XAMPP默认开启了。</p>
<p>四、补充：如果PHP这边已经开启了扩展，DLL文件也换了新的，MSSQL那边如果1433打了补丁还是没有被侦听，只好再找解决办法了，看看这篇文章：MSSQL2000数据库1433端口无法连接问题解决方案大全（<a href="http://www.zoomla.cn/Content.aspx?ItemID=394" rel="external nofollow">http://www.zoomla.cn/Content.aspx?ItemID=394</a>），如果1433已经在侦听了，那就检查用户名密码吧……</p>
<p><a href="http://www.pigblog.net/wp-content/uploads/2009/10/ntwdblib.rar" rel="external nofollow">下载ntwdblib</a></p>
<h4  class="entry-title">Most Commented Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/an-enterprise-theme-for-dedeeims.html" title="发一个dedeEIMS企业模板">发一个dedeEIMS企业模板</a></li><li><a href="http://blog.xiongchuan.org/guestbook" title="Guestbook">Guestbook</a></li><li><a href="http://blog.xiongchuan.org/blog-recovery-again.html" title="博客终于恢复啦">博客终于恢复啦</a></li><li><a href="http://blog.xiongchuan.org/cant-find-messagefile-resolve.html" title="MySQL Can&#8217;t find messagefile,解决方法">MySQL Can&#8217;t find messagefile,解决方法</a></li><li><a href="http://blog.xiongchuan.org/2010-bad-day.html" title="2010沉默几天">2010沉默几天</a></li><li><a href="http://blog.xiongchuan.org/these-days-in-wuhan.html" title="武汉的这个六月">武汉的这个六月</a></li><li><a href="http://blog.xiongchuan.org/move-house.html" title="搬家啦,上班不怕迟到了……">搬家啦,上班不怕迟到了……</a></li><li><a href="http://blog.xiongchuan.org/about" title="About">About</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/warning-mssql_connect-unable-to-connect-to-server-resove.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

