<?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>SQL &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Wed, 24 Oct 2012 15:55:10 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Mysql一些细节性的优化</title>
		<link>https://www.mudbest.com/mysql%e4%b8%80%e4%ba%9b%e7%bb%86%e8%8a%82%e6%80%a7%e7%9a%84%e4%bc%98%e5%8c%96/</link>
		
		<dc:creator><![CDATA[hkshadow]]></dc:creator>
		<pubDate>Fri, 19 Oct 2012 06:15:48 +0000</pubDate>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[优化]]></category>
		<category><![CDATA[最优]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=1586</guid>

					<description><![CDATA[1、对查询进行优化，应尽量避免全表扫描，首先应考虑在 where 及 order by 涉及的列上建立索引。  ... <a title="Mysql一些细节性的优化" class="read-more" href="https://www.mudbest.com/mysql%e4%b8%80%e4%ba%9b%e7%bb%86%e8%8a%82%e6%80%a7%e7%9a%84%e4%bc%98%e5%8c%96/" aria-label="阅读 Mysql一些细节性的优化">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>1、对查询进行优化，应尽量避免全表扫描，首先应考虑在 where 及 order by 涉及的列上建立索引。</p>
<p>2、应尽量避免在 where 子句中对字段进行 null 值判断，否则将导致引擎放弃使用索引而进行全表扫描，如：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num is null
</pre>
<p>可以在num上设置默认值0，确保表中num列没有null值，然后这样查询：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num=0
</pre>
<p>3、应尽量避免在 where 子句中使用!=或<>操作符，否则<span id="more-1586"></span>将引擎放弃使用索引而进行全表扫描。</p>
<p>4、应尽量避免在 where 子句中使用 or 来连接条件，否则将导致引擎放弃使用索引而进行全表扫描，如：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num=10 or num=20
</pre>
<p>可以这样查询：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num=10
union all
select id from t where num=20
</pre>
<p>5、in 和 not in 也要慎用，否则会导致全表扫描，如：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num in(1,2,3)
</pre>
<p>对于连续的数值，能用 between 就不要用 in 了：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num between 1 and 3
</pre>
<p>6、下面的查询也将导致全表扫描：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where name like '%abc%'
</pre>
<p>若要提高效率，可以考虑全文检索。</p>
<p>7、如果在 where 子句中使用参数，也会导致全表扫描。因为SQL只有在运行时才会解析局部变量，但优化程序不能将访问计划的选择推迟到运行时；它必须在编译时进行选择。然而，如果在编译时建立访问计划，变量的值还是未知的，因而无法作为索引选择的输入项。如下面语句将进行全表扫描：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num=@num 
#&lt;mailto:num=@num&gt;
</pre>
<p>可以改为强制查询使用索引：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t with(index(索引名)) where num=@num 
#&lt;mailto:num=@num&gt;
</pre>
<p>8、应尽量避免在 where 子句中对字段进行表达式操作，这将导致引擎放弃使用索引而进行全表扫描。如：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num/2=100
</pre>
<p>应改为:</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where num=100*2
</pre>
<p>9、应尽量避免在where子句中对字段进行函数操作，这将导致引擎放弃使用索引而进行全表扫描。如：</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where substring(name,1,3)='abc'
#-name以abc开头的id
select id from t where datediff(day,createdate,'2005-11-30') = 0 
#-'005-11-30'生成的id
</pre>
<p>应改为:</p>
<pre class="brush: sql; title: ; notranslate">
select id from t where name like 'abc%'
select id from t where createdate &gt;= '2005-11-30' and createdate &lt; '2005-12-1'
</pre>
<p>10、不要在 where 子句中的“=”左边进行函数、算术运算或其他表达式运算，否则系统将可能无法正确使用索引。</p>
<p>11、在使用索引字段作为条件时，如果该索引是复合索引，那么必须使用到该索引中的第一个字段作为条件时才能保证系统使用该索引，否则该索引将不会被使用，并且应尽可能的让字段顺序与索引顺序相一致。</p>
<p>12、不要写一些没有意义的查询，如需要生成一个空表结构：</p>
<pre class="brush: sql; title: ; notranslate">
select col1,col2 into #t from t where 1=0
</pre>
<p>这类代码不会返回任何结果集，但是会消耗系统资源的，应改成这样：</p>
<pre class="brush: sql; title: ; notranslate">
create table #t(…)
</pre>
<p>13、很多时候用 exists 代替 in 是一个好的选择：</p>
<pre class="brush: sql; title: ; notranslate">
select num from a where num in(select num from b)
</pre>
<p>用下面的语句替换：</p>
<pre class="brush: sql; title: ; notranslate">
select num from a where exists(select 1 from b where num=a.num)
</pre>
<p>14、并不是所有索引对查询都有效，SQL是根据表中数据来进行查询优化的，当索引列有大量数据重复时，SQL查询可能不会去利用索引，如一表中有字段sex，male、female几乎各一半，那么即使在sex上建了索引也对查询效率起不了作用。</p>
<p>15、索引并不是越多越好，索引固然可以提高相应的 select 的效率，但同时也降低了 insert 及 update 的效率，因为 insert 或 update 时有可能会重建索引，所以怎样建索引需要慎重考虑，视具体情况而定。一个表的索引数最好不要超过6个，若太多则应考虑一些不常使用到的列上建的索引是否有必要。</p>
<p>16、应尽可能的避免更新 clustered 索引数据列，因为 clustered 索引数据列的顺序就是表记录的物理存储顺序，一旦该列值改变将导致整个表记录的顺序的调整，会耗费相当大的资源。若应用系统需要频繁更新 clustered 索引数据列，那么需要考虑是否应将该索引建为 clustered 索引。</p>
<p>17、尽量使用数字型字段，若只含数值信息的字段尽量不要设计为字符型，这会降低查询和连接的性能，并会增加存储开销。这是因为引擎在处理查询和连接时会逐个比较字符串中每一个字符，而对于数字型而言只需要比较一次就够了。</p>
<p>18、尽可能的使用 varchar/nvarchar 代替 char/nchar ，因为首先变长字段存储空间小，可以节省存储空间，其次对于查询来说，在一个相对较小的字段内搜索效率显然要高些。</p>
<p>19、任何地方都不要使用 select * from t ，用具体的字段列表代替“*”，不要返回用不到的任何字段。</p>
<p>20、尽量使用表变量来代替临时表。如果表变量包含大量数据，请注意索引非常有限（只有主键索引）。</p>
<p>21、避免频繁创建和删除临时表，以减少系统表资源的消耗。</p>
<p>22、临时表并不是不可使用，适当地使用它们可以使某些例程更有效，例如，当需要重复引用大型表或常用表中的某个数据集时。但是，对于一次性事件，最好使用导出表。</p>
<p>23、在新建临时表时，如果一次性插入数据量很大，那么可以使用 select into 代替 create table，避免造成大量 log ，以提高速度；如果数据量不大，为了缓和系统表的资源，应先create table，然后insert。</p>
<p>24、如果使用到了临时表，在存储过程的最后务必将所有的临时表显式删除，先 truncate table ，然后 drop table ，这样可以避免系统表的较长时间锁定。</p>
<p>25、尽量避免使用游标，因为游标的效率较差，如果游标操作的数据超过1万行，那么就应该考虑改写。</p>
<p>26、使用基于游标的方法或临时表方法之前，应先寻找基于集的解决方案来解决问题，基于集的方法通常更有效。</p>
<p>27、与临时表一样，游标并不是不可使用。对小型数据集使用 FAST_FORWARD 游标通常要优于其他逐行处理方法，尤其是在必须引用几个表才能获得所需的数据时。在结果集中包括“合计”的例程通常要比使用游标执行的速度快。如果开发时间允许，基于游标的方法和基于集的方法都可以尝试一下，看哪一种方法的效果更好。</p>
<p>28、在所有的存储过程和触发器的开始处设置 SET NOCOUNT ON ，在结束时设置 SET NOCOUNT OFF 。无需在执行存储过程和触发器的每个语句后向客户端发送 DONE_IN_PROC 消息。</p>
<p>29、尽量避免大事务操作，提高系统并发能力。</p>
<p>30、尽量避免向客户端返回大数据量，若数据量过大，应该考虑相应需求是否合理。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>手动删除SQL Server2005</title>
		<link>https://www.mudbest.com/%e6%89%8b%e5%8a%a8%e5%88%a0%e9%99%a4sql-server2005/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 28 Jul 2010 18:44:11 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">http://blog.mudbest.com/?p=234</guid>

					<description><![CDATA[1、Stop 所有服务 2、用 Windows Install Clean Up 工具卸载SQL 2005组件 ... <a title="手动删除SQL Server2005" class="read-more" href="https://www.mudbest.com/%e6%89%8b%e5%8a%a8%e5%88%a0%e9%99%a4sql-server2005/" aria-label="阅读 手动删除SQL Server2005">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>1、Stop 所有服务</p>
<p><a rel="attachment wp-att-235" href="http://www.mudbest.com/234.action/v1"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-235" title="v1" src="http://www.mudbest.com/wp-content/uploads/2010/07/v1.jpg" alt="" width="500" height="148" /></a></p>
<p>2、用 Windows Install Clean Up 工具卸载S<span id="more-234"></span>QL 2005组件</p>
<p><a rel="attachment wp-att-236" href="http://www.mudbest.com/234.action/v2"><img decoding="async" class="alignnone size-full wp-image-236" title="v2" src="http://www.mudbest.com/wp-content/uploads/2010/07/v2.jpg" alt="" width="394" height="391" /></a></p>
<p>3、用 SrvInstw.exe 删除所有SQL服务</p>
<p><a rel="attachment wp-att-237" href="http://www.mudbest.com/234.action/v3"><img decoding="async" class="alignnone size-full wp-image-237" title="v3" src="http://www.mudbest.com/wp-content/uploads/2010/07/v3.jpg" alt="" width="445" height="304" /></a></p>
<p>4、清除注册表</p>
<p>　　a. 将HKEY_CURRENT_USER——Software——Microsoft下的Microsoft SQL Server文件夹全部删除<br />
　　b. 将HKEY_LOCAL_MACHINE——SOFTWARE——Microsoft下的Microsoft SQL Native Client，Microsoft SQL Server，Microsoft SQL Server 2005 Redist全部删除。</p>
<p>　</p>
<p>5、删除残留文件</p>
<p>　　将C盘——Program File下的 Microsoft SQL Server 文件夹删除。</p>
<p>　</p>
<p>6、重启电脑，重新安装，OK。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Microsoft SQL Server数据导入导出与简单的运用</title>
		<link>https://www.mudbest.com/ms-sql-server%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%af%bc%e5%87%ba%e4%b8%8e%e7%ae%80%e5%8d%95%e7%9a%84%e8%bf%90%e7%94%a8/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 28 Jul 2010 15:56:12 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">http://blog.mudbest.com/?p=215</guid>

					<description><![CDATA[本地的MS SQL Server数据导入到远程服务器上，供客户的网站使用。 首先登录到远程数据库服务器： 其实 ... <a title="Microsoft SQL Server数据导入导出与简单的运用" class="read-more" href="https://www.mudbest.com/ms-sql-server%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%af%bc%e5%87%ba%e4%b8%8e%e7%ae%80%e5%8d%95%e7%9a%84%e8%bf%90%e7%94%a8/" aria-label="阅读 Microsoft SQL Server数据导入导出与简单的运用">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>本地的MS SQL Server数据导入到远程服务器上，供客户的网站使用。<br />
首先登录到远程数据库服务器：</p>
<p>其实用这样的方法，可以实现几个站的SQL的数据同步更新与维护，一系的操作都可以利用这样的方法完成，以下只是简单的利用了一下点对点的导<span id="more-215"></span>入与导出。<br />
1.右击您准备导入数据的数据库，选择“所有任务”下的“导入数据”</p>
<p><a rel="attachment wp-att-216" href="http://www.mudbest.com/215.action/q1"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-216" title="q1" src="http://www.mudbest.com/wp-content/uploads/2010/07/q1-367x430.gif" alt="" width="367" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/q1-367x430.gif 367w, https://www.mudbest.com/wp-content/uploads/2010/07/q1.gif 474w" sizes="auto, (max-width: 367px) 100vw, 367px" /></a></p>
<p>2.进入DTS导入/导出向导，点击“下一步”按钮继续</p>
<p><a rel="attachment wp-att-217" href="http://www.mudbest.com/215.action/q2"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-217" title="q2" src="http://www.mudbest.com/wp-content/uploads/2010/07/q2.gif" alt="" width="503" height="382" /></a></p>
<p>3.选择数据源，输入数据源所在的数据库服务器名称、用户名、密码和要复制数据的源数据库，点击“下一步”按钮</p>
<p><a rel="attachment wp-att-218" href="http://www.mudbest.com/215.action/q3"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-218" title="q3" src="http://www.mudbest.com/wp-content/uploads/2010/07/q3.gif" alt="" width="502" height="382" /></a></p>
<p>4.选择目的，输入目的数据库所在的数据库服务器名称、用户名、密码和要复制数据的目的数据库，点击“下一步”按钮</p>
<p><a rel="attachment wp-att-219" href="http://www.mudbest.com/215.action/q4"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-219" title="q4" src="http://www.mudbest.com/wp-content/uploads/2010/07/q4.gif" alt="" width="502" height="382" /></a></p>
<p>5.选择“在SQL Server数据库之间复制对象和数据”方式，点“下一步”继续</p>
<p><a rel="attachment wp-att-220" href="http://www.mudbest.com/215.action/q5"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-220" title="q5" src="http://www.mudbest.com/wp-content/uploads/2010/07/q5.gif" alt="" width="503" height="382" /></a></p>
<p>6.取消安全措施选项</p>
<p><a rel="attachment wp-att-221" href="http://www.mudbest.com/215.action/q6"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-221" title="q6" src="http://www.mudbest.com/wp-content/uploads/2010/07/q6.gif" alt="" width="503" height="382" /></a></p>
<p><a rel="attachment wp-att-222" href="http://www.mudbest.com/215.action/q7"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-222" title="q7" src="http://www.mudbest.com/wp-content/uploads/2010/07/q7.gif" alt="" width="503" height="382" /></a></p>
<p><a rel="attachment wp-att-223" href="http://www.mudbest.com/215.action/q8"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-223" title="q8" src="http://www.mudbest.com/wp-content/uploads/2010/07/q8.gif" alt="" width="503" height="382" /></a></p>
<p>7.设定调度方式，一般选“立即运行”就可以，然后点“下一步”继续</p>
<p><a rel="attachment wp-att-224" href="http://www.mudbest.com/215.action/q9"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-224" title="q9" src="http://www.mudbest.com/wp-content/uploads/2010/07/q9.gif" alt="" width="502" height="382" /></a></p>
<p>8.点“完成”执行</p>
<p><a rel="attachment wp-att-225" href="http://www.mudbest.com/215.action/q10"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-225" title="q10" src="http://www.mudbest.com/wp-content/uploads/2010/07/q10.gif" alt="" width="503" height="382" /></a></p>
<p>9.数据导入完成</p>
<p><a rel="attachment wp-att-226" href="http://www.mudbest.com/215.action/q11"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-226" title="q11" src="http://www.mudbest.com/wp-content/uploads/2010/07/q11.gif" alt="" width="503" height="382" /></a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2005与2000之间的数据转换</title>
		<link>https://www.mudbest.com/sql-server-2005%e4%b8%8e2000%e4%b9%8b%e9%97%b4%e7%9a%84%e6%95%b0%e6%8d%ae%e8%bd%ac%e6%8d%a2/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 28 Jul 2010 11:12:24 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">http://blog.mudbest.com/?p=198</guid>

					<description><![CDATA[2005不论是性能还是安全性都是SQL SERVER2000有所增强，现有不少企业在使用2005，或是有的用户 ... <a title="SQL Server 2005与2000之间的数据转换" class="read-more" href="https://www.mudbest.com/sql-server-2005%e4%b8%8e2000%e4%b9%8b%e9%97%b4%e7%9a%84%e6%95%b0%e6%8d%ae%e8%bd%ac%e6%8d%a2/" aria-label="阅读 SQL Server 2005与2000之间的数据转换">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>2005不论是性能还是安全性都是SQL SERVER2000有所增强，现有不少企业在使用2005，或是有的用户是2000与2005同时使用，那么这中间就涉及到双数据的转换问题：</p>
<p>今天我们就来看一下相关的实现<span id="more-198"></span>方法：</p>
<p><a rel="attachment wp-att-199" href="http://www.mudbest.com/198.action/a1"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-199" title="a1" src="http://www.mudbest.com/wp-content/uploads/2010/07/a1.jpg" alt="" width="547" height="379" /></a></p>
<p>方法一： 使用分离与附加   该方法适合于将SQL Server 2000中的数据转换到SQL Server2005 ，但反之不行。</p>
<p> 例如：现在将SQL SERVER2000中的DUFEI数据库通过分离与附加的方法导入到SQL  SERVER 2005中：</p>
<p>步骤1： 在 2000机器上运行：</p>
<p><code>USE master;GO</code></p>
<p>EXEC sp_detach_db @dbname = N&#8217;dufei&#8217;;GO</p>
<p>步骤2：将分离再来的MDF及LDF文件复制到 2005机器上：</p>
<p><a rel="attachment wp-att-200" href="http://www.mudbest.com/198.action/a2"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-200" title="a2" src="http://www.mudbest.com/wp-content/uploads/2010/07/a2.jpg" alt="" width="399" height="248" /></a></p>
<p>步骤3：在2005机器上执行以下命令：将复制的文件附加到数据库中即可：</p>
<p><code>USE master;Go</code><br />
此时：导入成功！</p>
<p>EXEC sp_attach_db @dbname = N&#8217;dufei&#8217;,</p>
<p>@filename1 = N&#8217;c:\dufei_data.mdf&#8217;,</p>
<p>@filename2 = N&#8217;c:\dufei_log.ldf&#8217;; GO</p>
<p>方法二：利用备份与还原：</p>
<p>实例：现将2000中的DB1数据库备份后，利用还原的方法导入到2005中：</p>
<p>步骤1：在SQL2000中执行：</p>
<p><code>backup database DB1 to disk='c:\DB1.BAK'</code></p>
<p>步骤2：将备份文件复制到 SQL 2005的机器上：将生成的DB1.BAK复制到对方机器上：</p>
<p><a rel="attachment wp-att-201" href="http://www.mudbest.com/198.action/a3"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-201" title="a3" src="http://www.mudbest.com/wp-content/uploads/2010/07/a3.jpg" alt="" width="394" height="340" /></a></p>
<p>步骤3： 在SQL 2005的机器上执行：</p>
<p>      restore database db1 from disk=&#8217;c:\db1.bak&#8217;  </p>
<p><a rel="attachment wp-att-202" href="http://www.mudbest.com/198.action/a4"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-202" title="a4" src="http://www.mudbest.com/wp-content/uploads/2010/07/a4.jpg" alt="" width="396" height="131" /></a></p>
<p>因为路径问题,所以默认情况下不会成功:也就是说如果使用RESTORE的默认语法,是不行的:</p>
<p>因此,我们要对路径进行修改:</p>
<p><code>RESTORE DATABASE db1 FROM DISK = 'C:\db1.bak' WITH FILE = 1, MOVE N'db1_Data' TO N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\db1.MDF', MOVE N'db1_Log' TO N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\db1_1.LDF'</code></p>
<p>则还原成功!</p>
<p>  但如果是将2005中的数据使用此方法导到2000则会报错：</p>
<p>为备份或还原操作指定的设备太多；只允许指定 64 个设备。</p>
<p>服务器: 消息 3013，级别 16，状态 1，行 1</p>
<p>RESTORE DATABASE 操作异常终止。</p>
<p>所以两种方法都不能实现将SQL SERVER 2005的数据导到 SQL SERVER 2000中，除非使用下面的两种方法：</p>
<p>方法三：导入导出：</p>
<p>           实例：将 2005中的数据库DUFEI导出到SQL 2000中</p>
<p>步骤1：</p>
<p><a rel="attachment wp-att-203" href="http://www.mudbest.com/198.action/a5"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-203" title="a5" src="http://www.mudbest.com/wp-content/uploads/2010/07/a5-487x430.jpg" alt="" width="487" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/a5-487x430.jpg 487w, https://www.mudbest.com/wp-content/uploads/2010/07/a5.jpg 545w" sizes="auto, (max-width: 487px) 100vw, 487px" /></a></p>
<p>成功！</p>
<p>反之从 SQL2000导到SQL 2005也是一样的：例如将PUBS导到2005中</p>
<p><a rel="attachment wp-att-204" href="http://www.mudbest.com/198.action/a6"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-204" title="a6" src="http://www.mudbest.com/wp-content/uploads/2010/07/a6-416x430.jpg" alt="" width="416" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/a6-416x430.jpg 416w, https://www.mudbest.com/wp-content/uploads/2010/07/a6.jpg 515w" sizes="auto, (max-width: 416px) 100vw, 416px" /></a></p>
<p><a rel="attachment wp-att-205" href="http://www.mudbest.com/198.action/a7"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-205" title="a7" src="http://www.mudbest.com/wp-content/uploads/2010/07/a7.jpg" alt="" width="533" height="277" /></a></p>
<p><a rel="attachment wp-att-206" href="http://www.mudbest.com/198.action/a8"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-206" title="a8" src="http://www.mudbest.com/wp-content/uploads/2010/07/a8.jpg" alt="" width="354" height="290" /></a></p>
<p>方法四：使用脚本： 个人不推荐使用此方法，因为在此过程中依然要使用数据的导入/导出来转换数据，也就是说使用脚本不能让记录也一起导入到对方的数据库中，仍然要借助其他方法！如果数据库中对象较多,如触发器,存储过程等,可以考虑使用脚本和数据的导入\导出相结合.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Microsoft SQL 2005的安装</title>
		<link>https://www.mudbest.com/microsoft-sql-2005%e7%9a%84%e5%ae%89%e8%a3%85/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 28 Jul 2010 09:19:56 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">http://blog.mudbest.com/?p=175</guid>

					<description><![CDATA[注意：安装的是Microsoft SQL 2005开发版本 1.打开安装文件，选择相应的操作系统，图示为Xp系 ... <a title="Microsoft SQL 2005的安装" class="read-more" href="https://www.mudbest.com/microsoft-sql-2005%e7%9a%84%e5%ae%89%e8%a3%85/" aria-label="阅读 Microsoft SQL 2005的安装">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>注意：安装的是Microsoft SQL 2005开发版本</p>
<p>1.打开安装文件，选择相应的操作系统，图示为Xp系统，在下图中点 &#8220;基于X86的操作系统(<span id="more-175"></span>8)&#8221;</p>
<p><a rel="attachment wp-att-176" href="http://www.mudbest.com/175.action/z1"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-176" title="z1" src="http://www.mudbest.com/wp-content/uploads/2010/07/z1-570x430.gif" alt="" width="570" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z1-570x430.gif 570w, https://www.mudbest.com/wp-content/uploads/2010/07/z1.gif 639w" sizes="auto, (max-width: 570px) 100vw, 570px" /></a></p>
<p>2.在下图中点 &#8220;服务器组件、工具、联机丛书和示例&#8221;</p>
<p><a rel="attachment wp-att-177" href="http://www.mudbest.com/175.action/z2"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-177" title="z2" src="http://www.mudbest.com/wp-content/uploads/2010/07/z2-570x430.gif" alt="" width="570" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z2-570x430.gif 570w, https://www.mudbest.com/wp-content/uploads/2010/07/z2.gif 641w" sizes="auto, (max-width: 570px) 100vw, 570px" /></a></p>
<p>3.在下图中选择 &#8220;我接受许可条款和条件&#8221;，然后点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-178" href="http://www.mudbest.com/175.action/z3"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-178" title="z3" src="http://www.mudbest.com/wp-content/uploads/2010/07/z3-463x430.gif" alt="" width="463" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z3-463x430.gif 463w, https://www.mudbest.com/wp-content/uploads/2010/07/z3.gif 489w" sizes="auto, (max-width: 463px) 100vw, 463px" /></a></p>
<p>4.在下图中点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-179" href="http://www.mudbest.com/175.action/z4"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-179" title="z4" src="http://www.mudbest.com/wp-content/uploads/2010/07/z4-464x430.gif" alt="" width="464" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z4-464x430.gif 464w, https://www.mudbest.com/wp-content/uploads/2010/07/z4.gif 487w" sizes="auto, (max-width: 464px) 100vw, 464px" /></a></p>
<p>5.在下图中点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-180" href="http://www.mudbest.com/175.action/z5"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-180" title="z5" src="http://www.mudbest.com/wp-content/uploads/2010/07/z5-523x430.gif" alt="" width="523" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z5-523x430.gif 523w, https://www.mudbest.com/wp-content/uploads/2010/07/z5.gif 633w" sizes="auto, (max-width: 523px) 100vw, 523px" /></a></p>
<p>6.系统配置检查，成功后点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-181" href="http://www.mudbest.com/175.action/z6"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-181" title="z6" src="http://www.mudbest.com/wp-content/uploads/2010/07/z6-522x430.gif" alt="" width="522" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z6-522x430.gif 522w, https://www.mudbest.com/wp-content/uploads/2010/07/z6.gif 632w" sizes="auto, (max-width: 522px) 100vw, 522px" /></a></p>
<p>7.在下图中点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-182" href="http://www.mudbest.com/175.action/z7"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-182" title="z7" src="http://www.mudbest.com/wp-content/uploads/2010/07/z7-466x430.gif" alt="" width="466" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z7-466x430.gif 466w, https://www.mudbest.com/wp-content/uploads/2010/07/z7.gif 490w" sizes="auto, (max-width: 466px) 100vw, 466px" /></a></p>
<p>8.选择&#8221;Sql Server DataBase Services&#8221;和&#8221;工作站组件、联机丛书和开发工具&#8221;，然后点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-183" href="http://www.mudbest.com/175.action/z8"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-183" title="z8" src="http://www.mudbest.com/wp-content/uploads/2010/07/z8-463x430.gif" alt="" width="463" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z8-463x430.gif 463w, https://www.mudbest.com/wp-content/uploads/2010/07/z8.gif 488w" sizes="auto, (max-width: 463px) 100vw, 463px" /></a></p>
<p>9.选择&#8221;默认实例&#8221;，然后点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-184" href="http://www.mudbest.com/175.action/z9"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-184" title="z9" src="http://www.mudbest.com/wp-content/uploads/2010/07/z9-463x430.gif" alt="" width="463" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z9-463x430.gif 463w, https://www.mudbest.com/wp-content/uploads/2010/07/z9.gif 487w" sizes="auto, (max-width: 463px) 100vw, 463px" /></a></p>
<p>10.默认下图选择，然后点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-185" href="http://www.mudbest.com/175.action/z10"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-185" title="z10" src="http://www.mudbest.com/wp-content/uploads/2010/07/z10-463x430.gif" alt="" width="463" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z10-463x430.gif 463w, https://www.mudbest.com/wp-content/uploads/2010/07/z10.gif 487w" sizes="auto, (max-width: 463px) 100vw, 463px" /></a></p>
<p>11.选择&#8221;混合模式&#8221;，输入sa密码，然后点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-186" href="http://www.mudbest.com/175.action/z11"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-186" title="z11" src="http://www.mudbest.com/wp-content/uploads/2010/07/z11-463x430.gif" alt="" width="463" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z11-463x430.gif 463w, https://www.mudbest.com/wp-content/uploads/2010/07/z11.gif 487w" sizes="auto, (max-width: 463px) 100vw, 463px" /></a></p>
<p>12.在下图中点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-187" href="http://www.mudbest.com/175.action/z12"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-187" title="z12" src="http://www.mudbest.com/wp-content/uploads/2010/07/z12-465x430.gif" alt="" width="465" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z12-465x430.gif 465w, https://www.mudbest.com/wp-content/uploads/2010/07/z12.gif 490w" sizes="auto, (max-width: 465px) 100vw, 465px" /></a></p>
<p>13.在下图中点 &#8220;下一步&#8221;</p>
<p><a rel="attachment wp-att-188" href="http://www.mudbest.com/175.action/z13"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-188" title="z13" src="http://www.mudbest.com/wp-content/uploads/2010/07/z13-463x430.gif" alt="" width="463" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z13-463x430.gif 463w, https://www.mudbest.com/wp-content/uploads/2010/07/z13.gif 487w" sizes="auto, (max-width: 463px) 100vw, 463px" /></a></p>
<p>14.在下图中点 &#8220;安装&#8221;</p>
<p><a rel="attachment wp-att-189" href="http://www.mudbest.com/175.action/z14"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-189" title="z14" src="http://www.mudbest.com/wp-content/uploads/2010/07/z14-467x430.gif" alt="" width="467" height="430" srcset="https://www.mudbest.com/wp-content/uploads/2010/07/z14-467x430.gif 467w, https://www.mudbest.com/wp-content/uploads/2010/07/z14.gif 488w" sizes="auto, (max-width: 467px) 100vw, 467px" /></a></p>
<p>15.安装配置中，请等待</p>
<p><a rel="attachment wp-att-190" href="http://www.mudbest.com/175.action/z15"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-190" title="z15" src="http://www.mudbest.com/wp-content/uploads/2010/07/z15.gif" alt="" width="491" height="423" /></a></p>
<p>16.安装进行中，请等待</p>
<p><a rel="attachment wp-att-191" href="http://www.mudbest.com/175.action/z16"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-191" title="z16" src="http://www.mudbest.com/wp-content/uploads/2010/07/z16.gif" alt="" width="491" height="423" /></a></p>
<p>17.安装进行中，请等待</p>
<p><a rel="attachment wp-att-192" href="http://www.mudbest.com/175.action/z17"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-192" title="z17" src="http://www.mudbest.com/wp-content/uploads/2010/07/z17.gif" alt="" width="488" height="421" /></a></p>
<p>18.提示安装成功，在下图中点 &#8220;完成&#8221;</p>
<p><a rel="attachment wp-att-193" href="http://www.mudbest.com/175.action/z18"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-193" title="z18" src="http://www.mudbest.com/wp-content/uploads/2010/07/z18.gif" alt="" width="489" height="422" /></a></p>
<p>到此为止，Microsoft SQL 2005详细安装方法已经完成</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
