<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>仁川网络 - 数据库知识</title><link>http://www.renchuan.com/</link><description>青岛开发区网站建设,青岛黄岛网站建设,青岛开发区网站制作,青岛开发区网站优化,青岛开发区免备案空间 - </description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 100427</generator><language>zh-CN</language><copyright>本站关键词：青岛开发区网站建设,黄岛网站建设,青岛开发区网站制作，青岛开发区网站设计,青岛开发区网络公司,青岛开发区网站优化,青岛开发区网站推广，青岛开发区百度优化,青岛开发区google优化,青岛开发区虚拟主机,青岛开发区域名注册,青岛开发区免备案空间,青岛开发区网页设计,青岛开发区SEO优化,黄岛SEO,黄岛网页设计,Copyright 2008-2010 仁川网络. All Rights Reserved. 24小时服务热线：13780679218 (同行勿扰)  鲁ICP备05037212号</copyright><pubDate>Mon, 06 Sep 2010 23:23:03 +0800</pubDate><item><title>SQL2000数据库备份及还原</title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/60.html</link><pubDate>Sat, 08 May 2010 11:05:00 +0800</pubDate><guid>http://www.renchuan.com/post/60.html</guid><description><![CDATA[<p>备份数据库<br />数据库文件非常重要，如果有一天服务器系统崩溃无发恢复，那么将会造成非常大的损失，所以我们要不定期的进行备份数据库。<br />选好要备份的数据库后，鼠标右键弹出菜单，选所有任务&mdash;备份数据库</p><p><img style="width: 428px; cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106218788.jpg" onload="return imgzoom(this,550);" border="0" /></p><p><img style="cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106244748.jpg" onload="return imgzoom(this,550);" border="0" /></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt">点添加按钮，选择一个要备份的路径。</span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><img style="cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106246772.png" onload="return imgzoom(this,550);" border="0" /></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt">选择好保存路径，添写备份文件名，确定即可</span></span></span></span></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><img style="cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106241446.jpg" onload="return imgzoom(this,550);" border="0" /></span></span></span></span></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt">还原数据库</span></span></span></span></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><img style="cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106255232.png" onload="return imgzoom(this,550);" border="0" /></span></span></span></span></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><img style="cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106250381.jpg" onload="return imgzoom(this,550);" border="0" /></span></span></span></span></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt">选好要还原的数据库后，鼠标右键弹出菜单，选所有任务&mdash;还原数据库&mdash;从设备&mdash;选择设备&mdash;选择数据库所在路径。</span></span></span></span></span></span></span></span></span></p><p><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><span style="font-size: 10.5pt"><img style="cursor: pointer" onclick="javascript:window.open(this.src);" alt="" src="http://www.renchuan.com/upload/2010/5/201005081106267850.jpg" onload="return imgzoom(this,550);" border="0" /></span></span></span></span></span></span></span></span></span></p>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/60.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=60</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=60&amp;key=2fdfd855</trackback:ping></item><item><title>SQL Server 导入/导出教程</title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/58.html</link><pubDate>Sat, 08 May 2010 10:56:56 +0800</pubDate><guid>http://www.renchuan.com/post/58.html</guid><description><![CDATA[<h1 align="center">SQL Server 导入/导出教程</h1><p>1、打开本地企业管理器，先创建一个SQL Server注册来远程连接服务器端口SQL Server。<br />步骤如下图：</p><p>图1:<br /><img height="456" src="http://www.renchuan.com/upload/2010/5/201005081058151880.gif" width="443" border="1" alt="" /><br /><br />2、弹出窗口后输入内容。&quot;总是提示输入登陆名和密码&quot;可选可不选，如图2。<br /><br />图2:<br /><img height="419" src="http://www.renchuan.com/upload/2010/5/201005081058163540.gif" width="371" border="0" alt="" /><br /><br />3、注册好服务器后，点击打开。如果是选择了&quot;总是提示输入登陆名和密码&quot;的话再点了确定后会提示输入用户密码，如图3。</p><p>图3:<br /><img height="243" src="http://www.renchuan.com/upload/2010/5/201005081058162430.gif" width="323" border="0" alt="" /><br /><br />4、进入后，选择到您的<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081058172213.gif" width="461" border="1" alt="" /></p><p>5、进入DTS导入/导出向导，点击&ldquo;下一步&rdquo;按钮继续</p><p>图5:<br /><img height="389" src="http://www.renchuan.com/upload/2010/5/201005081058175411.gif" width="503" border="0" alt="" /></p><p>6、选择数据源，输入数据源所在的数据库服务器名称、用户名、密码和要复制数据的源<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081058173578.gif" width="503" border="0" alt="" /></p><p>7、选择&ldquo;在SQL Server<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081058172466.gif" width="503" border="0" alt="" /></p><p>8、这一步可以把&quot;包括扩展属性&quot;和&quot;排序规则&quot;两个选择上。接着去掉左下的&quot;使用默认选项&quot;，点击右下角的&quot;选项&quot;来进行配置。</p><p>图8:<br /><img height="389" src="http://www.renchuan.com/upload/2010/5/201005081058178354.gif" width="503" border="0" alt="" /></p><p>9、图8中点&quot;选项&quot;后会弹出图9，把&quot;复制数据库用户和<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081058185767.gif" width="457" border="0" alt="" /></p><p>10、设定调度方式，一般选&ldquo;立即运行&rdquo;就可以，然后点&ldquo;下一步&rdquo;继续</p><p>图10:<br /><img height="389" src="http://www.renchuan.com/upload/2010/5/201005081058182113.gif" width="503" border="0" alt="" /></p><p>11、点&quot;完成&quot;开始执行。</p><p>图11:<br /><img height="389" src="http://www.renchuan.com/upload/2010/5/201005081058197775.gif" width="503" border="0" alt="" /></p><p>12、正在进行数据导入中</p><p>图12:<br /><img height="380" src="http://www.renchuan.com/upload/2010/5/201005081058191115.gif" width="458" border="0" alt="" /></p><p>13、如果一切正常，提示成功复制如图13，那就大功告成了。</p><p>图13:<br /><img height="121" src="http://www.renchuan.com/upload/2010/5/201005081058205881.gif" width="477" border="0" alt="" /></p><h1 align="center">SQL Server 导入/导出 错误排查</h1><p>如果提示导入失败，出现图14情况，这时不要急着点&quot;完成&quot;关闭窗口。双击中间的&quot;出现错误&quot;会出现详细的失败原因。</p><p>图14:<br /><img height="380" src="http://www.renchuan.com/upload/2010/5/201005081058201622.gif" width="458" border="0" alt="" /></p><p><strong>错误原因一、没安装SP3补丁</strong></p><p>如果是出现如图15的报错原因，那么就很有可能是因为您本机的SQL Server还没有打SP3补丁。</p><p>图15:<br /><img height="131" src="http://www.renchuan.com/upload/2010/5/201005081058206807.gif" width="573" border="0" alt="" /></p><p>如何查看是否已打了SP3补丁呢？右键点击本地SQL Server属性，弹出图16窗口，查看&quot;产品版本&quot;一行。<br />像以下图显示8.00.760(SP3)说明已经打过补丁。如果您的企业管理器显示的版本要比这个小，那就是没打SP3补丁。<br />请安装SQL Server SP3补丁后再重试。</p><p>图16:<br /><img height="534" src="http://www.renchuan.com/upload/2010/5/201005081058216288.gif" width="404" border="0" alt="" /></p><p><strong>错误原因二、对象属性冲突</strong></p><p>如果出现图17情况，那么应该就是您本地数据库的表/视图/存储过程的属主和服务器上<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081058213013.gif" border="0" /></p><p>图18:<strong><br /></strong><img height="261" src="http://www.renchuan.com/upload/2010/5/201005081058217845.gif" width="566" border="1" alt="" /></p><p>解决方法是：<br />应该先把本地的所有表/视图/存储过程属主都改为dbo或testdb_f(后者需要在本地创建起相应用户。<br />建议创建，否则以后想从服务器上导出数据时同样会因为这个问题导出错误)，再重新进行导入/导出。</p><p>打开SQL查询分析器，运行以下命令进行批量修改表属主为dbo:</p><p><table style="border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; width: 296px; border-bottom: #cccccc 1px dotted; height: 55px" cellspacing="0" cellpadding="6" width="296" align="center" border="0">    <tbody>        <tr>            <td style="word-wrap: break-word" bgcolor="#fdfddf"><font style="font-weight: bold; color: #990000">以下是代码片段：</font><br />            exec sp_MSForEachTable 'sp_changeobjectowner &quot;?&quot;, &quot;dbo&quot;'</td>        </tr>    </tbody></table></p><p>运行成功后表属主会改变成如图19:</p><p>图19:<br /><img height="262" src="http://www.renchuan.com/upload/2010/5/201005081058221127.gif" width="558" border="1" alt="" /></p><p>如果需要修改视图/存储过程，则麻烦了点。<br />下面有个方法可以实现：</p><p>一、先在master创建一个sp_MSforeachObject存储过程，命令如下：</p><p><table style="border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; width: 448px; border-bottom: #cccccc 1px dotted; height: 933px" cellspacing="0" cellpadding="6" width="448" align="center" border="0">    <tbody>        <tr>            <td style="word-wrap: break-word" bgcolor="#fdfddf"><font style="font-weight: bold; color: #990000">以下是代码片段：</font><br />            USE MASTER<br />            GO<br />            CREATE proc sp_MSforeachObject<br />            @objectType int=1,<br />            @command1 nvarchar(2000), <br />            @replacechar nchar(1) = N'?', <br />            @command2 nvarchar(2000) = null,<br />            &nbsp;&nbsp;&nbsp;&nbsp;@command3 nvarchar(2000) = null, <br />            @whereand nvarchar(2000) = null,<br />            @precommand nvarchar(2000) = null, <br />            @postcommand nvarchar(2000) = null<br />            as<br />            /* This proc returns one or more rows for each table (optionally, matching @where), with each table defaulting to its <br />            own result set */<br />            /* @precommand and @postcommand may be used to force a single result set via a temp table. */<br />            /* Preprocessor won't replace within quotes so have to use str(). */<br />            declare @mscat nvarchar(12)<br />            select @mscat = ltrim(str(convert(int, 0x0002)))<br />            if (@precommand is not null)<br />            &nbsp;&nbsp;exec(@precommand)<br />            /* Defined&nbsp;&nbsp;@isobject for save object type */<br />            Declare @isobject varchar(256)<br />            select @isobject= case @objectType when 1 then 'IsUserTable'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 2 then 'IsView'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 3 then 'IsTrigger'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 4 then 'IsProcedure' <br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 5 then 'IsDefault'&nbsp;&nbsp; <br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 6 then 'IsForeignKey'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 7 then 'IsScalarFunction'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 8 then 'IsInlineFunction'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 9 then 'IsPrimaryKey'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 10 then 'IsExtendedProc'&nbsp;&nbsp;&nbsp;&nbsp;<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 11 then 'IsReplProc'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 12 then 'IsRule'<br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />            /* Create the select */<br />            /* Use @isobject variable isstead of IsUserTable string */<br />            EXEC(N'declare hCForEach cursor global for select ''['' + REPLACE(user_name(uid), N'']'', N'']]'') + '']'' + ''.'' + ''['' + <br />            REPLACE(object_name(id), N'']'', N'']]'') + '']'' from dbo.sysobjects o '<br />            + N' where OBJECTPROPERTY(o.id, N'''+@isobject+''') = 1 '+N' and o.category &amp; ' + @mscat + N' = 0 '<br />            + @whereand)<br />            declare @retval int<br />            select @retval = @@error<br />            if (@retval = 0)<br />            exec @retval = sp_MSforeach_worker @command1, @replacechar, @command2, @command3<br />            if (@retval = 0 and @postcommand is not null)<br />            exec(@postcommand)<br />            return @retval<br />            GO</td>        </tr>    </tbody></table></p><p>二、再运行以下命令批量修改表、触发器、视图、存储过程的属主(需要先在master创建sp_MSforeachObject存储过程)</p><p><table style="border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; width: 432px; border-bottom: #cccccc 1px dotted; height: 104px" cellspacing="0" cellpadding="6" width="432" align="center" border="0">    <tbody>        <tr>            <td style="word-wrap: break-word" bgcolor="#fdfddf"><font style="font-weight: bold; color: #990000">以下是代码片段：</font><br />            EXEc sp_MSforeachObject @command1=&quot;sp_changeobjectowner '?', 'dbo'&quot;,@objectType=1<br />            EXEc sp_MSforeachObject @command1=&quot;sp_changeobjectowner '?', 'dbo'&quot;,@objectType=2<br />            EXEc sp_MSforeachObject @command1=&quot;sp_changeobjectowner '?', 'dbo'&quot;,@objectType=3<br />            EXEc sp_MSforeachObject @command1=&quot;sp_changeobjectowner '?', 'dbo'&quot;,@objectType=4</td>        </tr>    </tbody></table></p><p>此时再重新进行导入应该就能一切顺利了。</p>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/58.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=58</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=58&amp;key=bd673ee9</trackback:ping></item><item><title>SQL2000自动备份操作方法</title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/57.html</link><pubDate>Sat, 08 May 2010 10:52:30 +0800</pubDate><guid>http://www.renchuan.com/post/57.html</guid><description><![CDATA[<p>首先，我们远程登陆服务器，先开启&quot;SQLSERVERAGENT&quot;服务，点击开始---程序---管理工具---服务，并在&ldquo;服务&rdquo;中开启</p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054183242.gif" target="_blank"><img onmousewheel="return bbimg(this)" style="filter: ; width: 570px; height: 410px" alt="" hspace="0" src="http://www.renchuan.com/upload/2010/5/201005081054183242.gif" onload="javascript:resizepic(this)" border="0" />&nbsp;</a></p><p>同时将&quot;SQLSERVERAGENT&quot;服务设置为自动启动</p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054181725.gif" target="_blank"><img onmousewheel="return bbimg(this)" style="filter: ; width: 570px; height: 420px" alt="" hspace="0" src="http://www.renchuan.com/upload/2010/5/201005081054181725.gif" onload="javascript:resizepic(this)" border="0" />&nbsp;</a></p><p>并启动&quot;SQLSERVERAGENT&quot;服务</p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054195677.gif" target="_blank"><img onmousewheel="return bbimg(this)" style="filter: ; width: 570px; height: 400px" alt="" hspace="0" src="http://www.renchuan.com/upload/2010/5/201005081054195677.gif" onload="javascript:resizepic(this)" border="0" />&nbsp;</a></p><p>然后打开SQL2000企业管理器，点击开始---程序---Microsoft SQL Server---企业管理器，并右键点击&ldquo;<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081054197772.gif" target="_blank"><img onmousewheel="return bbimg(this)" style="filter: ; width: 570px; height: 430px" alt="" hspace="0" src="http://www.renchuan.com/upload/2010/5/201005081054193777.gif" onload="javascript:resizepic(this)" border="0" />&nbsp;</a></p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054197046.gif" target="_blank"><img onmousewheel="return bbimg(this)" height="382" src="http://www.renchuan.com/upload/2010/5/201005081054197046.gif" width="496" onload="javascript:resizepic(this)" border="0" alt="" />&nbsp;</a></p><p>勾选您需要维护的<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081054190078.gif" target="_blank"><img onmousewheel="return bbimg(this)" height="382" src="http://www.renchuan.com/upload/2010/5/201005081054190117.gif" width="497" onload="javascript:resizepic(this)" border="0" alt="" />&nbsp;</a></p><p>之后始终按照默认选项到&ldquo;指定<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081054205522.gif" target="_blank"><img onmousewheel="return bbimg(this)" height="381" src="http://www.renchuan.com/upload/2010/5/201005081054201868.gif" width="498" onload="javascript:resizepic(this)" border="0" alt="" />&nbsp;</a></p><p>再下一步中建议您勾选&ldquo;删除早于此时间的文件&rdquo;，在以下对话框中您可以将&ldquo;要存储备份文件的目录&rdquo;勾选&quot;使用此目录&quot;修改到E盘中</p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054202082.gif" target="_blank"><img onmousewheel="return bbimg(this)" height="383" src="http://www.renchuan.com/upload/2010/5/201005081054202082.gif" width="498" onload="javascript:resizepic(this)" border="0" alt="" />&nbsp;</a></p><p>之后始终按照默认选项到&ldquo;维护计划创建成功&rdquo;</p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054206248.gif" target="_blank"><img onmousewheel="return bbimg(this)" height="383" src="http://www.renchuan.com/upload/2010/5/201005081054206248.gif" width="498" onload="javascript:resizepic(this)" border="0" alt="" />&nbsp;</a></p><p>确定后即可在企业管理器中查看到新建立的维护计划</p><p><a href="http://www.renchuan.com/upload/2010/5/201005081054203570.gif" target="_blank"><img onmousewheel="return bbimg(this)" style="filter: ; width: 570px; height: 310px" alt="" hspace="0" src="http://www.renchuan.com/upload/2010/5/201005081054203570.gif" onload="javascript:resizepic(this)" border="0" />&nbsp;</a></p><p>如果您今后需要对该技术任务进行调整，您可以在&ldquo;<a class="channel_keylink" href="http://www.renchuan.com/upload/2010/5/201005081054203126.gif" target="_blank"><img onmousewheel="return bbimg(this)" height="450" src="http://www.renchuan.com/upload/2010/5/201005081054200107.gif" width="494" onload="javascript:resizepic(this)" border="0" alt="" />&nbsp;</a></p><p>这样就完成了SQL2000对自动备份功能。</p>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/57.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=57</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=57&amp;key=efa49711</trackback:ping></item><item><title>如何远程连接SQL Server数据库 </title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/56.html</link><pubDate>Sat, 08 May 2010 10:44:05 +0800</pubDate><guid>http://www.renchuan.com/post/56.html</guid><description><![CDATA[<p><table class="outertable" style="width: 509px; height: 2802px" width="509" border="0">    <tbody>        <tr>            <td align="center"><font class="bigtext" color="#000033"><b><font color="#333399">如何远程连接SQL Server数据库</font></b></font></td>        </tr>        <tr>            <td><font class="bigtext" color="#000033"><b><font color="#000066">一.设置客户端网络实用工具</font></b></font></td>        </tr>        <tr>            <td>            <ul>                <li>点击&ldquo;开始&rdquo;－&ldquo;程序&rdquo;，在&ldquo;Microsoft SQL Server&rdquo;菜单中选择&ldquo;客户端网络实用工具&rdquo;。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="180" src="http://www.renchuan.com/upload/2010/5/201005081045167714.jpg" width="188" alt="" /></td>        </tr>        <tr>            <td>            <ul>                <li>在&ldquo;别名&rdquo;选项中点击&ldquo;添加&rdquo;。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="392" src="http://www.renchuan.com/upload/2010/5/201005081045160673.jpg" width="554" alt="" /></td>        </tr>        <tr>            <td>            <ul>                <li>在&ldquo;服务器别名&rdquo;中，填入您网站域名，在&ldquo;网络库&rdquo;区域中点击&ldquo;TCP/IP&rdquo;,在&ldquo;连接参数&rdquo;区域取消&ldquo;动态决定端口&rdquo;，指定&ldquo;端口号&rdquo;为2433。填写完毕后，点击&ldquo;确定&rdquo;按钮保存配置。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="264" src="http://www.renchuan.com/upload/2010/5/201005081045166655.jpg" width="590" alt="" /></td>        </tr>        <tr>            <td><b><font class="bigtext" color="#000066">二.企业管理器的使用</font></b></td>        </tr>        <tr>            <td>            <ul>                <li>点击&ldquo;开始&rdquo;－&ldquo;程序&rdquo;，在&ldquo;Microsoft SQL Server&rdquo;菜单中打开&ldquo;企业管理器&rdquo;。在企业管理器中，右键单击&ldquo;SQL Server组&rdquo;，选择&ldquo;新建SQL Server注册&rdquo;。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="233" src="http://www.renchuan.com/upload/2010/5/201005081045166288.jpg" width="352" alt="" /></td>        </tr>        <tr>            <td>            <ul>                <li>此时会出现SQL Server属性窗口，在&ldquo;服务器&rdquo;中填入您网站的域名，选择&ldquo;使用SQL Server身份验证&rdquo;，&ldquo;登录名&rdquo;和&ldquo;密码&rdquo;分别填入主机开通邮件中的用户名和密码，然后点击&ldquo;确定&rdquo;。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="412" src="http://www.renchuan.com/upload/2010/5/201005081045177583.jpg" width="371" alt="" /></td>        </tr>        <tr>            <td>            <ul>                <li>连接成功后，你会看到&ldquo;SQL Server组&rdquo;中多了一个名称为您网站域名的服务器。此时，您就可以像操作本地SQL数据库一样管理网站数据库了。</li>            </ul>            </td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td><font color="#000066"><b class="bigtext">注意事项</b></font></td>        </tr>        <tr>            <td>            <ul>                <li>如果连接的时候出现超时错误，更改超时时间即可，方法是点击&ldquo;工具&rdquo;－&ldquo;选项&rdquo;。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="347" src="http://www.renchuan.com/upload/2010/5/201005081045172425.jpg" width="342" alt="" /></td>        </tr>        <tr>            <td>            <ul>                <li>在属性窗口中选择&ldquo;高级&rdquo;选项卡，将&ldquo;登录超时&rdquo;的数值设置为0。</li>            </ul>            </td>        </tr>        <tr>            <td align="center"><img height="356" src="http://www.renchuan.com/upload/2010/5/201005081045178407.jpg" width="404" alt="" /></td>        </tr>        <tr>            <td align="center">&nbsp;</td>        </tr>        <tr>            <td align="center">（完毕）</td>        </tr>    </tbody></table></p>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/56.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=56</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=56&amp;key=e598a1fc</trackback:ping></item><item><title>SQL Server 2000 企业版图文安装教程</title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/55.html</link><pubDate>Sat, 08 May 2010 10:24:27 +0800</pubDate><guid>http://www.renchuan.com/post/55.html</guid><description><![CDATA[<p>SQL Server 2000是微软公司最新版的大型数据库服务器，其性能指标在各方面都有赶超Oracle数据库的趋势。在经历了SQL Server 6.5和7.0两个版本的尝试后，微软公司终于开始向大规模的业务领域进发了。记得在以前各种关于SQL Server的文章，都会将其定位成中小型应用方面，这种感觉被大家自然的延续到了2000版之中。其实这是一种误解。在过去的很长一段时间中，微软公司凭请了世界上最优秀的数据库专家以及专门搭建了信息量可谓空前的地理信息系统，励精图治，就是为了摘掉扣在自己头上的这顶帽子。有了强大的性能和功能支持，再配合其一向为人称道的易用性，SQL Server可以说成为了开发者手中的一柄利器！ <br />　　另外，目前国内的一些关于微软平台的数据库编程教程，喜欢使用Access作为数据库平台的案例，并展开相关的内容。这其实对于开发真正的数据库应用并没有直接的帮助作用，只能使大家停留在应用的初级阶段。SQL Server 2000提供的非常傻瓜的缺省安装和使用模式，其上手难度并不比Access大。另外，SQL Server 2000可以兼顾小、中、大规模的应用，有着远远比Access强大的伸缩性。因此，建议大家不如一步到位，直接从高起点开始，这对于持续发展个人技能也是很有好处的。<br />　　笔者进行了一段时间基于SQL Server 2000系统的平台应用开发，积累了一定的经验。为了可以将这些经验和大家共享，在未来一段时间将逐步推出与SQL Server密切相关的系列教程。<br />　　嘻嘻，吹了这么多牛皮，也该说说正题了：）。本篇文章介绍了安装SQL Server 2000企业版的软硬件配置要求，安装过程的详细步骤，以及需要注意的事项。<br />　　一、硬件和操作系统要求<br />　　下表说明安装 Microsoft SQL Server 2000 或 SQL Server 客户端管理工具和库的硬件要求。<br />硬件<br />最低要求<br />计算机<br />Pentium 166 MHz 或更高。<br />内存<br />至少 64 MB，建议 128 MB 或更多。根据笔者的经验，内存容量可以和数据容量保持1:1的比例，这样可以更好的发挥其效能。<br />硬盘空间<br />需要约500MB的程序空间，以及预留500M的数据空间。<br />显示器<br />需要设置成800x600模式，才能使用其图形分析工具。<br />SQL Server 版本或组件<br />操作系统要求<br />企业版<br />Microsoft Windows NT Server 4.0、Microsoft Windows NT Server 4.0 企业版、Windows 2000 Server、Windows 2000 Advanced Server 和 Windows 2000 Data Center Server。(所有版本均需要安装IE5.0以上版本浏览器)<br />标准版<br />Microsoft Windows NT Server 4.0、Windows 2000 Server、Microsoft Windows NT Server 企业版、Windows 2000 Advanced Server 和 Windows 2000 Data Center Server。<br />个人版<br />Microsoft Windows Me、Windows 98、Windows NT Workstation 4.0、Windows 2000 Professional、Microsoft Windows NT Server 4.0、Windows 2000 Server 和所有更高级的 Windows 操作系统。<br />　　注：SQL Server 2000 的某些功能要求在Microsoft Windows 2000 Server以上的版本才能运行。因此大家安装Windows Server 2000(建议为Advanced版本)，可以学习和使用到SQL Server 2000的更多功能，以及享受更好的性能。<br />　　二、详细的安装过程<br />　　本文将在Windows 2000 Advanced Server操作系统作为示例，详细介绍安装SQL Server 2000企业版的过程。大家清首先安装Windows 2000 Advanced Server。如果手头上没有SQL Server 2000企业版，可以到微软公司的这个网址下载试用版：<br />upload/2010/5/201005081027218713.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 图1<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027223251.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图2<br />　　选择 &quot;下一步&quot;，然后选择 &quot;本地计算机&quot; 进行安装。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027245777.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图3<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027257706.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图4<br />　　在 &quot;安装选择&quot; 窗口，选择 &quot;创建新的SQL Server实例...&quot;。对于初次安装的用户，应选用这一安装模式，不需要使用 &quot;高级选项&quot; 进行安装。 &quot;高级选项&quot; 中的内容均可在安装完成后进行调整。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027256607.jpg" border="0" /><br />&nbsp;</p><p>在 &quot;用户信息&quot; 窗口，输入用户信息，并接受软件许可证协议。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027266406.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图6<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027267866.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图7<br />　　在 &quot;安装定义&quot;窗口，选择 &quot;服务器和客户端工具&quot; 选项进行安装。我们需要将服务器和客户端同时安装，这样在同一台机器上，我们可以完成相关的所有操作，对于我们学习SQL Server很有用处。如果你已经在其它机器上安装了SQL Server，则可以只安装客户端工具，用于对其它机器上SQL Server的存取。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027273533.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图8<br />　　在 &quot;实例名&quot; 窗口，选择 &quot;默认&quot; 的实例名称。这时本SQL Server的名称将和Windows 2000服务器的名称相同。例如笔者的Windows服务器名称是 &quot;Darkroad&quot;，则SQL Server的名字也是 &quot;Darkroad&quot;。SQL Server 2000可以在同一台服务器上安装多个实例，也就是你可以重复安装几次。这时您就需要选择不同的实例名称了。建议将实例名限制在 10 个字符之内。实例名会出现在各种 SQL Server 和系统工具的用户界面中，因此，名称越短越容易读取。另外，实例名称不能是 &quot;Default&quot; 或 &quot;MSSQLServer&quot; 以及SQL Server的保留关键字等。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027278786.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图9<br />　　在 &quot;安装类型&quot; 窗口，选择 &quot;典型&quot; 安装选项，并指定 &quot;目的文件夹&quot;。程序和数据文件的默认安装位置都是 &quot;C:\Program Files\Microsoft SQL Server\&quot;。笔者因为C盘是系统区、D盘是应用区，因此选择了D盘。注意，如果您的数据库数据有10万条以上的话，请预留至少1G的存储空间，以应付需求庞大的日志空间和索引空间。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027270412.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图10<br />　　在 &quot;服务账号&quot; 窗口，请选择 &quot;对每个服务使用统一账户...&quot; 的选项。在 &quot;服务设置&quot; 处，选择 &quot;使用本地系统账户&quot;。如果需要 &quot;使用域用户账户&quot; 的话，请将该用户添加至Windows Server的本机管理员组中。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027280007.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图11<br />　　在 &quot;身份验证模式&quot; 窗口，请选择 &quot;混合模式...&quot; 选项，并设置管理员&quot;sa&quot;账号的密码。如果您的目的只是为了学习的话，可以将该密码设置为空，以方便登录。如果是真正的应用系统，则千万需要设置和保管好该密码！：）如果需要更高的安全性，则可以选择 &quot;Windows身份验证模式&quot; ，这时就只有Windows Server的本地用户和域用户才能使用SQL Server了。<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027286043.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图12<br />在 &quot;选择许可模式&quot; 窗口，根据您购买的类型和数量输入（0表示没有数量限制）。 &quot;每客户&quot;表示同一时间最多允许的连接数，&quot;处理器许可证&quot;表示该服务器最多能安装多少个CPU。笔者这里选择了 &quot;每客户&quot; 并输入了100作为示例。（嘻嘻，别选得太多，越多越贵呀！：）<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027294534.jpg" border="0" /><br />&nbsp;</p><p>然后就是约10分钟左右的安装时间，安装完毕后，出现该界面，并新增了以下的菜单。如果您是个初学者，就可以先打开 &quot;联机丛书&quot;，做一个简单的学习啦！<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027293845.jpg" border="0" /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;图14<br /><img alt="" src="http://www.renchuan.com/upload/2010/5/201005081027305782.jpg" border="0" /></p>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/55.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=55</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=55&amp;key=04019dbf</trackback:ping></item><item><title>删除MSSQL中的_log.ldf日志文件</title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/49.html</link><pubDate>Fri, 07 May 2010 02:07:49 +0800</pubDate><guid>http://www.renchuan.com/post/49.html</guid><description><![CDATA[删除MSSQL中的_log.ldf日志文件<br/>采用SQL数据库的kingcms用户会发现,网站运行一段时间后数据库_log.ldf日志文件在不断的增大,严重占用数据库空间,^_^ 够郁闷了!其实日志文件只是记录对数据库的每一步操作,对我们来说没有什么用的,通过以下步骤可以删除:<br/>1、进入企业管理器，选中数据库,比如kingcms<br/>2、所有任务->分离数据库<br/>3、到数据库文件的存放目录,将kingcms_log.ldf文件删除，可以先备份!<br/>4、企业管理器->附加数据库,选kingcms,这个时候你会看见日志文件这项是一个叉,不要紧继续,此时数据库就会提示你该数据库无日志是否创建一个新的，确定就是了.<br/>5、记得数据库重新附加后用户要重新设置一下.<br/>以后如果新的日志文件变大了，再继续这个步骤就行了]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/49.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=49</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=49&amp;key=3f0bec58</trackback:ping></item><item><title>无法载入 mysql 扩展,请检查 PHP 配置(不支持MYSQL数据库) (原因及解决方法) </title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/47.html</link><pubDate>Fri, 07 May 2010 02:04:08 +0800</pubDate><guid>http://www.renchuan.com/post/47.html</guid><description><![CDATA[一, 运行phpmyadmin程序提示“无法载入 mysql 扩展，请检查 PHP 配置”的解决方法如下:<br/>答:没有正确安装Mysql数据库，在系统服务中Mysql相关的服务没有启动   （请认真阅读安装Mysql的教程）<br/>       <br/>二, 安装Discuz!论坛时提示“不支持Mysql数据库，无法安装论坛”的解决方法如下:<br/>答:1,在系统的 system32（C:\windows\system32） 目录下缺少libmysql.dll文件，解决方法是找到php目录下的libmysql.dll，并将libmysql.dll复制到C:\windows\system32目录中，然后重新启动Web服务。<br/>2, 在C:\windows目录下的php.ini文件中，没有将“;extension=php_mysql.dll”中的前面一个“;”去掉，所以不能使用相应功能，解决方法是打开php.ini文件找到<br/>;extension=php_mysql.dll<br/>改成<br/>extension=php_mysql.dll    //去掉前面的;使之生效<br/>3, Mysql目录没有读取权限，正确的目录权限如下：<br/>administrator   完全控制<br/>system          完全控制<br/>users           读取和运行+列出文件夹目录+读取<br/>其他的用户权限全部删除，然后重启MYsql服务和Web服务<br/>（注:以上设置无安全设置;建议修改后重启一下服务器）<br/>重要!还要检查php.ini文件的权限,检查复制到system32里面的php文件的权限,检查php安装目录文件夹的权限.至少要有users组默认权限,temp文件夹至少要有users组修改级别权限.<br/>强烈建议在新装的标准版2003系统里面配置!先配置环境安装程序,安装程序成功后再做系统安全设置等!<br/>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/47.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=47</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=47&amp;key=8250ab84</trackback:ping></item><item><title>phpMyAdmin 2.11.X安装攻略 </title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/46.html</link><pubDate>Fri, 07 May 2010 02:03:05 +0800</pubDate><guid>http://www.renchuan.com/post/46.html</guid><description><![CDATA[phpMyAdmin    安装攻略 <br/>        <br/>1、先下载 phpMyAdmin 安装包 ，http://www.phpmyadmin.net/ <br/><a href="http://tele.skycn.com/soft/17470.html  (我们用的这个很正常) "  target="_blank">http://tele.skycn.com/soft/17470.html  (我们用的这个很正常) </a><br/>   <br/>2、解压后一个单独目录中（你可以自定义目录名称） <br/>   <br/>3、找到 /libraries/config.default.php文件(旧版本是根目录下的config.inc.php文件)，用写字板（不要用记事本，这是UTF8编码）进行编辑。 <br/>   <br/>4、查找 $cfg['PmaAbsoluteUri'] <br/>修改为你将上传到空间的phpMyAdmin的网址 <br/>如：$cfg['PmaAbsoluteUri'] = 'http://www.buyes.net/phpmyadmin/'; <br/>   <br/>5、查找 $cfg['Servers'][$i]['host'] = 'localhost';（通常用默认，也有例外，可以不用修改） <br/>   <br/>6、查找 $cfg['Servers'][$i]['auth_type'] = 'config'; <br/>在自己的机子里调试用config；如果在网络上的空间用cookie，这里我们既然在前面已经添加了网址，就修改成cookie ，这里建议使用cookie. <br/>   <br/>7、查找 $cfg['Servers'][$i]['user'] = 'root'; // MySQL user（ 用户名,一般这里随便填几个字母就可以了; 特殊情况下，自己机里用root,在网上一般为你的ftp用户名,虚拟主机提供商会告诉你的,一般不要修改.） <br/>   <br/>8、查找 $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed 留空就可以了)<br/>   <br/>9、查找 $cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only（你只有一个数据就设置一下,设置为你的数据库名；如果你想架设服务器，那么建议留空） <br/>   <br/>10、查找 $cfg['DefaultLang'] = 'zh'; （这里是选择语言，zh代表简体中文的意思） <br/>     <br/>11、查找$cfg['blowfish_secret'],请在$cfg['blowfish_secret'] = ' ';的等号里面设置你网站的cookie(cookie也就是访问phpmyadmin的域名)，例如：$cfg['blowfish_secret'] = 'www.buyes.net';。<br/>      <br/>12、设置完毕后保存，现在可以上传到网络空间上了， 浏览http://www.buyes.net/phpmyadmin/ 测试一下。]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/46.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=46</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=46&amp;key=cd2a4929</trackback:ping></item><item><title>MYSQL备份命令</title><author>a@b.com (admin)</author><link>http://www.renchuan.com/post/43.html</link><pubDate>Fri, 07 May 2010 01:59:53 +0800</pubDate><guid>http://www.renchuan.com/post/43.html</guid><description><![CDATA[总结：<br/><br/>导入：mysql -u root -p 导入的库名 < xxx.sql文件<br/><br/>导出：mysqldump -uroot -p --default-character-set=latin1 数据库名>back.sql<br/><br/>mysqldump -u liufangxin -p --default-character-set=latin1 qb>qbback.sql<br/>]]></description><category>数据库知识</category><comments>http://www.renchuan.com/post/43.html#comment</comments><wfw:comment>http://www.renchuan.com/</wfw:comment><wfw:commentRss>http://www.renchuan.com/feed.asp?cmt=43</wfw:commentRss><trackback:ping>http://www.renchuan.com/cmd.asp?act=tb&amp;id=43&amp;key=d5019800</trackback:ping></item></channel></rss>
