1 | rsync --force --ignore-errors --delete --delete-excluded --exclude "logs/" --exclude "umslog/" 192.168.254.221::www-back /Datas/Backup/Rsync-YuKuai/app-daily --log-file=/Datas/Backup/Rsync-YuKuai/logs/`date +%Y-%m-%d`.log -azv -backup --backup-dir=/Datas/Backup/Rsync-YuKuai/app-daily-arch/`date +%Y-%m-%d` |
Monthly Archive for September, 2011
Cloud computing related open source softwares. IAAS: OpenNebula , OpenStack , Eucalyptus, CloudForms, CloudStack/Cloud.com(part of cloudstack), ibvirt, AbiCloud, Nimbus, OpenNebula, OpenQRM, ConVirt, OpenVZ ; PAAS:Makara/OpenShift, Cloud Foundry,Aeolus(iPaaS) , AppScale, CloudStack.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/expect -f set server [lindex $argv 0] trap { set rows [stty rows] set cols [stty columns] stty rows $rows columns $cols < $spawn_out(slave,name) } WINCH switch -- $server \ "mail" { spawn ssh -p 51 root@mail expect "password:" send "A)Q11dDuh^.\n" interact } "win1" { exec rdesktop -u administrator -p "aU\$B_C%K" 192.168.111.3 } default { puts "input a server name" } expect eof |
一.生成AWR报告
[ractest@sun880-1 /u01/app/oracle/orahome/rdbms/admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Sun Jan 27 20:47:38 2008
Copyright (c) 1982, 2007, Oracle. All Rights Reserved/span>.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> @awrrpt
......
//根据Oracle提示生成报告……
注:报告生成在$ORACLE_HOME/rdbms/admin/目录下。
二.修改awr的默认设置
//半小时采集一次,采集信息保存3天。
三.关闭AWR自动收集
注:10g默认是自动开启awr信息收集的,会对系统有一定的影响(很小);如果要关闭awr信息收集,只需设置interval参数为0即可。但interval设0后,AWR报告无法生成。
一.基础SQL语句
- 查:select * from employees;
- 增:insert into employees (Name , Birthday , Location , Salary) values (‘hyddd’,’1984-10-1′,’guangzhou’,999999);
- 改:update employees set Salary=999999999 where Name=’hyddd’;
- 删:delete from employees where name=’zhangsan’;
更多技巧请参考:SQL基本语句
二.PFile,SPFile管理
- SPFile->PFile:
-
##用生成对应SID的spfile生成pfile,生成的pfile位置:$ORACLE_HOME/dbs/init$ORACLE_SID.ora
SQL> create pfile from spfile;
–——
##自己指定生成文件的位置
SQL> create pfile=‘/home/oracle/initorcl.ora‘ from spfile;
-
SQL> create spfile from pfile;
三.启动,关闭数据库
- 启动
-
SQL>startup
-
- 关闭
-
SQL>shutdown normal
SQL>shutdown transactional
SQL>shutdown immediate
SQL>shutdown abort
四.修改SGA参数
- 修改SGA的原则
- sga_target <= sga_max_size
- SGA加上PGA等其他进程占用的内存必须少于机器物理内存。
- 命令
-
SQL>alter system set sga_max_size=2048m scope=spfile;
SQL>alter system set sga_target=2048m scope=spfile;
##修改SGA的相关参数,只能spfile,然后重启数据库。不能直接scope=both!
-
五.查询Oracle配置参数
- 命令
-
SQL>show parameter;
-
- 具体查询某个Oracle参数,只需输入部分关键字即可,比如:查询sga_target的值。
-
SQL> show parameter sga;
NAME TYPE VALUE
–———————————- ———– ——————————
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 2G
sga_target big integer 2G
SQL>
-
CentOS 5.6上的virt-clone有点问题,就直接用copy来复制然后用virt-install导入。
Recent Comments