本文的目的是介绍oraclesql日期比较的详细情况,特别关注oraclesql日期比较的相关信息。我们将通过专业的研究、有关数据的分析等多种方式,为您呈现一个全面的了解oraclesql日期比较的机
本文的目的是介绍oracle sql日期比较的详细情况,特别关注oracle sql 日期比较的相关信息。我们将通过专业的研究、有关数据的分析等多种方式,为您呈现一个全面的了解oracle sql日期比较的机会,同时也不会遗漏关于For oracle databases, if the top showing the oracle database, then oracle process is using the top c、How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6、NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)、Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g的知识。
本文目录一览:- oracle sql日期比较(oracle sql 日期比较)
- For oracle databases, if the top showing the oracle database, then oracle process is using the top c
- How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6
- NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)
- Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g
oracle sql日期比较(oracle sql 日期比较)
共三部分:
第一部分:oracle sql日期比较:
http://www.blogjava.net/forker/archive/2007/09/07/143467.html#Post
第二部分:Oracle 获取当前日期及日期格式
http://blog.sina.com.cn/s/blog_6168ee920100l2ye.html
第三部分:
获取昨天:
select trunc(SYSDATE-1) from dual;
检查一下:
select to_char (trunc(SYSDATE-1),''yyyy-mm-dd HH24:MI:SS'') from dual;
获取上个月第一天00:00:00:
select add_months(trunc(sysdate,''MON''),-1) from dual
select add_months(trunc(sysdate,''MON''),-13) from dual也可以
获取上个月今天00:00:00:
SELECT trunc(add_months(sysdate,-1))FROM dual
获得本季度第一天
SELECT TRUNC(add_months(SYSDATE,0),''Q'') FROM dual
获得上季度第一天
SELECT TRUNC(add_months(SYSDATE,-3),''Q'') FROM dual
获得去年1月1日
to_char(add_months(trunc(sysdate, ''Year''), -12), ''YYYY-MM-DD'')
between and 前面的时间小后面的时间大
to_date(''20110105'',''YYYYMMDD'')-7 此处 -7代表天
第四部分:
第一部分:oracle sql日期比较:
oracle sql日期比较:
在今天之前:
select * from up_date where update <= to_date( '' 2007-09-07 00:00:00 '' , '' yyyy-mm-dd hh24:mi:ss '' )
在今天之后:
select * from up_date where update >= to_date( '' 2007-09-07 00:00:00 '' , '' yyyy-mm-dd hh24:mi:ss '' )
精确时间:
在某段时间内:
select * from up_date where update < to_date( '' 2007-09-07 00:00:00 '' , '' yyyy-mm-dd hh24:mi:ss '' ) and update > to_date( '' 2007-07-07 00:00:00 '' , '' yyyy-mm-dd hh24:mi:ss '' )
select * from up_date where update <= to_date( '' 2007-09-07 00:00:00 '' , '' yyyy-mm-dd hh24:mi:ss '' ) and update >= to_date( '' 2007-07-07 00:00:00 '' , '' yyyy-mm-dd hh24:mi:ss '' )
格式化日期输出格式:
to_char(w.sample_time, ''yyyy-mm-dd '')
第二部分:Oracle 获取当前日期及日期格式
Oracle 获取当前日期及日期格式
获取系统日期: SYSDATE()
格式化日期: TO_CHAR(SYSDATE(),''YY/MM/DD HH24:MI:SS)
或 TO_DATE(SYSDATE(),''YY/MM/DD HH24:MI:SS)
格式化数字: TO_NUMBER
注: TO_CHAR 把日期或数字转换为字符串
TO_CHAR(number, ''格式'')
TO_CHAR(salary, ''$99,999.99'')
TO_CHAR(date, ''格式'')
TO_DATE 把字符串转换为数据库中的日期类型
TO_DATE(char, ''格式'')
TO_NUMBER 将字符串转换为数字
TO_NUMBER(char, ''格式'')
返回系统日期,输出 25-12月-09
select sysdate from dual;
mi是分钟,输出 2009-12-25 14:23:31
select to_char(sysdate,''yyyy-MM-dd HH24:mi:ss'') from dual;
mm会显示月份,输出 2009-12-25 14:12:31
select to_char(sysdate,''yyyy-MM-dd HH24:mm:ss'') from dual;
输出 09-12-25 14:23:31
select to_char(sysdate,''yy-mm-dd hh24:mi:ss'') from dual
输出 2009-12-25 14:23:31
select to_date(''2009-12-25 14:23:31'',''yyyy-mm-dd,hh24:mi:ss'') from dual
而如果把上式写作:
select to_date(''2009-12-25 14:23:31'',''yyyy-mm-dd,hh:mi:ss'') from dual
则会报错,因为小时hh是12进制,14为非法输入,不能匹配。
输出 $10,000,00 :
select to_char(1000000,''$99,999,99'') from dual;
输出 RMB10,000,00 :
select to_char(1000000,''L99,999,99'') from dual;
输出 1000000.12 :
select trunc(to_number(''1000000.123''),2) from dual;
select to_number(''1000000.123'') from dual;
转换的格式:
表示 year 的:y 表示年的最后一位 、
yy 表示年的最后2位 、
yyy 表示年的最后3位 、
yyyy 用4位数表示年
表示month的: mm 用2位数字表示月 、
mon 用简写形式, 比如11月或者nov 、
month 用全称, 比如11月或者november
表示day的:dd 表示当月第几天 、
ddd 表示当年第几天 、
dy 当周第几天,简写, 比如星期五或者fri 、
day 当周第几天,全称, 比如星期五或者friday
表示hour的:hh 2位数表示小时 12进制、
hh24 2位数表示小时 24小时
表示minute的:mi 2位数表示分钟
表示second的:ss 2位数表示秒 60进制
表示季度的:q 一位数 表示季度 (1-4)
另外还有ww 用来表示当年第几周 w用来表示当月第几周。
24小时制下的时间范围:00:00:00-23:59:59
12小时制下的时间范围:1:00:00-12:59:59
数字格式: 9 代表一个数字
0 强制显示0
$ 放置一个$符
L 放置一个浮动本地货币符
. 显示小数点
, 显示千位指示符
补充:
当前时间减去7分钟的时间
select sysdate,sysdate - interval ''7'' MINUTE from dual;
当前时间减去7小时的时间
select sysdate - interval ''7'' hour from dual;
当前时间减去7天的时间
select sysdate - interval ''7'' day from dual;
当前时间减去7月的时间
select sysdate,sysdate - interval ''7'' month from dual;
当前时间减去7年的时间
select sysdate,sysdate - interval ''7'' year from dual;
时间间隔乘以一个数字
select sysdate,sysdate - 8*interval ''7'' hour from dual;
含义解释:
Dual伪列
Dual 是 Oracle中的一个实际存在的表,任何用户均可读取,常用在没有目标表的select语句块中。
不同系统可能返回日期的格式不一样。
返回当前连接的用户:select user from dual;
第四部分:
常用的时间格式 在oracle中有 yyyy-mm-dd hh24:mi:ss 而在Java中有些区别 为yyyy-MM-dd HH:mm:ss 这点还是经常容易模糊的。
相信很多人都有过统计某些数据的经历,比如,要统计财务的情况,可能要按每年,每季度,每月,甚至每个星期来分别统计。那在oracle中应该怎么来写sql语句呢,这个时候Oracle的日期函数会给我们很多帮助。
常用日期型函数
1。Sysdate 当前日期和时间
SQL> Select sysdate from dual;
SYSDATE
----------
21-6月 -05
2。Last_day 本月最后一天
SQL> Select last_day(sysdate) from dual;
LAST_DAY(S
----------
30-6月 -05
3。Add_months(d,n) 当前日期d后推n个月
用于从一个日期值增加或减少一些月份
date_value:=add_months(date_value,number_of_months)
SQL> Select add_months(sysdate,2) from dual;
ADD_MONTHS
----------
21-8月 -05
4。Months_between(f,s) 日期f和s间相差月数
SQL> select months_between(sysdate,to_date(''2005-11-12'',''yyyy-mm-dd''))from dual;
MONTHS_BETWEEN(SYSDATE,TO_DATE(''2005-11-12'',''YYYY-MM-DD''))
----------------------------------------------------------
-4.6966741
5。NEXT_DAY(d, day_of_week)
返回由"day_of_week"命名的,在变量"d"指定的日期之后的第一个工作日的日期。参数"day_of_week"必须为该星期中的某一天。
SQL> SELECT next_day(to_date(''20050620'',''YYYYMMDD''),1) FROM dual;
NEXT_DAY(T
----------
26-6月 -05
6。current_date()返回当前会话时区中的当前日期
date_value:=current_date
SQL> column sessiontimezone for a15
SQL> select sessiontimezone,current_date from dual;
SESSIONTIMEZONE CURRENT_DA
--------------- ----------
+08:00 13-11月-03
SQL> alter session set time_zone=''-11:00'' 2 /
会话已更改。
SQL> select sessiontimezone,current_timestamp from dual;
SESSIONTIMEZONE CURRENT_TIMESTAMP
--------------- ------------------------------------
-11:00 12-11月-03 04.59.13.668000 下午 -11:00
7。current_timestamp()以timestamp with time zone数据类型返回当前会话时区中的当前日期
SQL> select current_timestamp from dual;
CURRENT_TIMESTAMP
---------------------------------------------------------------------------
21-6月 -05 10.13.08.220589 上午 +08:00
8。dbtimezone()返回时区
SQL> select dbtimezone from dual;
DBTIME
------
-08:00
9。extract()找出日期或间隔值的字段值
date_value:=extract(date_field from [datetime_value|interval_value])
SQL> select extract(month from sysdate) "This Month" from dual;
This Month
----------
6
SQL> select extract(year from add_months(sysdate,36)) " Years" from dual;
Years
----------
2008
10。localtimestamp()返回会话中的日期和时间
SQL> select localtimestamp from dual;
LOCALTIMESTAMP
---------------------------------------------------------------------------
21-6月 -05 10.18.15.855652 上午
常用日期数据格式(该段为摘抄)
Y或YY或YYY 年的最后一位,两位或三位 Select to_char(sysdate,’YYY’) from dual; 002表示2002年
SYEAR或YEAR SYEAR使公元前的年份前加一负号 Select to_char(sysdate,’SYEAR’) from dual; -1112表示公元前111 2年
Q 季度,1~3月为第一季度 Select to_char(sysdate,’Q’) from dual; 2表示第二季度①
MM 月份数 Select to_char(sysdate,’MM’) from dual; 12表示12月
RM 月份的罗马表示 Select to_char(sysdate,’RM’) from dual; IV表示4月
Month 用9个字符长度表示的月份名 Select to_char(sysdate,’Month’) from dual; May后跟6个空格表示5月
WW 当年第几周 Select to_char(sysdate,’WW’) from dual; 24表示2002年6月13日为第24周
W 本月第几周 Select to_char(sysdate,’W’) from dual; 2002年10月1日为第1周
DDD 当年第几, 1月1日为001,2月1日为032 Select to_char(sysdate,’DDD’) from dual; 363 2002年1 2月2 9日为第363天
DD 当月第几天 Select to_char(sysdate,’DD’) from dual; 04 10月4日为第4天
D 周内第几天 Select to_char(sysdate,’D’) from dual; 5 2002年3月14日为星期一
DY 周内第几天缩写 Select to_char(sysdate,’DY’) from dual; SUN 2002年3月24日为星期天
HH或HH12 12进制小时数 Select to_char(sysdate,’HH’) from dual; 02 午夜2点过8分为02
HH24 24小时制 Select to_char(sysdate,’HH24’) from dual; 14 下午2点08分为14
MI 分钟数(0~59) Select to_char(sysdate,’MI’) from dual; 17下午4点17分
SS 秒数(0~59) Select to_char(sysdate,’SS’) from dual; 22 11点3分22秒
提示注意不要将MM格式用于分钟(分钟应该使用MI)。MM是用于月份的格式,将它用于分钟也能工作,但结果是错误的。
现在给出一些实践后的用法:
1。上月末天:
SQL> select to_char(add_months(last_day(sysdate),-1),''yyyy-MM-dd'') LastDay from
dual;
LASTDAY
----------
2005-05-31
2。上月今天
SQL> select to_char(add_months(sysdate,-1),''yyyy-MM-dd'') PreToday from dual;
PRETODAY
----------
2005-05-21
3.上月首天
SQL> select to_char(add_months(last_day(sysdate)+1,-2),''yyyy-MM-dd'') firstDay from dual;
FIRSTDAY
----------
2005-05-01
4.按照每周进行统计
SQL> select to_char(sysdate,''ww'') from dual group by to_char(sysdate,''ww'');
TO
--
25
5。按照每月进行统计
SQL> select to_char(sysdate,''mm'') from dual group by to_char(sysdate,''mm'');
TO
--
06
6。按照每季度进行统计
SQL> select to_char(sysdate,''q'') from dual group by to_char(sysdate,''q'');
T
-
2
7。按照每年进行统计
SQL> select to_char(sysdate,''yyyy'') from dual group by to_char(sysdate,''yyyy'');
TO_C
----
2005
8.要找到某月中所有周五的具体日期
select to_char(t.d,''YY-MM-DD'') from (
select trunc(sysdate, ''MM'')+rownum-1 as d
from dba_objects
where rownum < 32) t
where to_char(t.d, ''MM'') = to_char(sysdate, ''MM'') --找出当前月份的周五的日期
and trim(to_char(t.d, ''Day'')) = ''星期五''
--------
03-05-02
03-05-09
03-05-16
03-05-23
03-05-30
如果把where to_char(t.d, ''MM'') = to_char(sysdate, ''MM'')改成sysdate-90,即为查找当前月份的前三个月中的每周五的日期。
9.oracle中时间运算
内容如下:
1、oracle支持对日期进行运算
2、日期运算时是以天为单位进行的
3、当需要以分秒等更小的单位算值时,按时间进制进行转换即可
4、进行时间进制转换时注意加括号,否则会出问题
SQL> alter session set nls_date_format=''yyyy-mm-dd hh:mi:ss'';
会话已更改。
SQL> set serverout on
SQL> declare
2 DateValue date;
3 begin
4 select sysdate into DateValue from dual;
5 dbms_output.put_line(''源时间:''||to_char(DateValue));
6 dbms_output.put_line(''源时间减1天:''||to_char(DateValue-1));
7 dbms_output.put_line(''源时间减1天1小时:''||to_char(DateValue-1-1/24));
8 dbms_output.put_line(''源时间减1天1小时1分:''||to_char(DateValue-1-1/24-1/(24*60)));
9 dbms_output.put_line(''源时间减1天1小时1分1秒:''||to_char(DateValue-1-1/24-1/(24*60)-1/(24*60*60)));
10 end;
11 /
源时间:2003-12-29 11:53:41
源时间减1天:2003-12-28 11:53:41
源时间减1天1小时:2003-12-28 10:53:41
源时间减1天1小时1分:2003-12-28 10:52:41
源时间减1天1小时1分1秒:2003-12-28 10:52:40
PL/SQL 过程已成功完成。
在Oracle中实现时间相加处理
-- 名称:Add_Times
-- 功能:返回d1与NewTime相加以后的结果,实现时间的相加
-- 说明:对于NewTime中的日期不予考虑
-- 日期:2004-12-07
-- 版本:1.0
-- 作者:Kevin
create or replace function Add_Times(d1 in date,NewTime in date) return date
is
hh number;
mm number;
ss number;
hours number;
dResult date;
begin
-- 下面依次取出时、分、秒
select to_number(to_char(NewTime,''HH24'')) into hh from dual;
select to_number(to_char(NewTime,''MI'')) into mm from dual;
select to_number(to_char(NewTime,''SS'')) into ss from dual;
-- 换算出NewTime中小时总和,在一天的百分几
hours := (hh + (mm / 60) + (ss / 3600))/ 24;
-- 得出时间相加后的结果
select d1 + hours into dResult from dual;
return(dResult);
end Add_Times;
-- 测试用例
-- select Add_Times(sysdate,to_date(''2004-12-06 03:23:00'',''YYYY-MM-DD HH24:MI:SS'')) from dual
在Oracle9i中计算时间差
计算时间差是Oracle DATA数据类型的一个常见问题。Oracle支持日期计算,你可以创建诸如“日期1-日期2”这样的表达式来计算这两个日期之间的时间差。
一旦你发现了时间差异,你可以使用简单的技巧来以天、小时、分钟或者秒为单位来计算时间差。为了得到数据差,你必须选择合适的时间度量单位,这样就可以进行数据格式隐藏。
使用完善复杂的转换函数来转换日期是一个诱惑,但是你会发现这不是最好的解决方法。
round(to_number(end-date-start_date))- 消逝的时间(以天为单位)
round(to_number(end-date-start_date)*24)- 消逝的时间(以小时为单位)
round(to_number(end-date-start_date)*1440)- 消逝的时间(以分钟为单位)
显示时间差的默认模式是什么?为了找到这个问题的答案,让我们进行一个简单的SQL *Plus查询。
SQL> select sysdate-(sysdate-3) from dual;
SYSDATE-(SYSDATE-3)
-------------------
3
这里,我们看到了Oracle使用天来作为消逝时间的单位,所以我们可以很容易的使用转换函数来把它转换成小时或者分钟。然而,当分钟数不是一个整数时,我们就会遇到放置小数点的问题。
Select
(sysdate-(sysdate-3.111))*1440
from
dual;
(SYSDATE-(SYSDATE-3.111))*1440
------------------------------
4479.83333
当然,我们可以用ROUND函数(即取整函数)来解决这个问题,但是要记住我们必须首先把DATE数据类型转换成NUMBER数据类型。
Select
round(to_number(sysdate-(sysdate-3.111))*1440)
from
dual;
ROUND(TO_NUMBER(SYSDATE-(SYSDATE-3.111))*1440)
----------------------------------------------
4480
我们可以用这些函数把一个消逝时间近似转换成分钟并把这个值写入Oracle表格中。在这个例子里,我们有一个离线(logoff)系统级触发机制来计算已经开始的会话时间并把它放入一个Oracle STATSPACK USER_LOG扩展表格之中。
Update
perfstat.stats$user_log
set
elapsed_minutes =
round(to_number(logoff_time-logon_time)*1440)
where
user = user_id
and
elapsed_minutes is NULL;
查出任一年月所含的工作日
CREATE OR REPLACE FUNCTION Get_WorkingDays(
ny IN VARCHAR2
) RETURN INTEGER IS
/*------------------------------------------------------------------------------------------
函数名称:Get_WorkingDays
中文名称:求某一年月中共有多少工作日
作者姓名: XINGPING
编写时间: 2004-05-22
输入参数:NY:所求包含工作日数的年月,格式为yyyymm,如200405
返 回 值:整型值,包含的工作日数目。
算法描述:
1).列举出参数给出的年月中的每一天。这里使用了一个表(ljrq是我的库中的一张表。这个表可以是有权访问的、记录条数至少为31的任意一张表或视图)来构造出某年月的每一天。
2).用这些日期和一个已知星期几的日期相减(2001-12-30是星期天),所得的差再对7求模。如果所求年月在2001-12-30以前,那么所得的差既是负数,求模后所得值范围为大于-6,小于0,如-1表示星期六,故先将求模的结果加7,再求7的模.
3).过滤掉结果集中值为0和6的元素,然后求count,所得即为工作日数目。
-------------------------------------------------------------------------------------------------*/
Result INTEGER;
BEGIN
SELECT COUNT(*) INTO Result
FROM (SELECT MOD(MOD(q.rq-to_date(''2001-12-30'',''yyyy-mm-dd''),7),7) weekday
FROM ( SELECT to_date(ny||t.dd,''yyyymmdd'') rq
FROM (SELECT substr(100+ROWNUM,2,2) dd
FROM ljrq z WHERE Rownum<=31
) t
WHERE to_date(ny||t.dd,''yyyymmdd'')
BETWEEN to_date(ny,''yyyymm'')
AND last_day(to_date(ny,''yyyymm''))
)q
) a
WHERE a.weekday NOT IN(0,6);
RETURN Result;
END Get_WorkingDays;
______________________________________
还有一个版本
CREATE OR REPLACE FUNCTION Get_WorkingDays(
ny IN VARCHAR2
) RETURN INTEGER IS
/*-----------------------------------------------------------------------------------------
函数名称:Get_WorkingDays
中文名称:求某一年月中共有多少工作日
作者姓名: XINGPING
编写时间: 2004-05-23
输入参数:NY:所求包含工作日数的年月,格式为yyyymm,如200405
返 回 值:整型值,包含的工作日数目。
算法描述:使用Last_day函数计算出参数所给年月共包含多少天,根据这个值来构造一个循环。在这个循环中先求这个月的每一天与一个已知是星期天的日期(2001-12-30是星期天)的差,所得的差再对7求模。如果所求日期在2001-12-30以前,那么所得的差既是负数,求模后所得值范围为大于-6,小于0,如-1表示星期六,故先将求模的结果加7,再求7的模. 如过所得值不等于0和6(即不是星期六和星期天),则算一个工作日。
----------------------------------------------------------------------------------------*/
Result INTEGER := 0;
myts INTEGER; --所给年月的天数
scts INTEGER; --某天距2001-12-30所差的天数
rq DATE;
djt INTEGER := 1; --
BEGIN
myts := to_char(last_day(to_date(ny,''yyyymm'')),''dd'');
LOOP
rq := TO_date(ny||substr(100+djt,2),''yyyymmdd'');
scts := rq - to_date(''2001-12-30'',''yyyy-mm-dd'');
IF MOD(MOD(scts,7)+7,7) NOT IN(0,6) THEN
Result := Result + 1;
END IF;
djt := djt + 1;
EXIT WHEN djt>myts;
END LOOP;
RETURN Result;
END Get_WorkingDays;
以上两个版本的比较
第一个版本一条SQL语句就可以得出结果,不需要编程就可以达到目的。但需要使用任意一张有权访问的、记录条数至少为31的一张表或视图。
第二个版本需要编程,但不需要表或者视图。
这两个版本都还存在需要完善的地方,即没有考虑节日,如五一、十一、元旦、春节这些节假期都没有去除。这些节假日应该维护成一张表,然后通过查表来去除这些节假日。
For oracle databases, if the top showing the oracle database, then oracle process is using the top c
Note 805586.1 Troubleshooting Session Administration (Doc ID 805586.1) Note 822527.1 How To Find Where The Memory Is Growing For A Process (Doc ID 822527.1) Note 273646.1 How to diagnose the high cpu utilization of ORACLE.EXE in Windows environment Note 728539.1 Find Blocking Sessions In sqlPLUS Note 61552.1 Troubleshooting Oracle Database Hanging Issues for versions from 7 to 9--Exhaustive Note 164760.1 Detecting and Resolving Locking Conflicts using TopSessionsHow I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6
How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6
by Ginny Henningsen; updated by Michele Casey
How to simplify the installation of Oracle Database 12c or 11g on Oracle Linux 6 by installing the oracle-rdbms-server-12cR1-preinstall
or oracle-rdbms-server-11gR2-preinstall
RPM package, which automatically performs a number of tasks, such as installing required software packages, resolving package dependencies, and modifying kernel parameters.
Published September 2012 (updated September 2017)
READ THIS FIRST: Important Changes Since Publication
While the content in this article is still valid, several details have changed. For example:
- For Oracle Database 12c Release 2, the preinstall RPM has a different name than the one used in the article belowpu:
- oracle-database-server-12cR2-preinstall
- See also this documentation: Automatically Configuring Oracle Linux with Oracle Preinstallation RPM
- The preinstall RPMs are published on Oracle Linux yum server for both Oracle Linux 6 and 7 in the Latest repositories which are configured and enabled by default in recent releases of Oracle Linux 6 and 7
Introducing the oracle-rdbms-server-12cR1-preinstall
and oracle-rdbms-server-11gR2-preinstall
RPM for Oracle Linux
Before installing Oracle Database 12c or 11g on a system, you need to preconfigure the operating environment since the database requires certain software packages, package versions, and tweaks to kernel parameters. (Be sure to review the appropriate Oracle Database installation guide to familiarize yourself with hardware, software, and operating system requirements.)
|
Note: This article applies to Oracle Linux 6. A previous article, "How I Simplified Oracle Database Installation on Oracle Linux," covered performing a similar task on versions of Oracle Linux 5.
On Oracle Linux, I discovered that there is a remarkably easy way to address these installation prerequisites: First, depending on your database version, install either the RPM package called oracle-rdbms-server-12cR1-preinstall
or oracle-rdbms-server-11gR2-preinstall
. This RPM performs a number of preconfiguration steps, including the following:
- Automatically downloading and installing any additional software packages and specific package versions needed for installing Oracle Grid Infrastructure and Oracle Database 12 c Release 1 (12.1) or 11g Release 2 (11.2.0.3), with package dependencies resolved via
yum
orup2date
capabilities. - Creating the user
oracle
and the groupsoinstall
(forOraInventory
) anddba
(forOSDBA
), which are used during database installation. (For security purposes, this user has no password by default and cannot log in remotely. To enable remote login, please set a password using thepasswd
tool.) - Modifying kernel parameters in
/etc/sysctl.conf
to change settings for shared memory, semaphores, the maximum number of file descriptors, and so on. - Setting hard and soft shell resource limits in
/etc/security/limits.conf
, such as the locked-in memory address space, the number of open files, the number of processes, and core file size. - Setting
numa=off
in the kernel for x86_64 machines.
Note that oracle-rdbms-server-12cR1-preinstall
and oracle-rdbms-server-11gR2-preinstall
parses the existing /etc/sysctl.conf
and /etc/security/limits.conf
files and updates values only as needed for database installation. Any precustomized settings not related to database installation are left as is.
The oracle-rdbms-server-12cR1-preinstall
and oracle-rdbms-server-11gR2-preinstall
RPM packages are accessible through the Oracle Unbreakable Linux Network (ULN, which requires a support contract), from the Oracle Linux distribution media, or from the Oracle public yum repository. Thus, whether or not your system is registered with ULN to access Oracle patches and support, you can use oracle-rdbms-server-12cR1-preinstall
and oracle-rdbms-server-11gR2-preinstall
to simplify database installation on Oracle Linux. In addition, the Oracle public yum repository now includes all security and bug errata, ensuring systems are secured and stable with the latest security updates and bug fixes.
Installing the oracle-rdbms-server-12cR1-preinstall
or oracle-rdbms-server-11gR2-preinstall
RPM
The remainder of this article steps through the procedure that I used for installing oracle-rdbms-server-11gR2-preinstall
on Oracle Linux via the Oracle public yum repository. The same steps outlined in the following section can be used for either version of the preinstall RPM package. I started with a system running Oracle Linux Release 6 Update 4 for x86_64, a 64-bit version of Oracle Linux that I downloaded from the Oracle software delivery cloud (requires registration or login). First, I set up a yum
configuration file that pointed to the correct repository, and then I installed the oracle-rdbms-server-11gR2-preinstall
RPM from that repository.
Here are the steps for preconfiguring a system for Oracle Database installation using oracle-rdbms-server-11gR2-preinstall
. Remember, the steps are the same when using the oracle-rdbms-server-12cR1-preinstall
package; you simply need to change the name of the RPM package during the yum installation step.
- As an authorized user (for example,
root
), retrieve the file that configures repository locations:
# cd /etc/yum.repos.d # wget http://yum.oracle.com/public-yum-ol6.repo
- Using a text editor, modify the file, changing the field
enabled=0
toenabled=1
to reflect repositories that correspond to the machine''s operating system release.
Here is an excerpt of
public-yum-old6.repo
with the changed lines in boldface.[ol6_latest] name=Oracle Linux $releasever Latest ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/ gpgkey=http://yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1 [ol6_UEK_latest] name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/ gpgkey=http://yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1
Because the target system is running Oracle Linux Release 6 Update 4 for x86_64, which installs the Oracle Unbreakable Enterprise Kernel by default, there are two repositories to enable,
[ol6_latest]
and[ol6_UEK_latest]
. - Next, install the
oracle-rdbms-server-11gR2-preinstall
RPM using theyum install
command. If you are using Oracle Database 12c, then you would typeyum install
.
The output in Listing 1 shows how the installation checks dependencies and then downloads and installs the required packages.
# yum install oracle-rdbms-server-11gR2-preinstall Loaded plugins: refresh-packagekit, rhnplugin, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el6 will be installed --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: glibc-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 --> Running transaction check ---> Package compat-libcap1.x86_64 0:1.10-1 will be installed ---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed ---> Package gcc.x86_64 0:4.4.6-4.el6 will be installed --> Processing Dependency: cpp = 4.4.6-4.el6 for package: gcc-4.4.6-4.el6.x86_64 --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.6-4.el6.x86_64 ---> Package gcc-c++.x86_64 0:4.4.6-4.el6 will be installed --> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.6-4.el6.x86_64 ---> Package glibc-devel.x86_64 0:2.12-1.80.el6_3.4 will be installed --> Processing Dependency: glibc-headers = 2.12-1.80.el6_3.4 for package: glibc-devel-2.12-1.80.el6_3.4.x86_64 --> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.80.el6_3.4.x86_64 ---> Package ksh.x86_64 0:20100621-16.el6 will be installed ---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed ---> Package libstdc++-devel.x86_64 0:4.4.6-4.el6 will be installed --> Running transaction check ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 ---> Package cpp.x86_64 0:4.4.6-4.el6 will be installed ---> Package glibc-headers.x86_64 0:2.12-1.80.el6_3.4 will be installed --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.80.el6_3.4.x86_64 --> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.el6_3.4.x86_64 ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed --> Running transaction check ---> Package kernel-uek-headers.x86_64 0:2.6.32-300.32.1.el6uek will be installed ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: oracle-rdbms-server-11gR2-preinstall x86_64 1.0-6.el6 ol6_latest 15 k Installing for dependencies: cloog-ppl x86_64 0.15.7-1.2.el6 ol6_latest 93 k compat-libcap1 x86_64 1.10-1 ol6_latest 17 k compat-libstdc++-33 x86_64 3.2.3-69.el6 ol6_latest 183 k cpp x86_64 4.4.6-4.el6 ol6_latest 3.7 M gcc x86_64 4.4.6-4.el6 ol6_latest 10 M gcc-c++ x86_64 4.4.6-4.el6 ol6_latest 4.7 M glibc-devel x86_64 2.12-1.80.el6_3.4 ol6_latest 970 k glibc-headers x86_64 2.12-1.80.el6_3.4 ol6_latest 600 k kernel-uek-headers x86_64 2.6.32-300.32.1.el6uek ol6_latest 713 k ksh x86_64 20100621-16.el6 ol6_latest 684 k libaio-devel x86_64 0.3.107-10.el6 ol6_latest 13 k libstdc++-devel x86_64 4.4.6-4.el6 ol6_latest 1.5 M mpfr x86_64 2.4.1-6.el6 ol6_latest 156 k ppl x86_64 0.10.2-11.el6 ol6_latest 1.3 M Transaction Summary ================================================================================ Install 15 Package(s) Total download size: 25 M Installed size: 61 M Is this ok [y/N]: Downloading Packages: -------------------------------------------------------------------------------- Total 710 kB/s | 25 MB 00:35 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : mpfr-2.4.1-6.el6.x86_64 1/15 Installing : libstdc++-devel-4.4.6-4.el6.x86_64 2/15 Installing : cpp-4.4.6-4.el6.x86_64 3/15 Installing : ppl-0.10.2-11.el6.x86_64 4/15 Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 5/15 Installing : kernel-uek-headers-2.6.32-300.32.1.el6uek.x86_64 6/15 Installing : glibc-headers-2.12-1.80.el6_3.4.x86_64 7/15 Installing : glibc-devel-2.12-1.80.el6_3.4.x86_64 8/15 Installing : gcc-4.4.6-4.el6.x86_64 9/15 Installing : gcc-c++-4.4.6-4.el6.x86_64 10/15 Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64 11/15 Installing : libaio-devel-0.3.107-10.el6.x86_64 12/15 Installing : ksh-20100621-16.el6.x86_64 13/15 Installing : compat-libcap1-1.10-1.x86_64 14/15 Installing : oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 15/15 Verifying : gcc-4.4.6-4.el6.x86_64 1/15 Verifying : compat-libcap1-1.10-1.x86_64 2/15 Verifying : ksh-20100621-16.el6.x86_64 3/15 Verifying : glibc-devel-2.12-1.80.el6_3.4.x86_64 4/15 Verifying : libaio-devel-0.3.107-10.el6.x86_64 5/15 Verifying : oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 6/15 Verifying : gcc-c++-4.4.6-4.el6.x86_64 7/15 Verifying : glibc-headers-2.12-1.80.el6_3.4.x86_64 8/15 Verifying : libstdc++-devel-4.4.6-4.el6.x86_64 9/15 Verifying : compat-libstdc++-33-3.2.3-69.el6.x86_64 10/15 Verifying : mpfr-2.4.1-6.el6.x86_64 11/15 Verifying : kernel-uek-headers-2.6.32-300.32.1.el6uek.x86_64 12/15 Verifying : cpp-4.4.6-4.el6.x86_64 13/15 Verifying : ppl-0.10.2-11.el6.x86_64 14/15 Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 15/15 Installed: oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el6 Dependency Installed: cloog-ppl.x86_64 0:0.15.7-1.2.el6 compat-libcap1.x86_64 0:1.10-1 compat-libstdc++-33.x86_64 0:3.2.3-69.el6 cpp.x86_64 0:4.4.6-4.el6 gcc.x86_64 0:4.4.6-4.el6 gcc-c++.x86_64 0:4.4.6-4.el6 glibc-devel.x86_64 0:2.12-1.80.el6_3.4 glibc-headers.x86_64 0:2.12-1.80.el6_3.4 kernel-uek-headers.x86_64 0:2.6.32-300.32.1.el6uek ksh.x86_64 0:20100621-16.el6 libaio-devel.x86_64 0:0.3.107-10.el6 libstdc++-devel.x86_64 0:4.4.6-4.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6 Complete!
Listing 1: Installing the
oracle-rdbms-server-11gR2-preinstall
RPMThe yum installation logs messages about kernel changes in the file
/var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log
, and it makes backups of current system settings in the directory/var/log/oracle-rdbms-server-11gR2-preinstall/backup
. - At this point, the system is ready for the installation of Oracle Database. For example, to install Oracle Database 11g Release 2, follow the directions in Chapter 4, "Installing Oracle Database," of the Database Installation Guide for Linux."
Here are the steps I followed while installing Oracle Database 11g Release 2 in my test environment. Make sure you review all documentation and follow recommended best practices before installing into your production environment.
- As
root
, create a parent directory in a file system that has sufficient space to be the target location for the downloaded files:
# mkdir /home/OraDB11g # cd /home/OraDB11g
The amount of disk space needed in the file system varies according to the specific installation type, but roughly twice the size of the zip archives, or 5 GB, is enough to house the software and data files.
- Into this target directory, download the installation media files from the Oracle Database Software Downloads page on Oracle Technology Network.
- Extract the files:
# unzip linux.x64_11gR2_database_1of2.zip # unzip linux.x64_11gR2_database_2of2.zip
- Log in as the user
oracle
. Change directory to thedatabase
directory and enter the following command to run the Oracle Universal Installer:
$ cd /home/OraDB11g/database $ ./runInstaller
The Oracle Universal Installer performs a number of checks, verifying that the necessary OS packages and versions are installed. In addition, it checks kernel parameters set by the
oracle-rdbms-server-11gR2-preinstall
installation. During the kernel settings check, the installer might flag a few settings as "failed," and you should investigate these failures. In some cases, you still might be able to continue with the database installation. If you check kernel settings in/etc/sysctl.conf
, you''ll see thatoracle-rdbms-server-11gR2-preinstall
has modified and added the necessary settings to ensure the minimum requirements are met, as defined in section 2.10.1, "Displaying and Changing Kernel Parameter Values," in Chapter 2, "Oracle Database Preinstallation Requirements," of the Oracle Database Installation Guide 11g Release2 (11.2) for Linux. Below is the list of requirements:fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 4294967295 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576
If necessary, you can (as
root
) edit the file/etc/sysctl.conf
to specify a setting manually, for example:# vi /etc/sysctl.conf # /sbin/sysctl -p
The Oracle Universal Installer performs additional checks, such as verifying the
glibc
version, sufficient disk space, environmental variable and path settings, and sufficient physical memory and swap space. Generally, installingoracle-rdbms-server-11gR2-preinstall
takes care of the prerequisites so that you can proceed directly with installing the database. - As
Final Thoughts
Installing the oracle-rdbms-server-12cR1-preinstall
and oracle-rdbms-server-11gR2-preinstall
RPMs can save time when installing Oracle Database 12c and 11g on Oracle Linux. These RPMs address most Oracle Database installation prerequisites and greatly simplify the installation process.
See Also
Here are the resources referenced earlier in this document:
- Oracle Unbreakable Linux Network: https://linux.oracle.com
- Oracle Linux yum server: http://yum.oracle.com/
- Oracle software delivery cloud (requires registration or login): https://edelivery.oracle.com/linux
- Chapter 4, "Installing Oracle Database," of the Database Installation Guide for Linux: http://docs.oracle.com/cd/E11882_01/install.112/e24321/inst_task.htm#BABBBHJH
- Oracle Database Software Downloads page on Oracle Technology Network: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
And here are some additional resources from the Oracle Database Documentation Library (http://www.oracle.com/pls/db112/homepage). Relevant subsections from the Oracle Database Installation Guide 11g Release 2 (11.2) for Linux (http://download.oracle.com/docs/cd/E11882_01/install.112/e16763/toc.htm) with currently valid URLs are as follows:
- "About the Oracle RDBMS Pre-Install and Oracle Validated RPMs" from Chapter 1, "Overview of Oracle Database Installation": http://download.oracle.com/docs/cd/E11882_01/install.112/e16763/install_overview.htm#BABDBHCJ
- Chapter 2, "Oracle Database Preinstallation Requirements": http://download.oracle.com/docs/cd/E11882_01/install.112/e16763/pre_install.htm#BABFDGHJ
- "Downloading Oracle Software" from Chapter 4, "Installing Oracle Database," which describes how to download installation files from the Oracle Technology Network Website: http://docs.oracle.com/cd/E11882_01/install.112/e16763/inst_task.htm#autoId6
Also see the blog entry "Oracle RDBMS Server 11gR2 Pre-Install RPM for Oracle Linux 6 has been released": https://blogs.oracle.com/linux/entry/oracle_rdbms_server_11gr2_pre
About the Authors
Ginny Henningsen has worked for the last 15 years as a freelance writer developing technical collateral and documentation for high-tech companies. Prior to that, Ginny worked for Sun Microsystems, Inc. as a Systems Engineer in King of Prussia, PA and Milwaukee, WI. Ginny has a BA from Carnegie-Mellon University and a MSCS from Villanova University.
Michele Casey is the Director of Product Management for Oracle Linux. She has worked with commercial Linux distributions and open source projects as a product manager since 2006. She has also held positions as a system administrator, project manager, and technical support engineer.
Revision 1.1, 07/09/2013; added information about using theoracle-rdbms-server-12cR1-preinstall package to installOracle Database 12c |
Follow us:
NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)
如何解决NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)?
我正在使用 loopback-connector-oracle 4.1.1 版寻求有关我面临的问题的一些信息。分析如下: 我们有 DB 连接配置,可以使用 json 文件格式的 oracle 连接器使用属性连接到 oracle DB 数据源。 "maxConn": 20,“主机”:DB_HOST, “端口”:DB_PORT, “数据库”:DB_NAME, “密码”:DB_PASSWORD, “用户”:DB_USER, "connector": "oracle",
有两个进程/pod 正在运行,每个进程/pod 都有自己的池供oracle 连接器使用。发生的情况是,在一个实例中,oracle 能够连接并处理请求,但在第二个 pod/进程中,我注意到 njs-040 错误连接超时。由于两者都运行在同一个环境中,所以连接性不会成为问题。我正在寻求您的帮助或意见以了解连接池耗尽的原因?正如我所看到的,DB 上的连接/会话数量配置的数量较少。 当我重新启动 pod/进程时,一切都会恢复正常。在我的流程中遇到的一些问题,如果您可以指导并提供宝贵的意见,我正在寻求您的帮助。
- 如果使用连接池(oracle 连接器),它也应该释放对象,耗尽的机会会减少吗?
- 在进程/pod 启动并通过连接器 (oracle) 获取数据源中的连接对象后,发生网络问题并且进程和数据库之间的连接丢失,连接器是否恢复?根据我的观察,我在其他进程中注意到的似乎应该被恢复,当它与范围一起运行时,在一个进程中可能会导致什么?
我非常感谢您的回复。 提前致谢 桑吉夫
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g
Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g
系统环境:
操作系统: RedHat EL6
Oracle: Oracle 10g and Oracle 11g
手工建库相对来说很容易实现,本案例是从10g和11g,通过手工建库的方式做一个简单的对比,可以看出11g和10g之间的一个简单的差异!
VMware+Linux+Oracle 10G RAC全程详细图解
案例二:
在Oracle 11g 环境下手工建库
DB_NAME=''test1''
INSTANCE_NAME=''test1''
1、建立Instance的初始化参数文件和口令文件
[oracle@rh6 dbs]$cat inittest1.ora
db_name=''test1''
memory_target=400m //Oracle 11g增加了内存自动管理
processes = 150
audit_file_dest=''$ORACLE_BASE/admin/test1/adump''
audit_trail =''db''
db_block_size=8192
db_domain=''''
open_cursors=300
remote_login_passwordfile=''EXCLUSIVE''
undo_tablespace=''UNDOTBS1''
# You may want to ensure that control files are created on separate physical
# devices
control_files = /u01/app/oracle/oradata/test1/control01.ctl
compatible =''11.2.0''
[oracle@rh6 dbs]$ orapwd file=orapwtest1 password=oracle entries=3
2、建立数据库相关的目录
Oracle 11g增加了diagnostic directory,,默认的为$ORACLE_BASE
[oracle@rh6 dbs]$ mkdir -p $ORACLE_BASE/admin/test1/adump
[oracle@rh6 dbs]$ mkdir -p /u01/app/oracle/oradata/test1
3、建立建库脚本
[oracle@rh6 ~]$ cat cr_db.sql
CREATE DATABASE test1
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE
GROUP 1 (''/u01/app/oracle/oradata/test1/redo01a.log'') SIZE 50M ,
GROUP 2 (''/u01/app/oracle/oradata/test1/redo02a.log'') SIZE 50M
MAXLOGFILES 10
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 200
CHARACTER SET zhs16gbk
DATAFILE ''/u01/app/oracle/oradata/test1/system01.dbf'' SIZE 325M REUSE
SYSAUX DATAFILE ''/u01/app/oracle/oradata/test1/sysaux01.dbf'' SIZE 325M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE ''/u01/app/oracle/oradata/test1/temp01.dbf''
SIZE 100M REUSE
UNDO TABLESPACE undotbs1
DATAFILE ''/u01/app/oracle/oradata/test1/undotbs01.dbf''
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
4、启动Instance并建立数据库
[oracle@rh6 ~]$ export ORACLE_SID=test1
[oracle@rh6 ~]$ sqlplus ''/as sysdba''
SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 10:59:58 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
10:59:59 SYS@ test1>startup nomount;
ORACLE instance started.
Total System Global Area 417546240 bytes
Fixed Size 2213936 bytes
Variable Size 268437456 bytes
Database Buffers 142606336 bytes
Redo Buffers 4288512 bytes
11:00:12 SYS@ test1>@/home/oracle/cr_db
Database created.
Elapsed: 00:01:23.44
11:01:51 SYS@ test1>
建库告警日志:
CREATE TABLESPACE sysaux DATAFILE ''/u01/app/oracle/oradata/test1/sysaux01.dbf'' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE
Wed May 21 11:01:08 2014
Completed: CREATE TABLESPACE sysaux DATAFILE ''/u01/app/oracle/oradata/test1/sysaux01.dbf'' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE
processing ?/rdbms/admin/dplsql.bsq
processing ?/rdbms/admin/dtxnspc.bsq
CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE ''/u01/app/oracle/oradata/test1/undotbs01.dbf''
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
Wed May 21 11:01:23 2014
Successfully onlined Undo Tablespace 2.
Completed: CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE ''/u01/app/oracle/oradata/test1/undotbs01.dbf''
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE ''/u01/app/oracle/oradata/test1/temp01.dbf''
SIZE 100M REUSE
Completed: CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE ''/u01/app/oracle/oradata/test1/temp01.dbf''
SIZE 100M REUSE
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1
Completed: ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1
ALTER DATABASE DEFAULT TABLESPACE SYSTEM
Completed: ALTER DATABASE DEFAULT TABLESPACE SYSTEM
processing ?/rdbms/admin/dfmap.bsq
processing ?/rdbms/admin/denv.bsq
processing ?/rdbms/admin/drac.bsq
processing ?/rdbms/admin/dsec.bsq
processing ?/rdbms/admin/doptim.bsq
processing ?/rdbms/admin/dobj.bsq
processing ?/rdbms/admin/djava.bsq
processing ?/rdbms/admin/dpart.bsq
Wed May 21 11:01:34 2014
processing ?/rdbms/admin/drep.bsq
processing ?/rdbms/admin/daw.bsq
processing ?/rdbms/admin/dsummgt.bsq
processing ?/rdbms/admin/dtools.bsq
processing ?/rdbms/admin/dexttab.bsq
processing ?/rdbms/admin/ddm.bsq
processing ?/rdbms/admin/dlmnr.bsq
processing ?/rdbms/admin/ddst.bsq
Wed May 21 11:01:43 2014
SMON: enabling tx recovery
Starting background process SMCO
Wed May 21 11:01:44 2014
SMCO started with pid=17, OS id=2816
Wed May 21 11:01:50 2014
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Wed May 21 11:01:50 2014
QMNC started with pid=20, OS id=2826
Completed: CREATE DATABASE test1
USER SYS IDENTIFIED BY ****USER SYSTEM IDENTIFIED BY ****LOGFILE
GROUP 1 (''/u01/app/oracle/oradata/test1/redo01a.log'') SIZE 50M ,
GROUP 2 (''/u01/app/oracle/oradata/test1/redo02a.log'') SIZE 50M
MAXLOGFILES 10
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 200
CHARACTER SET zhs16gbk
DATAFILE ''/u01/app/oracle/oradata/test1/system01.dbf'' SIZE 325M REUSE
SYSAUX DATAFILE ''/u01/app/oracle/oradata/test1/sysaux01.dbf'' SIZE 325M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE ''/u01/app/oracle/oradata/test1/temp01.dbf''
SIZE 100M REUSE
UNDO TABLESPACE undotbs1
DATAFILE ''/u01/app/oracle/oradata/test1/undotbs01.dbf''
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
更多详情见请继续阅读下一页的精彩内容:
10gRAC-10.2.0.4-dbca建库时配置OEM遇到BUG-p8350262
Oracle 11g R2 手动建库(create database manually)
Oracle 11g + ASM DBCA 建库问题解决心得
Linux下Oracle 10g手工建库全过程
Oracle 9i数据库手工建库过程简记
静默安装Oracle 11gR2软件并且手动建库
今天关于oracle sql日期比较和oracle sql 日期比较的讲解已经结束,谢谢您的阅读,如果想了解更多关于For oracle databases, if the top showing the oracle database, then oracle process is using the top c、How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6、NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)、Oracle 10g AND Oracle 11g手工建库案例--Oracle 11g的相关知识,请在本站搜索。
本文标签: