Oracle Exadata体系笔记
http://www.cnblogs.com/zhenxing/p/3905047.html
最底下为连接多个机柜的spine switch交换机
上下为对称的存储服务器
中间两个对称的为数据库服务器
机柜正中间为一台以太网交换机(思科),两台infiniband交换机
Exadata的操作系统
基于Intel芯片的Sun服务器
Oracle Linux 操作系统(可安装solaris操作系统,但一般很少见)
Oracle不允许在系统上安装任何其他的软件
The Oracle Linux operating System (OS)
https://www.oracle.com/cn/linux/operating-system/index.html
Oracle linux安装Oracle 11G
https://www.cnblogs.com/iyoume2008/p/6986374.html
Oracle 运维建议
http://www.eygle.com/archives/2018/08/silent_data_corruption.html
http://www.eygle.com/index-ha.htm
ORACLE的SQL Developer工具默认的日期格式DD-MON-RR,在SQL查询中往往你看不到时间信息,此时你必须修改日期格式。具体如下所示
工具->首选项->数据库->NLS->日期格式: DD-MON-RR 修改为: YYYY-MM-DD HH24:MI:SS
SUSE + Oracle
https://www.cnblogs.com/kawashibara/p/9037933.html
数据库下载:
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
https://www.oracle.com/tools/developerstudio/
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-windows-3633015.html
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-windows-180000-5066774.html
1、获取系统时间的语句(ssxff6获取小数点后面六位)
select sysdate,systimestamp,to_char(systimestamp, ‘yyyymmdd hh24:mi:ssxff6’),
to_char(systimestamp, ‘yyyymmdd hh24:mi:ss.ff6’) from dual;
2、字符型转成timestamp
select to_timestamp(‘2011-09-14 12:52:42.123456789’, ‘syyyy-mm-dd hh24:mi:ss.ff’) from dual;
3、timestamp转成date型
select cast(to_timestamp(‘2011-09-14 12:52:42.123456789’, ‘syyyy-mm-dd hh24:mi:ss.ff’) as date) timestamp_to_date from dual;
4、date型转成timestamp
select cast(sysdate as timestamp) date_to_timestamp from dual;
5、两date的日期相减得出的是天数,而两timestamp的日期相减得出的是完整的年月日时分秒小数秒
select sysdate-sysdate,systimestamp-systimestamp from dual;
select extract(day from inter) * 24 * 60 * 60 +
extract(hour from inter) * 60 * 60 + extract(minute from inter) * 60 +
extract(second from inter) “seconds” from
(
select to_timestamp(‘2011-09-14 12:34:23.281000000’, ‘yyyy-mm-dd hh24:mi:ss.ff’) -
to_timestamp(‘2011-09-14 12:34:22.984000000’, ‘yyyy-mm-dd hh24:mi:ss.ff’) inter from dual
);
select extract(second from to_timestamp(‘2011-09-14 12:34:23.281000000’, ‘yyyy-mm-dd hh24:mi:ss.ff’))-
extract(second from to_timestamp(‘2011-09-14 12:34:22.984000000’, ‘yyyy-mm-dd hh24:mi:ss.ff’)) from dual;
注:所以,timestamp要算出两日期间隔了多少秒,要用函数转换一下。
to_char函数支持date和timestamp,但是trunc却不支持TIMESTAMP数据类型。
AWR 报告生成及解析–
$ORACLE_HOME
@?/rdbms/admin/awrrpt.sql
Specify the Report Type
AWR reports can be generated in the following formats. Please enter the
name of the format at the prompt. Default value is 'html'.
'html' HTML format (default)
'text' Text format
'active-html' Includes Performance Hub active report