﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-kxbin-文章分类-转发</title><link>http://www.blogjava.net/kxbin/category/50464.html</link><description>成功留给有准备的人</description><language>zh-cn</language><lastBuildDate>Wed, 17 Apr 2013 12:04:45 GMT</lastBuildDate><pubDate>Wed, 17 Apr 2013 12:04:45 GMT</pubDate><ttl>60</ttl><item><title>win7 64位系统 pl sql 无法解析指定的连接标识符 解决办法</title><link>http://www.blogjava.net/kxbin/articles/397925.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 16 Apr 2013 08:25:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/397925.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/397925.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/397925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/397925.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/397925.html</trackback:ping><description><![CDATA[<p style="margin: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; background-color: #ffffff;">系统是win764位，装好后，装了pl/sql 和toad，都连不上数据库，报错位&#8220;ql 无法解析指定的连接标识符&#8221; 解决办法，我勒个去！神马情况吗！很是郁闷，经过研究发现安装目录有问题。默认会安装在&#8220;C:\Program Files (x86)&#8221;这个目录下，，以前有空格也没问题，起初没在意，后来经过研究发现，确实是目录的问题，括号让pl/sql不爽了。于是乎，pl/sql让我也不爽了！。。</p><p style="margin: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; background-color: #ffffff;">记录下，解决了，现在很爽。。</p><p style="margin: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; background-color: #ffffff;">&nbsp;</p><p style="margin: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; background-color: #ffffff;">PS：如果遇到此问题，不用重装pl/sql，只需将其移动（最好copy）到其他没有空格，没有特殊字符的目录下就ok了！</p><img src ="http://www.blogjava.net/kxbin/aggbug/397925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2013-04-16 16:25 <a href="http://www.blogjava.net/kxbin/articles/397925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux oracle10g安装</title><link>http://www.blogjava.net/kxbin/articles/388272.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Fri, 21 Sep 2012 08:49:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/388272.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/388272.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/388272.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/388272.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/388272.html</trackback:ping><description><![CDATA[<div style="margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><strong style="padding: 0px; margin: 0px; ">一、安装系统</strong></div><blockquote style="padding: 0px; margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><div style="margin: 0px; ">首先安装Linux系统，根据Oracle官方文档的建议，在机器内存小于1G的情况下，swap分区大小应该设置为内存的2倍大，若内存大于2G则swap分区设置为与内存大小一样。</div></blockquote><blockquote style="padding: 0px; margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><div style="margin: 0px; ">为防止Oracle安装过程中出现乱码，建议使用英文作为系统语言，进行Oracle的安装工作</div></blockquote><div style="margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><strong style="padding: 0px; margin: 0px; ">二、安装Oracle前的系统准备工作</strong></div><blockquote style="padding: 0px; margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">1.检查需要的软件包</strong></div><div style="margin: 0px; ">可以使用rpm -qa|grep 软件包关键词命令进行检测，一般情况下会需要手动安装如下的软件包：</div><div style="margin: 0px; ">&nbsp; From RedHat AS5 Disk 1（32 Bit）</div><div style="margin: 0px; ">&nbsp; # rpm -Uvh setarch-2*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh make-3*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh glibc-2*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh libaio-0*</div><div style="margin: 0px; ">&nbsp; From RedHat AS5 Disk 2（32 Bit）</div><div style="margin: 0px; ">&nbsp; # rpm -Uvh compat-libstdc -33-3*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh compat-gcc-34-3*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh compat-gcc-34-c -3*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh gcc-4*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh libXp-1*</div><div style="margin: 0px; ">&nbsp; From RedHat AS5 Disk 3（32 Bit）</div><div style="margin: 0px; ">&nbsp; # rpm -Uvh openmotif-2*&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp; # rpm -Uvh compat-db-4*</div><div style="margin: 0px; ">如果使用DVD安装介质的话，会很方便。</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">2.修改Linux发行版本信息</strong></div><div style="margin: 0px; ">由于Oracle 10g发行的时候，RedHat Enterprise Linux 5没有发行，所以Oracle 10g并没有对RedHat Enterprise Linux 5确认支持，我们有两种方法可以让Oracle 10g支持RedHat Enterprise Linux 5。</div><div style="margin: 0px; "><em style="padding: 0px; margin: 0px; font-style: normal; "><strong style="padding: 0px; margin: 0px; ">方法一：</strong></em></div><div style="margin: 0px; ">我们需要手工修改Linux的发行注记，让Oracle 10g支持RedHat Enterprise Linux 5。</div><div style="margin: 0px; ">编辑/etc/redhat-release文件</div><div style="margin: 0px; "># vi /etc/redhat-release</div><div style="margin: 0px; ">将其中的内容Red Hat Enterprise Linux Server release 5 (Tikanga)修改为Red Hat Enterprise Linux AS release 4 (Nahant Update 4)</div><div style="margin: 0px; "><em style="padding: 0px; margin: 0px; font-style: normal; "><strong style="padding: 0px; margin: 0px; ">方法二：</strong></em></div><div style="margin: 0px; ">还有文章说修改Oracle安装包中install/oraparam.ini文件的内容，也可以让Oracle 10g支持RedHat Enterprise Linux 5，修改方法如下：</div><div style="margin: 0px; "># vi install/oraparam.ini</div><div style="margin: 0px; ">在其中的Certified Versions段落增加redhat-5</div><div style="margin: 0px; ">#[Certified Versions]&nbsp;<br style="padding: 0px; margin: 0px; " />Linux=redhat-3,SuSE-9,redhat-4,redhat-5,UnitedLinux-1.0,asianux-1,asianux-2]</div><div style="margin: 0px; ">再添加&nbsp;<br style="padding: 0px; margin: 0px; " />[Linux-redhat-5.0-optional]&nbsp;<br style="padding: 0px; margin: 0px; " />TEMP_SPACE=80&nbsp;<br style="padding: 0px; margin: 0px; " />SWAP_SPACE=150&nbsp;<br style="padding: 0px; margin: 0px; " />MIN_DISPLAY_COLORS=256</div><div style="margin: 0px; ">经我测试，发现方法二在安装之前的系统检测过程可以通过，但是在安装过程中的系统支持检测无法通过，不知道是不是我设置的有问题，希望有高手可以给我点提示。</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">3.修改系统内核参数</strong></div><div style="margin: 0px; "># vi /etc/sysctl.conf</div><div style="margin: 0px; ">kernel.shmall = 2097152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 该参数表示系统一次可以使用的共享内存总量（以页为单位）。缺省值就是2097152，通常不需要修改kernel.shmmax = 2147483648&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 该参数定义了共享内存段的最大尺寸（以字节为单位）。缺省为32M，对于oracle来说，该缺省值太低了，通常将其设置为2G&nbsp;<br style="padding: 0px; margin: 0px; " />kernel.shmmni = 4096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 这个内核参数用于设置系统范围内共享内存段的最大数量。该参数的默认值是 4096 。通常不需要更改&nbsp;<br style="padding: 0px; margin: 0px; " />kernel.sem = 250 32000 100 128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 表示设置的信号量&nbsp;<br style="padding: 0px; margin: 0px; " />fs.file-max = 65536&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 表示文件句柄的最大数量。文件句柄设置表示在linux系统中可以打开的文件数量&nbsp;<br style="padding: 0px; margin: 0px; " />net.ipv4.ip_local_port_range = 1024 65000&nbsp;<br style="padding: 0px; margin: 0px; " />net.core.rmem_default=262144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 默认的接收窗口大小&nbsp;<br style="padding: 0px; margin: 0px; " />net.core.rmem_max=262144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 接收窗口的最大大小&nbsp;<br style="padding: 0px; margin: 0px; " />net.core.wmem_default=262144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 默认的发送窗口大小&nbsp;<br style="padding: 0px; margin: 0px; " />net.core.wmem_max=262144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 发送窗口的最大大小</div><div style="margin: 0px; ">修改好内核参数后，执行如下命令使新的设置生效</div><div style="margin: 0px; "># /sbin/sysctl -p</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">4.创建Oracle用户、组、安装目录</strong></div><div style="margin: 0px; ">在这里我只讨论单主机环境，不考虑RAC环境的配置，在以后我会专门写一篇如何配置Oracle RAC环境的文章。</div><div style="margin: 0px; ">(1) 创建Oracle用户组</div><div style="margin: 0px; "># groupadd oinstall&nbsp;<br style="padding: 0px; margin: 0px; " /># groupadd dba</div><div style="margin: 0px; ">(2) 创建Oracle用户</div><div style="margin: 0px; "># useradd -m -g oinstall -G dba oracle</div><div style="margin: 0px; ">(3) 设置Oracle用户口令</div><div style="margin: 0px; "># passwd oracle</div><div style="margin: 0px; ">(4) 创建Oracle安装目录以及数据存放目录</div><div style="margin: 0px; "># mkdir -p /DBSoftware/app/oracle&nbsp;<br style="padding: 0px; margin: 0px; " /># mkdir -p /DBData/oradata</div><div style="margin: 0px; ">(5) 修改目录权限</div><div style="margin: 0px; "># chown -R oracle:oinstall /DBSoftware/app/oracle/ /DBData/oradata/&nbsp;<br style="padding: 0px; margin: 0px; " /># chmod -R 755 /DBSoftware/app/oracle/ /DBData/oradata/</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">5.添加以下内容到/etc/security/limits.conf</strong></div><div style="margin: 0px; "># vi /etc/security/limits.conf</div><div style="margin: 0px; ">oracle soft nproc 2047&nbsp;<br style="padding: 0px; margin: 0px; " />oracle hard nproc 16384&nbsp;<br style="padding: 0px; margin: 0px; " />oracle soft nofile 1024&nbsp;<br style="padding: 0px; margin: 0px; " />oracle hard nofile 65536</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">6.添加以下内容到/etc/pam.d/login</strong></div><div style="margin: 0px; "># vi /etc/pam.d/login</div><div style="margin: 0px; ">session required /lib/security/pam_limits.so&nbsp;<br style="padding: 0px; margin: 0px; " />session required pam_limits.so</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">7.添加以下内容到/etc/profile</strong></div><div style="margin: 0px; "># vi /etc/profile</div><div style="margin: 0px; ">if [ $USER = "oracle" ]; then&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; if [ $SHELL = "/bin/ksh" ]; then&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulimit -p 16384&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulimit -n 65536&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; else&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulimit -u 16384 -n 65536&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; fi&nbsp;<br style="padding: 0px; margin: 0px; " />fi</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">8.配置Linux主机</strong></div><div style="margin: 0px; ">检查/etc/hosts文件中是否有localhost的记录（指向127.0.0.1即可），若没有的话，在后面配置Oracle监听的时候会出现一些问题，导致无法启动监听，在此手工添加此记录即可。</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">9.配置oracle用户环境变量</strong></div><div style="margin: 0px; "># su - oracle&nbsp;<br style="padding: 0px; margin: 0px; " />$ vi ~/.bash_profile</div><div style="margin: 0px; ">增加如下内容：</div><div style="margin: 0px; ">export ORACLE_BASE=/DBSoftware/app/oracle&nbsp;&nbsp; // 上面创建的Oracle安装文件夹&nbsp;<br style="padding: 0px; margin: 0px; " />export ORACLE_SID=orcl&nbsp;<br style="padding: 0px; margin: 0px; " />export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1</div><div style="margin: 0px; ">export PATH=$PATH:$ORACLE_HOME/bin&nbsp;<br style="padding: 0px; margin: 0px; " />export LD_LIBARY_PATH=$ORACLE_HOME/lib</div><div style="margin: 0px; ">export PATH&nbsp;<br style="padding: 0px; margin: 0px; " />umask 022</div><div style="margin: 0px; ">保存后使用如下命令，使设置生效：</div><div style="margin: 0px; ">$ source ~/.bash_profile</div></blockquote><div style="margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><strong style="padding: 0px; margin: 0px; ">三、安装Oracle，并进行相关设置</strong></div><blockquote style="padding: 0px; margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">1.解压缩安装文件</strong></div><div style="margin: 0px; ">Oracle的安装包有这样几种格式：</div><div style="margin: 0px; ">(1) zip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10201_database_linux32.zip</div><div style="margin: 0px; ">这种格式最好解压缩，直接使用命令unzip 文件名即可</div><div style="margin: 0px; ">(2) cpio.gz</div><div style="margin: 0px; ">这种格式有这样几种解压缩方式</div><div style="margin: 0px; ">a.&nbsp; # zcat XXXX.cpio.gz | cpio -idmv&nbsp;<br style="padding: 0px; margin: 0px; " />b.&nbsp; # gunzip XXXX.cpio.gz解压出XXXX.cpio文件然后再 # cpio -idvm &amp;lt; XXXX.cpio</div><div style="margin: 0px; ">解压缩完成后，设置oracle帐户可以操作安装文件所在的目录</div><div style="margin: 0px; ">chown -R oracle:oinstall 安装文件所在目录</div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">2. 用oracle帐户进入安装文件所在目录，执行如下命令即可看到安装界面：</strong></div><div style="margin: 0px; ">$ ./runInstaller</div><div style="margin: 0px; ">如果无法看到安装界面，请使用root帐户执行如下命令后再运行安装程序：</div><div style="margin: 0px; "># export DISPLAY=:0.0&nbsp;<br style="padding: 0px; margin: 0px; " /># xhost +&nbsp;<br style="padding: 0px; margin: 0px; " />$ ./runInstaller</div><div style="margin: 0px; ">出现安装界面后，根据界面提示进行相关的设置，我的建议是在安装过程中不创建数据库，只安装程序，监听和创建数据库等安装完成后再进行相关的操作。</div><div style="margin: 0px; ">安装过程中，需要使用root权限执行两个脚本。</div><div style="margin: 0px; ">&nbsp;</div><p style="padding: 0px 0px 15px; margin: 0px; "><a target="_blank" href="http://img1.51cto.com/attachment/201109/102441824.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102441824.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a></p><div style="margin: 0px; ">&nbsp;</div><p style="padding: 0px 0px 15px; margin: 0px; "><a target="_blank" href="http://img1.51cto.com/attachment/201109/102518944.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102518944.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a>&nbsp;<a target="_blank" href="http://img1.51cto.com/attachment/201109/102518845.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102518845.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a>&nbsp;<a target="_blank" href="http://img1.51cto.com/attachment/201109/102518196.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102518196.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a>&nbsp;<a target="_blank" href="http://img1.51cto.com/attachment/201109/102518276.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102518276.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a></p><p style="padding: 0px 0px 15px; margin: 0px; "><a target="_blank" href="http://img1.51cto.com/attachment/201109/102539362.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102539362.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a>&nbsp;<a target="_blank" href="http://img1.51cto.com/attachment/201109/102539562.jpg" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; "><img alt="" border="0" src="http://img1.51cto.com/attachment/201109/102539562.jpg" style="padding: 0px; margin: 0px; vertical-align: top; border: none; " /></a></p><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">3. 安装完成后，将/etc/redhat-release文件中的内容修改回Red Hat Enterprise Linux Server release 5 (Tikanga)</strong></div><div style="margin: 0px; "><strong style="padding: 0px; margin: 0px; ">4.创建监听以及创建数据库</strong></div><div style="margin: 0px; ">(1) 创建监听程序</div><div style="margin: 0px; ">使用Oracle提供的NET CONFIGURATION ASSISTANT创建TNS监听</div><div style="margin: 0px; ">$ netca</div><div style="margin: 0px; ">基本上就是一直Next就可以了，当然你也可以在这期间修改TNS的监听端口号</div><div style="margin: 0px; ">TNS监听创建完成后可以使用如下命令进行检查：</div><div style="margin: 0px; "># netstat -atln&nbsp;&nbsp;&nbsp; 检查监听端口是否打开&nbsp;<br style="padding: 0px; margin: 0px; " />$ lsnrctl status&nbsp;&nbsp;&nbsp; 检查TNS监听状态</div><div style="margin: 0px; ">确认监听已经成功启动后，即可执行Database Configure Assistant进行数据库的创建，执行命令如下：</div><div style="margin: 0px; ">$ dbca</div><div style="margin: 0px; ">在创建数据库的过程中，建议将数据库的字符集设置为Unicode UTF-8，防止出现乱码。</div></blockquote><div style="margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><strong style="padding: 0px; margin: 0px; ">四、数据库的启动脚本（转载自<a href="http://82584.blog.51cto.com/72584/110131" style="padding: 0px; margin: 0px; color: #015f91; text-decoration: none; ">[url]http://82584.blog.51cto.com/72584/110131[/url]</a>）</strong></div><blockquote style="padding: 0px; margin: 0px; color: #555555; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><div style="margin: 0px; "># vi /etc/rc.d/init.d/oracle</div><div style="margin: 0px; ">================================ Script File Start ================================&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;</div><div style="margin: 0px; ">#!/bin/bash&nbsp;<br style="padding: 0px; margin: 0px; " />#&nbsp;<br style="padding: 0px; margin: 0px; " /># chkconfig: 35 95 1&nbsp;<br style="padding: 0px; margin: 0px; " /># description: init script to start/stop oracle database 10g, TNS listener, EMS&nbsp;<br style="padding: 0px; margin: 0px; " /># match these values to your environment:</div><div style="margin: 0px; ">export ORACLE_BASE=/DBSoftware/app/oracle&nbsp;<br style="padding: 0px; margin: 0px; " />export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1</div><div style="margin: 0px; ">export PATH=/u01/app/oracle/bin:$ORACLE_HOME/bin:$PATH&nbsp;<br style="padding: 0px; margin: 0px; " />export ORACLE_SID=orcl&nbsp;<br style="padding: 0px; margin: 0px; " />export ORACLE_USER=oracle</div><div style="margin: 0px; "># see how we are called:&nbsp;<br style="padding: 0px; margin: 0px; " />case $1 in&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; start)&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; su - "$ORACLE_USER"&amp;lt;&amp;lt;EOO&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lsnrctl start&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlplus /nolog&amp;lt;&amp;lt;EOS&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect / as sysdba&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; startup&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; EOS&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; emctl start dbconsole&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; EOO&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; touch /var/lock/subsys/$scriptname&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; ;;&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; stop)&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; su - "$ORACLE_USER"&amp;lt;&amp;lt;EOO&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lsnrctl stop&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlplus /nolog&amp;lt;&amp;lt;EOS&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect / as sysdba&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shutdown immediate&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; EOS&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; emctl stop dbconsole&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; EOO&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; rm -f /var/lock/subsys/scriptname&nbsp;<br style="padding: 0px; margin: 0px; " />&nbsp;&nbsp;&nbsp; ;;&nbsp;<br style="padding: 0px; margin: 0px; " />*)&nbsp;<br style="padding: 0px; margin: 0px; " />echo "Usage: $0 {start|stop}"&nbsp;<br style="padding: 0px; margin: 0px; " />;;&nbsp;<br style="padding: 0px; margin: 0px; " />esac</div><div style="margin: 0px; ">================================ Script File End ================================</div><div style="margin: 0px; ">授权 ：chown root.root /etc/rc.d/init.d/oracle</div><div style="margin: 0px; ">修改文件属性：chmod 755 /etc/rc.d/init.d/oracle</div><div style="margin: 0px; ">以后启动/关闭Oracle可以使用如下命令操作：</div><div style="margin: 0px; "># service oracle start&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 启动监听、数据库以及em&nbsp;<br style="padding: 0px; margin: 0px; " /># service oracle stop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 关闭监听、数据库以及em</div><div style="margin: 0px; ">当然你也可以把Oracle作为系统服务，随系统启动等等。</div></blockquote><img src ="http://www.blogjava.net/kxbin/aggbug/388272.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-21 16:49 <a href="http://www.blogjava.net/kxbin/articles/388272.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE锁机制</title><link>http://www.blogjava.net/kxbin/articles/388188.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 20 Sep 2012 07:25:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/388188.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/388188.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/388188.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/388188.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/388188.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">数据库是一个多用户使用的共享资源。当多个用户并发地存取数据时，在数据库中就会产生多个事务同时存取同一数据的情况。若对并发操作不加控制就可能会读取和存储不正确的数据，破坏数据库的一致性。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">加锁是实现数据库并发控制的一个非常重要的技术。当事务在对某个数据对象进行操作前，先向系统发出请求，对其加锁。加锁后事务就对该数据对象有了一定的控制，在该事务释放锁之前，其他的事务不能对此数据对象进行更新操作。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">在数据库中有两种基本的锁类型：排它锁（Exclusive Locks，即X锁）和共享锁（Share Locks，即S锁）。当数据对象被加上排它锁时，其他的事务不能对它读取和修改。加了共享锁的数据对象可以被其他事务读取，但不能修改。数据库利用这两种基本的锁类型来对数据库的事务进行并发控制。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">Oracle数据库的锁类型</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">根据保护的对象不同，Oracle数据库锁可以分为以下几大类：DML锁（data locks，数据锁），用于保护数据的完整性；DDL锁（dictionary locks，字典锁），用于保护数据库对象的结构，如表、索引等的结构定义；内部锁和闩（internal locks and latches），保护 数据库的内部结构。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">DML锁的目的在于保证并发情况下的数据完整性，。在Oracle数据库中，DML锁主要包括TM锁和TX锁，其中TM锁称为表级锁，TX锁称为事务锁或行级锁。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">当Oracle执行DML语句时，系统自动在所要操作的表上申请TM类型的锁。当TM锁获得后，系统再自动申请TX类型的锁，并将实际锁定的数据行的锁标志位进行置位。这样在事务加锁前检查TX锁相容性时就不用再逐行检查锁标志，而只需检查TM锁模式的相容性即可，大大提高了系统的效率。TM锁包括了SS、SX、S、X 等多种模式，在数据库中用0－6来表示。不同的SQL操作产生不同类型的TM锁。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">在数据行上只有X锁（排他锁）。在Oracle数据库中，当一个事务首次发起一个DML语句时就获得一个TX锁，该锁保持到事务被提交或回滚。当两个或多个会话在表的同一条记录上执行 DML语句时，第一个会话在该条记录上加锁，其他的会话处于等待状态。当第一个会话提交后，TX锁被释放，其他会话才可以加锁。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">当Oracle数据库发生TX锁等待时，如果不及时处理常常会引起Oracle数据库挂起，或导致死锁的发生，产生ORA-60的错误。这些现象都会对实际应用产生极大的危害，如长时间未响应，大量事务失败等。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">悲观封锁和乐观封锁&nbsp;<br />一、悲观封锁&nbsp;<br />锁在用户修改之前就发挥作用：&nbsp;<br />Select ..for update（nowait)&nbsp;<br />Select * from tab1 for update&nbsp;<br />用户发出这条命令之后，oracle将会对返回集中的数据建立行级封锁，以防止其他用户的修改。&nbsp;<br />如果此时其他用户对上面返回结果集的数据进行dml或ddl操作都会返回一个错误信息或发生阻塞。&nbsp;<br />1：对返回结果集进行update或delete操作会发生阻塞。&nbsp;<br />2：对该表进行ddl操作将会报：Ora-00054:resource busy and acquire with nowait specified.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">原因分析&nbsp;<br />此时Oracle已经对返回的结果集上加了排它的行级锁，所有其他对这些数据进行的修改或删除操作都必须等待这个锁的释放，产生的外在现象就是其他的操作将发生阻塞，这个这个操作commit或rollback.&nbsp;<br />同样这个查询的事务将会对该表加表级锁，不允许对该表的任何ddl操作，否则将会报出ora-00054错误：:resource busy and acquire with nowait specified.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">二、乐观封锁&nbsp;<br />乐观的认为数据在select出来到update进取并提交的这段时间数据不会被更改。这里面有一种潜在的危险就是由于被选出的结果集并没有被锁定，是存在一种可能被其他用户更改的可能。因此Oracle仍然建议是用悲观封锁，因为这样会更安全。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; "><br />阻塞</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">定义：&nbsp;<br />当一个会话保持另一个会话正在请求的资源上的锁定时，就会发生阻塞。被阻塞的会话将一直挂起，直到持有锁的会话放弃锁定的资源为止。4个常见的dml语句会产生阻塞&nbsp;<br />INSERT&nbsp;<br />UPDATE&nbsp;<br />DELETE&nbsp;<br />SELECT&#8230;FOR UPDATE</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; "><br />INSERT</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">Insert发生阻塞的唯一情况就是用户拥有一个建有主键约束的表。当2个的会话同时试图向表中插入相同的数据时，其中的一个会话将被阻塞，直到另外一个会话提交或会滚。一个会话提交时，另一个会话将收到主键重复的错误。回滚时，被阻塞的会话将继续执行。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">UPDATE 和DELETE当执行Update和delete操作的数据行已经被另外的会话锁定时，将会发生阻塞，直到另一个会话提交或会滚。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">Select &#8230;for update</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">当一个用户发出select..for update的错作准备对返回的结果集进行修改时，如果结果集已经被另一个会话锁定，就是发生阻塞。需要等另一个会话结束之后才可继续执行。可以通过发出 select&#8230; for update nowait的语句来避免发生阻塞，如果资源已经被另一个会话锁定，则会返回以下错误：Ora-00054:resource busy and acquire with nowait specified.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">死锁-deadlock</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">定义:当两个用户希望持有对方的资源时就会发生死锁.&nbsp;<br />即两个用户互相等待对方释放资源时,oracle认定为产生了死锁,在这种情况下,将以牺牲一个用户作为代价,另一个用户继续执行,牺牲的用户的事务将回滚.&nbsp;<br />例子：&nbsp;<br />1：用户1对A表进行Update，没有提交。&nbsp;<br />2：用户2对B表进行Update，没有提交。&nbsp;<br />此时双反不存在资源共享的问题。&nbsp;<br />3：如果用户2此时对A表作update,则会发生阻塞，需要等到用户一的事物结束。&nbsp;<br />4：如果此时用户1又对B表作update，则产生死锁。此时Oracle会选择其中一个用户进行会滚，使另一个用户继续执行操作。&nbsp;<br />起因:&nbsp;<br />Oracle的死锁问题实际上很少见，如果发生，基本上都是不正确的程序设计造成的，经过调整后，基本上都会避免死锁的发生。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">DML锁分类表</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; "><br />表1Oracle的TM锁类型&nbsp;<br />锁模式 锁描述 解释 SQL操作&nbsp;<br />0 none&nbsp;<br />1 NULL 空 Select&nbsp;<br />2 SS(Row-S) 行级共享锁，其他对象&nbsp;<br />只能查询这些数据行 Select for update、Lock for</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">update、Lock row share</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">3 SX(Row-X) 行级排它锁，&nbsp;<br />在提交前不允许做DML操作 Insert、Update、&nbsp;<br />Delete、Lock row share</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">4 S(Share) 共享锁 Create index、Lock share&nbsp;<br />5 SSX(S/Row-X) 共享行级排它锁 Lock share row exclusive&nbsp;<br />6 X(Exclusive) 排它锁 Alter table、Drop able、Drop index、Truncate table 、Lock exclusive</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">oracle 锁问题的解决</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; "><br />可以用Spotlight软件对数据库的运行状态进行监控。</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">当出现session锁时，我们要及时进行处理.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">1. 查看哪些session锁:&nbsp;<br />SQL语句：select 'alter system kill session '''||sid||','||serial#||''';' from v$session where sid in (select sid from v$lock where block = 1);</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">SQL&gt; select 'alter system kill session '''||sid||','||serial#||''';' from v$session where sid in (select sid from v$lock where block = 1);&nbsp;<br />'ALTERSYSTEMKILLSESSION'''||SID||','||SERIAL#||''';'&nbsp;<br />--------------------------------------------------------------------------------&nbsp;<br />alter system kill session '132,731';&nbsp;<br />alter system kill session '275,15205';&nbsp;<br />alter system kill session '308,206';&nbsp;<br />alter system kill session '407,3510';</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">2. 查看session锁.&nbsp;<br />sql语句：select s.sid, q.sql_text from v$sqltext q, v$session s&nbsp;<br />where q.address = s.sql_address&nbsp;<br />and s.sid = &amp;sid&nbsp;<br />order by piece;</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">SQL&gt; select s.sid,q.sql_text from v$sqltext q, v$session s where q.address = s.sql_address and s.sid in (select sid from v$lock where block = 1) order by piece;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SID SQL_TEXT&nbsp;<br />---------- ----------------------------------------------------------------&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 77 UPDATE PROFILE_USER SET ID=1,COMPANY_ID=2,CUSTOMER_ID=3,NAMED&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 77 _INSURED_ID=4,LOGIN=5,ROLE_ID=6,PASSWORD=7,EMAIL=8,TIME_ZON&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 77 E=9 WHERE PROFILE_USER.ID=:34&nbsp;<br />3 rows selected.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; "><br />3. kill锁的进程.&nbsp;<br />SQL语句：alter system kill session '77,22198';</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">SQL&gt; alter system kill session '391,48398';&nbsp;<br />System altered.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">4. 查看谁锁了谁。<br />select s1.username || [email='@']'@'[/email] || s1.machine<br />&nbsp; || ' ( SID=' || s1.sid || ' )&nbsp; is blocking '<br />&nbsp; || s2.username || [email='@']'@'[/email] || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status<br />&nbsp; from v$lock l1, v$session s1, v$lock l2, v$session s2<br />&nbsp; where s1.sid=l1.sid and s2.sid=l2.sid<br />&nbsp; and l1.BLOCK=1 and l2.request &gt; 0<br />&nbsp; and l1.id1 = l2.id1<br />&nbsp; and l2.id2 = l2.id2 ;</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">注：&nbsp;<br />&gt; ： 重定向输出，将文件的标准输出重新定向输出到文件，或将数据文件作为另一程序的标准输入内容。&nbsp;<br />| ：UNIX管道：将一文件的输出作为另一文件的输入.</p><p style="color: #333333; font-family: Verdana, Arial, sans-serif, 'Lucida Grande'; font-size: 13px; line-height: 23px; background-color: #d6d3d6; ">在执行SQL语句试：alter system kill session '391,48398'(sid为391); 应当注意对于sid在100以下的应当谨慎，可能该进程对应某个application，如对应某个事务,可以kill.</p><div></div><img src ="http://www.blogjava.net/kxbin/aggbug/388188.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-20 15:25 <a href="http://www.blogjava.net/kxbin/articles/388188.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Oracle 数据库实例启动关闭过程</title><link>http://www.blogjava.net/kxbin/articles/388185.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 20 Sep 2012 06:59:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/388185.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/388185.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/388185.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/388185.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/388185.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 转载自http://blog.csdn.net/robinson_0612/article/details/5542983--&gt;Oracle&nbsp;数据库实例启动关闭过程--================================/*&nbsp;&nbsp;&nbsp;&nbsp;Oracle数据库实例的启动，严格来说应该是实例的启动，数据库仅仅是在实例启动后进行装载。Oracl...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/388185.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/388185.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-20 14:59 <a href="http://www.blogjava.net/kxbin/articles/388185.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE常用命令</title><link>http://www.blogjava.net/kxbin/articles/388010.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 10:01:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/388010.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/388010.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/388010.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/388010.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/388010.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 一、ORACLE的启动和关闭&nbsp;1、在单机环境下&nbsp;要想启动或关闭ORACLE系统必须首先切换到ORACLE用户，如下&nbsp;su - oracle&nbsp;a、启动ORACLE系统&nbsp;oracle&gt;svrmgrl&nbsp;SVRMGR&gt;connect internal&nbsp;SVRMGR&gt;startup&nbsp;SVRMGR&gt;quit...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/388010.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/388010.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 18:01 <a href="http://www.blogjava.net/kxbin/articles/388010.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Oracle同义词创建及其作用</title><link>http://www.blogjava.net/kxbin/articles/388003.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 09:46:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/388003.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/388003.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/388003.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/388003.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/388003.html</trackback:ping><description><![CDATA[<p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">Oracle的同义词（synonyms）从字面上理解就是别名的意思，和试图的功能类似，就是一种映射关系。本文介绍如何创建同义词语句，删除同义词以及查看同义词语句。<br />　　oracle的同义词总结：<br />　　从字面上理解就是别名的意思，和试图的功能类似。就是一种映射关系。<br />　　1.创建同义词语句：</p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">　　create public synonym table_name for user.table_name;</p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">　　其中第一个user_table和第二个user_table可以不一样。<br />　　此外如果要创建一个远程的数据库上的某张表的同义词，需要先创建一个Database Link(数据库连接)来扩展访问，然后在使用如下语句创建数据库同义词：create synonym table_name for<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#116;&#97;&#98;&#108;&#101;&#95;&#110;&#97;&#109;&#101;&#64;&#68;&#66;&#95;&#76;&#105;&#110;&#107;" style="color: #333333; text-decoration: none; ">table_name@DB_Link</a>;<br />　　当然，你可能需要在user用户中给当前用户(user2)授权： grant select/delete/update on user2<br />　　2.删除同义词：</p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">　　drop public synonym table_name;</p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">　　3.查看所有同义词：</p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">　　select * from dba_synonyms</p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">　　同义词拥有如下好处：节省大量的<a href="http://www.2cto.com/database/" target="_blank" style="color: #333333; text-decoration: none; ">数据库</a>空间，对不同用户的操作同一张表没有多少差别;扩展的数据库的使用范围，能够在不同的数据库用户之间实现无缝交互;同义词可以创建在不同一个数据库服务器上，通过网络实现连接。<br />&nbsp;<a href="http://www.2cto.com/database/Oracle/" target="_blank" style="color: #333333; text-decoration: none; ">Oracle</a>数据库中提供了同义词管理的功能。Oracle同义词是数据库方案对象的一个别名，经常用于简化对象访问和提高对象访问的安全性。<br />AD：<br />&nbsp;<span style="text-indent: 2em; ">在Oracle中对用户的管理是使用权限的方式来管理的，也就是说，如果我们想使用数据库，我们就必须得有权限，但是如果是别人将权限授予了我们，我们也是能对数据库进行操作的，但是我们必须要已授权的表的名称前键入该表所有者的名称，所以这就是比较麻烦的，遇到这种情况，我们该怎么办呢？创建个Oracle同义词吧！这样我们就可以直接使用同义词来使用表了。</span></p><p style="border-width: 0px; padding: 0px; margin: 0px 0px 8px; list-style: none; text-indent: 2em; color: #333333; font-family: 宋体; line-height: 28px; background-color: #ffffff; ">1.同义词的概念<br />Oracle数据库中提供了同义词管理的功能。同义词是数据库方案对象的一个别名，经常用于简化对象访问和提高对象访问的安全性。在使用同义词时，Oracle数据库将它翻译成对应方案对象的名字。与视图类似，同义词并不占用实际存储空间，只有在数据字典中保存了同义词的定义。在Oracle数据库中的大部分数据库对象，如表、视图、同义词、序列、存储过程、包等等，数据库管理员都可以根据实际情况为他们定义同义词。<br />2.Oracle同义词的分类<br />Oracle同义词有两种类型，分别是公用Oracle同义词与私有Oracle同义词。<br />1)公用Oracle同义词:由一个特殊的用户组Public所拥有。顾名思义，数据库中所有的用户都可以使用公用同义词。公用同义词往往用来标示一些比较普通的数据库对象，这些对象往往大家都需要引用。<br />2)私有Oracle同义词:它是跟公用同义词所对应，他是由创建他的用户所有。当然，这个同义词的创建者，可以通过授权控制其他用户是否有权使用属于自己的私有同义词。<br />3.Oracle同义词创建及删除<br />创建公有Oracle同义词的语法：Create [public] synonym 同义词名称 for [username.]objectName；<br />Drop [public] synonym 同义词名称<br />4.Oracle同义词的作用<br />1) 多用户协同开发中，可以屏蔽对象的名字及其持有者。如果没有同义词，当操作其他用户的表时，必须通过user名.object名的形式，采用了Oracle同义词之后就可以隐蔽掉user名，当然这里要注意的是：public同义词只是为数据库对象定义了一个公共的别名，其他用户能否通过这个别名访问这个数据库对象，还要看是否已经为这个用户授权。<br />2) 为用户简化sql语句。上面的一条其实就是一种简化sql的体现，同时如果自己建的表的名字很长，可以为这个表创建一个Oracle同义词来简化sql开发。<br />3)为分布式数据库的远程对象提供位置透明性。<br />5.Oracle同义词在数据库链中的作用<br />数据库链是一个命名的对象，说明一个数据库到另一个数据库的路径，通过其可以实现不同数据库之间的通信。<br />Create database link 数据库链名 connect&nbsp; to&nbsp; user名 identified by 口令&nbsp; using &#8216;Oracle连接串&#8217;; 访问对象要通过 object名@数据库链名。同义词在数据库链中的作用就是提供位置透明性。</p><img src ="http://www.blogjava.net/kxbin/aggbug/388003.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 17:46 <a href="http://www.blogjava.net/kxbin/articles/388003.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle创建database link总结</title><link>http://www.blogjava.net/kxbin/articles/388002.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 09:36:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/388002.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/388002.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/388002.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/388002.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/388002.html</trackback:ping><description><![CDATA[<p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">物理上存放于网络的多个ORACLE数据库，逻辑上可以看成一个单一的大型数据 库，用户可以通过网络对异地数据库中的数据进行存取，而服务器之间的协同处理对于工作站用户及应用程序而言是完全透明的，开发人员无需关心网络的链接细 节、数据在网络节点中的具体分布情况和服务器间的协调工作过程。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">数据库之间的链接建立在DATABASE LINK上。要创建一个DATABASE LINK，必须首先在建立链接的数据库上设置链接字符串，即配置一个远程数据库的本地网络服务名。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">链接字符串的配置参见《客户端连接服务器》一节。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">数据库全局名称可以用以下命令查出：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>SELECT * FROM GLOBAL_NAME;</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">修改可以用以下语句来修改参数值：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>ALTER SYSTEM SET GLOBAL_NAME=TRUE/FALSE;</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">&lt;1&gt;、当数据库参数global_name=false时，就不要求数据库链接名称跟远端数据库名称一样。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">oracle数据库之间进行连接通讯。<br />创建数据库链接的语法如下：&nbsp;<br /><strong>CREATE [PUBLIC] DATABASE LINK link</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>CONNECT TO username IDENTIFIED BY password</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>USING &#8216;connectstring&#8217;</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">其中：<br />--demona为用net8 easy config创建的连接字符串<br />目的方数据库的init.ora文件中的global_names设为false<br />重新启动数据库设置才能生效<br />或者用sys用户执行</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">注意：创建数据库链接的帐号必须有CREATE DATABASE LINK或CREATE PUBLIC DATABASE LINK的系统权限，用来登录到远程数据库的帐号必须有CREATE SESSION权限。这两种权限都包含在CONNECT角色中（CREATE PUBLIC DATABASE LINK权限在DBA中）。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">一个公用数据库链接对于数据库中的所有用户都是可用的，而一个私有链接仅对创建它的用户可用。由一个用户给另外一个用户授权私有数据库链接是不可能的，一个数据库链接要么是公用的，要么是私有的。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">创建数据库链接时，还可以使用缺省登录方式，即不指定远程数据库的用户名和密码：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>create public database link zrhs_link</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>using &#8216;zrhs&#8217;;</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">在不指定用户名和口令的情况下，ORACLE使用当前的用户名和口令登录到远程数据库。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">USING后面指定的是链接字符串，也就是远程数据库的网络服务名，这个服务名保存在TNSNAMES.ORA文件中，在该文件中定义了协议、主机名、端口和数据库名。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">删除数据库链接的语句是：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; "><strong>DROP [PUBLIC] DATABASE LINK zrhs_link</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">数据库链接的引用</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">一般情况下引用数据库链接，可以直接将其放到调用的表名或视图名称后面，中间使用一个 @ 作为分割符：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">SELECT * FROM&nbsp;<a rel="nofollow" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#119;&#111;&#114;&#107;&#101;&#114;&#64;&#122;&#114;&#104;&#115;&#95;&#108;&#105;&#110;&#107;" style="text-decoration: none; color: #64a038; "><span style="color: #800080; ">worker@zrhs_link</span>&nbsp;</a>;</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">对于经常使用的数据库链接，可以建立一个本地的同义词，方便使用：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">CREATE SYNONYM worker_syn FOR&nbsp;<a rel="nofollow" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#119;&#111;&#114;&#107;&#101;&#114;&#64;&#122;&#114;&#104;&#115;&#95;&#108;&#105;&#110;&#107;" style="text-decoration: none; color: #64a038; "><span style="color: #800080; ">worker@zrhs_link</span>&nbsp;</a>;</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">还可以建立一个本地的远程视图，方便使用：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">CREATE VIEW worker AS SELECT * FROM&nbsp;<a rel="nofollow" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#119;&#111;&#114;&#107;&#101;&#114;&#64;&#122;&#114;&#104;&#115;&#95;&#108;&#105;&#110;&#107;" style="text-decoration: none; color: #64a038; "><span style="color: #800080; ">worker@zrhs_link</span>&nbsp;</a>where&#8230; ;</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">现在本视图可与本地数据库中的任何其它视图一样对待，也可以授权给其它用户，访问此视图，但该用户必须有访问数据库链接的权限。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">对于另外一种情况，所要访问的表不在数据库链接中指定的远程帐户下，但该帐户有访问该表的权限，那么我们在表名前要加上该表的用户名：</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">SELECT * FROM&nbsp;<a rel="nofollow" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#99;&#97;&#109;&#101;&#108;&#46;&#119;&#111;&#114;&#107;&#101;&#114;&#64;&#122;&#114;&#104;&#115;&#95;&#108;&#105;&#110;&#107;" style="text-decoration: none; color: #64a038; ">camel.worker@zrhs_link</a>&nbsp;;</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">&lt;2&gt;、当数据库参数global_name=true时，那就要求数据库链接名称跟远端数据库名称一样<br />数据库全局名称可以用以下命令查出</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">SELECT * FROM GLOBAL_NAME;</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">atabase link(dblink)--数据库链路<br />创建dblink的语法：<br /><strong>sql&gt;create database link 数据库链路名<br />connect to 用户名 identified by 口令<br />using '主机字符串名';</strong>&nbsp;<br />如：<br /><strong>sql&gt;create database link ora9i.us.oracle.com ### 这里的us.oracle.com为oracle默认域名 ###<br />connect to scott identified by tiger<br />using 'sun';</strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">1)dblink名必须与远程数据库的全局数据库名（global_name）相同；<br />2)用户名，口令为远程数据库用户名，口令;<br />3)主机字符串为本机tnsnames.ora中定义的串;<br />4)两个同名的数据库间不得建立dblink;<br />然后，你就可以通过dblink访问远程数据库了。<br />如：<br />sql&gt;select * from 表名@ora9i.us.oracle.com;<br />还可以建立快照(snapshot)通过dblink实现远程数据自动传输。</p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #444444; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff; ">查看所有的数据库链接，进入系统管理员SQL&gt;操作符下，运行命令：&nbsp;<br /><strong><br />SQL&gt;select owner,object_name from dba_objects where object_type='DATABASE LINK';</strong></p><img src ="http://www.blogjava.net/kxbin/aggbug/388002.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 17:36 <a href="http://www.blogjava.net/kxbin/articles/388002.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用INSERT语句向表中插入数据（MSSQLSERVER版）</title><link>http://www.blogjava.net/kxbin/articles/387989.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 07:09:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387989.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387989.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387989.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387989.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387989.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp; &nbsp; &nbsp;做开发的同仁对于向数据库中插入数据可谓是太普通不过了，也没什么说的，一般都是采用常用的INSERT INTO [(字段列表)] VALUES(字段值列表)，这样的方式进行操作。今天，我要给大家介绍的是其他一些非常规的方式，一定会让你耳目一新，眼前一亮。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 进入今天的...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387989.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387989.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 15:09 <a href="http://www.blogjava.net/kxbin/articles/387989.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE SQL：经典查询练手第五篇</title><link>http://www.blogjava.net/kxbin/articles/387986.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 07:05:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387986.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387986.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387986.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387986.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387986.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文使用ORACLE自带的人力资源（HR）实例数据，本文所用表结构如下：表名：REGIONS序号列名数据类型长度小数位标识主键允许空默认值说明1REGION_IDNUMBER&nbsp;&nbsp;&nbsp;是否&nbsp;&nbsp;2REGION_NAMEVARCHAR225&nbsp;&nbsp;&nbsp;是&nbsp;&nbsp;&nbsp;表名：COUNTRIES序号列名数据类型长度...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387986.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387986.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 15:05 <a href="http://www.blogjava.net/kxbin/articles/387986.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE SQL：经典查询练手第四篇</title><link>http://www.blogjava.net/kxbin/articles/387984.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 07:04:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387984.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387984.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387984.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387984.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387984.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文使用ORACLE自带的人力资源（HR）实例数据，本文所用表结构如下：表名：REGIONS序号列名数据类型长度小数位标识主键允许空默认值说明1REGION_IDNUMBER&nbsp;&nbsp;&nbsp;是否&nbsp;&nbsp;2REGION_NAMEVARCHAR225&nbsp;&nbsp;&nbsp;是&nbsp;&nbsp;&nbsp;表名：COUNTRIES序号列名数据类型长度...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387984.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387984.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 15:04 <a href="http://www.blogjava.net/kxbin/articles/387984.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE SQL：经典查询练手第三篇</title><link>http://www.blogjava.net/kxbin/articles/387983.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 07:03:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387983.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387983.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387983.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387983.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387983.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文使用ORACLE自带的人力资源（HR）实例数据，本文所用表结构如下：HR.EMPLOYEES员工表结构如下：&nbsp;HR.DEPARTMENTS表结构如下：&nbsp;HR.REGIONS表结构如下：&nbsp;SQL&gt;&nbsp;DESC&nbsp;HR.REGIONS;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387983.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387983.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 15:03 <a href="http://www.blogjava.net/kxbin/articles/387983.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE SQL：经典查询练手第二篇</title><link>http://www.blogjava.net/kxbin/articles/387981.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 07:02:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387981.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387981.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387981.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387981.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387981.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文使用的实例表结构与表的数据如下：scott.emp员工表结构如下：&nbsp;SQL&gt;&nbsp;DESC&nbsp;SCOTT.EMP;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nullable&nbsp;Default&nbsp;Comment...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387981.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387981.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 15:02 <a href="http://www.blogjava.net/kxbin/articles/387981.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE SQL：经典查询练手第一篇</title><link>http://www.blogjava.net/kxbin/articles/387980.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 18 Sep 2012 07:01:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387980.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387980.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387980.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387980.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387980.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文使用的实例表结构与表的数据如下：scott.emp员工表结构如下：Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nullable&nbsp;Default&nbsp;Comments&nbsp;--------&nbsp;------------&nbsp;...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387980.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387980.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-18 15:01 <a href="http://www.blogjava.net/kxbin/articles/387980.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle常见问题(401-500)</title><link>http://www.blogjava.net/kxbin/articles/387661.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 13 Sep 2012 09:28:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387661.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387661.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387661.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387661.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387661.html</trackback:ping><description><![CDATA[<p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; font-family: 微软雅黑, 宋体, Arial; background-color: #ffffff; "><span style="font-size: 12pt; line-height: 24px; font-family: Verdana; ">401. V$PQ_TQSTAT&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含并行执行操作上的统计量</span><span style="font-size: 12pt; line-height: 24px; font-family: Verdana; ">.</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">帮助在一个查询中测定不平衡的问题。</span></p><span style="background-color: #ffffff; font-size: 12pt; line-height: 24px; font-family: Verdana; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />402. V$PROCESS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含关于当前活动进程的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />403. V$PROXY_ARCHIVEDLOG&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含归档日志备份文件的描述信息，这些备份文件带有一个称为</span><span style="font-size: 12pt; line-height: 24px; ">PROXY</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">副本的新特征。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />404. V$PROXY_DATAFILE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含数据文件和控制文件备份的描述信息，这些备份文件带有一个称为</span><span style="font-size: 12pt; line-height: 24px; ">PROXY</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">副本的新特征。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />405. V$PWFILE_USERS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出被授予</span><span style="font-size: 12pt; line-height: 24px; ">SYSDBA</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">和</span><span style="font-size: 12pt; line-height: 24px; ">SYSOPER</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">特权的用户。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />406. V$PX_PROCESS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含正在运行并行操作的会话的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />407. V$PX_PROCESS_SYSSTAT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含正在运行并行操作的会话的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />408. V$PX_SESSION&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含正在运行并行操作的会话的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />409. V$PX_SESSTAT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含正在运行并行操作的会话的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />410. V$QUEUE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含多线程消息队列的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />411. V$QUEUEING_MTH&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示所有可用的查询资源分配方法。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />412. V$RECOVER_FILE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示需要介质恢复的文件状态。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />413. V$RECOVERY_FILE_STATUS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含对每个恢复命令的每一数据文件的一行信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />414. V$RECOVERY_LOG&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出需要完成介质恢复的归档日志的信息</span><span style="font-size: 12pt; line-height: 24px; ">.</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">这个信息来自</span><span style="font-size: 12pt; line-height: 24px; ">V$LOG_HISTORY</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />415. V$RECOVERY_PROCESS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">能够用来跟踪数据库恢复操作，以便他们不会被终止执行。</span><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">也用来估算进程中完成这个操作所需的时间。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />416. V$RECOVERY_STATUS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含当前恢复进程的统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />417. V$REQDIST&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出</span><span style="font-size: 12pt; line-height: 24px; ">MTS</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">调度程序请求次数的直方图的统计量。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">418. V$RESERVED_WORDS&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">给出</span><span style="font-size: 12pt; line-height: 24px; ">PL/SQL</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">编译器所使用的关键字的列表。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />419. V$RESOURCE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含资源名和地址信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />420. V$RESOURCE_LIMIT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示系统资源的全局资源使用的信息。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />421. V$ROLLNAME&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出所有联机回滚段的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />422. V$ROLLSTAT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含回滚段的统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />423. V$ROWCACHE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示活动数据字典的统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />424. V$ROWCACHE_PARENT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示数据字典中所有双亲对象的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />425. V$ROWCACHE_SUBORDINATE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示数据字典中从属对象的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />426. V$RSRC_CONSUMER_GROUP&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示与当前活动资源消费者用户组相关联的数据。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />427. V$RSRC_CONSUMER_GROUP_CPU_MTH&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">为资源消费者用户组显示所有可用的资源的分配方法。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />428. V$RSRC_PLAN&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示当前所有活动资源方案的名称。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />429. V$RSRC_PLAN_CPU_MTH&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示所有用于资源方案的可用</span><span style="font-size: 12pt; line-height: 24px; ">CPU</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">资源分配方法。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />430. V$SESS_IO&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">为每个用户会话列出</span><span style="font-size: 12pt; line-height: 24px; ">I/O</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">统计。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />431. V$SESSION&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出当前每一个会话的会话信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />432. V$SESSION_CONNECT_INFO&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示当前会话的网络连接的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />433. V$SESSION_CURSOR_CACHE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示当前会话的游标用法的信息。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />434. V$SESSION_EVENT&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出一个会话在等待一个事件的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />435. V$SESSION_LONGOPS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示一个长时间运行操作的状态。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />436. V$SESSION_OBJECT_CACHE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示本地服务器上当前用户对话的对象高速缓存的统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />437. V$SESSION_WAIT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出正在等待的活动会话的资源或事件。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />438. V$SESSTAT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出用户会话统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />439. V$SGA&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含系统全局区的总统计量。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />440. V$SGASTAT&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含系统全局区的详细信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />441. V$SHARED_POOL_RESERVED&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出能帮助你调节共享池中保留池和空间的统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />442. V$SHARED_SERVER&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含共享服务器进程的信息。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />443. V$SHARED_SERVER_MONITOR&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含调试共享服务器进程的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />444. V$SORT_SEGMENT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含一个给定实例中每一个排序段的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />445. V$SPPARAMETER&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出</span><span style="font-size: 12pt; line-height: 24px; ">SPFILE</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">的内容。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />446. V$SQL&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出</span><span style="font-size: 12pt; line-height: 24px; ">SQL</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">共享区的统计量。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; "><br />447. V$SQL_BIND_DATA&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">如果数据在服务器中可用，它将对查询这个视图的会话所拥有的每个游标中的每一个不同的连接变量，显示客</span></p><p style=" font-size: 13px; "><span style="font-size: 12pt; font-family: 宋体; ">户端发送的实际连接数据。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />448. V$SQL_BIND_METADATA&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">对查询这个视图的会话所拥有的每个游标中的每一个不同的连接变量，显示客户端提供的连接元数据。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />449. V$SQL_CURSOR&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示与查询这个视图的会话相关的每一个游标的</span><span style="font-size: 12pt; ">DEBUG</span><span style="font-size: 12pt; font-family: 宋体; ">信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />450. V$SQL_PLAN&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含装载到库缓存中每个子游标的执行计划信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />451. V$SQL_SHARED_CURSOR&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">为什么一个特定的子游标没有与存在的子查询的共享的解释。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />452. V$SQL_SHARED_MEMEORY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">关于共享内存快照的游标的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />453. V$SQL_REDIRECTION&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">标识复位向的</span><span style="font-size: 12pt; ">SQL</span><span style="font-size: 12pt; font-family: 宋体; ">语句。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />454. V$SQL_WORKAREA&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示被</span><span style="font-size: 12pt; ">SQL</span><span style="font-size: 12pt; font-family: 宋体; ">游标使用的工作区信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />455. V$SQL_WORKAREA_ACTIVE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含当前由系统分配的工作区的昫间信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />456. V$SQLAREA&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">共享</span><span style="font-size: 12pt; ">SQL</span><span style="font-size: 12pt; font-family: 宋体; ">的统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />457. V$SQLTEXT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含</span><span style="font-size: 12pt; ">SGA</span><span style="font-size: 12pt; font-family: 宋体; ">中属于共享</span><span style="font-size: 12pt; ">SQL</span><span style="font-size: 12pt; font-family: 宋体; ">游标的</span><span style="font-size: 12pt; ">SQL</span><span style="font-size: 12pt; font-family: 宋体; ">语句文本。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />458. V$SQLTEXT_WITH_NEWLINES&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">不能用空格代替新行制表符外，和</span><span style="font-size: 12pt; ">V$SQLTEXT</span><span style="font-size: 12pt; font-family: 宋体; ">功能一样。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />459. V$STATNAME&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示</span><span style="font-size: 12pt; ">V$SESSTAT</span><span style="font-size: 12pt; font-family: 宋体; ">和</span><span style="font-size: 12pt; ">V$SYSTAT</span><span style="font-size: 12pt; font-family: 宋体; ">表中的统计量的译码统计名字。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />460. V$SUBCACHE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示当前装载于库高速缓存中的从属高速缓存的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />461. V$SYSSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出系统统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />462. V$SYSTEM_CURSOR_CACHE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">系统范围的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />463. V$SYSTEM_EVENT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含等待一个事件的全部信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />464. V$SYSTEM_PARAMETER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含系统参数信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />465. V$SYSTEM_PARAMETER2&nbsp;<br />ORACLE<span style="font-size: 12pt; font-family: 宋体; ">实例中当前影响的参数和参数的值。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />466. V$TABLESPACE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">控制文件中表空间的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />467. V$TEMP_CACHE_TRANSFER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示每个数据文件中探查块的数量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />468. V$TEMP_EXTENT_MAP&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示所有临时表空间的每一个单元的状态信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />469. V$TEMP_EXTENT_POOL&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示被一个给定实例使用的临时空间缓存的状态。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />470. V$TEMP_PING&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示每一个数据文件探查的块数。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />471. V$TEMP_SPACE_HEADER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示每一个临时表空间中每一个文件的聚集信息，涉及每个空间首部中当前使用多少空间和有多少自由空间。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />472. V$TEMPFILE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示临时文件的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />473. V$TEMPORARY_LOBS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示临时的</span><span style="font-size: 12pt; ">LOB</span><span style="font-size: 12pt; font-family: 宋体; ">。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />474. V$TEMPSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含文件读</span><span style="font-size: 12pt; ">/</span><span style="font-size: 12pt; font-family: 宋体; ">写的统计信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />475. V$THREAD&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含控制文件中的线程信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />476. V$TIMER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出以</span><span style="font-size: 12pt; ">1%</span><span style="font-size: 12pt; font-family: 宋体; ">秒计的流逝时间。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />477. V$TIMEZONE_NAMES&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出合法的时区名称。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />478. V$TRANSACTION&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出系统中的活动事务。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />479. V$TRANSACTION_ENQUEUE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示事务状态对象所拥有的锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />480. V$TYPE_SIZE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出不同数据库组件的大小，以便用来估算数据块的容量大小。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />481. V$UNDOSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示一个历史统计数据来显示系统工作的如何。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />482. V$VERSION&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出</span><span style="font-size: 12pt; ">ORACLE</span><span style="font-size: 12pt; font-family: 宋体; ">服务器中核心库组件的版本号。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />483. V$VPD_POLICY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出与当前在库缓存中的游标相关的所有安全策略。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />484. V$WAITSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出块竞争统计量</span>&nbsp;<span style="font-size: 12pt; "><br />9I</span><span style="font-size: 12pt; font-family: 宋体; ">管理的数据字典</span><span style="font-size: 12pt; ">DBA</span><span style="font-size: 12pt; font-family: 宋体; ">视图</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />485. DBA_2PC_NEIGHBORS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含未决事务的引入或流出的连接信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />486. DBA_ALL_TABLES&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示数据库中所有表的描述。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />487. DBA_APPLICATION_ROLES&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">所有的具有函数定义的验证策略的角色。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />488. DBA_ASSOCIATIONS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示用户定义的统计信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />489. DBA_AUDIT_EXISTS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出</span><span style="font-size: 12pt; ">AUDIT NOT EXISTS</span><span style="font-size: 12pt; font-family: 宋体; ">和</span><span style="font-size: 12pt; ">AUDIT EXISTS</span><span style="font-size: 12pt; font-family: 宋体; ">产生的审计跟踪。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />490. DBA_AUDIT_OBJECT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">系统中所有对象的审计跟踪记录。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />491. DBA_AUDIT_SESSION&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出关于</span><span style="font-size: 12pt; ">CONNECT</span><span style="font-size: 12pt; font-family: 宋体; ">和</span><span style="font-size: 12pt; ">DISCONNECT</span><span style="font-size: 12pt; font-family: 宋体; ">的所有审计跟踪信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />492. DBA_AUDIT_STATEMENT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出关于</span><span style="font-size: 12pt; ">GRANT</span><span style="font-size: 12pt; font-family: 宋体; ">，</span><span style="font-size: 12pt; ">REVOKE</span><span style="font-size: 12pt; font-family: 宋体; ">，</span><span style="font-size: 12pt; ">AUDIT</span><span style="font-size: 12pt; font-family: 宋体; ">，</span><span style="font-size: 12pt; ">NOAUDIT</span><span style="font-size: 12pt; font-family: 宋体; ">，</span><span style="font-size: 12pt; ">ALTER SYSTEM</span><span style="font-size: 12pt; font-family: 宋体; ">语句的审计跟踪信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />493. DBA_AUDIT_TRAIL&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出所有的审计跟踪条目。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />494. DBA_BLOCKERS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出正有人等待一个会话持有的锁的所有会话，但并非它们自己在等待一个锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />495. DBA_BASE_TABLE_MVIEWS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">描述数据库中所有的物化视图。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />496. DBA_CATALOG&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出所有数据库标，视图，同义词和序列。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />497. DBA_CLU_COLUMNS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出表列到聚集列的映射。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />498. DBA_CLUSTER_HASH_EXPRESSIONS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出所有聚集的散列</span><span style="font-size: 12pt; ">HASH</span><span style="font-size: 12pt; font-family: 宋体; ">函数。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />499. DBA_CLUSTERS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含数据库中所有聚集的描述。</span></p><p style=" font-size: 13px; "><span style="font-size: 12pt; "><br />500. DBA_COL_COMMENTS&nbsp;<br /></span><span style="font-size: 12pt; font-family: 宋体; ">所有表和视图的列的注解。</span>&nbsp;</p></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><img src ="http://www.blogjava.net/kxbin/aggbug/387661.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-13 17:28 <a href="http://www.blogjava.net/kxbin/articles/387661.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle常见问题(301-400)</title><link>http://www.blogjava.net/kxbin/articles/387660.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 13 Sep 2012 09:27:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387660.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387660.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387660.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387660.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387660.html</trackback:ping><description><![CDATA[<p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; font-family: 微软雅黑, 宋体, Arial; background-color: #ffffff; "><span style="font-size: 12pt; line-height: 24px; font-family: Verdana; ">301. V$BUFFER_POOL&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示实例缓冲池的信息。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; font-family: 微软雅黑, 宋体, Arial; background-color: #ffffff; "><span style="font-size: 12pt; line-height: 24px; font-family: Verdana; ">&nbsp;<br />302. V$BUFFER_POOL_STATISTICS&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示实例缓冲池的信息。</span></p><span style="background-color: #ffffff; font-size: 12pt; line-height: 24px; font-family: Verdana; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />303. V$CACHE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含当前实例的</span><span style="font-size: 12pt; line-height: 24px; ">SGA</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">中的每一个块的头部信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />304. V$CACHE_LOCK&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含当前实例的</span><span style="font-size: 12pt; line-height: 24px; ">SGA</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">中的每一个块的头部信息</span><span style="font-size: 12pt; line-height: 24px; ">.&nbsp;</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">和</span><span style="font-size: 12pt; line-height: 24px; ">V$CACHE</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">非常相似，</span><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">除特使平台锁管理器标识符号不同外。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />305. V$CACHE_TRANSFER&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">除了只显示那些被探查了至少一次的块的信息外，和</span><span style="font-size: 12pt; line-height: 24px; ">V$CACHE</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">功能相同。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />306. V$CIRCUIT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含关于虚电路的信息，是用户通过调度程序和服务器到数据库的所有连接。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />307. V$CLASS_PING&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示每一个块类中被探查块的数目。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />308. V$COMPATIBILITY&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示数据库实例使用的特征，可以阻止数据库回到早期的版本中去。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />309. V$COMPATSEG&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示数据库实例使用的永久性特征，可以阻止数据库回到早期的版本中去。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />310. V$CONTEXT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出当前对话的设置属性。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />311. V$CONTROLFILE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出控制文件的名称。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />312. V$CONTROLFILE_RECORD_SECTION&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示控制文件记录部分的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />313. V$COPY_CORRUPTION&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示控制文件中数据文件损坏的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />314. V$CR_BLOCK_SERVER&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示用在缓存中块服务器后台进程上的统计信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />315. V$DATABASE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含控制文件中数据库的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />316. V$DATAFILE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含控制文件中数据库文件的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />317. V$DATAFILE_COPY&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含控制文件中数据库文件副本的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />318. V$DATAFILE_HEADER&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示数据文件头部的数据文件信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />319. V$DB_CACHE_ADVICE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">根据缓存的大小估计出物理读的数量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />320. V$DB_OBJECT_CACHE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">缓存在库缓存中的数据库对象。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />321. V$DB_PIPES&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示实例中的共享池当前描绘的管道。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />322. V$DBFILE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出组成数据库的所有数据文件。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />323. V$DBLINK&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">查询会话所打开的所有数据库连接。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />324. V$DELETED_OBJECT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示控制文件中被删除归档日志。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />325. V$DISPATCHER&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">提供调度进程的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />326. V$DISPATCHER_RATE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">为调度进程提供优质提供速率统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />327. V$DLM_ALL_LOCKS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">列出当前所有锁的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />328. V$DLM_CONVERT_LOCAL&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">本地锁转换操作所消耗的时间。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />329. V$DLM_CONVERT_REMOTE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">远程锁转换操作所消耗的时间。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />330. V$DLM_LATCH&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">它是过时的，参见</span><span style="font-size: 12pt; line-height: 24px; ">V$LATCH</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />331. V$DLM_LOCKS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">这些是锁管理器已知的被阻塞或阻塞其它对象的锁信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />332. V$DLM_MISC&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示多种</span><span style="font-size: 12pt; line-height: 24px; ">DLM</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">统计量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />333. V$DLM_RESS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示当前锁管理器已知的全部资源的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />334. V$ENABLEDPRIVE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示被授予的特权。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />335. V$ENQUEUE_LOCK&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示排队对象所拥有的全部锁。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />336. V$EVENT_NAME&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含等待事件的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />337. V$EXECUTION&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示并行执行中的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />338. V$FALSE_PING&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">可能得到探查失败的缓冲区。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />339. V$FAST_START_SERVERS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">执行并行操作事务恢复的所有从属操作的信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />340. V$FAST_START_TRANSACTIONS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">恢复中的事务进展信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />341. V$FILE_CACHE_TRANSFER&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示每个数据文件中探查的块的数量。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />342. V$FILE_PING&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示每个数据文件被探查的块数目。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />343. V$FILESTAT&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">包含文件关于读</span><span style="font-size: 12pt; line-height: 24px; ">/</span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">写统计量信息。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />344. V$FIXED_TABLE&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示数据库中所有动态性能表和视图及导出表。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />345. V$FIXED_VIEW_DEFINITION&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">显示所有固定视图的定义。</span></p><span style="font-size: 12pt; "><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><br />346. V$GC_ELEMENTS_WITH_COLLISIONS&nbsp;<br /><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">可以找到保护多缓存的锁。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />347. V$GES_BLOCKING_ENQUEUE&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">这些是锁管理器已知的被阻塞或阻塞其它对象的锁信息。</span></p><p align="left" style="margin: 0cm 0cm 7.5pt; font-size: 13px; line-height: 19px; "><span style="font-size: 12pt; line-height: 24px; ">&nbsp;<br />348. V$GES_CONVERT_LOCAL&nbsp;<br /></span><span style="font-size: 12pt; line-height: 24px; font-family: 宋体; ">本地锁转换操作</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />349. V$GES_CONVERT_REMOTE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">远程锁转换操作所消耗的时间。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />350. V$GES_ENQUEUE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示当前锁管理员知道的所有的锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />351. V$GES_LATCH&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">参见</span><span style="font-size: 12pt; ">V$LATCH</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />352. V$GES_RESOURCE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示当前锁管理器已知的全部资源的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />353. V$GES_STATISTICS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示多种</span><span style="font-size: 12pt; ">DLM</span><span style="font-size: 12pt; font-family: 宋体; ">统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />354. V$GLOBAL_BLOCKED_LOCKS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示全局块锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />355. V$GLOBAL_TRANSACTION&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示当前激活的全局事务的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />356. V$HS_AGENT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">标识当前运行在一个给定的主机上的</span><span style="font-size: 12pt; ">HS</span><span style="font-size: 12pt; font-family: 宋体; ">代理的集合。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />357. V$HS_SESSION&nbsp;<br />ORACLE<span style="font-size: 12pt; font-family: 宋体; ">服务器打开的</span><span style="font-size: 12pt; ">HS</span><span style="font-size: 12pt; font-family: 宋体; ">会话集。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />358. V$INDEXED_FIXED_COLUMN&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示建立索引的动态性能表中的列</span><span style="font-size: 12pt; ">(X$</span><span style="font-size: 12pt; font-family: 宋体; ">表</span><span style="font-size: 12pt; ">)</span><span style="font-size: 12pt; font-family: 宋体; ">。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />359. V$INSTANCE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示当前实例的状态。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />360. V$INSTANCE_RECOVERY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">用来监视执行用户指定恢复读次数的限制机制。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />361. V$LATCH&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">为非双亲简易锁列出统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />362. V$LATCH_CHILDREN&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">关于子简易锁的统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />363. V$LATCH_MISSES&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">试图获得一个简易锁失败的统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />364. V$LATCH_PARENT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含关于双亲简易锁的统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />365. V$LATCHHOLDER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">当前简易锁持有者的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />366. V$LATCHNAME&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含关于显示在</span><span style="font-size: 12pt; ">V$LATCH</span><span style="font-size: 12pt; font-family: 宋体; ">中的简易锁的解码简易锁名字的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />367. V$LIBRARYCACHE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">关于高速缓存性能和活动的统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />368. V$LICENSE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">许可证限制的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />369. V$LOADCSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含在一个直接装载执行过程中所编译的</span><span style="font-size: 12pt; ">SQL*LOADER</span><span style="font-size: 12pt; font-family: 宋体; ">统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />370. V$LOCK&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">当前</span><span style="font-size: 12pt; ">ORACLE</span><span style="font-size: 12pt; font-family: 宋体; ">所持有的锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />371. V$LOCK_ACTIVITY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示当前实例的</span><span style="font-size: 12pt; ">DLM</span><span style="font-size: 12pt; font-family: 宋体; ">锁操作活动。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />372. V$LOCK_ELEMENT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">每一个被缓存使用的</span><span style="font-size: 12pt; ">PCM</span><span style="font-size: 12pt; font-family: 宋体; ">锁在</span><span style="font-size: 12pt; ">V$LOCK_ELEMENTS</span><span style="font-size: 12pt; font-family: 宋体; ">中都有一个条目。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />373. V$LOCKED_OBJECT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出每个事务所获得的全部锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />374. V$LOCK_WITH_COLLISIONS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">可以查询出保护多缓冲区的锁。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />375. V$LOG&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">控制文件中日志文件的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />376. V$LOG_HISTORY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">控制文件中日志文件的历史信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />377. V$LOGFILE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含重做日志文件的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />378. V$LOGHIST&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">控制文件中日志文件的日志历史信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />379. V$LOGMNR_CONTENTS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">日志历史信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />380. V$LOGMNR_DICTIONARY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">日志历史信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />381. V$LOGMNR_LOGS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">日志信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />382. V$LOGMNR_PARAMETERS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">日志信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />383. V$MTS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">包含调节多线程的服务器的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />384. V$MYSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">当前会话的统计量。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />385. V$NLS_PARAMETERS&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">当前</span><span style="font-size: 12pt; ">NLS</span><span style="font-size: 12pt; font-family: 宋体; ">参数信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />386. V$NLS_VALID_VALUES&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出所有</span><span style="font-size: 12pt; ">NLS</span><span style="font-size: 12pt; font-family: 宋体; ">参数的有效值。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />387. V$OBJECT_DEPENDENCY&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">能够通过当前装载在共享池中的包，过程或游标来决定依赖哪一个对象。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />388. V$OBJECT_USAGE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">来监视索引的使用。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />389. V$OBSOLETE_PARAMETER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出陈旧的参数。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />390. V$OFFINE_RANGE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示控制文件中数据文件的脱机信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />391. V$OPEN_CURSOR&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出每一个会话当前打开的和解析的游标。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />392. V$OPTION&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出</span><span style="font-size: 12pt; ">ORACLE</span><span style="font-size: 12pt; font-family: 宋体; ">服务安装的状况。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />393. V$PARALLEL_DEGREE_LIMIT_MTH&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">显示所有有效的并行度限制资源分配的方法。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />394. V$PARAMETER&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出关于初始化参数的信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />395. V$PARAMETER2&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出了当前影响会话的参数和参数值。</span></p><p style=" font-size: 13px; "><span style="font-size: 12pt; ">&nbsp;<br />396. V$PGASTAT&nbsp;<br /></span><span style="font-size: 12pt; font-family: 宋体; ">列出</span><span style="font-size: 12pt; ">ORACLE</span><span style="font-size: 12pt; font-family: 宋体; ">内存使用统计。</span></p><p style=" font-size: 13px; "><span style="font-size: 12pt; ">&nbsp;<br />397. V$PING&nbsp;<br /></span><span style="font-size: 12pt; font-family: 宋体; ">与</span><span style="font-size: 12pt; ">V$CACHE</span><span style="font-size: 12pt; font-family: 宋体; ">一样。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />398. V$PQ_SESSTAT&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">列出并行查询会话的统计信息。</span></p><span style="font-size: 12pt; "><p style=" font-size: 13px; "><br />399. V$PQ_SLAVE&nbsp;<br /><span style="font-size: 12pt; font-family: 宋体; ">一个实例上每个活动并行执行服务器的统计量。</span></p><p style=" font-size: 13px; "><span style="font-size: 12pt; "><br />400. V$PQ_SYSSTAT&nbsp;<br /></span><span style="font-size: 12pt; font-family: 宋体; ">列出并行查询的系统的统计量。</span></p></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><img src ="http://www.blogjava.net/kxbin/aggbug/387660.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-13 17:27 <a href="http://www.blogjava.net/kxbin/articles/387660.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle常见问题(201-300)</title><link>http://www.blogjava.net/kxbin/articles/387659.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 13 Sep 2012 09:26:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387659.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387659.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387659.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387659.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387659.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 201. /*+NOCACHE(TABLE)*/&nbsp;当进行全表扫描时，CACHE提示能够将表的检索块放置在缓冲区缓存中最近最少列表LRU的最近使用端&nbsp;例如：&nbsp;SELECT&nbsp;/*+FULL(BSEMPMS)&nbsp;NOCAHE(BSEMPMS)&nbsp;*/&nbsp;EMP_NAM&nbsp;FROM&nbsp;BSEMPMS;202. /*+APPEN...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387659.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387659.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-13 17:26 <a href="http://www.blogjava.net/kxbin/articles/387659.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle常见问题(101-200)</title><link>http://www.blogjava.net/kxbin/articles/387657.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 13 Sep 2012 09:24:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387657.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387657.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387657.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387657.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387657.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 101.&nbsp;如何搜索出前N条记录？SQL&gt; SELECT * FROM empLOYEE WHERE ROWNUM &lt; n ORDER BY empno;&nbsp;102.&nbsp;如何知道机器上的Oracle支持多少并发用户数?&nbsp;SQL&gt;conn internal&nbsp;；&nbsp;SQL&gt;show parameter processes&nb...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387657.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387657.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-13 17:24 <a href="http://www.blogjava.net/kxbin/articles/387657.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle常见问题(1-100)</title><link>http://www.blogjava.net/kxbin/articles/387656.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 13 Sep 2012 09:23:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387656.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387656.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387656.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387656.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387656.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1. Oracle安装完成后的初始口令?&nbsp;&nbsp;　internal/oracle&nbsp;　sys/change_on_install&nbsp;　system/manager&nbsp;　scott/tiger&nbsp;　sysman/oem_temp&nbsp;2. ORACLE9I AS WEB CACHE的初始默认用户和密码？&nbsp;administrator/ad...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387656.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387656.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-13 17:23 <a href="http://www.blogjava.net/kxbin/articles/387656.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详解之七：   程序包的创建与应用</title><link>http://www.blogjava.net/kxbin/articles/387581.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 09:34:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387581.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387581.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387581.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387581.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387581.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本篇主要内容如下：第七章&nbsp;&nbsp;程序包的创建和应用7.1&nbsp;&nbsp;程序包简介7.2&nbsp;&nbsp;程序包的定义7.3&nbsp;&nbsp;包的开发步骤7.4&nbsp;&nbsp;包定义的说明7.5&nbsp;&nbsp;子程序重载7.6&nbsp;&nbsp;加密实用程序7.7&nbsp;&nbsp;删除包7.8&nbsp;&nbsp;包的管理&nbsp;...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387581.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387581.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 17:34 <a href="http://www.blogjava.net/kxbin/articles/387581.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详解之六： 把过程与函数说透</title><link>http://www.blogjava.net/kxbin/articles/387580.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 09:33:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387580.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387580.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387580.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387580.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387580.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本篇主要内容如下：6.1&nbsp;引言6.2&nbsp;创建函数6.3&nbsp;存储过程6.3.1&nbsp;创建过程6.3.2&nbsp;调用存储过程6.3.3&nbsp;AUTHID6.3.4&nbsp;PRAGMA AUTONOMOUS_TRANSACTION6.3.5&nbsp;开发存储过程步骤6.3.6&nbsp;删除过程和函数6.3.7&nbsp;过程与函数的比较&nbsp;6.1...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387580.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387580.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 17:33 <a href="http://www.blogjava.net/kxbin/articles/387580.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详解之五： 异常错误处理</title><link>http://www.blogjava.net/kxbin/articles/387579.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 09:32:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387579.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387579.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387579.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387579.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387579.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本篇主要内容如下：5.1&nbsp;异常处理概念5.1.1&nbsp;预定义的异常处理5.1.2&nbsp;非预定义的异常处理5.1.3&nbsp;用户自定义的异常处理5.1.4&nbsp;&nbsp;用户定义的异常处理5.2&nbsp;异常错误传播5.2.1&nbsp;在执行部分引发异常错误5.2.2&nbsp;在声明部分引发异常错误5.3&nbsp;异常错误处理编程5.4&nbsp;&nbsp...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387579.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387579.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 17:32 <a href="http://www.blogjava.net/kxbin/articles/387579.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详细之四： 把游标说透</title><link>http://www.blogjava.net/kxbin/articles/387578.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 09:31:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387578.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387578.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387578.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387578.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387578.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本篇主要内容如下：4.1&nbsp;游标概念4.1.1&nbsp;处理显式游标4.1.2&nbsp;处理隐式游标4.1.3&nbsp;关于&nbsp;NO_DATA_FOUND&nbsp;和&nbsp;%NOTFOUND的区别4.1.4&nbsp;&nbsp;使用游标更新和删除数据4.2&nbsp;游标变量4.2.1&nbsp;&nbsp;声明游标变量4.2.2&nbsp;&nbsp;游标变量操作...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387578.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387578.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 17:31 <a href="http://www.blogjava.net/kxbin/articles/387578.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详解之三：PL/SQL流程控制语句</title><link>http://www.blogjava.net/kxbin/articles/387577.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 09:30:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387577.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387577.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387577.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387577.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387577.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本篇主要内容如下：3.1&nbsp;&nbsp;条件语句3.2&nbsp;&nbsp;CASE&nbsp;表达式3.3&nbsp;&nbsp;循环3.4&nbsp;&nbsp;标号和GOTO3.5&nbsp;&nbsp;NULL&nbsp;语句&nbsp;介绍PL/SQL的流程控制语句,&nbsp;包括如下三类:l&nbsp;控制语句:&nbsp;IF&nbsp;语句l&nbsp;循环语句:&nb...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387577.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387577.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 17:30 <a href="http://www.blogjava.net/kxbin/articles/387577.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详解之二： PL/SQL块结构和组成元素</title><link>http://www.blogjava.net/kxbin/articles/387571.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 09:00:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387571.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387571.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387571.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387571.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387571.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本篇主要内容如下：2.1&nbsp;&nbsp;&nbsp;PL/SQL块2.2&nbsp;&nbsp;&nbsp;PL/SQL结构2.3&nbsp;&nbsp;&nbsp;标识符2.4&nbsp;&nbsp;&nbsp;PL/SQL&nbsp;变量类型2.4.1&nbsp;&nbsp;变量类型2.4.2&nbsp;&nbsp;复合类型2.4.2.1&nbsp;记录类型2.4.2.2&nbsp;数...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387571.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387571.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 17:00 <a href="http://www.blogjava.net/kxbin/articles/387571.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程详解之一：PL/SQL 程序设计简介</title><link>http://www.blogjava.net/kxbin/articles/387570.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 08:59:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387570.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387570.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387570.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387570.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387570.html</trackback:ping><description><![CDATA[<p style="margin: 7.5pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: 宋体; background-color: #ffff00; font-size: 11pt; font-weight: bold; ">本篇主要内容如下：</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc10218" style="color: #464646; text-decoration: none; "><span style="text-transform: uppercase; font-family: Arial; font-size: 10.5pt; ">第</span><span style="text-transform: uppercase; font-family: 宋体; font-size: 10.5pt; ">一</span><span style="text-transform: uppercase; font-family: Arial; font-size: 10.5pt; ">章&nbsp;&nbsp;&nbsp;PL/SQL&nbsp;程序设计简介</span></a></p><p style="margin: 0pt 0px 0pt 10.5pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc18787" style="color: #464646; text-decoration: none; "><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">1.</span><span style="font-variant: small-caps; font-family: 宋体; font-size: 10pt; ">1</span><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">&nbsp;&nbsp;&nbsp;SQL与PL/SQL</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc11821" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.</span><span style="font-family: 宋体; font-size: 10pt; ">1</span><span style="font-family: 'Times New Roman'; font-size: 10pt; ">.1&nbsp;&nbsp;什么是PL/SQL?</span></a></p><p style="margin: 0pt 0px 0pt 10.5pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc5025" style="color: #464646; text-decoration: none; "><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">1.</span><span style="font-variant: small-caps; font-family: 宋体; font-size: 10pt; ">2</span><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">&nbsp;&nbsp;PL/SQL的</span><span style="font-variant: small-caps; font-family: 宋体; font-size: 10pt; ">优点或特征</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc6530" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.2.1&nbsp;&nbsp;有利于客户/服务器环境应用的运行</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc20499" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.2.2&nbsp;&nbsp;适合于客户环境</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc21230" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.2.</span><span style="font-family: 宋体; font-size: 10pt; ">3</span><span style="font-family: 'Times New Roman'; font-size: 10pt; ">&nbsp;&nbsp;</span><span style="font-family: 宋体; font-size: 10pt; ">过程化</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc6437" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.2.</span><span style="font-family: 宋体; font-size: 10pt; ">4</span><span style="font-family: 'Times New Roman'; font-size: 10pt; ">&nbsp;&nbsp;</span><span style="font-family: 宋体; font-size: 10pt; ">模块化</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc21211" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.2.</span><span style="font-family: 宋体; font-size: 10pt; ">5</span>&nbsp;<span style="font-family: 宋体; font-size: 10pt; ">&nbsp;运行错误的可处理性</span></a></p><p style="margin: 0pt 0px 0pt 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc22163" style="color: #464646; text-decoration: none; "><span style="font-family: 'Times New Roman'; font-size: 10pt; ">1.2.</span><span style="font-family: 宋体; font-size: 10pt; ">6</span>&nbsp;<span style="font-family: 宋体; font-size: 10pt; ">&nbsp;提供大量内置程序包</span></a></p><p style="margin: 0pt 0px 0pt 10.5pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc30478" style="color: #464646; text-decoration: none; "><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">1.</span><span style="font-variant: small-caps; font-family: 宋体; font-size: 10pt; ">3</span><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">&nbsp;&nbsp;PL/SQL&nbsp;可用的SQL语句</span></a></p><p style="margin: 0pt 0px 0pt 10.5pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><a href="http://www.cnblogs.com/huyong/archive/2011/05/16/2047329.html#_Toc6182" style="color: #464646; text-decoration: none; "><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">1.</span><span style="font-variant: small-caps; font-family: 宋体; font-size: 10pt; ">4</span><span style="font-variant: small-caps; font-family: 'Times New Roman'; font-size: 10pt; ">&nbsp;&nbsp;运行PL/SQL程序</span></a></p><p style="margin: 0pt 0px 0pt 10.5pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><hr style="font-family: 微软雅黑, 宋体, Arial; font-size: 15px; line-height: normal; background-color: #ffffff; " /><p style="margin: 7px 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; ">&nbsp;</p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><p style="margin: 0pt 0px; text-indent: 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: 宋体; font-size: 10.5pt; ">SQL语言只是访问、操作数据库的语言，并不是一种具有流程控制的程序设计语言，而只有程序设计语言才能用于应用软件的开发。</span><span style="font-family: Arial; font-size: 10.5pt; ">PL&nbsp;/SQL是一种高级数据库程序设计语言，该语言专门用于在各种环境下对ORACLE数据库进行访问。由于该语言集成于数据库服务器中，所以PL/SQL代码可以对数据进行快速高效的处理。除此之外，可以在ORACLE数据库的某些客户端工具中，使用PL/SQL语言也是该语言的一个特点。本章的主要内容是讨论引入PL/SQL语言的必要性和该语言的主要特点，以及了解PL/SQL语言的重要性和数据库版本问题。还要介绍一些贯穿全书的更详细的高级概念，并在本章的最后就我们在本书案例中使用的数据库表的若干约定做一说明。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h2><a name="_Toc518865172" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 12pt; "><a name="_Toc521305443" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418090" style="color: rgb(70, 70, 70); "></a><a name="_Toc524428001" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949039" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407121" style="color: rgb(70, 70, 70); "></a><a name="_Toc477183988" style="color: rgb(70, 70, 70); "></a><a name="_Toc24706" style="color: rgb(70, 70, 70); "></a><a name="_Toc18787" style="color: #464646; ">1.</a></span><span style="font-family: 宋体; font-size: 12pt; ">1</span><span style="font-family: Arial; font-size: 12pt; ">&nbsp;&nbsp;&nbsp;SQL与PL/SQL</span></h2><h3><a name="_Toc518865173" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc521305444" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418091" style="color: rgb(70, 70, 70); "></a><a name="_Toc524428002" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949040" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407122" style="color: rgb(70, 70, 70); "></a><a name="_Toc477183989" style="color: rgb(70, 70, 70); "></a><a name="_Toc24699" style="color: rgb(70, 70, 70); "></a><a name="_Toc11821" style="color: #464646; ">1.</a></span><span style="font-family: 宋体; font-size: 10.5pt; ">1</span><span style="font-family: Arial; font-size: 10.5pt; ">.1&nbsp;&nbsp;什么是PL/SQL?</span></h3><p style="margin: 0pt 0px; text-indent: 27pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL是&nbsp;Procedure&nbsp;Language&nbsp;&amp;&nbsp;Structured&nbsp;Query&nbsp;Language&nbsp;的缩写。ORACLE的SQL是支持ANSI(American&nbsp;national&nbsp;Standards&nbsp;Institute)和ISO92&nbsp;(International&nbsp;Standards&nbsp;Organization)标准的产品。PL/SQL是对SQL语言存储过程语言的扩展。从ORACLE6以后，ORACLE的RDBMS附带了PL/SQL。它现在已经成为一种过程处理语言，简称PL/SQL。目前的PL/SQL包括两部分，一部分是数据库引擎部分；另一部分是可嵌入到许多产品（如C语言，JAVA语言等）工具中的独立引擎。可以将这两部分称为：数据库PL/SQL和工具PL/SQL。两者的编程非常相似。都具有编程结构、语法和逻辑机制。工具PL/SQL另外还增加了用于支持工具（如ORACLE&nbsp;Forms）的句法，如：在窗体上设置按钮等。本章主要介绍数据库PL/SQL内容。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h2><a name="_Toc503776575" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 12pt; "><a name="_Toc518865174" style="color: rgb(70, 70, 70); "></a><a name="_Toc521305445" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418092" style="color: rgb(70, 70, 70); "></a><a name="_Toc524428003" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949041" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407123" style="color: rgb(70, 70, 70); "></a><a name="_Toc477183990" style="color: rgb(70, 70, 70); "></a><a name="_Toc15813" style="color: rgb(70, 70, 70); "></a><a name="_Toc5025" style="color: #464646; ">1.</a></span><span style="font-family: 宋体; font-size: 12pt; ">2</span><span style="font-family: Arial; font-size: 12pt; ">&nbsp;&nbsp;PL/SQL的</span><span style="font-family: 宋体; font-size: 12pt; ">优点或特征</span></h2><h3><a name="_Toc518865175" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc521305446" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418093" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949042" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407124" style="color: rgb(70, 70, 70); "></a><a name="_Toc8118" style="color: rgb(70, 70, 70); "></a><a name="_Toc6530" style="color: #464646; ">1.2.1&nbsp;&nbsp;有利于客户/服务器环境应用的运行</a></span></h3><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">对于客户/服务器环境来说，真正的瓶颈是网络上。无论网络多快，只要客户端与服务器进行大量的数据交换。应用运行的效率自然就回受到影响。如果使用PL/SQL进行编程，将这种具有大量数据处理的应用放在服务器端来执行。自然就省去了数据在网上的传输时间。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h3><a name="_Toc518865176" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc521305447" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418094" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949043" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407125" style="color: rgb(70, 70, 70); "></a><a name="_Toc6181" style="color: rgb(70, 70, 70); "></a><a name="_Toc20499" style="color: #464646; ">1.2.2&nbsp;&nbsp;适合于客户环境</a></span></h3><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL由于分为数据库PL/SQL部分和工具PL/SQL。对于客户端来说，PL/SQL可以嵌套到相应的工具中，客户端程序可以执行本地包含PL/SQL部分，也可以向服务发SQL命令或激活服务器端的PL/SQL程序运行。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h3><a name="_Toc28930" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc21230" style="color: #464646; ">1.2.</a></span><span style="font-family: 宋体; font-size: 10.5pt; ">3</span><span style="font-family: Arial; font-size: 10.5pt; ">&nbsp;&nbsp;</span><span style="font-family: 宋体; font-size: 10.5pt; ">过程化</span></h3><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL</span><span style="font-family: 宋体; font-size: 10.5pt; ">是</span><span style="font-family: 宋体; font-size: 10.5pt; ">Oracle在标准SQL上的过程性扩展，不仅允许在PL/SQL程序内嵌入SQL语句，而且允许使用各种类型的条件分支语句和循环语句，可以多个应用程序之间共享其解决方案</span><span style="font-family: Arial; font-size: 10.5pt; ">。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h3><a name="_Toc2337" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc6437" style="color: #464646; ">1.2.</a></span><span style="font-family: 宋体; font-size: 10.5pt; ">4</span><span style="font-family: Arial; font-size: 10.5pt; ">&nbsp;&nbsp;</span><span style="font-family: 宋体; font-size: 10.5pt; ">模块化</span></h3><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL</span><span style="font-family: 宋体; font-size: 10.5pt; ">程序结构是一种描述性很强、界限分明的块结构、嵌套块结构，被分成单独的过程、函数、触发器，且可以把它们组合为程序包，提高程序的模块化能力</span><span style="font-family: Arial; font-size: 10.5pt; ">。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h3><a name="_Toc23825" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc21211" style="color: #464646; ">1.2.</a></span><span style="font-family: 宋体; font-size: 10.5pt; ">5</span>&nbsp;&nbsp;<span style="font-family: 宋体; font-size: 10.5pt; ">运行错误的可处理性</span></h3><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: 宋体; font-size: 10.5pt; ">使用</span><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL</span><span style="font-family: 宋体; font-size: 10.5pt; ">提供的异常处理（</span><span style="font-family: 宋体; font-size: 10.5pt; ">EXCEPTION），开发人员可集中处理各种ORACLE错误和PL/SQL错误，或处理系统错误与自定义错误，以增强应用程序的健壮性。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><h3><a name="_Toc16138" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 10.5pt; "><a name="_Toc22163" style="color: #464646; ">1.2.</a></span><span style="font-family: 宋体; font-size: 10.5pt; ">6</span>&nbsp;&nbsp;<span style="font-family: 宋体; font-size: 10.5pt; ">提供大量内置程序包</span></h3><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: 宋体; font-size: 10.5pt; ">ORACLE提供了大量的内置程序包。通过这些程序包能够实现DBS的一些低层操作、高级功能，不论对DBA还是应用开发人员都具有重要作用。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><p style="margin: 0pt 0px; text-indent: 21pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: 宋体; font-size: 10.5pt; ">当然还有其它的一些优点如：更好的性能、可移植性和兼容性、可维护性、易用性与快速性等。</span></p><h2><a name="_Toc518865178" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 12pt; "><a name="_Toc521305449" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418096" style="color: rgb(70, 70, 70); "></a><a name="_Toc524428004" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949045" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407127" style="color: rgb(70, 70, 70); "></a><a name="_Toc477183991" style="color: rgb(70, 70, 70); "></a><a name="_Toc10163" style="color: rgb(70, 70, 70); "></a><a name="_Toc30478" style="color: #464646; ">1.</a></span><span style="font-family: 宋体; font-size: 12pt; ">3</span><span style="font-family: Arial; font-size: 12pt; ">&nbsp;&nbsp;PL/SQL&nbsp;可用的SQL语句</span></h2><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">&nbsp;&nbsp;&nbsp;&nbsp;PL/SQL是ORACLE系统的核心语言，现在ORACLE的许多部件都是由PL/SQL写成。在PL/SQL中可以使用的SQL语句有：</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">INSERT，UPDATE，DELETE，SELECT&nbsp;INTO，COMMIT，ROLLBACK，SAVEPOINT。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-style: italic; font-family: Arial; font-size: 10.5pt; font-weight: bold; ">提示：在&nbsp;PL/SQL中只能用&nbsp;SQL语句中的&nbsp;DML&nbsp;部分，不能用&nbsp;DDL&nbsp;部分，如果要在PL/SQL中使用DDL(如CREATE&nbsp;&nbsp;table&nbsp;&nbsp;等)的话，只能以动态的方式来使用。</span></p><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "></p><p style="margin: 0pt 0px 0pt 39pt; text-indent: -18pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Wingdings; font-size: 10.5pt; ">l&nbsp;</span><span style="font-family: Arial; font-size: 10.5pt; ">ORACLE&nbsp;的&nbsp;PL/SQL&nbsp;组件在对&nbsp;PL/SQL&nbsp;程序进行解释时，同时对在其所使用的表名、列名及数据类型进行检查。</span></p><p style="margin: 0pt 0px 0pt 39pt; text-indent: -18pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Wingdings; font-size: 10.5pt; ">l&nbsp;</span><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL&nbsp;可以在SQL*PLUS&nbsp;中使用。</span></p><p style="margin: 0pt 0px 0pt 39pt; text-indent: -18pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Wingdings; font-size: 10.5pt; ">l&nbsp;</span><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL&nbsp;可以在高级语言中使用。</span></p><p style="margin: 0pt 0px 0pt 39pt; text-indent: -18pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Wingdings; font-size: 10.5pt; ">l&nbsp;</span><span style="font-family: Arial; font-size: 10.5pt; ">PL/SQL可以在ORACLE的开发工具中使用</span><span style="font-family: 宋体; font-size: 10.5pt; ">(如：SQL&nbsp;Developer或Procedure&nbsp;Builder等)</span><span style="font-family: Arial; font-size: 10.5pt; ">。</span></p><p style="margin: 0pt 0px 0pt 39pt; text-indent: -18pt; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Wingdings; font-size: 10.5pt; ">l&nbsp;</span><span style="font-family: Arial; font-size: 10.5pt; ">其它开发工具也可以调用PL/SQL编写的过程和函数，如Power&nbsp;Builder&nbsp;等都可以调用服务器端的PL/SQL过程。</span></p><h2><a name="_Toc518865179" style="color: rgb(70, 70, 70); "></a><span style="font-family: Arial; font-size: 12pt; "><a name="_Toc521305450" style="color: rgb(70, 70, 70); "></a><a name="_Toc521418097" style="color: rgb(70, 70, 70); "></a><a name="_Toc524428005" style="color: rgb(70, 70, 70); "></a><a name="_Toc525949046" style="color: rgb(70, 70, 70); "></a><a name="_Toc528407128" style="color: rgb(70, 70, 70); "></a><a name="_Toc477183992" style="color: rgb(70, 70, 70); "></a><a name="_Toc2603" style="color: rgb(70, 70, 70); "></a><a name="_Toc6182" style="color: #464646; ">1.</a></span><span style="font-family: 宋体; font-size: 12pt; ">4</span><span style="font-family: Arial; font-size: 12pt; ">&nbsp;&nbsp;运行PL/SQL程序</span></h2><p style="margin: 0pt 0px; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: #ffffff; "><span style="font-family: Arial; font-size: 10.5pt; ">&nbsp;&nbsp;&nbsp;&nbsp;PL/SQL程序的运行是通过ORACLE中的一个引擎来进行的。这个引擎可能在ORACLE的服务器端，也可能在&nbsp;ORACLE&nbsp;应用开发的客户端。引擎执行PL/SQL中的过程性语句，然后将SQL语句发送给数据库服务器来执行。再将结果返回给执行端。</span></p><img src ="http://www.blogjava.net/kxbin/aggbug/387570.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 16:59 <a href="http://www.blogjava.net/kxbin/articles/387570.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORACLE PL/SQL编程之八：把触发器说透 </title><link>http://www.blogjava.net/kxbin/articles/387567.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 12 Sep 2012 08:50:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387567.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387567.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387567.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387567.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387567.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 8.1&nbsp;触发器类型8.1.1&nbsp;DML触发器8.1.2&nbsp;替代触发器8.1.3&nbsp;系统触发器8.2&nbsp;创建触发器8.2.1&nbsp;触发器触发次序8.2.2&nbsp;创建DML触发器8.2.3&nbsp;创建替代(INSTEAD OF)触发器8.2.3&nbsp;创建系统事件触发器8.2.4&nbsp;系统触发器事件属性8.2.5&nbsp;使用触发器...&nbsp;&nbsp;<a href='http://www.blogjava.net/kxbin/articles/387567.html'>阅读全文</a><img src ="http://www.blogjava.net/kxbin/aggbug/387567.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-12 16:50 <a href="http://www.blogjava.net/kxbin/articles/387567.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle记录类型</title><link>http://www.blogjava.net/kxbin/articles/387123.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 05 Sep 2012 13:52:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387123.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387123.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387123.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387123.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387123.html</trackback:ping><description><![CDATA[<div>pl/sql表和记录一样，都是用户自定义的数据结构。record类似于c语言中结构（struct）而pl/sql表类似于c语言的数组或集合，只是这个数据的元素可以是用户自定义的类型。record可以存储一条记录，而pl/sql表可以存储多条record记录。<br />一，什么是记录（Record）？</div><div>&nbsp;由单行多列的标量构成的复合结构。可以看做是一种用户自定义数据类型。组成类似于多维数组。</div><div>将一个或多个标量封装成一个对象进行操作。是一种临时复合对象类型。</div><div>&nbsp;</div><div>&nbsp;记录可以直接赋值。RECORD1 :=RECORD2；</div><div>&nbsp;记录不可以整体比较.</div><div>&nbsp;记录不可以整体判断为空。</div><div>&nbsp;</div><div>二，%ROWTYPE和记录（Record）？</div><div>&nbsp;请区别%ROWTYPE和记录（Record）类型。%ROWTYPE可以说是Record的升级简化版。</div><div>&nbsp;区别在与前者结构为表结构，后者为自定义结构。二者在使用上没有很大区别。前者方便，后者灵活。在实际中根据情况来具体决定使用。</div><div>&nbsp;Record + PL/SQL表可以进行数据的多行多列存储。</div><div>&nbsp;</div><div>三，如何创建和使用记录？</div><div>&nbsp;</div><div>&nbsp; &#9312;创建记录类型</div><div>&nbsp; 语法：</div><div>&nbsp; TYPE &nbsp;记录名 &nbsp;IS RECORD&nbsp;</div><div>　　(&nbsp;</div><div>&nbsp; &nbsp;filed1 type1 [NOT NULL] [：=eXPr1],</div><div>　　 &nbsp; &nbsp; ....... ,</div><div>　　 &nbsp;filedN typen [NOT NULL] [：=exprn]&nbsp;</div><div>&nbsp; ）</div><div>&nbsp; 其中，filed1是标量的名字。</div><div>&nbsp;&nbsp;</div><div>&nbsp; &#9313;声明记录类型变量：</div><div>&nbsp; &nbsp;记录类型变量名 记录类型</div><div>&nbsp; &nbsp;</div><div>&nbsp; &#9314;填充记录。</div><div>&nbsp; &nbsp;</div><div>&nbsp; &#9315;访问记录成员</div><div>&nbsp; &nbsp;记录类型变量名.filed1</div><div>&nbsp; &nbsp;.........</div><div>&nbsp; &nbsp;记录类型变量名.filedN</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;</div><div>&nbsp; 注意：</div><div>&nbsp; 表字段类型修改后，还需要修改记录字段类型，有时候可能会忘记，从而出现错误。</div><div>&nbsp; 对于记录内每个字段（filed1.。。。），可以指定也可以使用%TYPE和%ROWTYPE动态指定记录字段类型。&nbsp;</div><div>&nbsp; 好处是表字段发生变化，记录字段自动改变。但是，由于每次执行前，遇到%TYPR或%ROWTYPE，</div><div>&nbsp; 数据库系统都会去查看对应表字段类型，会造成一定的数据库开销，如果系统中大量使用记录类型，则对性能会有一定影响。</div><div>&nbsp; 另外如果删除了某一字段，而自定义记录中使用了该字段，也会有可能忘记删除该字段。</div><div>&nbsp; &nbsp; &nbsp; &nbsp;对数据库负荷偏低的系统，性能问题一般可以不重点关注，但是对于高负荷数据库服务器，</div><div>&nbsp; &nbsp; &nbsp; &nbsp;各个环节都要考虑性能问题，每处节省一点出来，性能整体就有很大提高。</div><div>&nbsp;&nbsp;</div><div>&nbsp; 语法：</div><div>&nbsp; TYPE &nbsp;记录名 &nbsp;IS RECORD&nbsp;</div><div>　　(&nbsp;</div><div>&nbsp; &nbsp;filed1 table.Filed%Type [NOT NULL] [：=eXPr1] ,</div><div>&nbsp; &nbsp;filed2 table.Filed%Type [NOT NULL] [：=eXPr1] ,</div><div>　　 &nbsp; &nbsp; ....... ,</div><div>　　 &nbsp;filedn table.Filed%Type [NOT NULL] [：=exprn]&nbsp;</div><div>&nbsp; ）;</div><div>&nbsp;</div><div>&nbsp;例子：记录可以整体赋值</div><div>&nbsp;/*conn scott/tiger</div><div>&nbsp;Create Table &nbsp;empa &nbsp;As &nbsp;Select * From emp;</div><div>&nbsp;*/</div><div>&nbsp;Declare</div><div>&nbsp; &nbsp; &nbsp;Type EmpType is Record(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; EMPNO number(4),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ENAME &nbsp;varchar2(10),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; JOB varchar2(15),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; SAL number(7,2),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; DEPTNO number(2)</div><div>&nbsp; &nbsp; &nbsp;);</div><div>&nbsp; &nbsp;EmpRec1 &nbsp;EmpType;</div><div>&nbsp; &nbsp;EmpRec2 &nbsp;EmpType;</div><div>&nbsp;Begin</div><div>&nbsp; &nbsp;EmpRec1.Empno:=7369;</div><div>&nbsp; &nbsp;EmpRec1.Ename:='SMITH';</div><div>&nbsp; &nbsp;EmpRec1.Job:='CLERK';</div><div>&nbsp; &nbsp;EmpRec1.Sal:=800;</div><div>&nbsp; &nbsp;EmpRec1.Deptno:=10;</div><div>&nbsp; &nbsp;EmpRec2 := EmpRec1;</div><div>&nbsp; &nbsp;DBMS_output.put_line(EmpRec2.empno);</div><div>&nbsp;End;</div><div>&nbsp;例子：记录不可以整体比较，只可以比较记录字段</div><div>&nbsp;Declare</div><div>&nbsp; &nbsp; &nbsp;Type EmpType is Record(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; EMPNO number(4),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ENAME &nbsp;varchar2(10),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; JOB varchar2(15),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; SAL number(7,2),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; DEPTNO number(2)</div><div>&nbsp; &nbsp; &nbsp;);</div><div>&nbsp; &nbsp;EmpRec1 &nbsp;EmpType;</div><div>&nbsp; &nbsp;EmpRec2 &nbsp;EmpType;</div><div>&nbsp;Begin</div><div>&nbsp; &nbsp;EmpRec1.Empno:=7369;</div><div>&nbsp; &nbsp;EmpRec1.Ename:='SMITH';</div><div>&nbsp; &nbsp;EmpRec1.Job:='CLERK';</div><div>&nbsp; &nbsp;EmpRec1.Sal:=800;</div><div>&nbsp; &nbsp;EmpRec1.Deptno:=10;</div><div>&nbsp; &nbsp;if EmpRec1.sal &lt; EmpRec2.sal then</div><div>&nbsp; &nbsp; &nbsp;DBMS_output.put_line('Xiao Xiao Xiao');</div><div>&nbsp; &nbsp;end if;</div><div>&nbsp;End;</div><div>&nbsp;</div><div>&nbsp;例子：记录不可以整体判断为空，只可以判断记录字段。</div><div>&nbsp;Declare</div><div>&nbsp; &nbsp; &nbsp;Type EmpType is Record(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; EMPNO number(4),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ENAME &nbsp;varchar2(10),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; JOB varchar2(15),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; SAL number(7,2),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; DEPTNO number(2)</div><div>&nbsp; &nbsp; &nbsp;);</div><div>&nbsp; &nbsp;EmpRec &nbsp;EmpType;</div><div>&nbsp;Begin</div><div>&nbsp; &nbsp;if EmpRec.ename is null then</div><div>&nbsp; &nbsp; &nbsp;DBMS_output.put_line('Kong Kong Kong'); &nbsp;</div><div>&nbsp; &nbsp;end if;</div><div>&nbsp;End;</div><div>&nbsp;</div><div>&nbsp;例子：使用%TYPE和%ROWTYPE动态指定记录字段。</div><div>&nbsp;/*conn scott/tiger</div><div>&nbsp;Create Table &nbsp;empa &nbsp;As &nbsp;Select * From emp;</div><div>&nbsp;*/</div><div>&nbsp;DECLARE</div><div>&nbsp; Type MyRecType Is &nbsp;Record</div><div>&nbsp; (</div><div>&nbsp; &nbsp;RENO &nbsp;EMPA.EMPNO%Type,</div><div>&nbsp; &nbsp;RENAME &nbsp; EMPA.ENAME%Type,</div><div>&nbsp; &nbsp;RJOB &nbsp; EMPA.JOB%Type</div><div>&nbsp; );</div><div>&nbsp; EmpRec &nbsp;MyRecType;</div><div>&nbsp;Begin</div><div>&nbsp; Select &nbsp; EMPNO, ENAME, JOB &nbsp;InTo &nbsp;EmpRec &nbsp;From empa Where empa.EMPNO = '7369';</div><div>&nbsp; If &nbsp;EmpRec.RJOB &nbsp;= 'CLERK' &nbsp;Then</div><div>&nbsp; &nbsp;DBMS_OUTPUT.PUT_LINE('Name: '||EmpRec.RENAME);</div><div>&nbsp; End If;</div><div>&nbsp;End;</div><div>&nbsp;</div><div>&nbsp;例子：数据集中的记录和记录类型中的数据关系。</div><div>&nbsp;DECLARE</div><div>&nbsp; Type MyRecType Is &nbsp;Record</div><div>&nbsp; (</div><div>&nbsp; &nbsp;RENO &nbsp;EMPA.EMPNO%Type,</div><div>&nbsp; &nbsp;RENAME &nbsp; EMPA.ENAME%Type,</div><div>&nbsp; &nbsp;RJOB &nbsp; EMPA.JOB%Type</div><div>&nbsp; );</div><div>&nbsp; EmpRec &nbsp;MyRecType;</div><div>&nbsp; vJob &nbsp;EMPA.JOB%Type;</div><div>&nbsp;Begin</div><div>&nbsp; Select &nbsp; EMPNO, ENAME, JOB &nbsp;InTo &nbsp;EmpRec &nbsp;From empa Where empa.EMPNO = '7369';</div><div>&nbsp; DBMS_OUTPUT.PUT_LINE('MyRecType.RJOB: '||EmpRec.RJOB);</div><div>&nbsp; EmpRec.RJOB &nbsp;:= '修改值后' &nbsp;;</div><div>&nbsp; DBMS_OUTPUT.PUT_LINE('MyRecType.RJOB: '||EmpRec.RJOB);</div><div>&nbsp; Select JOB &nbsp;InTo vJob &nbsp;from empa &nbsp;Where empa.EMPNO = EmpRec.RENO;</div><div>&nbsp; DBMS_OUTPUT.PUT_LINE('EMPA.JOB: '||vJob);</div><div>&nbsp;End;</div><div>&nbsp;/</div><div>&nbsp;</div><div>&nbsp;</div><div>四，使用记录向表中插入数据？</div><div>&nbsp;根据表结构合理安排记录字段。比如主外键。</div><div>&nbsp;如果用记录(RECORD)插入数据，那么只能使用记录成员；</div><div>&nbsp;如果用%ROWTYPE插入数据,可以直接使用%ROWTYPE。</div><div>&nbsp;</div><div>&nbsp;例子：使用记录成员向表中插入数据</div><div>&nbsp;DECLARE</div><div>&nbsp; Type MyRecType Is &nbsp;Record</div><div>&nbsp; (</div><div>&nbsp; &nbsp;RENO &nbsp;EMPA.EMPNO%Type,</div><div>&nbsp; &nbsp;RENAME &nbsp; VARCHAR2(10),</div><div>&nbsp; &nbsp;RJOB &nbsp; EMPA.JOB%Type</div><div>&nbsp; );</div><div>&nbsp; EmpRec MyRecType;&nbsp;</div><div>&nbsp;Begin</div><div>&nbsp; Select &nbsp; EMPNO, ENAME, JOB &nbsp;InTo &nbsp;EmpRec &nbsp;From empa Where empa.EMPNO = '7369';</div><div>&nbsp; DBMS_OUTPUT.PUT_LINE(EmpRec.RENO||' &nbsp;'||EmpRec.RENAME||' &nbsp;'||EmpRec.RJOB);</div><div>&nbsp;&nbsp;</div><div>&nbsp; EmpRec.RENO &nbsp;:= 1001;</div><div>&nbsp; EmpRec.RENAME := '杰克';</div><div>&nbsp; EmpRec.RJOB &nbsp;:= '办事员';</div><div>&nbsp; Insert InTo &nbsp;empa(EMPNO,ENAME,JOB) &nbsp;Values(EmpRec.RENO, EmpRec.RENAME,EmpRec.RJOB);</div><div>&nbsp;</div><div>&nbsp; Select &nbsp;EMPNO, ENAME, JOB &nbsp;InTo &nbsp;EmpRec &nbsp;From empa Where empa.EMPNO = '1001';</div><div>&nbsp; DBMS_OUTPUT.PUT_LINE(EmpRec.RENO||' &nbsp;'||EmpRec.RENAME||' &nbsp;'||EmpRec.RJOB);</div><div>&nbsp;End;</div><div>&nbsp;</div><div>五，使用记录更新数据？</div><div>&nbsp;如果用记录(RECORD)更新数据，那么只能使用记录成员；</div><div>&nbsp;如果用%ROWTYPE更新数据,可以直接使用%ROWTYPE。</div><div>&nbsp;</div><div>&nbsp;例子：使用%ROWTYPE向表中插入数据</div><div>&nbsp;DECLARE</div><div>&nbsp; vEmp empa%RowType;</div><div>&nbsp;Begin</div><div>&nbsp; Select &nbsp;* &nbsp;InTo &nbsp;vEmp &nbsp;From empa Where empa.EMPNO = '7369';</div><div>&nbsp; UpDate empa Set ROW = vEmp Where EMPNO = 1001;</div><div>&nbsp;End;</div><div>六，使用记录删除数据？</div>&nbsp;删除记录时，只能在delete语句的where子句中使用记录成员。&nbsp;<img src ="http://www.blogjava.net/kxbin/aggbug/387123.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-05 21:52 <a href="http://www.blogjava.net/kxbin/articles/387123.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>国外程序员所积累的20条编程经验(转)</title><link>http://www.blogjava.net/kxbin/articles/387114.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 05 Sep 2012 09:10:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387114.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387114.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387114.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387114.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387114.html</trackback:ping><description><![CDATA[<p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">编者按：原文作者乔纳森&#183;丹尼可（Jonathan Danylko）是一位自由职业的web架构师和程序员，编程经验已超过20年，涉足领域有电子商务、生物技术、房地产、医疗、保险和公用事业。正如乔纳森在文中所言，本文适合刚毕业的大学生和刚入门的程序员。如果你已是高级开发人员，或许你能在本文中看到自己的身影。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">从11岁时，我就一直在编程，并且一直都很喜欢技术和编程。这些年来，我积累了一些艰难又容易的经验。作为一名程序员，你或许还没这些经验，但我会把它们献给那些想从中学到更多的朋友。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">我会持续更新这些经验，我可能还会有更多的感想，但就我这20年来看，我想下面这个列表中基本不需要增添额外的东西了。下面就是我至今最难忘的经验。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">1. 估算解决问题所需要的时间。不要怕，承认吧！我曾见过一些程序员为了解决一个特殊问题而坐在显示器前面8小时。为自己定一个时间限制吧，1小时、30分钟或甚至15分钟。如果在这期间你不能解决问题，那就去寻求帮助，或到网上找答案，而不是尝试去做&#8220;超级堆码员&#8221;。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">2. 编程语言是一种语言，只是一种语言。随着时光推移，只要你理解了一种语言的原理，你会发现各种语言之间的相似之处 。你所选择的语言，你应该觉得&#8220;舒服&#8221;，并且能够写出有效（而且简洁）的代码。最重要的，让语言去适应项目，反之亦然。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">3. 不要过于注重程序的&#8220;设计模式&#8221;。 有时候，写一个简单的算法，要比引入某种模式更容易。在多数情况下，程序代码应是简单易懂，甚至清洁工也能看懂。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">　4. 经常备份代码。在我年轻时，我就有过因硬盘故障而丢了大量代码的经历，这经历很恐怖的。只要你一次没有备份，就应当像有着严格的期限，客户明天就需要。此时就该源码/版本控制软件大显身手了。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">5. 承认自己并不是最顶尖的程序员 - 知不足。我常想，我对编程了解已足够多，但是总有其他人比你优秀。正所谓，&#8220;一山总比一山高&#8221;。所以，向他们看齐吧！.</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">6、学习再学习。正如第5点所说，我经常会在手里拿一本计算机或编程相关的杂志或书（不信，可以问我的朋友）。诚然，总有很多你不知道的技术，你可以从中学习以保持不落后。如果你有一种灵巧的方式来获取你需要的新技术，那你每天都应该坚持学习。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">7. 永恒的变化。你对待技术/编程知识，就应像你对待股票一样：多样化。不要在某一特定技术上自我感觉良好。如果那种技术或语言已经没有足够支持，那你还不如现在就开始更新你的简历，并启动培训新计划。我能保持前行的主要原则是什么呢？至少了解两到三种语言，所以，如果某种语言过时了，你在学习新技术的时候还可以依靠另一种语言。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">8. 提携新人。协助并且培养初级/入门的开发人员学习优秀的编程方法和技巧。也许你还不知道，在帮助他们向更高一层前进时，你自己也在向更高一层提升，你会更加自信。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">9. 简化算法。代码如恶魔，在你完成编码后，应回头并且优化它。从长远来看，这里或那里一些的改进，会让后来的支持人员更加轻松。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">10. 编写文档。无论是Web服务的API，还是一个简单的类，你尽量编写相应文档。我曾经引以为豪的代码注释，因过度注释而有人指责。给三行代码加一行注释，只需要你几秒时间。如果那是一个比较难以理解的技术，千万别担心过多注释。如果你能很好做好自己的工作，大多数架构师、后备程序员、支持组都会感激你。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">11. 测试、测试再测试。我是一名黑盒测试粉丝。当你完成编码后，你&#8220;被认可&#8221;的时候就开始了。如果你们公司有QA部门，如果你的代码中有错误，那你得到的评论，会比项目经理还多。如果你不彻底测试自己的代码，那恐怕你开发的就不只是代码，可能还会声名狼藉。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">12. 庆祝每一次成功。我见过很多程序员在解决编程技术难题后，会和同伴握手、击掌或甚至手舞足蹈。每个人在生命中都会碰到&#8220;顿悟&#8221;。如果一个程序员高兴地跑来叫你去看他的非凡代码，也许你已经看过这样的代码100遍了，但你也应该为了这个家伙而庆祝第101次。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">13. 经常检查代码。 在公司，你的代码要经常检查（包括自查和其他同事检查）。不要把别人的检查，看成是对代码风格的苛求。应该把它们看作是有建设性的批评。对个人来说，经常检查你的代码并且自问，&#8220;我怎样才能写得更好呢？&#8221; 这会加速你的成长，让你成为一个更优秀的程序员。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">14. 回顾你的代码。在看到自己以前的代码时，通常会有两种方式：&#8220;难以至信，这代码是我写的&#8221;和&#8220;难以至信，这代码是我写的&#8221;。第一种往往是厌恶的语气，并在想如何改进它。你也许会惊叹，旧代码也能复活成为一种更好的程序，甚至是一个完整的产品。第二种通常带着惊奇和成就感。开发人员应该一到两个自己完成的项目成果，能让众人不禁而立并注目而观的项目。同样，基于你优越的编程能力，你可以把过去的程序或项目拿出来，把它们更新为更加优秀的产品或想法。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">15. 幽默是不可缺的。在我20年的开发生涯中，我还没有碰到哪位程序员是没有幽默感的。实际上，干我们这行，幽默是一项必备品。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">16. 谨防那些无所不知的程序员，不愿分享的程序员，还有经验不足的程序员。当你遇到这几种程序员时，你自己要谦虚。无所不知的程序员，更想当一个英雄而不是团队成员；保守的程序员则是在编写着他们独享的代码；而经验不足的程序员则会每十分钟就来问你一下，当代码完成后，代码已经是你的，而不是他们。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">17. 任何项目都不会那么简单。朋友、家人和同事曾请求我仓促做一些事情，仓促做一个程序或者网站。对于这样的事，应该从双方做计划，才能做出令两方都会满意的东西。如果某人起初只是需要一个使用Microsoft Access的、只有有3个页面的网站，但来就很可能变成一个有15个页面的网站，并使用SQL Server，有一个论坛，还有一个定制的CMS（内容管理系统）。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">18. 任何时候不要想当然。假如你承接一个简单的项目，你可能会认为某个部分可以轻松完成。千万别这样想！除非你有一个类、组件、或者一段已经写好的代码，并且在现有的项目已经测试通过。不要认为这将是很容易的。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">19. 没有已经完成的软件。曾经有一位程序员告诉我，没有软件是已经完成的，它只是&#8220;暂时完成了&#8221;。这是明智的忠告。如果客户还在使用你写的程序，并经受了时间的考验。如果有机会，你仍在更新它，这并不是什么坏事，这让你不断地前行。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">20. 耐心是一种美德。当客户、朋友或家庭成员用电脑的时候，他们也许会受挫，进而想砸电脑，或气冲冲地离开。我一直在告诉他们，&#8220;是你掌控电脑，不是电脑掌控你。&#8221;对于用作编程的电脑，你要有一定的耐心。一旦程序员知道问题所在后，他们就会站在电脑的角度看问题，并且说&#8220;哦，这就是为什么它是这样做。&#8221;</p><img src ="http://www.blogjava.net/kxbin/aggbug/387114.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-05 17:10 <a href="http://www.blogjava.net/kxbin/articles/387114.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>put和put_line区别</title><link>http://www.blogjava.net/kxbin/articles/387112.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 05 Sep 2012 08:58:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387112.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387112.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387112.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387112.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387112.html</trackback:ping><description><![CDATA[<p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">在学习PL/SQL脚本时，打印语句是用得最多的语句。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">在Oracle中，又有两种打印的方法：put和put_line。<br />它们的区别是：<br />put：不换行输出，输出在缓冲区，不显示出来，直到执行put_line才一并输出。<br />put_line:换行输出。但首先会输出缓冲区中的内容，然后清空缓冲区。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">下面举个例子来帮助理解。<br />输入：<br />begin<br />dbms_output.put_line(1);1<br />end;<br />/<br />打印：1</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">输入：<br />begin<br />dbms_output.put(2);<br />end;<br />/<br />没有打印任何内容</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">再输入一次：<br />/<br />仍然没有打印任何内容</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">输入：<br />begin<br />dbms_output.put_line(3);<br />end;<br />/<br />问题：现在输出的结果是什么？<br />你可以把你认为的输出结果写在纸上，注意要包含回车符。</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; ">分析：<br />第一次执行&#8220;put(2)&#8221;，在缓冲区中产生&#8220;2&#8221;；<br />再输入&#8220;/&#8221;执行上次的代码，在缓冲区中产生&#8220;22&#8221;；<br />执行&#8220;put_line(3)&#8221;，首先输出缓冲区的&#8220;22&#8221;,再输出&#8220;3&#8221;和一个回车符。<br />所以最后输出的内容(用&#8220;-------------------&#8221;隔开的)就是：<br />-------------------<br />223<br /><br />-------------------<br />小结：<br />1、如果输出时不需要换行，则用put()方法，不过内容是在缓冲区，在后面执行put_line()时才会一并输出。<br />2、如果输出时需要换行，则用put_line()。</p><img src ="http://www.blogjava.net/kxbin/aggbug/387112.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-05 16:58 <a href="http://www.blogjava.net/kxbin/articles/387112.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle变量2</title><link>http://www.blogjava.net/kxbin/articles/387110.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 05 Sep 2012 08:25:00 GMT</pubDate><guid>http://www.blogjava.net/kxbin/articles/387110.html</guid><wfw:comment>http://www.blogjava.net/kxbin/comments/387110.html</wfw:comment><comments>http://www.blogjava.net/kxbin/articles/387110.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/kxbin/comments/commentRss/387110.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/kxbin/services/trackbacks/387110.html</trackback:ping><description><![CDATA[<p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>使用变量可以保存计算机需要处理的数据，为了给该变量分配适当的内存空间，还需要指定数据类型，有的数据类型还需要指定长度，如字符串。<br />有些类型可以用于建表(如char)，有些则不能(如boolean，rowtype)。<br />同样是字符串，建表时的限制为4000,在脚本中则为3万多。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>简单语法：变量名 数据类型;&nbsp;<br />完整语法：变量名 [constant] 变量类型 [not null] [default 值 | :=值]</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>其中&#8220;[ ]&#8221;表示可以不写，&#8220;|&#8221;表示任选其一。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>下面给出变量定义及解释，数据类型先用建表时所用的数据类型：<br /></strong><strong>v1 char：<br />说明：没有给出长度，所以v1只能保存一个字符。超过了则会出错：数字或值错误 : 字符串缓冲区太小。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v2 varchar2(10);&nbsp;<br />说明：v2最多只能保存10个字符。如果不写长度，会出错：字符串长度限制在范围(1...32767)</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v3 number;&nbsp;<br />说明：v3保存的数字范围非常大，几乎可以认为是没有限制的。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v4 number(5);<br />说明：v4最多能够保存5位整数。如果有小数，Oracle会自动四舍五入。如果整数部分超过5位，则会报错：数字或值错误 : 数值精度太高。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v5 number(5,2);<br />说明：v5最多能够保存3位整数,2位小数。如果小数位不止2位，则Oracle会自动四舍五入。整数位超过3位会报错，同上。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v6 date;<br />说明：可以直接保存sysdate的值；如果是指定日期，则要用to_date来转化。否则报错：文字与格式字符串不匹配。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>定义了变量，变量的默认值为空，此时进行计算，结果一定为NULL。所以变量必须初始化。<br />初始化有三种方式：</strong><br /><strong>v7 constant number := 100;<br />说明：定义v7为常量，定义时就必须给定值。然后在程序中就不能再对v7进行赋值了，否则会报错：表达式 'V7' 不能用作赋值目标。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v8 number default 10;<br />说明：定义v8时就给定默认值10。注意，number类型变量的默认值不是0,而是NULL。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>v9 number not null := 1000.50;<br />说明：定义v9变量不能为空，此时必须给出一个不为NULL的值。在运行时发现v9为NULL，则报错：说明为 NOT NULL 的变量必须有初始化赋值。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>预测各打印结果，如果代码有错误请先改正：<br />declare&nbsp;<br />v1 char;<br />v2 varchar2(10);<br />v3 number;<br />v4 number(5);<br />v5 number(5,2);<br />v6 date;<br />v7 number default 10;<br />begin&nbsp;<br />v1:='ab';&nbsp;<br />v2:='abcd';<br />v4:=9998.99;<br />v5:=1000.5555555;<br />v6:=to_date('2002-10-2','yyyy-mm-dd');<br />dbms_output.put_line(v1);<br />dbms_output.put_line(v2);<br />dbms_output.put_line(v3+100);<br />dbms_output.put_line(v4);<br />dbms_output.put_line(v5);<br />dbms_output.put_line(v6);<br />dbms_output.put_line(v7+100);<br />end;</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>只能在脚本中使用的变量类型：<br />上面的数据类型，同时在建表时也能使用。而下面的数据类型只能在PL/SQL脚本中使用。<br />即：boolean，type，rowtype，record，替代变量、table类型。<br />其中：<br />&#183;一个变量只能保存一个值，叫做&#8220;标量变量&#8221;。如：char、type。<br />&#183;一个变量只能保存多个值，叫做&#8220;复合变量&#8221;。如：rowtype、record,table。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>1、布尔类型 boolean&nbsp;<br />boolean类型主要表达真或假。可以为boolean类型变量赋值true或false。<br />主要用于PL/SQL脚本的流程控制。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>示例：<br />declare&nbsp;<br />v1 boolean;<br />begin&nbsp;<br />v1:=1&gt;2;<br />dbms_output.put_line(v1);<br />end;</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>问题：打印的结果是什么，是true、false、1、0？<br />回答：<br />都不对。运行时得到错误信息：调用 'PUT_LINE' 时参数个数或类型错误。<br />这是因为在脚本中不能直接打印boolean类型的值，所以只能在脚本中使用if语句来判断。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>修改示例：<br />declare&nbsp;<br />v1 boolean;<br />begin&nbsp;<br />v1:=1&gt;2;<br />if(v1)then&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; dbms_output.put_line('真');<br />else&nbsp;<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('假');<br />end if;<br />end;&nbsp;<br />打印：<br />假</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>2、type类型。<br />语法：表.字段%TYPE<br />返回：某个表的字段的实际类型。<br />作用：<br />PL/SQL脚本中，有时定义的变量就是存取表中数据的。此时数据类型及长度就需要与字段的定义一致。可以去查看该字段的具体类型，但这样做很麻烦；并且当字段定义改变时，脚本也需要修改。<br />所以使用type类型来引用该字段的类型，更方便，维护性更好。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><br /><strong>示例：根据工号查询员工姓名。<br />分析：要从emp表中获取姓名，必须要用查询语句。而要从查询语句中获取返回的值，要加上&#8220;into 变量&#8221;。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>declare<br />&nbsp;&nbsp;&nbsp; v_empno emp.empno%type;<br />&nbsp;&nbsp;&nbsp; v_ename emp.ename%type;<br />begin<br />&nbsp;&nbsp;&nbsp; v_empno:=7900;<br />&nbsp;&nbsp;&nbsp; select ename into v_ename from emp where empno=7900;<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line(v_ename);<br />end;</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><br /><strong>3、rowtype类型<br />语法： 表%rowtype<br />作用： 保存了某一行记录的所有字段的值。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><br /><strong>示例：根据工号为7900的员工的以下信息:ename,job,sal,comm,hiredate。<br />第一种：如果用type类型，定义5个变量保存查询结果。代码略。<br />第二种：如果用rowtype类型，只需要定义一个rowtype类型的变量。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>代码：<br />declare<br />&nbsp;&nbsp;&nbsp; v_empno emp.empno%type;<br />&nbsp;&nbsp;&nbsp; v_row emp%rowtype;<br />begin<br />&nbsp;&nbsp;&nbsp; v_empno:=7900;<br />&nbsp;&nbsp;&nbsp; select * into v_row from emp where empno=7900;<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('ename='||v_row.ename);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('job='||v_row.job);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('sal='||v_row.sal);&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('comm='||v_row.comm);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('hiredate='||v_row.hiredate);&nbsp;&nbsp;&nbsp;&nbsp;<br />end;<br />打印：<br />ename=JAMES<br />job=CLERK<br />sal=950<br />comm=<br />hiredate=03-12月-81</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>说明<br />&#183;必须select *，或者根据表结构的顺序写出所有字段名。<br />&#183;使用rowtype类型最主要的限制在于表中不能有大对象字段如：CLOB、BLOB。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>4、record类型<br />record的意思是&#8220;记录&#8221;。<br />有时，用type类型会定义太多的变量，用rowtype又会取到自己不关心的数据。<br />如何只取自己关心的字段的值呢？此时就用record类型来自定义有多少个列。<br />语法：<br />type 类型名 is record(<br />&nbsp;&nbsp; 属性名1 属性类型,<br />&nbsp;&nbsp; 属性名2 属性类型<br />);<br />注意<br />1、属性之间定义用的是逗号(,)，不是分号(;)。<br />2、最后一个属性名不需要再用&#8220;，&#8221;。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>使用步骤有两个：<br />1、先用type自定义一个新的类型，这个类型的变量能够的变量与定义有关。<br />2、再用这个新的类型来定义一个变量，这个变量才能保存实际的数据。</strong></p><p style="margin: 0px; padding: 0px; color: #454545; font-family: 'Microsoft Yahei', 微软雅黑, Tahoma, Arial, Helvetica, STHeiti; font-size: 13.63636302947998px; line-height: 25px; background-color: #ffffff; "><strong>示例：需求同上。<br />declare<br />--自定义一个类型<br />type myType is record(<br />&nbsp;&nbsp;&nbsp; xm emp.ename%type, --姓名<br />&nbsp;&nbsp;&nbsp; gzuo emp.job%type, --工作<br />&nbsp;&nbsp;&nbsp; gzi emp.sal%type --工资<br />);<br />--使用自定义类型来定义变量<br />myValue myType;<br />begin<br />&nbsp;&nbsp;&nbsp; select ename,job,sal into myValue from emp where empno=7844;<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('ename='||myValue.xm);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('job='||myValue.gzuo);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('sal='||myValue.gzi);<br />end;<br /><br />说明：<br />&#183; 在查询时必须与自定义类型的属性顺序一一对应。<br />&#183;myValue中的属性名也是自定义的，不是字段名。<br /><br /></strong><strong>问题：上面的代码比直接用type类型还多些，看不出优势在什么地方。为什么还要用record？<br />回答：<br />在项目中，自定义类型通常会放到在包(package，后面会专门学习)中，这样就可以在其它地方直接引用了。<br /><br />示例：<br />先在包中自定义类型：<br />create or replace package my_bao<br />as<br />type myType is record(<br />&nbsp;&nbsp;&nbsp; xm emp.ename%type, --姓名<br />&nbsp;&nbsp;&nbsp; gzuo emp.job%type, --工作<br />&nbsp;&nbsp;&nbsp; gzi emp.sal%type --工资<br />);<br />end;<br />然后就可以在块中直接使用该类型，只不过在类型前要加上包名:&#8220;my_bao&#8221;。<br />declare<br />--使用包中自定义类型来定义变量<br />myValue&nbsp;</strong><strong>my_bao.myType;<br />begin<br />&nbsp;&nbsp;&nbsp; select ename,job,sal into myValue from emp where empno=7844;<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('ename='||myValue.xm);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('job='||myValue.gzuo);<br />&nbsp;&nbsp;&nbsp; dbms_output.put_line('sal='||myValue.gzi);<br />end;<br /></strong><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>5、替代变量<br />语法： &amp;替换内容<br />作用：提供用户输入的界面，在用户输入数据以后，先替换PL/SQL脚本，再编译执行。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>案例一：输入年龄，然后打印出来<br />SQL&gt; declare<br />2&nbsp;&nbsp; v_age number(3);<br />3 begin<br />4&nbsp;&nbsp;&nbsp; v_age:=&amp;年龄;<br />5&nbsp;&nbsp;&nbsp; dbms_output.put_line('您的年龄是 = '||v_age);<br />6 end;<br />7 /<br />输入 年龄 的值: 20<br />原值&nbsp;&nbsp;&nbsp; 4:&nbsp;&nbsp; v_age:=&amp;年龄;<br />新值&nbsp;&nbsp;&nbsp; 4:&nbsp;&nbsp; v_age:=20;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>说明：在用户输入&#8220;20&#8221;以后，将&#8220;&amp;年龄&#8221;替换为了&#8220;20&#8221;。于是脚本的源代码发生了改变：<br />declare<br />v_age number(3);<br />begin<br />v_age:=20;<br />dbms_output.put_line('您的年龄是 = '||v_age);<br />end;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>所以&#8220;&amp;&#8221;变量并不是一个真正的变量，它不能保存任何内容，只是提供一个字符串替换的功能。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><br /><strong>案例二：用户输入姓名并打印。<br />declare<br />v_age varchar2(3);<br />begin<br />v_age:=&amp;姓名;<br />dbms_output.put_line('您的姓名是 = '||v_age);<br />end;<br />问题：如果用户输入&#8220;a&#8221;，程序是否能够运行，如果能，打印的结果是什么？<br />分析：当用户输入&#8220;a&#8221;，上面代码就是：<br />declare<br />v_age varchar2(3);<br />begin<br />v_age:=a;<br />dbms_output.put_line('您的姓名是 = '||v_age);<br />end;<br />由于&#8220;a&#8221;前后没有单引号，所以会被当作&#8220;标识符&#8221;即当作变量名。<br />但是a这个变量又没有定义。所以一定会提示如下的错误：<br />必须说明标识符 'A'</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>解决的方法就是：在&#8220;&amp;&#8221;前后加上单引号，即：<br />declare<br />v_age varchar2(3);<br />begin<br />v_age:='&amp;姓名';<br />dbms_output.put_line('您的姓名是 = '||v_age);<br />end;<br />/</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>替代变量小结：<br />&#183;替代变量的作用主要是为匿名块提供一个数据录入的界面。<br />&#183;替代变量只是完成字符串替换的功能，不能保存值。<br />&#183;如果替代变量是字符串，则必须加上单引号。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>说明：如果是命名块，则通过名称和参数进行调用，此时不会再用替代变量。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>6、table类型<br />table类型叫做&#8220;表类型&#8221;，又叫&#8220;索引表类型&#8221;。<br />注意：都是指PL/SQL脚本中的table类型，而不是数据库的对象。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>在学习table类型之前，先看一个任务。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>需求：用户输入10,打印男；输入20,打印女。<br />方法一：用分支语句(if&#8230;&#8230;等)判断。<br />方法二：请思考，能不能不用判断语句。这个任务同样适用于java学习者。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>方法一：<br />declare<br />v_sex_code number(2);<br />v_sex_name char(2);<br />begin<br />v_sex_code:=&amp;性别编号;<br />if(v_sex_code=10)then<br />&nbsp;&nbsp;&nbsp;&nbsp; v_sex_name:='男';<br />else<br />&nbsp;&nbsp;&nbsp; v_sex_name:='女';<br />end if;<br />dbms_output.put_line('您的性别是 = '||v_sex_name);<br />end;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>用户输入：10<br />打印： 男</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><br /><strong>方法二：使用table类型。<br />语法：type 类型名 is table of 值类型 index by 索引类型。<br /></strong><strong><br />说明：<br />&#183;作用：定义了一个表格结构，这个表格只有2个列用于保存&#8220;索引(键)值对&#8221;，这样就可以方便地通过索引找到值。<br />&nbsp;&nbsp;&nbsp;&nbsp; 如：10=男、20=女，其中10,20就叫做索引，通过10,20就能够找到性别名称：男和女<br />&#183;值类型：指实际保存的数据的类型。如男和女。<br />&#183;索引类型：通常指定为下面两种整数类型之一：binary_integer 或者 pls_integer。区别是：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#183;Binary_Integer类型变量值计算是由Oracle来执行，不会出现溢出，但是执行速度较慢，因为它是由Oracle模拟执行。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#183;Pls_Integer的执行是由硬件即直接由CPU来运算，因而会出现溢出，但其执行速度较前者快许多。Oracle旧版本不支持。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><br /><strong>需求：用户输入10,打印男；输入20,打印女。<br />分析：<br />&#183;根据上面的需求，值是&#8220;男&#8221;或者&#8220;女&#8221;，所以只需要char(2)就可以了。<br />&#183;在数据量不是太大时，可以选择索引的类型为：pls_integer。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>代码：<br />declare<br />--1.定义表结构<br />type myTabType is table of char(2) index by pls_integer;<br />--2.创建表类型变量<br />sexTab myTabType;<br /><br />v_sex_code number(2);<br />v_sex_name char(2);<br />begin<br />--3.插入数据：<br />sexTab (10):='男';<br />sexTab (20):='女';<br />--用户输入<br />v_sex_code:=&amp;性别编号;<br /><br />--4. 查询数据(如：sexTab (10) 表示&#8220;查询索引为10的值，得到 男&#8221;)<br />v_sex_name:=sexTab (v_sex_code);<br /><br />dbms_output.put_line('您的性别是 = '||v_sex_name);<br />end;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>说明：sexTab在插入数据以后，在内存结构如下：<br />index&nbsp;&nbsp;&nbsp; 值<br />10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 男<br />20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 女</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong></strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>使用table类型也可以查询多行多列的数据。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong></strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>需求：查询所有部门</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>declare<br />--定义表结构(省略了index by，见说明)</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>type myType is table of dept%rowtype;<br />--创建表类型变量<br />myTab myType;<br />begin<br /><br />select * bulk collect into myTab from dept;<br />for x in 1..myTab.count<br />loop<br />&nbsp;&nbsp; dbms_output.put_line(myTab(x).deptno);<br />&nbsp;&nbsp; dbms_output.put_line(myTab(x).dname);<br />end loop;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>end;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>说明：</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>&#183;本列中myTab的索引是由程序为索引赋值，所以index by语句可以省略。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>&#183; 将查询的所有部门放到myTab，索引自动设置为1,2,3&#8230;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>打印：</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>10<br />ACCOUNTING<br />20<br />RESEARCH<br />30<br />SALES<br />40<br />OPERATIONS</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong></strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>探讨：有关PL/SQL表类型中的理解。<br />&#183;很容易认为PL/SQL表类型象c或Java中的数组类型，因为其中有个关键字叫做&#8220;index&#8221;(索引)，而数组的下标也叫做&#8220;index&#8221;。<br />&#183;但是这样无法解释PL/SQL表类型的索引可以不连续，甚至可以为负数的问题。<br />&#183;我认为，PL/SQL表类型更象是java中的map对象，索引就对应map中的键，多个值之间的键可以不连续，可以为负数，甚至可以是字符串。两者有异曲同工之妙。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>示例：用字符串做索引。<br />declare<br />--定义表结构<br />type myTabType is table of char(2) index by varchar2(5);<br />sexTab myTabType;<br /><br />v_sex_code varchar2(5);<br />v_sex_name char(2);&nbsp;<br />begin<br />--往表中添加内容<br />sexTab('nan'):='男';<br />sexTab('nv'):='女';<br />--用户输入<br />v_sex_code:='&amp;性别编号';<br />v_sex_name:=sexTab(v_sex_code);<br /><br />dbms_output.put_line('您的性别是 = '||v_sex_name);<br />end;</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>输入：nan<br />输出: 男<br /><br />问题：用table类型能够保存多个列吗？<br />回答：<br />可以。只要将&#8220;值类型&#8221;换为复合类型就可以了。如下面的table定义就能够保存emp表的所有记录：<br />type empTabType is table of emp%rowtype index by pls_integer。<br />注意：empTabType的索引可以是empno，也可以不是。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>联想一下下：<br />&#183;在PL/SQL表中，利用PL/SQL表类型，在某些场合也能够避免减少表连接，从而大大提高连接的效率。<br />&#183;在java中map对象用途非常广泛，可以缓存很多对象(如配置文件对象，常见的查询结果对象等)。两者的用法真的是异曲同工之妙。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>7、其它类型<br />&#183;嵌套表、数组：用得少，不学了。<br />&#183;游标类型，引用游标类型：在后面学习游标以后再学习。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong></strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>主要内容小结：<br />&#183;块结构：变量区、代码区、异常区<br />&#183;块分类：匿名块、命名块(具体的在后面学习)<br />&#183;标量类型：char,varchar2,number,date,boolean,type&nbsp;<br />&#183;复合类型：rowtype,record,table</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong></strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong></strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>个人小结：<br />&#183;保存一个值的变量，可以用具体的数据或者type类型</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>&#183;保存多个值的变量，可以用rowtype，record。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>&#183;保存多行2列的变量，可以用table类型。</strong></p><p style="margin: 0px; padding: 0px; font-size: 13.63636302947998px; "><strong>&#183;保存多行多列的变量，仍然用table类型，只是</strong><strong>数据类型选用rowtype即可。</strong></p></p><img src ="http://www.blogjava.net/kxbin/aggbug/387110.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/kxbin/" target="_blank">kxbin</a> 2012-09-05 16:25 <a href="http://www.blogjava.net/kxbin/articles/387110.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>