<?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>DBAlife &#187; oracle</title>
	<atom:link href="http://www.dbalife.com/archives/tag/oracle/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dbalife.com</link>
	<description>网站系统架构实践</description>
	<lastBuildDate>Wed, 27 Jul 2011 09:57:10 +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>kill某个用户的所有session</title>
		<link>http://www.dbalife.com/archives/518.html</link>
		<comments>http://www.dbalife.com/archives/518.html#comments</comments>
		<pubDate>Tue, 21 Dec 2010 07:13:44 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[DBA脚本]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[kill session]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[用户]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/archives/518.html</guid>
		<description><![CDATA[kill_all_session_by_username.sh 用于杀掉Oracle数据库中某个用户的所有session #!/bin/sh if [ $# -ne 1 ] ; then echo "Usage: $0 &#60;Username&#62;"; echo "WARNING: the &#60;Username&#62; MUST in upper case."; exit 1; fi username=$1 echo $username function_get_info(){ username=$1 sqlplus  / as sysdba  &#60;&#60;EOF select username,sid,serial# from v\$session where username = '$username'; EXIT EOF } function_get_info ${username} &#124;awk '/^'${username}'/ { print "alter system [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/30.html' rel='bookmark' title='笔记：查询oracle被锁的对象'>笔记：查询oracle被锁的对象</a></li>
<li><a href='http://www.dbalife.com/archives/56.html' rel='bookmark' title='如何使用跟踪事件10046'>如何使用跟踪事件10046</a></li>
<li><a href='http://www.dbalife.com/archives/38.html' rel='bookmark' title='AutoTrace'>AutoTrace</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>kill_all_session_by_username.sh<br />
用于杀掉Oracle数据库中某个用户的所有session</p>
<p>#!/bin/sh</p>
<p>if [ $# -ne 1 ] ;<br />
then<br />
echo "Usage: $0 &lt;Username&gt;";<br />
echo "WARNING: the &lt;Username&gt; MUST in upper case.";<br />
exit 1;<br />
fi</p>
<p>username=$1<br />
echo $username</p>
<p>function_get_info(){<br />
username=$1</p>
<p>sqlplus  / as sysdba  &lt;&lt;EOF<br />
select username,sid,serial# from v\$session where username = '$username';<br />
EXIT<br />
EOF<br />
}</p>
<p>function_get_info ${username} |awk '/^'${username}'/ { print "alter system kill session '\''"  $2 "," $3 "'\'' ; "} '<br />
sql_killsession=`function_get_info |awk '/^'${username}'/ { print "alter system kill session  '\''"  $2 "," $3 "'\''; "} '`<br />
echo $sql_killsession</p>
<p>sqlplus  / as sysdba  &lt;&lt;EOF<br />
#$sql_killsession<br />
EXIT<br />
EOF</p>
<div class="flockcredit" style="text-align: right; color: #ccc; font-size: x-small;">用 <a style="color: #999; font-weight: bold;" title="Flock Browser" href="http://www.flock.com/blogged-with-flock" target="_new">Flock 浏览器</a> 创建</div>
<p><!-- technorati tags begin --></p>
<p style="font-size: 10px; text-align: right;">标签: <a rel="tag" href="http://technorati.com/tag/oracle">oracle</a>, <a rel="tag" href="http://technorati.com/tag/killsession">killsession</a></p>
<p><!-- technorati tags end --></p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/30.html' rel='bookmark' title='笔记：查询oracle被锁的对象'>笔记：查询oracle被锁的对象</a></li>
<li><a href='http://www.dbalife.com/archives/56.html' rel='bookmark' title='如何使用跟踪事件10046'>如何使用跟踪事件10046</a></li>
<li><a href='http://www.dbalife.com/archives/38.html' rel='bookmark' title='AutoTrace'>AutoTrace</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/518.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>拉里 埃里森</title>
		<link>http://www.dbalife.com/archives/402.html</link>
		<comments>http://www.dbalife.com/archives/402.html#comments</comments>
		<pubDate>Mon, 13 Sep 2010 00:00:00 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[人物]]></category>
		<category><![CDATA[案例与思考]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/archives/402.html</guid>
		<description><![CDATA[[本文转载自CSDN蒋涛的博客] 背景:这是我在98年应刘韧之邀在中国计算机报开设"环球IT英雄"陆续发表的文章,主要是介绍国际IT界知名人物,也许内容陈旧了一些,不过看看历史的故事吧.我的写作资料基本来自互联网,不过遗憾的是当时没有做引用记录. 埃里森在32岁以前他还一事无成, 读了三个大学，没得到一个学位文凭, 换了十几家公司，老婆也离他而去,开始创业时只有1200美元,却使得Oracle公司连续十二年销售额每年翻一翻,成为世界上第二大的软件公司,他拥有的Oracle是世界上最大的数据库软件公司. Ellison以不择手段的经营手腕和强力甚至欺骗的市场竞争，击败了一个又一个的对手, Ellison要打倒的最后一个目标就是软件帝国之王微软的比尔.盖茨。 Ellison 还以乐于享受，好勇斗狠，傲慢自大还有和漂亮女人交往而出名，在32岁以前他一事无成，二十年后成了硅谷首富。 “读了三个大学，没得到一个学位文凭” Ellison美国犹太人,俄罗斯移民，出生在1944年的曼哈顿,他的未婚妈妈只有19岁,Ellison由舅舅一家抚养,在芝加哥犹太区中下阶层长大，那时贫富的差别没有现在巨大。学生时代的Ellison并没有显示出成功的素质和成绩,在学校他非常孤僻,独来独往,不过却十分注意打扮和享受,在别的孩子还是由父母来理发时,他却请专业理发师打理。 1962 年Ellison高中毕业,进入Illinois 大学就读,二年级时离开了学校，商业周刊报导他离开的原因是因为平均成绩没有达到及格水平，但他却不置可否。过了一个夏天他进入Chicago 大学,同时还在Northwestern 大学学习, 虽然经历了三个大学，最终他没有得到任何大学文凭。 1966年Ellison离开家乡，来到加州的伯克莱，准备就读研究生，同时开始工作赚钱,他学习了电脑编程,主要是为IBM大型电脑开发,他并不想投身高科技,只不过想赚点生活费，他的工作是给一些大公司开发应用程序，那时的软件开发意味着：挂上磁带，备份数据，工作单调也没有挑战性,远不能和现在的程序员相比。 关于学位Ellison认为:“大学学位是有用的，我想每个人都应该去获得一个或者更多，但我在大学没有得到学位，我从来没有上过一堂计算机课，但我却成了程序员。我完全是从书本自学编程的。” “换了十几家公司，老婆也离他而去” 在伯克莱Ellison认识了主修中国历史的Adda Quinn.他们很快就结婚了。60年代的美国是动荡和巨变的时代，中东战争，越南战争...。Ellison 不停地更换工作，虽然挣钱不多（夫妇俩月收入合计1600美元），花钱却十分大方，他甚至借了三千美元购买一条34英尺的帆船同时还在分期付款购买另一条小帆船。Ellison 是一个完美主义者。他从来不操心帐单，Quinn却受够了，1974年他们离婚了，Ellison劝她说:“我会成为百万富翁的，如果你和我在一起，你可以得到你想要的任何东西。”,但Quinn却不相信，不过她最后也没有后悔自己的选择。 1973年Ellison在Amdahl工作, Amdahl是和IBM竞争的生产大型电脑的公司,有45%的股份是日本富士通的, Ellison所以有机会去日本出差,他被京都东方异国情调给迷住了,日本的禅学和文化给 Ellison 以深刻的影响，他成了一个日本文化艺术的终身爱好者。 离开Amdahl Ellison加入Ampex,这是硅谷一家生产影像设备的公司，在那里他认识了他一生中最重要的两个人：Bob Miner和Edward Oates. 他们一起研究如何有效存储读取海量的数字信息，Ellison转向了市场和销售工作,他们的项目最终失败了，Ellison将这归咎于公司管理不善，“我比公司的头们懂技术，也比他们懂市场，如果他们能经营公司，我也能。” 就在他们打算成立公司时,另外两个传奇式的公司也产生了，一个是苹果，一个是微软，虽然公司产品，理想，文化完全不同，但却有着同样成功的模式：创立者都是一个有梦想精神的技术企业家和一个技术天才，Bill Gates 有Paul Allen, Steve Jobs 有Steve Wozniak,Larry Ellison 有Bob Miner. 1977年6月Ellison 他们三人合伙出资2000美元成立了软件开发研究公司，Ellison拥有60%的股份,Ellison占这么多股份是因为成立公司完全是由于Ellison的鼓动，而且他有一个40万美元的项目合同,这一年他32岁。 “好在经营软件公司不需要大量的资金，用点小钱就可以创业。所有伟大的软件公司都是这样开始的，也许不是所有的，但Microsoft和我们是的,我们比Microsoft资金更少,几乎一无所有。” “IBM犯了上百亿美元的错误” 1976年IBM研究人员发表了一篇里程碑的论文 “R系统:数据库关系理论”,介绍了关系数据库理论和查询语言SQL, Ellison非常仔细地阅读了这篇文章，被其内容震惊，这是第一次有人用全面一致的方案管理数据信息。作者Ted Codd十年前就发表了关系数据库理论，并在IBM研究机构开发原型，这个项目就是R系统,存取数据表的语言就是SQL,文章详细描述了他十年的研究成果和如何实现的方法，Ellison 看完后，敏锐意识到在这个研究基础上可以开发商用软件系统。 那时大多数人认为关系数据库不会有商业价值，因为速度太慢，不可能满足处理大规模数据或者大量用户存取数据，关系数据库理论上很漂亮而且易于使用，但不足就是太简单实现速度太慢。 [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p><span style="color: #3366ff;">[本文转载自CSDN蒋涛的博客]</span></p>
<p>背景:这是我在98年应刘韧之邀在中国计算机报开设"环球IT英雄"陆续发表的文章,主要是介绍国际IT界知名人物,也许内容陈旧了一些,不过看看历史的故事吧.我的写作资料基本来自互联网,不过遗憾的是当时没有做引用记录.</p>
<p>埃里森在32岁以前他还一事无成, 读了三个大学，没得到一个学位文凭, 换了十几家公司，老婆也离他而去,开始创业时只有1200美元,却使得Oracle公司连续十二年销售额每年翻一翻,成为世界上第二大的软件公司,他拥有的Oracle是世界上最大的数据库软件公司.   Ellison以不择手段的经营手腕和强力甚至欺骗的市场竞争，击败了一个又一个的对手, Ellison要打倒的最后一个目标就是软件帝国之王微软的比尔.盖茨。<br />
Ellison 还以乐于享受，好勇斗狠，傲慢自大还有和漂亮女人交往而出名，在32岁以前他一事无成，二十年后成了硅谷首富。</p>
<p>“读了三个大学，没得到一个学位文凭”<br />
Ellison美国犹太人,俄罗斯移民，出生在1944年的曼哈顿,他的未婚妈妈只有19岁,Ellison由舅舅一家抚养,在芝加哥犹太区中下阶层长大，那时贫富的差别没有现在巨大。学生时代的Ellison并没有显示出成功的素质和成绩,在学校他非常孤僻,独来独往,不过却十分注意打扮和享受,在别的孩子还是由父母来理发时,他却请专业理发师打理。<br />
1962 年Ellison高中毕业,进入Illinois 大学就读,二年级时离开了学校，商业周刊报导他离开的原因是因为平均成绩没有达到及格水平，但他却不置可否。过了一个夏天他进入Chicago 大学,同时还在Northwestern 大学学习,  虽然经历了三个大学，最终他没有得到任何大学文凭。<br />
1966年Ellison离开家乡，来到加州的伯克莱，准备就读研究生，同时开始工作赚钱,他学习了电脑编程,主要是为IBM大型电脑开发,他并不想投身高科技,只不过想赚点生活费，他的工作是给一些大公司开发应用程序，那时的软件开发意味着：挂上磁带，备份数据，工作单调也没有挑战性,远不能和现在的程序员相比。<br />
关于学位Ellison认为:“大学学位是有用的，我想每个人都应该去获得一个或者更多，但我在大学没有得到学位，我从来没有上过一堂计算机课，但我却成了程序员。我完全是从书本自学编程的。”</p>
<p>“换了十几家公司，老婆也离他而去”<br />
在伯克莱Ellison认识了主修中国历史的Adda Quinn.他们很快就结婚了。60年代的美国是动荡和巨变的时代，中东战争，越南战争...。Ellison 不停地更换工作，虽然挣钱不多（夫妇俩月收入合计1600美元），花钱却十分大方，他甚至借了三千美元购买一条34英尺的帆船同时还在分期付款购买另一条小帆船。Ellison 是一个完美主义者。他从来不操心帐单，Quinn却受够了，1974年他们离婚了，Ellison劝她说:“我会成为百万富翁的，如果你和我在一起，你可以得到你想要的任何东西。”,但Quinn却不相信，不过她最后也没有后悔自己的选择。<br />
1973年Ellison在Amdahl工作, Amdahl是和IBM竞争的生产大型电脑的公司,有45%的股份是日本富士通的, Ellison所以有机会去日本出差,他被京都东方异国情调给迷住了,日本的禅学和文化给 Ellison 以深刻的影响，他成了一个日本文化艺术的终身爱好者。<br />
离开Amdahl Ellison加入Ampex,这是硅谷一家生产影像设备的公司，在那里他认识了他一生中最重要的两个人：Bob Miner和Edward Oates. 他们一起研究如何有效存储读取海量的数字信息，Ellison转向了市场和销售工作,他们的项目最终失败了，Ellison将这归咎于公司管理不善，“<span style="font-weight: bold;">我比公司的头们懂技术，也比他们懂市场，如果他们能经营公司，我也能。</span>”<br />
就在他们打算成立公司时,另外两个传奇式的公司也产生了，一个是苹果，一个是微软，虽<span style="font-weight: bold;">然公司产品，理想，文化完全不同，但却有着同样成功的模式：创立者都是一个有梦想精神的技术企业家和一个技术天才，Bill Gates 有Paul Allen, Steve Jobs 有Steve Wozniak,</span><br style="font-weight: bold;" /><span style="font-weight: bold;">Larry Ellison 有Bob Miner.</span><br />
1977年6月Ellison 他们三人合伙出资2000美元成立了软件开发研究公司，Ellison拥有60%的股份,Ellison占这么多股份是因为成立公司完全是由于Ellison的鼓动，而且他有一个40万美元的项目合同,这一年他32岁。<br />
“好在经营软件公司不需要大量的资金，用点小钱就可以创业。所有伟大的软件公司都是这样开始的，也许不是所有的，但Microsoft和我们是的,我们比Microsoft资金更少,几乎一无所有。”</p>
<p>“IBM犯了上百亿美元的错误”<br />
1976年IBM研究人员发表了一篇里程碑的论文 “R系统:数据库关系理论”,介绍了关系数据库理论和查询语言SQL, Ellison非常仔细地阅读了这篇文章，被其内容震惊，这是第一次有人用全面一致的方案管理数据信息。作者Ted Codd十年前就发表了关系数据库理论，并在IBM研究机构开发原型，这个项目就是R系统,存取数据表的语言就是SQL,文章详细描述了他十年的研究成果和如何实现的方法，<span style="font-weight: bold;">Ellison 看完后，敏锐意识到在这个研究基础上可以开发商用软件系统。</span><br />
那时大多数人认为关系数据库不会有商业价值，因为速度太慢，不可能满足处理大规模数据或者大量用户存取数据，关系数据库理论上很漂亮而且易于使用，但不足就是太简单实现速度太慢。 Ellison认为这是他们的机会:他们决定开发通用商用数据库系统Oracle,这个名字来源于他们曾给中央情报局做过的项目名。不过也不是只有他们独家在行动，Berkeley大学也开始开发关系数据库系统Ingres.<br />
IBM 却没有计划开发,为什么蓝色巨人放弃了这个价值上百亿的产品，原因有很多：IBM的研究人员大多是学术出身,他们最感兴趣的是理论，而不是推向市场的产品，从学术上看，研究成果应该公开，发表论文和演讲能使他们成名，为什么不呢？还有一个很主要的原因就是IBM当时有一个销售得还不错的层次数据库产品IMS,推出一个竞争性的产品会影响IMS的销售和人员工作，直到1985年IBM才发布了关系数据库DB2,Ellision那时已经成了千万富翁。<br />
Ellison曾将IBM选择Microsoft的MS-DOS作为IBM-PC机 的操作系统比为：“世界企业经营历史上最严重的错误，价值超过了上千亿美元。”，IBM发表R系统论文,而且没有很快推出关系数据库产品的错误可能仅仅次之,Oracle的市值在1996年就达到了280亿.</p>
<p>"我需要的不仅仅是成功"<br />
<span style="font-weight: bold;">几个月后，他们就开发了Oracle 1.0，但这只不过是个玩具，除了完成简单关系查询不能做任何事情，他们需要花相当长的时间才能使Oracle有用，维持公司运转主要靠承接一些数据库管理项目和做顾问咨询工作。</span><br />
Oracle数据库的头两个用户是美国中央情报局和海军情报所，他们使用完全不同的硬件和软件, 中央情报局用的是IBM大型机, 海军用VAX机,而Ellison和Miner开发Oracle用的是Digital的PDP机,这迫使他们作出了重要而关键的决定:<span style="font-weight: bold;">新版本3.0全部用C语言开发,因为C语言是所有机器支持的，而且C编译器很便宜.</span><br />
<span style="font-weight: bold;">Ellison向客户宣称Oracle能运行在所有的机器上,事实上当然不可能，但这是非常聪明的市场策略,</span>大型公司和机构都拥有各种类型的电脑和操作系统，他们愿意购买一种能通用的数据库。<br />
Oracle的成功除了有IBM的友好帮助外,还要记上Digital的一份功劳。IBM向Ellison提供了关系数据库理论,DEC提供了表演的舞台：VAX电脑,VAX是历史上最成功的小型机.<br />
Ellison和Miner都十分好战,  "<span style="font-weight: bold;">我需要的不仅仅是成功,所有其他人都必须失败.</span>",虽然Ellison后来否认了他对新闻周刊记者说过的这段话,但这是他的一贯作风,既使是在工作之余的体育比赛中他也总要争取胜利, 他是相当不错的网球和棒球选手。<span style="font-weight: bold;">为了胜利他可以不择手段，夸大其词和撒谎是家常便饭，Oracle的规模还很小,如果客户知道他们的实情—只有四五个程序员，根本就不会购买他们的产品。</span></p>
<p>“出色的市场推销员”<br />
<span style="font-weight: bold;">早期的Oracle版本无法正常地工作,程序充满了错误,用户抱怨不断,但Ellison相信较早占领大块市场份额是最主要的，“当市场已建立好，你知道百事可乐要花多少钱才能夺得可口可乐1%的市场，非常非常昂贵。”</span>IBM的作风大相径庭，如果用户不满意就不会推出新产品。Oracle直到1986年的5.0版本才是基本可靠运转的系统,不过有趣的是早期的用户并不在意损失金钱和数据，既使是中央情报局,也没有不高兴,他们需要的是技术的发展，而不仅是一个产品，Ellison能为他们描述产品将能达到的美好功能，虽然现在没有，但他们愿意支付费用。<br />
Ellison的工作不只是推销产品,而且到处宣传关系数据库观念，他经常作的演讲标准题目是“关系数据技术的缺陷”，讲述关系数据库会出现的问题，然后介绍Oracle是如何解决的.另外一个推销技巧是别的产品只是讲述它们的功能,而Ellison当场就作演示，在电脑上输入一个关系查询，很快结果就出来了，虽然实际应用时情况会不同，但现场听众都印象深刻。Ellison不仅在作演示，而且在培训用户使用关系查询语言SQL. Ellison的成功不是作为一个技术专家而是市场推销专家。<br />
"<span style="font-weight: bold;">Oracle生逢其时,Ellison将市场放在第一位,其他所有的靠后,拥有普通技术和一流市场能力的公司总是打败了拥有一流技术和只有普通市场能力的公司</span>"，一位硅谷资深人士评论道。</p>
<p>“你们都会成为百万富翁,我确信!”<br />
Ellison经常向他的员工宣传只要采用他的市场策略,他们都会成为百万富翁,事实上早期的员工基本上都达到了这一目标。他的策略是销售产品时强调Oracle的三大特性:可移植性,和其他数据库产品特别是IBM的兼容性,支持广泛网络连接.这满足了用户的需要,虽然他们实际得到的比期望的要少,Ellison的对手攻击他总是销售气泡软件, 气泡软件指的是功能还未完成的软件产品，Microsoft也以此闻名。<br />
Ellison的主要对手是Ingres,1984年Oracle的销售额是1270万美元，Ingres是900万美元,1985年两者销售额都翻了一倍以上，只是Ingres增长得更快，如果照此发展,Ingres将会超越对手,但这时蓝色巨人IBM又帮了Ellison一把.<br />
1985年IBM发布了关系数据库DB2,采用了和Ingres不同的数据查询语言SQL, Ingres用的是QUEL, Ellison 抓住了市场机会,到处宣传Oracle和IBM的兼容性,结果从1985年到1990年虽然Ingres的销售额每年增长高于50%，但Oracle远远跑在了前面，每年增长率超过100%，SQL在1986年成为了正式工业标准,Ingres的老板简直无法相信Ellison的运气,但这正是Ellison的精明之处，“<span style="font-weight: bold;">跟着蓝色巨人，永远不会错。</span>”<br />
IBM确立SQL的标准是Oracle成功的关键,但数据库的战争远未结束.Sybase和Informix也加入了竞争的行列.</p>
<p>“我的目标是杀死对手”<br />
Ingres犯了一个致命的错误就是很晚才开发PC机上的版本,而Ellison和Bill Gates一样看都到了PC的巨大潜力,<span style="font-weight: bold;">Oracle很快就有了一个PC机上的廉价版本,但它几乎没有任何用处,可是Ellison和销售人员却有了有力的宣传武器：Oracle能运行在PC机上,Ingres不能。</span><br />
<span style="font-weight: bold;">Ellison听说Ingres发明了一种新技术:分布式查询，十天后Oracle就刊登广告宣布了SQL之星:第一个分布式查询数据库，事实上没有任何这样产品。</span>Ellison就是这样,想象产品应该怎样，然后再才去实现，如果成功了，他是成功的预言家，失败了，他就是骗子。<br />
1986年Oracle股票公开上市,不过很令人费解的是上市前几天Ellison解雇了他的销售主管Seashols, Seashols接着跳槽到了Oracle的老对手Ingres,不过已经太迟了，战争已经结束了。Ingres是一个学术化的公司,只注重技术而不关心市场，注定是要失败的。<br />
Oracle的上市给Ellison带来了9300万美元的身家,Microsoft在第二天也公开上市,Microsoft和Oracle在同一年成立,Bill Gates拥有的股票价值超过了3亿美元,Ellison这时发现了他一生中最强大的对手.<br />
1988年Oracle 推出了6.0版本,这是当时功能最强大的产品,不过它的匆忙上市对公司简直是一场灾难，使用6.0的最初用户都遭遇了频繁死机和数据库毁坏，直到6.0.27版本,产品质量才基本稳定,这表示6.0版本经过了27次大的修改.<br />
<span style="font-weight: bold;">既然这样,用户为什么不选择其他的产品呢?主要原因是如果用户选择其他厂商的产品，他们就得重写所有应用程序，这是非常巨大的工作量，所以一旦选用了某种数据库平台进行开发，你就得依赖它</span>。</p>
<p>“遭遇危机”<br />
Oracle从1977年创立到1990年，销售额保持了每年高于100%的增长，高增长的同时也潜伏着巨大的隐患，公司的财务和销售管理十分混乱，销售人员为了完成任务得到提成，大量签订无法收款的合同，甚至有人弄虚作假，合同执行情况也无人过问，现金流量是负值，Ellison高薪聘请了有经验的管理人员开始整顿公司,1990年第三财政季度有1500万美元的销售合同无法执行，结果季度销售额虽然达到创记录的2.36亿美元,但利润只增长了1%。消息公布第二天Oracle的股票从25.38元跌到了17.5元,损失了30%的市值。为度过危机Oracle解雇了10%的员工，在以后的两个季度情况变得更糟，股票在10月底的收盘价只有5.38美元，在春天Ellison还拥有的价值近10亿的股票在11月只剩下了1.6亿美元。<br />
Ellison勇敢地接受了挑战，他没有卖掉自己的股票。公司开始改进销售和财务的管理，保持足够的现金流量，销售合同必须得到确认，这些普通公司的做法就起了很大的作用，但公司的增长率减慢了，这是Ellison原来不愿采用这些做法的真正原因。91年和92年的销售额增长率只有12%和15%。<br />
Ellison将希望寄托于Oracle 7.0,这个公司已经谈论了好几年的新版本，直到1992年6月才终于登场，吸取6.0匆忙上市的教训在10个月前发布过Alpha测试版,Oracle 7.0是极为出色的产品,取得了巨大的成功,Ellison的销售队伍有了真正的王牌，销售额从92年的15亿美元增长到95年的42亿。<br />
公司也开始有了成熟的管理方式，耐心听取用户的意见并满足他们的需求,Oracle原来从来没这么做过，有个Oracle对待客户的典型事件，一个客户打电话抱怨Oracle数据库死机并毁坏了他的数据,技术支持工程师的回答是：“无赖,一点用都没有.”这种情况再也不会出现了，客户必须得到一流的服务。</p>
<p>“改变世界的网络计算机”<br />
Ellison现在不再负责日常工作,只是规划Oracle未来的发展方向.闲暇之余驾驶长达78英尺的“莎扬娜那”号出海兜风，在1995年他曾经夺得悉尼帆船比赛的冠军。<br />
信息高速公路吸引了Ellison的注意,他是克林顿总统最大的赞助商之一。他曾极力推动交互式电视和顶式盒的发展，不久他就发现了更迷人的机会：WWW环球网,Netscape的浏览器将WWW网推向了全世界,PC机的性能将不再是主角，连上Internet网才是价值所在。<br />
Ellison在1995年巴黎举行的欧洲信息技术论坛会议上,介绍了网络计算机Network Computer的观念,所谓NC指的是配置简单却能充分利用网络资源的低价电脑，不需要不断更新的硬件设备和越来越复杂，庞大的操作系统，没有软盘和硬盘，只要打开电源用浏览器连上网络，就可以获得信息和存储文件，售价将不高于500美元。Ellison这一次将他的标靶瞄上了软件帝国Microsoft．“Oracle将只会做一件事情，我们管理海量的数据并通过网络提供这些数据。”<br />
网络计算机的背后就是强大的网络服务器，所有数据和应用程序都存储在服务器的数据库中，Oracle的数据库技术将使网络计算机非常容易操作管理．Gates紧接着Ellison 发言，他认为网络计算机没有任何价值，只是大型机哑终端的翻版．但这一天的胜利是属于Ellison的，网络计算机的报道出现在所有报刊的主要版面上．<br />
媒体对网络计算机评价不一，CNET的记者认为没有硬盘网络计算机需要依赖服务器，这将是完全不可靠的，商业周刊专栏记者则认为网络计算机会带来一种完全不同的个人电脑工业，Microsoft负责技术的副总裁认为：＂人们想要电脑提供越多的能力，而不是越少．网络计算机根本不值一提。＂但大型公司和机构对网络计算机大加赞赏，每隔两年就要更新电脑和升级软件的成本实在太高，1996年一台标准PC机成本是2000美元，但维护的费用每台要接近１３２００美元，网络计算机的管理成本相对应该低很多。 。<br />
虽然Oracle集合了IBM,Sun,Apple和Netscape 在1996年制定了网络计算机的标准，但事实上没有一台网络计算机生产出来。Gates虽然对网络计算机嗤之以鼻，但也发表了一种简单个人电脑SIPC的标准进行反击，SIPC基本上和NC一样，只有一点不同：它需要用Windows操作系统．<br />
不过这一切都无关紧要了，NC和SIPC都将不存在了.随着AMD和Intel的竞争，97年８００美元以下的电脑成为电脑行业新的增长点，500美元以下的Basic Computer不久也将会出现，Microsoft 仍然是市场的主导者，但Ellison从来不会放弃，他说：＂观念的战争已经结束，市场的竞争才刚刚开始。＂</p>
<p>Larry Ellison语录</p>
<p>"日本文化非常有趣，对我影响非常巨大，日本人是世界上最好斗的民族同时又是最有礼貌的，极度傲慢自大和极度谦卑混合，一种美妙的平衡。在创立Oracle时，我们想在公司尽可能地创造这种文化，一方面很好斗另一方面很谦虚，如果你能平衡这两者，你在竞争中取得成功的机会就会大大增加，这对个人和集体都一样。"</p>
<p>“当我创立Oracle时，我想建立一个让我喜爱工作的环境，这是最主要的目的，当然，我也要通过公司养家糊口，但没想到会成为现在这么富有。钱不是最主要的，我真的是想和我喜欢或者佩服的人一起工作，Oracle招聘有一个原则：如果这个人你不喜欢一周有三次和他一起午餐，就不要他加入。我真正想建立的环境不只是要有能力的人，这样我才可以相信你的能力和努力精神，我们才能象团队一样工作，你才会完成你承诺要做的工作。从个人关系上我也会喜欢你，你的成功不会让我烦恼，我会为你而高兴，就象我自己成功一样。”</p>
<p>Ellison最崇拜的人是英国二战首相温斯顿—丘吉尔 "我认为,可能是他拯救了整个西方文明,他有令人难以置信的勇气,特立独行。",他和丘吉尔有很多相同点:学生时代都很普通，都拼命想取得父亲的赞赏，富于机智，爱挑剔，富有魅力。</p>
<p>我一向怀疑所谓“传统的智慧”，我不相信权威的观点，特别是那些人云亦云的权威，对我来说，事情必须合理才行．<br />
这种思考方式在企业经营上非常有价值，比如，你看到“传统的智慧”的错误，即使每个人都说那是对的，可是事实并非如此，那就成为我们进入市场的绝好机会．因为你将成为第一个有机会做不同事情，同时占据市场先机。可是，如何避免自己犯错误呢？很简单，就是勤奋加思考，不断尝试，和一大群聪明人一起讨论。</p>
<p>Oracle的前销售副总裁说：＂为Ellison工作就象骑着老虎，不管路程如何危险艰难，你必须紧贴老虎背，如果你掉下来，老虎会把你吃掉。其他人对他而言，只有两种人：朋友和敌人。＂</p>
<p>本文来自CSDN博客，转载请标明出处：http://blog.csdn.net/jiangtao/archive/2005/09/14/480970.aspx</p>
<div class="flockcredit" style="text-align: right; color: #ccc; font-size: x-small;">
<p>用 <a style="color: #999; font-weight: bold;" title="Flock Browser" href="http://www.flock.com/blogged-with-flock" target="_new">Flock 浏览器</a> 创建</p>
</div>
<p><!-- technorati tags begin --></p>
<p style="font-size: 10px; text-align: right;">标签: <a rel="tag" href="http://technorati.com/tag/oracle">oracle</a>, <a rel="tag" href="http://technorati.com/tag/%E5%95%86%E4%B8%9A">商业</a>, <a rel="tag" href="http://technorati.com/tag/%E6%A1%88%E4%BE%8B">案例</a></p>
<p><!-- technorati tags end --></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/402.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>禁用/启用所有外键约束</title>
		<link>http://www.dbalife.com/archives/383.html</link>
		<comments>http://www.dbalife.com/archives/383.html#comments</comments>
		<pubDate>Sat, 06 Feb 2010 16:01:14 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[DBA脚本]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[fk]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[启用]]></category>
		<category><![CDATA[外键]]></category>
		<category><![CDATA[禁用]]></category>
		<category><![CDATA[约束]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=383</guid>
		<description><![CDATA[1、ORACLE数据库中的外键约束名都在表user_constraints中可以查到。其中constraint_type='R'表示是外键约束。 2、启用外键约束的命令为：alter table table_name enable constraint constraint_name 3、禁用外键约束的命令为：alter table table_name disable constraint constraint_name 4、然后再用SQL查出数据库中所以外键的约束名： select 'alter table '&#124;&#124;table_name&#124;&#124;' enable constraint '&#124;&#124;constraint_name&#124;&#124;';' from user_constraints where constraint_type='R' select 'alter table '&#124;&#124;table_name&#124;&#124;' disable constraint '&#124;&#124;constraint_name&#124;&#124;';' from user_constraints where constraint_type='R' Related posts: oralce10g shrink drop table遭遇ORA-604 / ORA-1422 Oracle9i优化器介绍（下）
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/286.html' rel='bookmark' title='oralce10g shrink'>oralce10g shrink</a></li>
<li><a href='http://www.dbalife.com/archives/128.html' rel='bookmark' title='drop table遭遇ORA-604 / ORA-1422'>drop table遭遇ORA-604 / ORA-1422</a></li>
<li><a href='http://www.dbalife.com/archives/32.html' rel='bookmark' title='Oracle9i优化器介绍（下）'>Oracle9i优化器介绍（下）</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>1、ORACLE数据库中的外键约束名都在表user_constraints中可以查到。其中constraint_type='R'表示是外键约束。</p>
<p>2、启用外键约束的命令为：alter table table_name enable constraint constraint_name</p>
<p>3、禁用外键约束的命令为：alter table table_name disable constraint constraint_name</p>
<p>4、然后再用SQL查出数据库中所以外键的约束名：</p>
<p>select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R'</p>
<p>select 'alter table '||table_name||' disable constraint '||constraint_name||';' from user_constraints where constraint_type='R'</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/286.html' rel='bookmark' title='oralce10g shrink'>oralce10g shrink</a></li>
<li><a href='http://www.dbalife.com/archives/128.html' rel='bookmark' title='drop table遭遇ORA-604 / ORA-1422'>drop table遭遇ORA-604 / ORA-1422</a></li>
<li><a href='http://www.dbalife.com/archives/32.html' rel='bookmark' title='Oracle9i优化器介绍（下）'>Oracle9i优化器介绍（下）</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/383.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Trace Level Event Numbers</title>
		<link>http://www.dbalife.com/archives/329.html</link>
		<comments>http://www.dbalife.com/archives/329.html#comments</comments>
		<pubDate>Mon, 16 Nov 2009 06:28:29 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[10046]]></category>
		<category><![CDATA[level]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=329</guid>
		<description><![CDATA[Oracle Trace Level Event Numbers 相关参考信息: Oracle Trace: The Swiss Army Knife of Diagnostic Tools Setting Events Trace and TKPROF 10000 control file debug event, name 'control_file' 10001 control file crash event1 10002 control file crash event2 10003 control file crash event3 10004 control file crash event4 10005 trace latch operations for debugging 10006 testing [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/101.html' rel='bookmark' title='ORACLE STATSPACK REPORT输出结果说明'>ORACLE STATSPACK REPORT输出结果说明</a></li>
<li><a href='http://www.dbalife.com/archives/383.html' rel='bookmark' title='禁用/启用所有外键约束'>禁用/启用所有外键约束</a></li>
<li><a href='http://www.dbalife.com/archives/261.html' rel='bookmark' title='Oracle 10g 手动建库'>Oracle 10g 手动建库</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Oracle Trace Level Event Numbers</p>
<p>相关参考信息:</p>
<ul>
<li><a href="http://www.proligence.com/pr_oracle_trace.pdf"><span style="color: #0082ff;">Oracle Trace: The Swiss Army Knife of Diagnostic Tools</span></a></li>
<li><a href="http://www.ixora.com.au/q+a/events.htm"><span style="color: #0082ff;">Setting Events</span></a></li>
<li><a href="http://www.psoug.org/reference/trace_tkprof.html"><span style="color: #0082ff;">Trace and TKPROF</span></a></li>
</ul>
<div id="more-more">
<blockquote>
<pre>10000 control file debug event, name 'control_file'
10001 control file crash event1
10002 control file crash event2
10003 control file crash event3
10004 control file crash event4
10005 trace latch operations for debugging
10006 testing - block recovery forced
10007 log switch debug crash after new log select, thread %s
10008 log switch debug crash after new log header write, thread %s
10009 log switch debug crash after old log header write, thread %s
10010 Begin Transaction
10011 End Transaction
10012 Abort Transaction
10013 Instance Recovery
10014 Roll Back to Save Point
10015 Undo Segment Recovery
10016 Undo Segment extend
10017 Undo Segment Wrap
10018 Data Segment Create
10019 Data Segment Recovery
10020 partial link restored to linked list (KSG)
10021 latch cleanup for state objects (KSS)
10022 trace ktsgsp
10023 Create Save Undo Segment
10024 Write to Save Undo
10025 Extend Save Undo Segment
10026 Apply Save Undo
10027 latch cleanup for enqueue locks (KSQ)
10028 latch cleanup for enqueue resources (KSQ)
10029 session logon (KSU)
10030 session logoff (KSU)
10031 row source debug event (R*)
10032 sort end (SOR*)
10035 parse <acronym title="Structured Query Language
">SQL</acronym> statement (OPIPRS)
10036 create remote row source (QKANET)
10037 allocate remote row source (QKARWS)
10038 dump row source tree (QBADRV)
10039 type checking (OPITCA)
10040 dirty cache list
10041 dump undo records skipped
10042 trap error during undo application
10044 free list undo operations
10045 "free list update operations - ktsrsp, ktsunl"
10046 enable <acronym title="Structured Query Language
">SQL</acronym> statement timing
10047 trace switching of sessions
10048 Undo segment shrink
10049 protect library cache memory heaps
10050 sniper trace
10051 trace OPI calls
10052 don't clean up obj$
10053 <acronym title="Cost based optimer
">CBO</acronym> Enable optimizer trace
10054 trace UNDO handling in MLS
10055 trace UNDO handing
10056 dump analyze stats (kdg)
10057 suppress file names in error messages
10058 use table scan cost in tab$.spare1
10060 <acronym title="Cost based optimer
">CBO</acronym> Enable predicate dump
10061 disable SMON from cleaning temp segment
10062 disable usage of <acronym title="Operating System
">OS</acronym> Roles in osds
10063 disable usage of <acronym title="Database Administrator
">DBA</acronym> and OPER privileges in osds
10064 "thread enable debug crash level %s, thread %s"
10065 limit library cache dump information for state object dump
10066 simulate failure to verify file
10067 force redo log checksum errors - block number
10068 force redo log checksum errors - file number
10069 Trusted Oracle test event
10070 force datafile checksum errors - block number
10071 force datafile checksum errors - file number
10072 protect latch recovery memory
10073 have PMON dump info before latch cleanup
10074 default trace function mask for kst
10075 <acronym title="Cost based optimer
">CBO</acronym> Disable outer-join to regular join conversion
10076 <acronym title="Cost based optimer
">CBO</acronym> Enable cartesian product join costing
10077 <acronym title="Cost based optimer
">CBO</acronym> Disable view-merging optimization for outer-joins
10078 <acronym title="Cost based optimer
">CBO</acronym> Disable constant predicate elimination optimization
10080 dump a block on a segment list which cannot be exchanged
10081 segment High Water Mark has been advanced
10082 free list head block is the same as the last block
10083 a brand new block has been requested from space management
10084 free list becomes empty
10085 free lists have been merged
10086 <acronym title="Cost based optimer
">CBO</acronym> Enable error if kko and qka disagree on oby sort
10087 disable repair of media corrupt data blocks
10088 <acronym title="Cost based optimer
">CBO</acronym> Disable new NOT IN optimization
10089 <acronym title="Cost based optimer
">CBO</acronym> Disable index sorting
10090 invoke other events before crash recovery
10091 <acronym title="Cost based optimer
">CBO</acronym> Disable constant predicate merging
10092 <acronym title="Cost based optimer
">CBO</acronym> Disable hash join
10093 <acronym title="Cost based optimer
">CBO</acronym> Enable force hash joins
10094 before resizing a data file
10095 dump debugger commands to trace file
10096 after the cross instance call when resizing a data file
10097 after generating redo when resizing a data file
10098 after the <acronym title="Operating System
">OS</acronym> has increased the size of a data file
10099 after updating the file header with the new file size
10100 after the <acronym title="Operating System
">OS</acronym> has decreased the size of a data file
10101 atomic redo write recovery
10102 switch off anti-joins
10103 <acronym title="Cost based optimer
">CBO</acronym> Disable hash join swapping
10104 dump hash join statistics to trace file
10105 <acronym title="Cost based optimer
">CBO</acronym> Enable constant pred trans and MPs w WHERE-clause
10106 <acronym title="Cost based optimer
">CBO</acronym> Disable evaluating correlation pred last for NOT IN
10107 <acronym title="Cost based optimer
">CBO</acronym> Always use bitmap index
10108 <acronym title="Cost based optimer
">CBO</acronym> Don't use bitmap index
10109 <acronym title="Cost based optimer
">CBO</acronym> Disable move of negated predicates
10110 <acronym title="Cost based optimer
">CBO</acronym> Try index rowid range scans
10111 Bitmap index creation switch
10112 Bitmap index creation switch
10113 Bitmap index creation switch
10114 Bitmap index creation switch
10115 <acronym title="Cost based optimer
">CBO</acronym> Bitmap optimization use maximal expression
10116 <acronym title="Cost based optimer
">CBO</acronym> Bitmap optimization switch
10117 <acronym title="Cost based optimer
">CBO</acronym> Disable new parallel cost model
10118 <acronym title="Cost based optimer
">CBO</acronym> Enable hash join costing
10119 QKA Disable GBY sort elimination
10120 <acronym title="Cost based optimer
">CBO</acronym> Disable index fast full scan
10121 <acronym title="Cost based optimer
">CBO</acronym> Don't sort bitmap chains
10122 <acronym title="Cost based optimer
">CBO</acronym> disable count(col) =&gt; count(*) transformation
10123 QKA Disable Bitmap And-EQuals
10145 test auditing network errors
10146 enable Oracle TRACE collection
10200 block cleanout
10201 consistent read undo application
10202 consistent read block header
10203 consistent read buffer status
10204 signal recursive extend
10205 row cache debugging
10206 transaction table consistent read
10207 consistent read transactions' status report
10208 consistent read loop check
10209 enable simulated error on control file
10210 check data block integrity
10211 check index block integrity
10212 check cluster integrity
10213 crash after control file write
10214 simulate write errors on control file
10215 simulate read errors on control file
10216 dump control file header
10217 debug sequence numbers
10218 dump uba of applied undo
10219 monitor multi-pass row locking
10220 show updates to the transaction table
10221 show changes done with undo
10222 row cache
10223 transaction layer - turn on verification codes
10226 trace CR applications of undo for data operations
10227 verify (multi-piece) row structure
10228 trace application of redo by kcocbk
10230 check redo generation by copying before applying
10231 skip corrupted blocks on _table_scans_
10232 dump corrupted blocks symbolically when kcbgotten
10233 skip corrupted blocks on index operations
10234 trigger event after calling kcrapc to do redo N times
10235 check memory manager internal structures
10236 library cache manager
10237 simulate ^C (for testing purposes)
10238 instantiation manager
10239 multi-instance library cache manager
10240 dump dba's of blocks that we wait for
10241 dump <acronym title="Structured Query Language
">SQL</acronym> generated for remote execution (OPIX)
10243 simulated error for test %s of K2GTAB latch cleanup
10244 make tranids in error msgs print as 0.0.0 (for testing)
10245 simulate lock conflict error for testing PMON
10246 print trace of PMON actions to trace file
10247 Turn on scgcmn tracing. (<acronym title="Virtual Memory System
">VMS</acronym> ONLY)
10248 turn on tracing for dispatchers
10249 turn on tracing for multi-stated servers
10250 Trace all allocate and free calls to the topmost <acronym title="System Global Area
">SGA</acronym> heap
10251 check consistency of transaction table and undo block
10252 simulate write error to data file header
10253 simulate write error to redo log
10254 trace cross-instance calls
10256 turn off multi-threaded server load balancing
10257 trace multi-threaded server load balancing
10258 force shared servers to be chosen round-robin
10259 get error message text from remote using explicit call
10260 Trace calls to SMPRSET (<acronym title="Virtual Memory System
">VMS</acronym> ONLY)
10261 Limit the size of the <acronym title="Process Global Area
">PGA</acronym> heap
10262 Don't check for memory leaks
10263 Don't free empty <acronym title="Process Global Area
">PGA</acronym> heap extents
10264 Collect statistics on context area usage (x$ksmcx)
10265 Keep random system generated output out of error messages
10266 Trace OSD stack usage
10267 Inhibit KSEDMP for testing
10268 Don't do forward coalesce when deleting extents
10269 Don't do coalesces of free space in SMON
10270 Debug shared cursors
10271 distributed transaction after COLLECT
10272 distributed transaction before PREPARE
10273 distributed transaction after PREPARE
10274 distributed transaction before COMMIT
10275 distributed transaction after COMMIT
10276 distributed transaction before FORGET
10277 Cursor sharing (or not) related event (used for testing)
10281 maximum time to wait for process creation
10282 Inhibit signalling of other backgrounds when one dies
10286 Simulate control file open error
10287 Simulate archiver error
10288 Do not check block type in ktrget
10289 Do block dumps to trace file in hex rather than fromatted
10290 kdnchk - checkvalid event - not for general purpose use.
10291 die in dtsdrv to test controlfile undo"
10292 dump uet entries on a 1561 from dtsdrv"
10293 dump debugging information when doing block recovery"
10294 enable PERSISTENT <acronym title="distributed lock manager
">DLM</acronym> operations on non-compliant systems"
10300 disable undo compatibility check at database open
10301 Enable LCK timeout table consistency check"
10320 Enable data layer (kdtgrs) tracing of space management calls"
10352 report direct path statistics
10353 number of slots
10354 turn on direct read path for parallel query
10355 turn on direct read path for scans
10356 turn on hint usage for direct read
10357 turn on debug information for direct path
10374 parallel query server interrupt (validate lock value)
10375 turn on checks for statistics rollups
10376 turn on table queue statistics
10377 turn off load balancing
10379 direct read for rowid range scans (unimplemented)
10380 kxfp latch cleanup testing event
10381 kxfp latch cleanup testing event
10382 parallel query server interrupt (reset)
10383 auto parallelization testing event
10384 parallel dataflow scheduler tracing
10385 parallel table scan range sampling method
10386 parallel <acronym title="Structured Query Language
">SQL</acronym> hash and range statistics
10387 parallel query server interrupt (normal)
10388 parallel query server interrupt (failure)
10389 parallel query server interrupt (cleanup)
10390 Trace parallel query slave execution
10391 trace rowid range partitioning
10392 parallel query debugging bits
10393 print parallel query statistics
10394 allow parallelization of small tables
10395 adjust sample size for range table queues
10396 circumvent range table queues for queries
10397 suppress verbose parallel coordinator error reporting
10398 enable timeouts in parallel query threads
10399 use different internal maximum buffer size
10400 turn on system state dumps for shutdown debugging
10500 turn on traces for SMON
10510 turn off SMON check to offline pending offline rollbacksegment
10511 turn off SMON check to cleanup undo dictionary
10512 turn off SMON check to shrink rollback segments
10600 check cursor frame. allocation
10602 cause an access violation (for testing purposes)
10603 cause an error to occur during truncate (for testing purposes)
10604 trace parallel create index
10605 enable parallel create index by default
10606 trace parallel create index
10607 trace index rowid partition scan
10608 trace create bitmap index
10610 trace create index pseudo optimizer
10666 Do not get database enqueue name
10667 Cause sppst to check for valid process ids
10690 Set shadow process core file dump type (Unix only)
10691 Set background process core file type (Unix only)
10700 Alter access violation exception handler
10701 Dump direct loader index keys
10702 Enable histogram data generation
10703 Simulate process death during enqueue get
10704 Print out information about what enqueues are being obtained
10706 Print out information about instance lock manipulation
10707 Simulate process death for instance registration
10708 Print out Tracing information for skxf multi instance comms
10709 enable parallel instances in create index by default
10710 trace bitmap index access
10711 trace bitmap index merge
10712 trace bitmap index or
10713 trace bitmap index and
10714 trace bitmap index minus
10715 trace bitmap index conversion to rowids
10800 disable Smart Disk scan
10801 enable Smart Disk trace
10802 reserved for Smart Disk
10803 write timing statistics on OPS recovery scan
10804 reserved for ksxb
10805 reserved for row source sort
10900 extent manager fault insertion event #%s
10924 import storage parse error ignore event
10925 trace name context forever
10926 trace name context forever
10927 trace name context forever
10928 trace name context forever
10999 do not get database enqueue name</pre>
</blockquote>
</div>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/101.html' rel='bookmark' title='ORACLE STATSPACK REPORT输出结果说明'>ORACLE STATSPACK REPORT输出结果说明</a></li>
<li><a href='http://www.dbalife.com/archives/383.html' rel='bookmark' title='禁用/启用所有外键约束'>禁用/启用所有外键约束</a></li>
<li><a href='http://www.dbalife.com/archives/261.html' rel='bookmark' title='Oracle 10g 手动建库'>Oracle 10g 手动建库</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/329.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>oralce10g shrink</title>
		<link>http://www.dbalife.com/archives/286.html</link>
		<comments>http://www.dbalife.com/archives/286.html#comments</comments>
		<pubDate>Wed, 22 Jul 2009 04:21:59 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[shrink]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=286</guid>
		<description><![CDATA[1、在10G 以前收缩表空间是用： 　　1.exp/imp 　　2.alter table xxx move　 2、10G后用shrink收缩表空间 表空间中支持自动段空间管理 (ASSM), 否则会报 ORA-10635: Invalid segment or tablespace type Shrink操作适用于 表（堆组织表或索引组织表） 分区 子分区 索引 大对象（数据或索引段） 物化视图 物化视图日志 堆组织段(heap-organized segments)必须开启行迁移功能: alter table tbname enable row movement shrink 保持HWM alter table tbname shrink space compact; 回缩表与HWM alter table tbname shrink space; 回缩表与相关索引 alter table tbname shrink space cascade; 回缩索引 [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/383.html' rel='bookmark' title='禁用/启用所有外键约束'>禁用/启用所有外键约束</a></li>
<li><a href='http://www.dbalife.com/archives/329.html' rel='bookmark' title='Oracle Trace Level Event Numbers'>Oracle Trace Level Event Numbers</a></li>
<li><a href='http://www.dbalife.com/archives/128.html' rel='bookmark' title='drop table遭遇ORA-604 / ORA-1422'>drop table遭遇ORA-604 / ORA-1422</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #000000;">1、在10G 以前收缩表空间是用：</span></strong></p>
<p>　　1.exp/imp<br />
　　2.alter table xxx move　</p>
<p><strong><span style="color: #000000;">2、10G后用shrink收缩表空间</span></strong></p>
<p>表空间中支持自动段空间管理 (ASSM), 否则会报 ORA-10635: Invalid segment or tablespace type</p>
<p>Shrink操作适用于</p>
<p style="padding-left: 30px;">表（堆组织表或索引组织表）<br />
分区<br />
子分区<br />
索引<br />
大对象（数据或索引段）<br />
物化视图<br />
物化视图日志</p>
<p>堆组织段(heap-organized segments)必须开启行迁移功能:<br />
alter table tbname enable row movement shrink</p>
<p>保持HWM<br />
alter table tbname shrink space compact;</p>
<p>回缩表与HWM<br />
alter table tbname shrink space;</p>
<p>回缩表与相关索引<br />
alter table tbname shrink space cascade;</p>
<p>回缩索引<br />
alter index idxname shrink space;<br />
　　<br />
<span style="color: #ff0000;">相关限制：<br />
1）cluster中的表。<br />
2）有long字段的表。<br />
3）有on_commit物化视图的表。<br />
4）有基于rowid物化视图的表。<br />
5）IOT映射表。<br />
6）有基于函数索引的表</span></p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/383.html' rel='bookmark' title='禁用/启用所有外键约束'>禁用/启用所有外键约束</a></li>
<li><a href='http://www.dbalife.com/archives/329.html' rel='bookmark' title='Oracle Trace Level Event Numbers'>Oracle Trace Level Event Numbers</a></li>
<li><a href='http://www.dbalife.com/archives/128.html' rel='bookmark' title='drop table遭遇ORA-604 / ORA-1422'>drop table遭遇ORA-604 / ORA-1422</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/286.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>undo相关的sql</title>
		<link>http://www.dbalife.com/archives/278.html</link>
		<comments>http://www.dbalife.com/archives/278.html#comments</comments>
		<pubDate>Thu, 02 Jul 2009 03:36:41 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[DBA脚本]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[undo]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=278</guid>
		<description><![CDATA[查UNDO统计信息语句： SELECT TO_CHAR(BEGIN_TIME,'HH24:MI:SS') BEGIN_TIME, TO_CHAR(END_TIME,'HH24:MI:SS') END_TIME, UNDOBLKS FROM V$UNDOSTAT; -------------------------------------------结果-------------------------------------------------------------- begin_time end_time undoblocks 9:48:30        9:53:07        76293 9:38:30        9:48:30        143670 9:28:30        9:38:30        130921 9:18:30        9:28:30        122500 9:08:30        9:18:30    [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/178.html' rel='bookmark' title='表空间使用状况查询'>表空间使用状况查询</a></li>
<li><a href='http://www.dbalife.com/archives/47.html' rel='bookmark' title='用sql截取字符串'>用sql截取字符串</a></li>
<li><a href='http://www.dbalife.com/archives/144.html' rel='bookmark' title='等待事件相关的SQL'>等待事件相关的SQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>查UNDO统计信息语句：</strong><br />
SELECT TO_CHAR(BEGIN_TIME,'HH24:MI:SS') BEGIN_TIME,<br />
TO_CHAR(END_TIME,'HH24:MI:SS') END_TIME,<br />
UNDOBLKS<br />
FROM V$UNDOSTAT;<br />
-------------------------------------------结果--------------------------------------------------------------<br />
begin_time end_time undoblocks<br />
9:48:30        9:53:07        76293<br />
9:38:30        9:48:30        143670<br />
9:28:30        9:38:30        130921<br />
9:18:30        9:28:30        122500<br />
9:08:30        9:18:30        149030<br />
8:58:30        9:08:30        144586<br />
8:48:30        8:58:30        108095<br />
8:38:30        8:48:30        63533<br />
8:28:30        8:38:30        72819<br />
8:18:30        8:28:30        23321<br />
8:08:30        8:18:30        2026<br />
7:58:30        8:08:30        15480<br />
7:48:30        7:58:30        91111<br />
7:38:30        7:48:30        15810<br />
7:28:30        7:38:30        56922<br />
7:18:30        7:28:30        30449<br />
7:08:30        7:18:30        6096<br />
6:58:30        7:08:30        15022<br />
6:48:30        6:58:30        91904<br />
6:38:30        6:48:30        38794<br />
6:28:30        6:38:30        111884<br />
----------------------------------------------------------------------------------------------------------<br />
<strong>查UNDO表空间的使用情况：</strong><br />
select<br />
  a.a1 表空间名,<br />
  substr(b.b2/1024/1024/1024,1,5) 表空间大小G,<br />
  substr(a.a2/1024/1024/1024,1,5) 剩余表空间G,<br />
  substr((b.b2-a.a2)/1024/1024/1024,1,5) 实际使用表空间G,<br />
  substr((b.b2-a.a2)/b.b2*100,1,5) 利用率,<br />
  c.c2 类型,<br />
  c.c3 区管理方式<br />
  from<br />
  (select tablespace_name a1,sum(Nvl(bytes,0)) a2 from dba_free_space group by tablespace_name) a,<br />
  (select tablespace_name b1,sum(bytes) b2 from dba_data_files group by tablespace_name) b,<br />
  (select tablespace_name c1,contents c2,extent_management c3 from dba_tablespaces) c<br />
  where a.a1=b.b1 and b.b1=c.c1<br />
  order by c.c2 desc<br />
-------------------------------------------------结果--------------------------------------------------------------------<br />
表空间名        表空间大小(G)        剩余(G)        使用        利用率        表空间类型        管理方式<br />
UNDOTBS1        17.24        1.124        16.12        93.48        UNDO        LOCAL<br />
----------------------------------------------------------------------------------------------------------------------------<br />
<strong>建议UNDO峰值：</strong><br />
select ur undo_retention,dbs db_block_size, ((ur * (ups * dbs)) + (dbs * 24)) / 1024 / 1024 as "M_bytes"<br />
from (select value as ur from v$parameter where name = 'undo_retention'),<br />
       (select (undoblks / ((end_time - begin_time) * 86400)) ups from v$undostat where undoblks in (select max(undoblks) from  v$undostat ) ),<br />
       (select value as dbs from v$parameter where name = 'db_block_size');<br />
----------------------------------------------结果------------------------------------------------------------------<br />
undo_retention        db_block_size        M_bytes<br />
10800                              8192                   33,376.96875</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/178.html' rel='bookmark' title='表空间使用状况查询'>表空间使用状况查询</a></li>
<li><a href='http://www.dbalife.com/archives/47.html' rel='bookmark' title='用sql截取字符串'>用sql截取字符串</a></li>
<li><a href='http://www.dbalife.com/archives/144.html' rel='bookmark' title='等待事件相关的SQL'>等待事件相关的SQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/278.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>compatible参数</title>
		<link>http://www.dbalife.com/archives/271.html</link>
		<comments>http://www.dbalife.com/archives/271.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 17:16:01 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[compatible]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[ora-01130]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=271</guid>
		<description><![CDATA[用rman复制数据库时，遇到ORA-01130错误，如下： RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: Duplicate Db 命令 (在 07/02/2009 00:40:44 上) 失败 RMAN-06136: 来自辅助数据库的 ORACLE 错误: ORA-01503: CREATE CONTROLFILE 失败 ORA-01130: 数据库文件版本 10.2.0.1.0 与 ORACLE 版本 10.2.0.0.0 不兼容 ORA-01110: 数据文件 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\AUXILIARY\SYSTEM01.DBF' 这是因为auxiliary库的compatible参数被设定为默认值10.2.0： SQL&#62; alter system set compatible='10.2.0.1.0' scope=spfile; 系统已更改。 然后重启数据库即可。 Related posts: windows平台上的LRM-00116 RMAN TAG参数的禁区 Oracle 10g [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/269.html' rel='bookmark' title='windows平台上的LRM-00116'>windows平台上的LRM-00116</a></li>
<li><a href='http://www.dbalife.com/archives/192.html' rel='bookmark' title='RMAN TAG参数的禁区'>RMAN TAG参数的禁区</a></li>
<li><a href='http://www.dbalife.com/archives/261.html' rel='bookmark' title='Oracle 10g 手动建库'>Oracle 10g 手动建库</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>用rman复制数据库时，遇到ORA-01130错误，如下：</p>
<p>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br />
RMAN-00571: ===========================================================<br />
RMAN-03002: Duplicate Db 命令 (在 07/02/2009 00:40:44 上) 失败<br />
RMAN-06136: 来自辅助数据库的 ORACLE 错误: ORA-01503: CREATE CONTROLFILE 失败<br />
ORA-01130: 数据库文件版本 10.2.0.1.0 与 ORACLE 版本 10.2.0.0.0 不兼容<br />
ORA-01110: 数据文件 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\AUXILIARY\SYSTEM01.DBF'</p>
<p>这是因为auxiliary库的compatible参数被设定为默认值10.2.0：</p>
<p>SQL&gt; alter system set compatible='10.2.0.1.0' scope=spfile;<br />
系统已更改。</p>
<p>然后重启数据库即可。</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/269.html' rel='bookmark' title='windows平台上的LRM-00116'>windows平台上的LRM-00116</a></li>
<li><a href='http://www.dbalife.com/archives/192.html' rel='bookmark' title='RMAN TAG参数的禁区'>RMAN TAG参数的禁区</a></li>
<li><a href='http://www.dbalife.com/archives/261.html' rel='bookmark' title='Oracle 10g 手动建库'>Oracle 10g 手动建库</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/271.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows平台上的LRM-00116</title>
		<link>http://www.dbalife.com/archives/269.html</link>
		<comments>http://www.dbalife.com/archives/269.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 16:49:08 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[LRM-00116]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[pfile]]></category>
		<category><![CDATA[spfile]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=269</guid>
		<description><![CDATA[建auxiliary数据库时，照《Creating and Updating Duplicate Databases with RMAN》中的例子建立init.ora。 示例文件： DB_NAME=newdb CONTROL_FILES=(/dup/oracle/oradata/trgt/control01.ctl,                /dup/oracle/oradata/trgt/control02.ctl) # note that the following two initialization parameters have equivalents # on the DUPLICATE command itself DB_FILE_NAME_CONVERT=(/oracle/oradata/trgt/,/dup/oracle/oradata/trgt/) LOG_FILE_NAME_CONVERT=(/oracle/oradata/trgt/redo,/dup/oracle/oradata/trgt/redo) 改为Windows平台适用： DB_NAME=auxi CONTROL_FILES=(D:\oracle\product\10.2.0\oradata\auxiliary\control01.ctl,                D:\oracle\product\10.2.0\oradata\auxiliary\control02.ctl) # note that the following two initialization parameters have equivalents # on the DUPLICATE command itself DB_FILE_NAME_CONVERT=(D:\oracle\product\10.2.0\oradata\test\,D:\oracle\product\10.2.0\oradata\auxiliary\) LOG_FILE_NAME_CONVERT=(D:\oracle\product\10.2.0\oradata\test\,D:\oracle\product\10.2.0\oradata\auxiliary\) SQL*Plus: Release [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/271.html' rel='bookmark' title='compatible参数'>compatible参数</a></li>
<li><a href='http://www.dbalife.com/archives/261.html' rel='bookmark' title='Oracle 10g 手动建库'>Oracle 10g 手动建库</a></li>
<li><a href='http://www.dbalife.com/archives/192.html' rel='bookmark' title='RMAN TAG参数的禁区'>RMAN TAG参数的禁区</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>建auxiliary数据库时，照《Creating and Updating Duplicate Databases with RMAN》中的例子建立init.ora。</p>
<p>示例文件：<br />
DB_NAME=newdb<br />
CONTROL_FILES=(/dup/oracle/oradata/trgt/control01.ctl,<br />
               /dup/oracle/oradata/trgt/control02.ctl)<br />
# note that the following two initialization parameters have equivalents<br />
# on the DUPLICATE command itself<br />
DB_FILE_NAME_CONVERT=(/oracle/oradata/trgt/,/dup/oracle/oradata/trgt/)<br />
LOG_FILE_NAME_CONVERT=(/oracle/oradata/trgt/redo,/dup/oracle/oradata/trgt/redo)</p>
<p>改为Windows平台适用：<br />
DB_NAME=auxi<br />
CONTROL_FILES=(D:\oracle\product\10.2.0\oradata\auxiliary\control01.ctl,<br />
               D:\oracle\product\10.2.0\oradata\auxiliary\control02.ctl)<br />
# note that the following two initialization parameters have equivalents<br />
# on the DUPLICATE command itself<br />
DB_FILE_NAME_CONVERT=(D:\oracle\product\10.2.0\oradata\test\,D:\oracle\product\10.2.0\oradata\auxiliary\)<br />
LOG_FILE_NAME_CONVERT=(D:\oracle\product\10.2.0\oradata\test\,D:\oracle\product\10.2.0\oradata\auxiliary\)</p>
<p>SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 7月 1 23:23:04 2009</p>
<p>Copyright (c) 1982, 2005, Oracle.  All rights reserved.</p>
<p>已连接到空闲例程。</p>
<p>SQL&gt; create spfile from pfile;<br />
create spfile from pfile<br />
*<br />
第 1 行出现错误:<br />
ORA-01078: failure in processing system parameters<br />
LRM-00116: syntax error at 'LOG_FILE_NAME_CO' following 'D:\oracle\produc'</p>
<p>修正init.ora中表达式，给路径加上双引号：<br />
DB_FILE_NAME_CONVERT=("D:\oracle\product\10.2.0\oradata\test\","D:\oracle\product\10.2.0\oradata\auxiliary\")<br />
LOG_FILE_NAME_CONVERT=("D:\oracle\product\10.2.0\oradata\test\","D:\oracle\product\10.2.0\oradata\auxiliary\")</p>
<p>SQL&gt; create spfile from pfile;</p>
<p>文件已创建。</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/271.html' rel='bookmark' title='compatible参数'>compatible参数</a></li>
<li><a href='http://www.dbalife.com/archives/261.html' rel='bookmark' title='Oracle 10g 手动建库'>Oracle 10g 手动建库</a></li>
<li><a href='http://www.dbalife.com/archives/192.html' rel='bookmark' title='RMAN TAG参数的禁区'>RMAN TAG参数的禁区</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/269.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle 10g 手动建库</title>
		<link>http://www.dbalife.com/archives/261.html</link>
		<comments>http://www.dbalife.com/archives/261.html#comments</comments>
		<pubDate>Wed, 24 Jun 2009 08:44:33 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[create database]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[建库]]></category>
		<category><![CDATA[手动]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=261</guid>
		<description><![CDATA[本文系转载，原作者不详  在Oracle中建库，通常有两种方法。一是使用Oracle的建库工且DBCA，这是一个图形界面工且，使用起来方便且很容易理解，因为它的界面友好、美观，而且提示也比较齐全。在Ｗindows系统中，这个工具可以在Oracle程序组中打开（”开始”—“程序”—“ Oracle - OraDb10g_home1”—“ Configuration and Migration Tools”—“ Database Configuration Assistant”），也可以在命令行（”开始”—“运行”—“cmd”）工具中直接输入dbca来打开。另一种方法就是手工建库，这也就是下面所要讲的内容。 手工建库比起使用DBCA建库来说，是比较麻烦的，但是如果我们学好了手工建库的话，就可以使我们更好地理解Oracle数据库的体系结构。手工建库须要经过几个步骤，每一个步骤都非常关键。它包括： １、 创建必要的相关目录 ２、 创建初始化参数文件 ３、 设置环境变量Oracle_sid ４、 创建实例 ５、 创建口令文件 ６、 启动数据库到nomount(实例)状态 ７、 执行建库脚本 ８、 执行catalog脚步本创建数据字典 ９、 执行catproc创建package包 １０、 执行pupbld １１、 由初始化参数文件创建spfile文件 １２、 执行scott脚本创建scott模式 做完了以上的步骤之后就可以使用“SQL&#62;alter database open;”打开数据库正常的使用了。下面，我将具体地把以上的几个步骤用实验展开来讲。 实验系统平台：Windows Server 2000　　　数据库系统版本：Oracle Database 10Ｇ Oracle的安装路径：D盘　　　　　 　创建的数据库名称：book １、打开命令行工具，创建必要有相关目录 C:\&#62;mkdir D:\oracle\product\10.1.0\admin\book C:\&#62;mkdir D:\oracle\product\10.1.0\admin\book\bdump C:\&#62;mkdir D:\oracle\product\10.1.0\admin\book\udump C:\&#62;mkdir [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/269.html' rel='bookmark' title='windows平台上的LRM-00116'>windows平台上的LRM-00116</a></li>
<li><a href='http://www.dbalife.com/archives/187.html' rel='bookmark' title='ORACLE 10G AWR 速查'>ORACLE 10G AWR 速查</a></li>
<li><a href='http://www.dbalife.com/archives/271.html' rel='bookmark' title='compatible参数'>compatible参数</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span>本文系转载，原作者不详</span><span> </span></p>
<p><span>在Oracle中建库，通常有两种方法。一是使用Oracle的建库工且DBCA，这是一个图形界面工且，使用起来方便且很容易理解，因为它的界面友好、美观，而且提示也比较齐全。在Ｗindows系统中，这个<a id="vad_6" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,6,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,6)" name="6" href="http://action.vogate.com/c/c.php?r=&amp;aid=11117&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.free789.com/&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;rn=145101&amp;k=%u5DE5%u5177" target="_blank">工具</a>可以在Oracle程序组中打开（”开始”—“程序”—“ Oracle - OraDb10g_home1”—“ Configuration and Migration Tools”—“ Database Configuration Assistant”），也可以在命令行（”开始”—“运行”—“cmd”）工具中直接输入dbca来打开。另一种方法就是手工建库，这也就是下面所要讲的内容。 </span></p>
<p>手工建库比起使用DBCA建库来说，是比较麻烦的，但是如果我们学好了手工建库的话，就可以使我们更好地理解Oracle数据库的体系结构。手工建库须要经过几个步骤，每一个步骤都非常关键。它包括：</p>
<p><span>１、 创建必要的相关目录 </span></p>
<p><span>２、 创建初始化参数文件 </span></p>
<p>３、 设置环境变量Oracle_sid</p>
<p><span>４、 创建实例 </span></p>
<p><span>５、 创建口令文件 </span></p>
<p>６、 启动数据库到nomount(实例)状态</p>
<p><span>７、 <a id="vad_3" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,3,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,3)" name="3" href="http://action.vogate.com/c/c.php?r=&amp;aid=11119&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.vogate.com/a_page_view.php%3Fid%3D414&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;rn=614056&amp;k=%u6267%u884C" target="_blank">执行</a>建库脚本 </span></p>
<p><span><span>８、 执行catalog脚步本创建数据字典 </span></span></p>
<p><span><span>９、 执行catproc创建package包 </span></span></p>
<p><span>１０、 执行pupbld </span></p>
<p><span>１１、 由初始化参数文件创建spfile文件 </span></p>
<p><span><span>１２、 执行scott脚本创建scott模式 </span></span></p>
<p>做完了以上的步骤之后就可以使用“SQL&gt;alter database open;”打开数据库正常的使用了。下面，我将具体地把以上的几个步骤用实验展开来讲。<span id="more-261"></span></p>
<p>实验系统平台：Windows Server 2000　　　数据库系统版本：Oracle Database 10Ｇ</p>
<p><span>Oracle的安装路径：D盘　　　　　 　创建的数据库名称：book </span></p>
<p><span><span>１、打开命令行工具，创建必要有相关目录 </span></span></p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\admin\book</p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\admin\book\bdump</p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\admin\book\udump</p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\admin\book\cdump</p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\admin\book\pfile</p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\admin\book\create</p>
<p>C:\&gt;mkdir D:\oracle\product\10.1.0\oradata\book</p>
<p><span><span><span>上面创建目录的过程也可以在Windows的图形界面中去创建。其中D:\oracle\product\10.1.0\admin\book目录下的几个子目录主要用于存放数据库运行过程中的跟踪</span><a id="vad_1" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,1,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,1)" name="1" href="http://action.vogate.com/c/c.php?r=&amp;aid=4938&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//bj.8j.com/&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;rn=797123&amp;k=%u4FE1%u606F" target="_blank">信息</a>。最重要的两上子目录是bdump和udump目录，bdump目录存放的是数据库动行过程中的各个后台进程的跟踪信息，当中alert文件是警告文件，其文件名称为alert_book.log，当数据库出现问题时，首先就可以去查看此文件以找出</span><a id="vad_0" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,0,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,0)" name="0" href="http://action.vogate.com/c/c.php?r=&amp;aid=11032&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.9wee.com/activity/2008_promotion_yx/index_b.php%3Fq%3D68862897_103_0&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;rn=511728&amp;k=%u539F%u56E0" target="_blank">原因</a><span><span><span>，手工创建过程中出现的各种问题往往也可以</span><a id="vad_7" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,7,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,7)" name="7" href="http://action.vogate.com/c/c.php?r=&amp;aid=11000&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.keno8868.com&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;rn=789292&amp;k=%u901A%u8FC7" target="_blank">通过</a>查看这个文件找到原因。Udump目录存放和特定会话相关的跟踪信息。D:\oracle\product\10.1.0\oradata\book目录存放各种数据库文件，包括控制文件、数据文件、重做日志文件。 </span></span></span></p>
<p><span>2、创建初始化参数文件 </span></p>
<p><span>数据库系统启动时须要用初始化参数文件的设置分配内存、启动必要的后台进程的。因此，初始化参数文件创建的是否正确、参数设置是否正确关系着整个建库的“命运”。 </span></p>
<p><span><span>创建初始化参数文件可以通过拷贝现在的初始化参数文件并将其做适当的修改即可，从而不必要用手工去一句一句地写出来，因为初始化参数文件的结构体系基本上都是一样的。在我们安装Oracle的时候，系统已经为我们安装了一个名为orcl的数据库，于是我们可以从它那里得到一份初始化参数文件。打开D:\oracle\product\10.1.0\admin\orcl\pfile，找到init.ora文件，把它拷贝到 D:\oracle\product\10.1.0\bd_1\databse下，并将其改名为initbook.ora。接着用记事本的方式打开 initbook.ora，修改以下的内容： </span></span></p>
<p>db_domain=""</p>
<p>db_name=book</p>
<p>control_files=("D:\oracle\product\10.1.0\oradata\book\control01.ctl", "D:\oracle\product\10.1.0\oradata\book\control02.ctl", "D:\oracle\product\10.1.0\oradata\book\control03.ctl")</p>
<p>undo_management=AUTO</p>
<p>undo_tablespace=UNDOTBS1　――注意此处的“UNDOTBS1”要和建库脚步本中对应</p>
<p>background_dump_dest=D:\oracle\product\10.1.0\admin\book\bdump</p>
<p>core_dump_dest=D:\oracle\product\10.1.0\admin\book\cdump</p>
<p>user_dump_dest=D:\oracle\product\10.1.0\admin\book\udump</p>
<p>３、打开命令行，设置环境变量oracle_sid</p>
<p>C:\&gt;set oracle_sid=book</p>
<p>设置环境变量的目地是在默认的情况下，指定命令行中所操作的数据库实例是book。</p>
<p><span>４、创建实例（即后台控制服务） </span></p>
<p>C:\&gt;oradim –new –sid book</p>
<p>orad</p>
<p><span><span><span>im是创建实例的</span><a id="vad_7" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,7,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,7)" name="7" href="http://action.vogate.com/c/c.php?r=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;aid=11000&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.keno8868.com&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406_2.html&amp;rn=586171&amp;k=%u5DE5%u5177" target="_blank">工具</a>程序名称，-new表明</span><a id="vad_1" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,1,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,1)" name="1" href="http://action.vogate.com/c/c.php?r=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;aid=11119&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.vogate.com/a_page_view.php%3Fid%3D414&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406_2.html&amp;rn=902803&amp;k=%u6267%u884C" target="_blank">执行</a>新建实例，-delete表明执行删掉实例，-sid指定害例的名称。 </span></p>
<p><span>５、创建口令文件 </span></p>
<p>C:\&gt;orapwd file=D:\oracle\product\10.1.0\db_1\database\pwdbook.ora password=bookstore entries=2</p>
<p><span>orapwd是创建口令文件的工肯程序各称，file参数指定口令文件所在的目录和文件名称，password参数指定sys用户的口令，entries参数指定数据库拥用DBA权限的用户的个数，当然还有一个force参数，相信您不指即明，这里就不再细述。 </span></p>
<p>请注意，这里的命令要一行输入，中间不得换行，否则会出现不必要的错误。</p>
<p>口令文件是专门存放sys用户的口令，因为sys用户要负责建库、启动数据库、关闭数据库等特殊任务，把以sys用户的中令单独存放于口令文件中，这样数据库末打开时也能进行口令验证。</p>
<p>6、启动数据库到nomount(实例)状态</p>
<p>C:\&gt;sqlplus /nolog</p>
<p>SQL*Plus:Release 10.1.0.2.0 - Production on 星期三 6月 29 23:09:35 2005</p>
<p>Copyright 1982,2004,Oracle. All rights reserved.</p>
<p>SQL&gt;connect sys/bookstore as sysdba ---这里是用sys连接数据库</p>
<p>已连接到空闲例程</p>
<p>SQL&gt;startup nomount</p>
<p>ORACLE 例程已经启动。</p>
<p>Total System Global Area 319888364bytes</p>
<p>Fixed Size 453612bytes</p>
<p>Variable Size 209715200bytes</p>
<p>Database Buffers 109051904bytes</p>
<p>Redo Buffers 667648bytes</p>
<p>SQL&gt;</p>
<p><span>7、执行建库脚本 </span></p>
<p><span>执行建库脚本，首先要有建库的脚本。（去哪找建库脚本呢？我又没有！）不用着急，请接着往下看。 </span></p>
<p><span><span>得到一个符合自己要求的建库脚本有两种方法，一种方法是在自己的电脑上用DBCA来建，接照它的提示一步步地去做，在做到第十二步的时候，请选择“生成建库脚本”，然后就大功告成，你就</span><a id="vad_4" style="font-size: 1em; cursor: pointer; color: #5f9ea0; border-bottom: #5f9ea0 1px dotted; text-decoration: underline;" onmouseover="this.style.borderBottom='2px #5F9EA0 solid';var fxEvent=arguments[0];kwmouseover(this,4,fxEvent);" onmouseout="this.style.borderBottom='1px #5F9EA0 dotted'; kwmouseout(this,4)" name="4" href="http://action.vogate.com/c/c.php?r=http%3A//www.th7.cn/Article/sj/ora/200901/343406.html&amp;aid=11033&amp;sid=6235007045042172&amp;click=1&amp;url=http%3A//www.9wee.com/activity/2008_promotion_yx/index_b.php%3Fq%3D68862897_103_0&amp;v=0&amp;s=http%3A//www.th7.cn/Article/sj/ora/200901/343406_2.html&amp;rn=722724&amp;k=%u53EF%u4EE5" target="_blank">可以</a>到相应的目录上去找到那个脚本并适当地修它便可便用。另一种方法就是自己手工去写一份建库脚本，这也是这里要见意使用的方法，用记事本编辑如下的内容，并将其保存为文件名任取而后缀名为（*.sql）的SQL脚本，这里保存到E盘根本录下且文件名称为book.sql。 </span></p>
<p>Create database book</p>
<p>datafile 'D:\oracle\product\10.1.0\oradata\book\system01.dbf' size 300M reuse autoextend on next 10240Kmaxsize unlimited</p>
<p>extent management local</p>
<p>sysaux datafile 'D:\oracle\product\10.1.0\oradata\book\sysaux01.dbf'</p>
<p>size 120M reuse autoextend on next 10240K maxsize unlimited</p>
<p>default temporary tablespace temp</p>
<p>tempfile 'D:\oracle\product\10.1.0\oradata\book\temp01.dbf' size 20M reuse autoextend on next 640K maxsize unlimited</p>
<p>undo tablespace "UNDOTBS1" --请注意这里的undo表空间要和参数文件对应</p>
<p>datafile 'D:\oracle\product\10.1.0\oradata\book\undotbs01.dbf' size 200M reuse autoextend on next 5120K maxsize unlimited</p>
<p>logfile</p>
<p>group 1 ('D:\oracle\product\10.1.0\oradata\book\redo01.log') size 10240K,</p>
<p>group 2 ('D:\oracle\product\10.1.0\oradata\book\redo02.log') size 10240K,</p>
<p>group 3 ('D:\oracle\product\10.1.0\oradata\book\redo03.log') size 10240K</p>
<p><span>接着就执行刚建的建库脚本： </span></p>
<p>SQL&gt;start E:\book.sql</p>
<p><span><span>8、执行catalog脚步本创建数据字典 </span></span></p>
<p>SQL&gt;start D:\oracle\product\10.1.0\db_1\rdbms\admin\catalog.sql</p>
<p><span><span>9、执行catproc创建package包 </span></span></p>
<p>SQL&gt;start D:\oracle\product\10.1.0\db_1\rdbms\admin\catproc.sql</p>
<p><span>10、执行pupbld </span></p>
<p><span><span>在执行pupbld之前要把当前用户（sys）转换成system,即以system账户连接数据库。因为此数据库是刚建的，所以system的口令是系统默认的口令，即manager。你可以在数据库建好以后再来重新设置此账户的口令。 </span></span></p>
<p>SQL&gt;connect system/manager</p>
<p>SQL&gt;start D:\oracle\product\10.1.0\db_1\sqlplus\admin\pupbld.sql</p>
<p><span>11、由初始化参数文件创建spfile文件 </span></p>
<p>SQL&gt;create spfile from pfile;</p>
<p><span><span>12、执行scott脚本创建scott模式 </span></span></p>
<p>SQL&gt;start D:\oracle\product\10.1.0\db_1\rdbms\admin\scott.sql</p>
<p>13、把数据库打开到正常状态</p>
<p>SQL&gt;alter database open;</p>
<p>14、以scott连接到数据库（口令为tiger），测试新建数据库是否可以正常运行</p>
<p>至此，整个数据库就已经建好了。接着你就可以在此数据库上建立自己的账户和表空间啦以及数据库对象，这里就不再作更多地叙述。</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/269.html' rel='bookmark' title='windows平台上的LRM-00116'>windows平台上的LRM-00116</a></li>
<li><a href='http://www.dbalife.com/archives/187.html' rel='bookmark' title='ORACLE 10G AWR 速查'>ORACLE 10G AWR 速查</a></li>
<li><a href='http://www.dbalife.com/archives/271.html' rel='bookmark' title='compatible参数'>compatible参数</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/261.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10g logmnr 无法挖掘DML的解决</title>
		<link>http://www.dbalife.com/archives/221.html</link>
		<comments>http://www.dbalife.com/archives/221.html#comments</comments>
		<pubDate>Tue, 03 Mar 2009 10:12:38 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[dml]]></category>
		<category><![CDATA[logmnr]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[恢复]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=221</guid>
		<description><![CDATA[Oracle 10g的logmnr做了一些改变，在默认状态下，无法挖掘到如delete、insert、update这样的DML语句，而当我们误删数据的时候，正需要用logmnr挖掘DML来进行恢复。 Oracle提供了一条语句来开启logmnr对DML的支持 alter database add supplemental log data (primary key, unique index) columns; Related posts: 笔记：重建用户下所有索引 oralce10g shrink compatible参数
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/31.html' rel='bookmark' title='笔记：重建用户下所有索引'>笔记：重建用户下所有索引</a></li>
<li><a href='http://www.dbalife.com/archives/286.html' rel='bookmark' title='oralce10g shrink'>oralce10g shrink</a></li>
<li><a href='http://www.dbalife.com/archives/271.html' rel='bookmark' title='compatible参数'>compatible参数</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Oracle 10g的logmnr做了一些改变，在默认状态下，无法挖掘到如delete、insert、update这样的DML语句，而当我们误删数据的时候，正需要用logmnr挖掘DML来进行恢复。</p>
<p>Oracle提供了一条语句来开启logmnr对DML的支持</p>
<p>alter database add supplemental log data (primary key, unique index) columns;</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/31.html' rel='bookmark' title='笔记：重建用户下所有索引'>笔记：重建用户下所有索引</a></li>
<li><a href='http://www.dbalife.com/archives/286.html' rel='bookmark' title='oralce10g shrink'>oralce10g shrink</a></li>
<li><a href='http://www.dbalife.com/archives/271.html' rel='bookmark' title='compatible参数'>compatible参数</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/221.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

