itpub awr案例分析之一
http://www.itpub.net/thread-1799620-1-3.html
苹果mac apple proc如何切换到root用户
sudo -i按照提示输入当前用户的密码,即可切换到root用户
购置apple mac pro苹果纪
于2013-7-1在公司申购apple mac pro笔记本一个,记之!
转eygle_append与nologging
http://www.eygle.com/archives/2004/07/nologging_append.html
临时表空间temporary tablespace相关操作
---如果已经作了setnewname操作,则会提示已作,会提示略过;run{set newname for tempfile '/oracle/app/oracle/oradata/zxy/newtemp01_pos.dbf' to '/oracle/newpos_temp01.dbf';set newname for tempfile&n...
linux shell与sqlplus批量获取逻辑卷lv大小并开启datafile自动扩展
-bash-3.2$ more gene.sh sqlplus '/ as sysdba'<<EOFset pagesize 200 heading off feedback offspool /oracle/test.shselect 'sudo -u root /usr/sbin/lvdisplay '||file_name||'|'||'grep '||''''||'...
在linux如何用awk加工文件每条记录减固定数值
-bash-3.2$ more nbr.txt1098-bash-3.2$ more nbr.txt|awk {'print $1-1'}987
linux shell与awk在文件每条记录后添加一个特定字符
--如何在文件每行记录后添加一个特定字符-bash-3.2$ more file rowrowrow-bash-3.2$ sed -i 's/$/m/g' file-bash-3.2$ more file rowmrowmrowm
sqlplus动态生成linux shell脚本并执行
-bash-3.2$ more gene.sh sqlplus '/ as sysdba'<<EOFset pagesize 200 heading off feedback offspool /oracle/test.shselect 'sudo -u root /usr/sbin/lvdisplay '||file_name||'|'||'grep '||''''||'...
如何在linux 中合并两个文件为一个文件paste
[root@rhel5 ~]# more file*::::::::::::::file1.txt::::::::::::::fff::::::::::::::file2.txt::::::::::::::123[root@rhel5 ~]# paste -d "" file1.txt file2.txt>merge.txt[root@rhel5 ~]# more merge.txtf1f2f3...
linux shell如何调用sqlplus关闭数据库
-bash-3.2$ more shutdown.sh sqlplus '/as sysdba'<<EOFshutdown immediateexitEOFproccnt=`ps -ef|grep ora_|grep -v ora|wc -l`if [ ${proccnt} = 0 ] then echo 'oracle have stopped'fi-bash-3.2$ sqlplu...
linux shell之do done及for 循环脚本
---for循环的shell脚本,循环显示某个目录的所有文件名称-bash-3.2$ more cycle.shfilelist=`ls -l|awk {'print $9'}`for file in $filelistdo if [ -f $file ] then echo "echo ${file}...
sqlplus与shell自动提取数据文件的逻辑卷lv并开启自动扩展
sqlplus '/ as sysdba'<<EOFset pagesize 200 heading off feedback offspool /oracle/test.shselect '/usr/sbin/lvdisplay '||file_name||'|'||'grep '||''''||'LV Size'||'''' from dba_data_files wh...
linux sed如何与文件进行交互
http://blog.chinaunix.net/uid-24426415-id-77244.html
linux shell组合多个变量为一个新变量并执行
[root@rhel5 ~]# a='rm -Rf'[root@rhel5 ~]# b='/root/zxy.txt' ---通过拼接a和b组合成一个新的命令并执行[root@rhel5 ~]# ${a} ${b} 1,变量=变量的值2,引用变量的值 ${变量}3,组合的变量 ${...
如何把shell变量传入oracle的sqlplus
-bash-3.2$ more maxsize.sh rawsize=`sudo -u root ~/zidong.sh|awk {'print $3'}`rawsize=${rawsize}msqlplus '/as sysdba'<<EOFalter database datafile '/dev/vg2/lv2' autoextend on maxsize ${rawsize};EOF&n...
shell中如何处理两个数的减法
-bash-3.2$ a=20-bash-3.2$ b=2-bash-3.2$ echo ${a}-${b}|bc18-bash-3.2$
redhat linux上不用dd清空raw device可以重复使用raw device吗
测试目标: 如何清空lvm的lv,并让oracle再次使用显示lv逻辑卷[root@rhel5 ~]# lvdisplay /dev/vg2/lv2 --- Logical volume --- LV Name &...
create tablespace之autoextend on和next及maxsize
SQL> create tablespace tbs_roger datafile '/oracle/tbs_roger.dbf' size 1m autoextend on next 2m;Tablespace created.SQL> r 1* select tablespace_name,file_name,increment_by,increment...
create table之storage选项initial和其它
---直接在表级别指定存储参数initialSQL> create table t_table_level(a int) storage(initial 4m maxsize 10m);Table created.---未插入数据前不分配extentSQL> select segment_name,extent_id,bytes,blocks from...