<?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>家有小虎 &#187; 脚本</title>
	<atom:link href="http://jiahu.net/tag/%e8%84%9a%e6%9c%ac/feed" rel="self" type="application/rss+xml" />
	<link>http://jiahu.net</link>
	<description>我在路上, 你不在身旁. 想你的时候, 温暖依然.</description>
	<lastBuildDate>Sun, 15 Jan 2012 03:12:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CreateObject(“MSXML2.DOMDocument”)</title>
		<link>http://jiahu.net/createobjectmsxml2domdocument.htm</link>
		<comments>http://jiahu.net/createobjectmsxml2domdocument.htm#comments</comments>
		<pubDate>Tue, 21 Oct 2008 06:30:04 +0000</pubDate>
		<dc:creator>@ouc</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Q&A]]></category>
		<category><![CDATA[脚本]]></category>
		<category><![CDATA[释疑]]></category>

		<guid isPermaLink="false">http://cngator.net/?p=754</guid>
		<description><![CDATA[1. CreateObject(“MSXML2.DOMDocument”) this is VB code to create a DOMDocument object using the MSXML2 library 2. new ActiveXObject(“MSXML.DOMDocument”) this is javascript to create a DOMDocument object using the MSXML library 3. Server.CreateOject(“Microsoft.XMLDOM”) this is ASP vbscript to create a version &#8230; <a href="http://jiahu.net/createobjectmsxml2domdocument.htm">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1. CreateObject(“MSXML2.DOMDocument”)<br />
this is VB code to create a DOMDocument object using the MSXML2 library</p>
<p>2. new ActiveXObject(“MSXML.DOMDocument”)<br />
this is javascript to create a DOMDocument object using the MSXML library</p>
<p>3. Server.CreateOject(“Microsoft.XMLDOM”)<br />
this is ASP vbscript to create a version independent DOMDocument object</p>
<p>Note:<br />
1. Only for built in objects, such as filesystemobject, dictionary etc. Any object which comes from an external library needs Server.CreateObject<br />
2. CreateObject is a VBScript mechanism (not ASP). In NT4 it will create an object without the context of the caller. This has perfomance benefits, but this context contains things like the ASP intrinisc objects (Application, Session and so on). So if you want to use these objects in the called component, CreateObject will fail.<br />
3. Server.CreateObject is an ASP construct and as such available in any language. It does create objects within the caller&#8217;s (ASP) context.<br />
4. In Win2000 CreateObject has the same functionality as Server.CreateObject, there is effectively no difference.</p>
<p>Link: http://p2p.wrox.com/archive/asp_xml/2001-05/47.asp</p>
]]></content:encoded>
			<wfw:commentRss>http://jiahu.net/createobjectmsxml2domdocument.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>两个特别的存储过程</title>
		<link>http://jiahu.net/%e4%b8%a4%e4%b8%aa%e7%89%b9%e5%88%ab%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b.htm</link>
		<comments>http://jiahu.net/%e4%b8%a4%e4%b8%aa%e7%89%b9%e5%88%ab%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b.htm#comments</comments>
		<pubDate>Tue, 26 Aug 2008 02:35:01 +0000</pubDate>
		<dc:creator>@ouc</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[脚本]]></category>

		<guid isPermaLink="false">http://cngator.net/?p=564</guid>
		<description><![CDATA[简介 sp_msforeachdb 和 sp_msforeachtable 是非常有用的存储过程, 他们允许你遍历SQL Server实例中的全部数据库和表, 并对这些数据库和表执行命令. 我作为一个DBA每天都在使用它们. 两个存储过程都使用问号(?)作为一个置换符. 对于sp_msforeachdb, “?”表示数据库名称, 对于sp_msforeachtable, “?”表示表名称. sp_msforeachdb 示例 #1 &#8211; 可以使用以下命令检查实例中的每个数据库: sp_msforeachdb &#8216;dbcc checkdb( ”?” )&#8217; 示例 #2 &#8211; 修改实例中所有数据库的所有者为sa. sp_msforeachdb &#8216;IF ”?” NOT IN (”master”, ”model”, ”msdb”, ”tempdb”) BEGIN print ”?” &#8230; <a href="http://jiahu.net/%e4%b8%a4%e4%b8%aa%e7%89%b9%e5%88%ab%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b.htm">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>简介</p>
<p>sp_msforeachdb 和 sp_msforeachtable 是非常有用的存储过程, 他们允许你遍历SQL Server实例中的全部数据库和表, 并对这些数据库和表执行命令. 我作为一个DBA每天都在使用它们. 两个存储过程都使用问号(?)作为一个置换符. 对于sp_msforeachdb, “?”表示数据库名称, 对于sp_msforeachtable, “?”表示表名称.<br />
<strong>sp_msforeachdb</strong></p>
<p>示例 #1 &#8211; 可以使用以下命令检查实例中的每个数据库:</p>
<p>sp_msforeachdb &#8216;dbcc checkdb( ”?” )&#8217;</p>
<p>示例 #2 &#8211; 修改实例中所有数据库的所有者为sa.</p>
<p>sp_msforeachdb &#8216;IF ”?” NOT IN (”master”, ”model”, ”msdb”, ”tempdb”)<br />
BEGIN<br />
print ”?”<br />
exec [?].dbo.sp_changedbowner ”sa”<br />
END&#8217;</p>
<p>**注意: 我使用if语句来过滤掉系统数据库</p>
<p>示例 #3 &#8211; 可以使用以下命令检查数据库中的每个表:</p>
<p>sp_msforeachdb &#8216;dbcc checktable( ”?” )&#8217;</p>
<p>示例 #4 &#8211; 压缩实例中的所有数据库. 谨慎使用这个命令. 不要在业务时间使用在业务数据库上.</p>
<p>sp_msforeachdb &#8216;dbcc ShrinkDatabase( ?, 10 )&#8217;</p>
<p>示例 #5 &#8211; 为实例中所有数据库添加用户 db_owner. 通常使用在SharePoint安装补丁上.</p>
<p>sp_msforeachdb &#8216;IF ”?” NOT IN (”master”, ”model”, ”msdb”, ”tempdb”)<br />
BEGIN<br />
print ”?”</p>
<p>exec [?].dbo.sp_adduser ”&lt;YOUR DOMAIN NAME HERE&gt;\&lt;YOUR USER ACCOUNT HERE&gt;”<br />
exec [?].dbo.sp_addrolemember ”db_owner”,”&lt;YOUR DOMAIN NAME HERE&gt;\<br />
&lt;YOUR USER ACCOUNT HERE”<br />
END&#8217;</p>
<p><strong>sp_msforeachtable</strong></p>
<p>相当于sp_msforeachdb, 存储过程sp_msforeachtable在命令中使用”?”来代替表名称.</p>
<p>示例 #1 &#8211; 获取索引列表, 以及索引的统计数据.</p>
<p>CREATE table #stats(<br />
table_name nvarchar(255) null,<br />
index_name nvarchar(255) null,<br />
statistics_update_date datetime null<br />
)<br />
GO</p>
<p>exec sp_msforeachtable<br />
&#8216;insert into #stats<br />
SELECT<br />
”?”,<br />
name AS index_name,<br />
STATS_DATE(object_id, index_id) AS statistics_update_date<br />
FROM<br />
sys.indexes<br />
WHERE<br />
object_id = OBJECT_ID(”?”);&#8217;</p>
<p>select * from #stats where index_name is not null</p>
<p>drop table #stats</p>
<p>有上百万人在使用这些存储过程, 可能不止这些. 你甚至可以组合使用sp_msforeachtable和sp_msforeachdb. 享受它们, 同时小心使用.</p>
<p>原文: <a title="SQL Server, Store Procedure" href="http://www.codeproject.com/KB/database/sql_server_hidden.aspx" target="_blank">SQL Server Hidden Stored Procedures</a></p>
<p>作者: <strong><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=1766896">Michael Ceranski</a></strong></p>
<p>PS: 很久没有做过翻译了, 但是这篇实在是很值得推荐, 顺便复习一下自己的英语. 希望没有给大家带来混乱:-)</p>
]]></content:encoded>
			<wfw:commentRss>http://jiahu.net/%e4%b8%a4%e4%b8%aa%e7%89%b9%e5%88%ab%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何在 BAT 批处理文件中实现 FTP 登陆？</title>
		<link>http://jiahu.net/%e5%a6%82%e4%bd%95%e5%9c%a8-bat-%e6%89%b9%e5%a4%84%e7%90%86%e6%96%87%e4%bb%b6%e4%b8%ad%e5%ae%9e%e7%8e%b0-ftp-%e7%99%bb%e9%99%86%ef%bc%9f.htm</link>
		<comments>http://jiahu.net/%e5%a6%82%e4%bd%95%e5%9c%a8-bat-%e6%89%b9%e5%a4%84%e7%90%86%e6%96%87%e4%bb%b6%e4%b8%ad%e5%ae%9e%e7%8e%b0-ftp-%e7%99%bb%e9%99%86%ef%bc%9f.htm#comments</comments>
		<pubDate>Sat, 02 Aug 2008 15:20:22 +0000</pubDate>
		<dc:creator>@ouc</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[批处理]]></category>
		<category><![CDATA[脚本]]></category>

		<guid isPermaLink="false">http://cngator.net/?p=141</guid>
		<description><![CDATA[越来越多的人都拥有了自己的网站, 或许构建在虚拟主机上, 或许是自己独立的服务器. 一个不可避免的工作就是通过FTP上传下载文件. 如果你急需要做FTP操作, 手头又没有现成的FTP软件使用, 那么这篇文章将对你很有启示. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; 问题: 写一个 BAT 批处理，打算把文件打包传到 FTP 服务器上 比如　ftp://11.11.11.11， 之后登陆的用户名和密码怎么写，才能实现自动登陆？ 解决方案: 必须使用 -s 选项，FTP 才能在 Windows 下读取该文件。 如果以前的脚本位于名为 Test.txt 的文件中，您可以通过键入以下内容启动该脚本： ftp -s:test.txt 您可以在命令行中指定主机名称，然后使用脚本进行登录。例如，如果您使用以下命令行： ftp -s:test.txt 11.11.11.11 脚本文件应如下所示： user guest guest put file1 quit 但是，如果 &#8230; <a href="http://jiahu.net/%e5%a6%82%e4%bd%95%e5%9c%a8-bat-%e6%89%b9%e5%a4%84%e7%90%86%e6%96%87%e4%bb%b6%e4%b8%ad%e5%ae%9e%e7%8e%b0-ftp-%e7%99%bb%e9%99%86%ef%bc%9f.htm">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>越来越多的人都拥有了自己的网站, 或许构建在虚拟主机上, 或许是自己独立的服务器. 一个不可避免的工作就是通过FTP上传下载文件. 如果你急需要做FTP操作, 手头又没有现成的FTP软件使用, 那么这篇文章将对你很有启示.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>问题:<br />
写一个 BAT 批处理，打算把文件打包传到 FTP 服务器上<br />
比如　ftp://11.11.11.11， 之后登陆的用户名和密码怎么写，才能实现自动登陆？</p>
<p>解决方案:<br />
必须使用 -s 选项，FTP 才能在 Windows 下读取该文件。<br />
如果以前的脚本位于名为 Test.txt 的文件中，您可以通过键入以下内容启动该脚本：<br />
ftp -s:test.txt<br />
您可以在命令行中指定主机名称，然后使用脚本进行登录。例如，如果您使用以下命令行：<br />
ftp -s:test.txt 11.11.11.11<br />
脚本文件应如下所示：<br />
user<br />
guest<br />
guest<br />
put file1<br />
quit<br />
但是，如果 FTP 主机执行自动登录，此命令将不会运行。若要关闭自动登录，请在命令行中使用 -n 开关，如下所示：<br />
ftp -n -s:test.txt 11.11.11.11</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;分割线&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>以下是一个自动下载 Norton 病毒库的 script<br />
保存为 cescript.txt 之后，用 ftp -s:cescript.txt 执行之</p>
<p>open ftp.symantec.com<br />
anonymous<br />
<a href="mailto:nobody@spammer.com">nobody@spammer.com</a><br />
cd public/english_us_canada/antivirus_definitions/norton_antivirus/static<br />
lcd E:\software\Symantec\VirusLib<br />
bin<br />
hash<br />
prompt<br />
get symcdefsx86.exe<br />
quit</p>
<p>来源: <a href="http://www.ixpub.net/archiver/tid-610522.html" target="_blank">http://www.ixpub.net/archiver/tid-610522.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jiahu.net/%e5%a6%82%e4%bd%95%e5%9c%a8-bat-%e6%89%b9%e5%a4%84%e7%90%86%e6%96%87%e4%bb%b6%e4%b8%ad%e5%ae%9e%e7%8e%b0-ftp-%e7%99%bb%e9%99%86%ef%bc%9f.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

