博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
好好学习,天天向SUN
联系方式: leiyu530@163.com
penguinstorm.cublog.cn
管理博客
发表文章
留言
收藏夹
博客圈
音乐
相册
· N4000拆卸过程
· Solaris8安装过程截图
· Veritas
}
· 建立VOLUME
· 其他
· 证书
· ORACLE_FOR_Solaris9i
· HACMP_FOR_AIX 4.3.3
}
· 准备工作
· 配置过程
· 配置共享卷组
· 配置应用脚本
· 同步过程
· 启动双机
· 错误大观
· 路由交换
· ruby专用文件夹
· sun_cluster
· FASTT系列存储
· 7133换盘操作
· HACMP_FOR_AIX 5.1
· 地震纪实
文章
· AIX
}
· 实践操作
· 双机配置
· 系统认证
· 基础知识
· 故障处理
· 共享精神
· HPUX
}
· 学逻辑卷
· 双机相关
· 考试认证
}
· CSE
· CSA
· 基础知识
· 动手实践
· 存储备份
· CISCO
}
· 交换相关
· 路由相关
· 认证考试
}
· CCNA
· CCNP
· CCIE
· 心情日记
· 动手实践
· Linux
· Oracle
}
· 基础知识
· 实践操作
· 考试认证
· 实验操作
· English
· Solaris
}
· 读书笔记
}
· SA239
· SA299
· SA399
· ES222
· SM240
· ES255
· ES310
· Solaris高级系统管理员指南
· 基础知识
· 实践操作
}
· ST350
· 认证计划
· 系统安装
· Veritas
}
· 基础知识
· 实践操作
· Program
}
· Rails
}
· 基础知识
· 实践操作
· 语法掌握
· Dynamips
· 荣誉勋章
· 过关总结
· 闲言碎语
· 熬夜签到
· 好文收录
· 人在职场
· 热点关注
首页
关于作者
姓名:雷宇 昵称:storm 职业:IT 年龄:26 位置:北京 个性介绍:没啥个性 不聊MSN/QQ 本着资源共享的精神,所有文章欢迎转载
||
<<
>>
||
我的分类
文章列表 - 基础知识
SQL*PLUS中编辑器的使用方法
<DIV>使用SQL>edit从缓冲区中调出刚才你输入的命令并粘贴到新记事本上,记事本以默认的afiedt.buf</DIV> <DIV>命名。关闭记事本之后,如果想再执行一次这个命令,那可以直接在SQL>/然后enter执行。</DIV> <DIV> </DIV> <DIV>要查看当前缓冲区中的数据,执行下列操作:<BR>1,在SQL>提示符上键入字符L或者LIST或者一个分号查看;<BR>2,要想只显示最后一行,可以通过LIST LAST实现;<BR>3,如果需要删除一行,那么键入DEL,后面加上行号,然后enter;<BR>4,可以键入INPUT或字母I并enter,向存储的SQL语句添加行,然后可以添加其余的文本行,要想将</DIV> <DIV>文本添加到缓冲区中当前行的最后,可以输入APPEND或者字母A来实现。</DIV> <DIV> </DIV> <DIV>例如:<BR>SQL> select title, cost<BR> from books;</DIV> <DIV>TITLE COST<BR>------------------------------ ----------<BR>BODYBUILD IN 10 MINUTES A DAY 18.75<BR>REVENGE OF MICKEY 14.2<BR>BUILDING A CAR WITH TOOTHPICKS 37.8<BR>DATABASE IMPLEMENTATION 31.4<BR>COOKING WITH MUSHROOMS 12.5<BR>HOLY GRAIL OF ORACLE 47.25<BR>HANDCRANKED COMPUTERS 21.8<BR>E-BUSINESS THE EASY WAY 37.9<BR>PAINLESS CHILD-REARING 48<BR>THE WOK WAY TO COOK ……
查看全文
发表于:2007-12-20 ┆
阅读(298)
┆
评论(0)
ORACLE9I 1Z0-032认证知识点总结摘要(完)
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="COLOR: blue">You</SPAN></B><SPAN lang=EN-US> must instruct Oracle to <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City w:st="on"><st1:place w:st="on">gath</st1:place></st1:City>er statistics on the buffer cache by setting the value of the <B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: red">DB_CACHE_ADVICE</SPAN></B> parameter to ON. The default value for this parameter is OFF. DB_CACHE_ADVICE can take on a third value, READY, which specifies that memory is allocated, but it does not <st1:City w:st="on"><st1:place w:st="on">gath</st1:place></st1:City>er statistics. The activity of collecting statistics affects the performance of the system. DB_CACHE_ADVICE is a dynamic parameter and can be changed to ON using <st1:State w:st="on"><st1:place w:st="on">AL</st1:place></st1:State>TER SYSTEM command.</SPAN></FONT></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>The <B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: red">TRACE</SPAN></B> option of the <st1:State w:st="on"><st1:place w:st="on">AL</st1:place></st1:State>TER DATABASE BACKUP CONTROLFILE command prompts Oracle to write SQL statements, for re-creating the control file, to a trace file. The trace file would exist in the location defined by the initialization parameter USER_DUMP_DEST on your system.</FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Tim……
查看全文
发表于:2007-12-14 ┆
阅读(203)
┆
评论(0)
ORACLE9I 1Z0-032认证知识点总结摘要(三)
<DIV> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>The user only needs to remember one password, which opens the wallet to access his or her credentials, <B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: red">Wallet </SPAN></B>Manager is used to authenticate the user to multiple services.</FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>The <B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: red">V$DATAFILE_HEADER</SPAN></B> dynamic performance view displays the error information related to data files when an internal read performed by Oracle fails. Apart from this, the view displays the status of the file and whether a file needs media recovery to be performed.</FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>To obtain detailed information about the datafiles associated with the temporary tablespace, you must query the <B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: red">V$TEMPFILE</SPAN></B> or DBA_TEMP_FILES views in Oracle9i. Some of the important columns in the V$TEMPFILE dynamic performance view are <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:country-region w:st="on"><st1:place w:st="on">NAM</st1:place></st1:country-region>E, FILE#, TS#, STATUS, ENABLED, AND BYTES.</FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0c……
查看全文
发表于:2007-12-14 ┆
阅读(233)
┆
评论(0)
ORACLE9I 1Z0-032认证知识点总结摘要(二)
<DIV> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="COLOR: red">RECOVERY_PARALLELISM </SPAN></B><SPAN lang=EN-US>specifies the number of processes to participate in instance or crash recovery. A value of 0 or 1 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:State w:st="on"><st1:place w:st="on">ind</st1:place></st1:State>icates that recovery is to be performed serially by one process. You can enable parallel recovery to tune the cache recovery phase. During thread or media recovery, the redo log is read, and redo blocks that are to be applied are parsed out. These blocks are subsequently distributed evenly to all recovery processes to be read into the buffer cache. Crash and instance recovery of datafiles on different disk drives are good candidates for parallel recovery.</SPAN></FONT></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>You can use RMAN with <B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: red">Block Media Recovery </SPAN></B>to restore and recover only those blocks. It is not required to set the <st1:State w:st="on"><st1:place w:st="on">ind</st1:place></st1:State>ividual data file offline. BMR enables you to back up specific blocks in a datafile without taking the database offline. The default backup method is datafile media recovery. You use the new BLOCKRECOVER statement to perform BMR.</FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New ……
查看全文
发表于:2007-12-14 ┆
阅读(190)
┆
评论(0)
ORACLE9I 1Z0-032认证知识点总结摘要(一)
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>RMAN command<B style="mso-bidi-font-weight: normal"> <SPAN style="COLOR: red">CROSSCHECK</SPAN></B> enables you to crosscheck the availability of the backup sets by verifying the information stored in its repository with the backup sets that are physically available in the designated storage medium.</FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="COLOR: red">Direct load insert</SPAN></B><SPAN lang=EN-US> can be implemented either in the serial mode or the parallel DML mode. To load data in the serial mode, you must activate the direct load insert by specifying the APPEND hint either immediately after the INSERT statement or within the subquery. You can also use the APPEND hint with <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place w:st="on">PARA</st1:place>LLEL hint when performing a direct load insert in the parallel DML mode.</SPAN></FONT></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="COLOR: red">Checkpoints</SPAN></B><SPAN lang=EN-US>, at the database or data file level, occur automatically when the database encounters the following conditions: when a log switch occurs, when configured through the database initialization parameter LOG_CHECKPOINT_INTERVAL and LOG_CHECKPOINT_TIMEOUT</SPAN></FONT></FONT></P> <P class=MsoNormal style="MARGIN: 0c……
查看全文
发表于:2007-12-14 ┆
阅读(217)
┆
评论(0)
RMAN的两种连接方式(每种连接方式的三种不同连接方法)
<DIV>使用不带恢复目录的rman操作<BR>方法一:<BR>$ rman target sys/change_on_install nocatalog<BR>连接到目标数据库rman<BR>正在使用目标数据库控制文件替代恢复目录<BR>$ rman target <A href="mailto:sys/change_on_install@ora">sys/change_on_install@ora</A> nocatalog<BR>连接到目标数据库ora<BR>正在使用目标数据库控制文件替代恢复目录</DIV> <DIV>方法二:<BR>$ rman nocatalog<BR>$ connnect target <A href="mailto:sys/change_on_install@rman">sys/change_on_install@rman</A><BR>连接到目标数据库rman<BR>正在使用目标数据库控制文件替代恢复目录</DIV> <DIV>方法三:<BR>$ rman target / nocatalog<BR>连接到目标数据库rman<BR>正在使用目标数据库控制文件替代恢复目录</DIV> <DIV><BR>使用带恢复目录的rman操作<BR>方法一:<BR>$ rman catalog rman/rman<BR>连接到恢复目录数据库</DIV> <DIV>方法二:<BR>$ rman target sys/change_on_install catalog rman/rman<BR>连接到目标数据库<BR>连接到恢复目录数据库</DIV> <DIV>方法三:<BR>$ rman <BR>$ connect target sys/change_on_install<BR>连接到目标数据库<BR>$ connect catalog rman/rman<BR>连接到恢复目录数据库</DIV> <DIV></DIV>
查看全文
发表于:2007-07-10 ┆
阅读(664)
┆
评论(0)
ORACLE SEQUENCE的简单介绍(转载)
<P class=style35>在oracle中sequence就是所谓的序列号,每次取的时候它会自动增加,一般用在需要按序列号排序的地方。 <BR>1、Create Sequence <BR>你首先要有CREATE SEQUENCE或者CREATE ANY SEQUENCE权限, <BR>CREATE SEQUENCE emp_sequence <BR>INCREMENT BY 1 -- 每次加几个 <BR>START WITH 1 -- 从1开始计数 <BR>NOMAXVALUE -- 不设置最大值 <BR>NOCYCLE -- 一直累加,不循环 <BR>CACHE 10; <BR><BR>一旦定义了emp_sequence,你就可以用CURRVAL,NEXTVAL <BR>CURRVAL=返回 sequence的当前值 <BR>NEXTVAL=增加sequence的值,然后返回 sequence 值 <BR>比如: <BR>emp_sequence.CURRVAL <BR>emp_sequence.NEXTVAL <BR><BR>可以使用sequence的地方: <BR>- 不包含子查询、snapshot、VIEW的 SELECT 语句 <BR>- INSERT语句的子查询中 <BR>- NSERT语句的VALUES中 <BR>- UPDATE 的 SET中 <BR><BR>可以看如下例子: <BR>INSERT INTO emp VALUES <BR>(empseq.nextval, 'LEWIS', 'CLERK',7902, SYSDATE, 1200, NULL, 20); <BR><BR>SELECT empseq.currval FROM DUAL; <BR><BR>但是要注意的是: <BR>- 第一次NEXTVAL返回的是初始值;随后的NEXTVAL会自动增加你定义的INCREMENT BY值,然后返回增加后的值。CURRVAL 总是返回当前SEQUENCE的值,但是在第一次NEXTVAL初始化之后才能使用CURRVAL,否则会出错。一次NEXTVAL会增加一次SEQUENCE的值,所以如果你在同一个语句里面使用多个NEXTVAL,其值就是不一样的。<BR><BR>- 如果指定CACHE值,ORACLE就可以预先在内存里面放置一些sequence,这样存取的快些。cache里面的取完后,oracle自动再取一组到cache。 使用cache或许会跳号, 比如数据库突然不正常down掉(shutdown abort),cache中的sequence就会丢失. 所以可以在create sequence的时候用nocache防止这种情况。 <BR><BR>2、Alter Sequence <BR>你或者是该sequence的owner,或者有ALTER ANY SEQUENCE 权限才能改动sequence. 可以alter除start至以外的所有sequence参数.如果想要改变start值,必须 drop sequence 再 re-create . <BR>Alter sequence 的例子 <BR>ALTER SEQUENCE emp_sequence <BR> INCREMENT BY 10 <BR> MAXVALUE 10000 <BR> CYCLE -- 到10000后从头开始 <BR> NOCACHE ; <BR><BR><BR>影响Sequence的初始化参数: <BR>SEQUENCE_CACHE_ENTRIES =设置能同时被cache的sequence数目。 <BR><BR>可以很简单的Drop Sequence <BR>DROP SEQUENCE order_seq; <BR></P> <P class=style35></P><!-- InstanceEndEditable --> <DIV></DIV> <DIV></DIV>
查看全文
发表于:2007-06-08 ┆
阅读(577)
┆
评论(0)
数据缓冲区(Data buffer cache)
<DIV>两个名词解释:</DIV> <DIV>LRU:是LEAST RECENTLY USED(最近最少使用原则)的缩写,是数据缓冲区的一种管理机制,只保留最近数据,不保留旧数据。</DIV> <DIV>DIRTY:是脏列表,或叫弄脏了的数据,表示修改了但还没有写到数据文件的数据。</DIV> <DIV>数据缓冲区的工作过程:</DIV> <DIV>当用户进程发出一条SQL命令时,服务器进程必须查找内存是否存在用户要读取的数据。如果服务器进程在内存中没有找到用户所需要的数据,则服务器进程从数据文件中读取数据,所以,这时服务器进程首先要在LRU中查找是否有空闲块,如果没有空闲块,则将LRU中的DIRTY数据块移入DIRTY LIST。</DIV> <DIV>当DIRTY LIST超过一定长度(此值受内存大小限制)时,服务器进程通过数据写入进程DBWR将DIRTY数据写入磁盘数据文件,重新刷新数据缓冲区,最后服务器进程从磁盘数据文件中将数据读出存入数据缓冲区。</DIV> <DIV></DIV>
查看全文
发表于:2007-05-24 ┆
阅读(543)
┆
评论(0)
Rules for Using NEXTVAL and CURRVAL
<DIV>You can use NEXTVAL and CURRVAL in the following context:</DIV> <DIV>1,The SELECT list of a SELECT statement that is not part of a subquery</DIV> <DIV>2,The SELECT list of a subquery in an INSERT statement</DIV> <DIV>3,The VALUES clause of an INSERT statement</DIV> <DIV>4,The SET clause of an UPDATE statement</DIV> <DIV>You can not use NEXTVAL and CURRVAL in the following context:</DIV> <DIV>1,The SELECT list of a view</DIV> <DIV>2,A SELECT statement with the DISTINCT keyword</DIV> <DIV>3,A SELECT statement with GROUP BY, HAVING, or ORDER BY clauses</DIV> <DIV>4,The DEFAULT expression in a CREATE TABLE or ALTER TABLE statement</DIV> <DIV></DIV>
查看全文
发表于:2007-05-22 ┆
阅读(595)
┆
评论(0)
好文转载:Single-Row Functions
<DIV> <DIV class=storycontent>- figer: function_name [(arg1,arg2,...)]<BR>- Manipulate data items<BR>- Accept arguments and return one value<BR>- Act on each row returned<BR>- Return one result per row<BR>- May modify the data type<BR>- Can be nested<BR>- Accept arguments which can be a column or an expression<BR>-----------------------------------------------------------------------------------------------------------------<BR>Single-Row Functions' Type:<BR>1.Character<BR>2.Number<BR>3.Date<BR>4.Conversion<BR>5.General<BR><BR><BR>-----------------------------------------------------------------------------------------------------------------<BR>Character Functions:<BR>1.Case-manipulation functions<BR>- LOWER : get the sql course's lower shap letters<BR>- UPPER : get the sql course's upper shap letters<BR>- INITCAP : get the sql course's first letter's upper shap and the others letter is lower,init caps Lock<BR>eg:<BR>FUNCTION RESULT<BR>------------------------------<BR>LOWER('CHENZS') chenzs<BR>UPPER('chenzs') CHENZS<BR>INITCAP('CHENZS') Chenzs<BR>INITCAP('chenzs') Chenzs<BR>INITCAP('cHENZS') Chenzs<BR>INITCAP('Chenzs') Chenzs<BR><BR>2.Character-manipulation functions<BR>- CONCAT : CONCAT('string1','string2'),连接了个字符串,相当于符合||<BR>- SUBSTR : SUBSTR('string',A,B)得到某一个字符串的子字符串,A为正表示从string的左边第A个字符从左往右取B个字符;A为负数,表示从string的右边第|A|个字母从左往右取B个字符;B必须为正,若为负,返回空白。注意是字符非字节<BR>- LENGTH : LENGTH('string'),get the length of the string<BR>- INSTR : INSTR('string','c'),get the first char 'c''s location in the string<BR>- LPAD|RPAD : LPAD('string',len,'C'),RPAD('string',len,'C'),在左/右边填充相应的字符(串)'C',使字符串string达到相应的长度len<BR><STRONG>- TRIM:截取要求的前后字符(注意:如果要求的字符出现的位置不是首尾,那就不管)</STRONG><BR>- REPLACE<BR>eg:<BR><BR>FUNCTION RESULT<BR>------------------------------------------<BR>CONCAT('Hello','World') HelloWorld<BR>SUBSTR('HelloWorld',1,5) Hello……
查看全文
发表于:2007-05-22 ┆
阅读(640)
┆
评论(0)