溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

oracle歷史知識備注

發(fā)布時間:2020-07-14 21:02:10 來源:網(wǎng)絡(luò) 閱讀:669 作者:liapple6 欄目:關(guān)系型數(shù)據(jù)庫

  v_sql_time := lpad(trunc(    ceil((v_beg_time - sysdate) * 24 * 60 * 60)/3600),2,'0')||':'||

                lpad(trunc(mod(ceil((v_beg_time - sysdate) * 24 * 60 * 60),3600)/60),2,'0')||':'||

                lpad(round(mod(ceil((v_beg_time - sysdate) * 24 * 60 * 60),60),2),2,'0')

  sp_etl_run_log(v_proname,v_sql_time,v_step,v_sql_code,v_run_msg,v_row_count,v_beg_time,sysdate,'sp_fin_trans_realtime');


oracle 兩個時間相減默認(rèn)的是天數(shù)

oracle 兩個時間相減默認(rèn)的是天數(shù)*24 為相差的小時數(shù)

oracle 兩個時間相減默認(rèn)的是天數(shù)*24*60 為相差的分鐘數(shù)

oracle 兩個時間相減默認(rèn)的是天數(shù)*24*60*60 為相差的秒數(shù)

--MONTHS_BETWEEN(date2,date1) 
給出date2-date1的月份 
SQL> select months_between('19-12月-1999','19-3月-1999') mon_between from dual; 

MON_BETWEEN 
----------- 
  9 
SQL>select months_between(to_date('2000.05.20','yyyy.mm.dd'),to_date('2005.05.20','yyyy.dd')) mon_betw from dual; 

MON_BETW 
--------- 
-60 

Oracle計算時間差表達(dá)式 

--獲取兩時間的相差豪秒數(shù) 
select ceil((To_date('2008-05-02 00:00:00' , 'yyyy-mm-dd hh34-mi-ss') - To_date('2008-04-30 23:59:59' , 'yyyy-mm-dd hh34-mi-ss')) * 24 * 60 * 60 * 1000) 相差豪秒數(shù) FROM DUAL; 
/* 
相差豪秒數(shù) 
---------- 
  86401000 
1 row selected 
*/ 

--獲取兩時間的相差秒數(shù) 
select ceil((To_date('2008-05-02 00:00:00' , 'yyyy-mm-dd hh34-mi-ss') - To_date('2008-04-30 23:59:59' , 'yyyy-mm-dd hh34-mi-ss')) * 24 * 60 * 60) 相差秒數(shù) FROM DUAL; 
/* 
相差秒數(shù) 
---------- 
     86401 
1 row selected 
*/ 

--獲取兩時間的相差分鐘數(shù) 
select ceil(((To_date('2008-05-02 00:00:00' , 'yyyy-mm-dd hh34-mi-ss') - To_date('2008-04-30 23:59:59' , 'yyyy-mm-dd hh34-mi-ss'))) * 24 * 60)  相差分鐘數(shù) FROM DUAL; 
/* 
相差分鐘數(shù) 
---------- 
      1441 
1 row selected 
*/ 

--獲取兩時間的相差小時數(shù) 
select ceil((To_date('2008-05-02 00:00:00' , 'yyyy-mm-dd hh34-mi-ss') - To_date('2008-04-30 23:59:59' , 'yyyy-mm-dd hh34-mi-ss')) * 24)  相差小時數(shù) FROM DUAL; 
/* 
相差小時數(shù) 
---------- 
        25 
1 row selected 
*/ 

--獲取兩時間的相差天數(shù) 
select ceil((To_date('2008-05-02 00:00:00' , 'yyyy-mm-dd hh34-mi-ss') - To_date('2008-04-30 23:59:59' , 'yyyy-mm-dd hh34-mi-ss')))  相差天數(shù) FROM DUAL; 
/* 
相差天數(shù) 
---------- 
         2 
1 row selected 
*/ 

---------------------------------------- 
注:天數(shù)可以2個日期直接減,這樣更加方便 
---------------------------------------- 

--獲取兩時間月份差 
select (EXTRACT(year FROM to_date('2009-05-01','yyyy-mm-dd')) - EXTRACT(year FROM to_date('2008-04-30','yyyy-mm-dd'))) * 12 + 
       EXTRACT(month FROM to_date('2008-05-01','yyyy-mm-dd')) - EXTRACT(month FROM to_date('2008-04-30','yyyy-mm-dd')) months 
from dual; 
/* 
MONTHS 
---------- 
        13 
1 row selected 
*/ 

-------------------------------------- 
注:可以使用months_between函數(shù),更加方便 
-------------------------------------- 

--獲取兩時間年份差 
select EXTRACT(year FROM to_date('2009-05-01','yyyy-mm-dd')) - EXTRACT(year FROM to_date('2008-04-30','yyyy-mm-dd')) years from dual; 
/* 
YEARS 
---------- 
         1 




select sysdate,add_months(sysdate,12) from dual;  --加1年 
select sysdate,add_months(sysdate,1) from dual;   --加1月 
select sysdate,TO_CHAR(sysdate+7,'yyyy-mm-dd HH24:MI:SS') from dual;  --加1星期 
select sysdate,TO_CHAR(sysdate+1,'yyyy-mm-dd HH24:MI:SS') from dual;  --加1天 
select sysdate,TO_CHAR(sysdate+1/24,'yyyy-mm-dd HH24:MI:SS') from dual;  --加1小時 
select sysdate,TO_CHAR(sysdate+1/24/60,'yyyy-mm-dd HH23:MI:SS') from dual;  --加1分鐘 
select sysdate,TO_CHAR(sysdate+1/24/60/60,'yyyy-mm-dd HH23:MI:SS') from dual;  --加1秒 
select   sysdate+7   from   dual;                     --加7天



select dbms_lob.substr(clob_field),c.*,m.* from ;

spool的設(shè)置

SET echo off;

SET feedback off;

SET pagesize 0;

SET termout off;

SET linesize 10000; 

SET heading off;

SET feedback off;  

spool F:\dir\dd.csv;

select 'TRS_CREATE_TIME,TRANS_ID,PAYMENT_ID,PAY_TYPE,NEW_PAY_CHANNEL,BANK_ID,BANK_NAME,CHANNEL_ID,RSP_CODE,RSP_DESC,BANK_RSP_CODE,BANK_RSP_DESC,PRODUCT_CODE,SUB_TRANS_TYPE,CUSTOMER_ID,MERCHANT_NO,MERCHANT_NAME' from dual;

select xx||','||yy

  from zz

 where qq;

spool off; 

  SET echo off         --在用start命令執(zhí)行一個sql腳本時,是否顯示腳本中正在執(zhí)行的SQL語句;

  SET feedback off     --是否回顯本次sql命令處理的記錄條數(shù),缺省為on;

  SET heading off     --是否顯示列標(biāo)題,缺省為on;

  SET pagesize 50000  --設(shè)置每頁有多少行數(shù),缺省為14。當(dāng)值設(shè)為0時,輸出內(nèi)容為一頁且不顯示列標(biāo)題,為了避免分頁,我們通??稍O(shè)定為0。


SET termout off     --是否在屏幕上顯示輸出的內(nèi)容,或腳本中的命令的執(zhí)行結(jié)果,缺省為on;

  SET trimout on;    --去除標(biāo)準(zhǔn)輸出每行后面多余的空格,缺省為off;

  SET timing off      --顯示每個sql語句花費(fèi)的執(zhí)行時間;

  SET trimspool on   --去除重定向(spool)輸出每行的拖尾空格,缺省為off;


SET NULL text       --顯示時,用text值代替NULL值;

  SET serveroutput off  --是否顯示用DBMS_OUTPUT.PUT_LINE包進(jìn)行輸出的信息;--編寫存儲過程時,大多會將必要的信息輸出;

  SET newpage none  --設(shè)置頁與頁之間的分隔{1|n|NONE};當(dāng)值為0時在每頁開頭有一個小的黑方框;當(dāng)值為n時在頁和頁之間隔著n個空行;當(dāng)為none 時,會在頁和頁之間沒有任何間隔;


SET linesize 1000    --設(shè)置一行可以容納的字符數(shù){80|n};輸出內(nèi)容大于設(shè)置的行可容納的字符數(shù),則折行顯示.據(jù)實(shí)際字符設(shè)置,過大導(dǎo)出速度慢;


SET wrap on       --輸出行長度大于設(shè)置行長度時(用set linesize n命令設(shè)置);值為on時,多余的字符另起一行顯示,否則多余的字符將被切除,不予顯示;

  SET verify off      --是否顯示替代變量被替代前后的語句;

  SET colsep' ';    --域輸出分隔符;

  ------------------------------------------------------------------

  導(dǎo)出文本數(shù)據(jù)的建議格式:

SQL*PLUS環(huán)境設(shè)置--

  SET echo off        --在用start命令執(zhí)行一個sql腳本時,不顯示腳本中正在執(zhí)行的SQL語句

  SET heading off     --不顯示字段的名稱        

  SET pagesize 0     --設(shè)置輸出每頁行數(shù),為了避免分頁,可設(shè)定為0。設(shè)置為0時,輸出內(nèi)容為一頁且不顯示列標(biāo)題具有SET heading off 包含的功能。

  SET newpage none  --頁與頁之間沒有分隔                    

SET trimout on    --去除標(biāo)準(zhǔn)輸出每行后面多余的空格

SET trimspool on    --去除重定向(spool)輸出每行的拖尾空格

SET linesize 1000    --設(shè)置一行可以容納的字符數(shù)

  SET feedback off     --是否回顯本次sql命令處理的記錄條數(shù),缺省為on;

  工作運(yùn)用時導(dǎo)出文本數(shù)據(jù)的常用格式:

  SET echo off 

  SET pagesize 0

  SET feedback off

  SET trimout on 

  SET trimspool on 

  SET linesize 1000

  spool 路徑+文件名

  需要執(zhí)行的SQL代碼

  spool off

  注:linesize 要稍微設(shè)置大些,免得數(shù)據(jù)被截斷,它應(yīng)和相應(yīng)的 trimspool 結(jié)合使用防止導(dǎo)出的文本有太多的尾部空格。但是如果 linesize 設(shè)置太大,會大大降低導(dǎo)出的速度,另外在WINDOWS下導(dǎo)出最好不要用PLSQL導(dǎo)出,速度比較慢,直接用COMMEND下的 SQLPLUS 命令最小化窗口執(zhí)行。

  對于字段內(nèi)包含很多回車換行符的應(yīng)該給與過濾,形成比較規(guī)矩的文本文件。通常情況下,我們使用SPOOL方法,將數(shù)據(jù)庫中的表導(dǎo)出為文本文件的時候會采用兩種方法,如下述:

  方法一:采用以下格式腳本  

   set colsep '|'        --設(shè)置|為列分隔符 

  set trimspool on 

  set linesize 120 

  set pagesize 2000     

  set newpage 1 

  set heading off      

  set term off 

   set num 18         

   set feedback off      

  spool 路徑+文件名 

  select * from tablename; 

  spool off

  方法二:采用以下腳本 

   set trimspool on 

  set linesize 120 

  set pagesize 2000 

  set newpage 1 

  set heading off 

  set term off 

  spool 路徑+文件名 

  select col1||','||col2||','||col3||','||col4||'..' from tablename; 

  spool off

  比較以上方法,即方法一采用設(shè)定分隔符然后由sqlplus自己使用設(shè)定的分隔符對字段進(jìn)行分割,方法二將分隔符拼接在SELECT語句中,即手工控制輸出格式。

  在實(shí)踐中,發(fā)現(xiàn)通過方法一導(dǎo)出來的數(shù)據(jù)具有很大的不確定性,這種方法導(dǎo)出來的數(shù)據(jù)再由sqlldr導(dǎo)入的時候出錯的可能性在95%以上,尤其對大批量的數(shù)據(jù)表,如100萬條記錄的表更是如此,而且導(dǎo)出的數(shù)據(jù)文件狂大。

  而方法二導(dǎo)出的數(shù)據(jù)文件格式很規(guī)整,數(shù)據(jù)文件的大小可能是方法一的1/4左右。經(jīng)這種方法導(dǎo)出來的數(shù)據(jù)文件再由sqlldr導(dǎo)入時,出錯的可能性很小,基本都可以導(dǎo)入成功。

  有網(wǎng)友在linux 服務(wù)器上直接編輯腳本實(shí)現(xiàn):

  將***v_sendsms_task表中的數(shù)據(jù)導(dǎo)出到文本(數(shù)據(jù)庫Oracle 9i 操作系統(tǒng) SUSE LINUX Enterprise Server 9)

  spool_test.sh腳本如下:

#!/bin/sh

DB_USER=zxdbm_ismp                #DB USER

DB_PWD=zxin_smap                 #DB PASSWORD

DB_SERV=zx10_40_43_133              #DB SERVICE NAME

  sqlplus -s $DB_USER/$DB_PWD@$DB_SERV$amp;set trimspool on

set linesize 120

set pagesize 2000

set newpage 1

set heading off

set term off

spool promt.txt

select taskindex||'|'||commonindex||'|'||tasktype||'|'||to_number(to_char(sysdate,'YYYYMMDD')) from ***v_sendsms_task;

spool off

EOF

  執(zhí)行./spool_test.sh后生成sp_test.txt,內(nèi)容如下:

83|115|1|20080307

85|115|11|20080307

86|115|10|20080307

84|115|2|20080307

6|5|14|20080307

7|5|12|20080307

9|5|15|20080307

  注:上面自測例中,spool promt.txt中的目標(biāo)生成文件promt.txt,在HP-UNX環(huán)境下的shell腳本中調(diào)用Oracle的spool函數(shù),如果將上述邏輯代碼封裝為一個function,然后來調(diào)用這個function的話,則在shell腳本中最終是不會生成promt.txt文件的。只能直接執(zhí)行邏輯代碼,封裝后則spool函數(shù)失效。

     對于promt.txt在相對路徑下,下面2中方法在shell環(huán)境中執(zhí)行時,兩者只能擇一,兩者并存則spool函數(shù)會失效。假設(shè)promt.txt文件生成的路徑為:/home/zxin10/zhuo/batchoperate/spoolfile

方式[1]

echo "start spool in shell.."


sqlplus -s zxdbm_ismp/zxin_smap$amp;set pagesize 0

set echo off feed off term off heading off trims off

set colsep '|'

set trimspool on

set linesize 10000

set trimspool on

set linesize 120

set newpage 1

spool /home/zxin10/zhuo/batchoperate/spoolfile/promt.txt

select batchindex||'|'||productid||'|'||contentid||'|'||optype||'|'||uploadfile from zxdbm_700.s700_batch_operation where status=1;

spool off

EOF

echo "end.."

方式[2]

echo "start spool in shell.."

cd /home/zxin10/zhuo/batchoperate/spoolfile

sqlplus -s zxdbm_ismp/zxin_smap$amp;set pagesize 0

set echo off feed off term off heading off trims off

set colsep '|'

set trimspool on

set linesize 10000

set trimspool on

set linesize 120

set newpage 1

spool promt.txt

select batchindex||'|'||productid||'|'||contentid||'|'||optype||'|'||uploadfile from zxdbm_700.s700_batch_operation where status=1;

spool off

EOF

echo "end.."

  因此,實(shí)踐中建議大家使用方法二手工去控制spool文件的格式,這樣可以減小出錯的可能性,避免走很多彎路。

1.查詢系統(tǒng)當(dāng)前SCN兩條命令 

  SQL> select current_scn from v$database; 
  SQL> select dbms_flashback.get_system_change_number from dual;    --1781893 
  2.數(shù)據(jù)庫全局-檢查點(diǎn) SCN,在控制文件中。 
  SYS@bys1> select dbid,checkpoint_change# from v$database; 
  DBID CHECKPOINT_CHANGE# 
  3957527513 1753478 
  3.當(dāng)前數(shù)據(jù)文件SCN.在控制文件中。即checkpoint scn,表示該數(shù)據(jù)文件最近一次執(zhí)行檢查點(diǎn)操作時的SCN 
  SQL> select name,checkpoint_change# from v$datafile; 
  NAME CHECKPOINT_CHANGE# 
  /u01/oradata/bys1/system01.dbf 1753478 
  /u01/oradata/bys1/sysaux01.dbf 1753478 
  SQL> select file#,name,checkpoint_change#,to_char(checkpoint_time,'yyyy-mm-dd hh34:mi:ss') cptime from v$datafile; 
  FILE# NAME CHECKPOINT_CHANGE# CPTIME 
  1 /u01/oradata/bys1/system01.dbf 1753478 2013-09-11 23:00:52 
  2 /u01/oradata/bys1/sysaux01.dbf 1753478 2013-09-11 23:00:52 
  4.查詢數(shù)據(jù)文件頭SCN,在數(shù)據(jù)文件頭 
  SQL> select name,checkpoint_change# from v$datafile_header; 
  NAME CHECKPOINT_CHANGE# 
  /u01/app/oracle/oradata/bys001/system01.dbf 1198546 
  5.數(shù)據(jù)文件結(jié)束SCN,在控制文件中。 
  LAST_CHANGE#,如果數(shù)據(jù)庫非正常關(guān)閉值為NULL.正常關(guān)閉是關(guān)閉時的SCN. 
  實(shí)例恢復(fù)就是在打開數(shù)據(jù)庫時檢查此參數(shù)確定是否需要恢復(fù)。 
  數(shù)據(jù)庫OPEN時LAST_CHANGE#也為NULL,因?yàn)椴淮_定SCN多少時關(guān)閉。 
  SQL> select name,last_change# from v$datafile; 
  NAME LAST_CHANGE# 
  /u01/app/oracle/oradata/bys001/system01.dbf 
  6.日志中所含SCN范圍 
  SQL> select GROUP#,sequence#,STATUS,FIRST_CHANGE#,to_char(FIRST_TIME,'yyyy/mm/dd:hh34:mi:ss') time from V$log; 
  GROUP# SEQUENCE# STATUS FIRST_CHANGE# TIME 
  1 49 INACTIVE 1713778 2013/09/11:10:10:08 
  2 50 INACTIVE 1744790 2013/09/11:21:34:23 
  3 51 CURRENT 1753478 2013/09/11:23:00:52

查詢某個存儲過程的執(zhí)行狀態(tài)?是否在運(yùn)行中?

SELECT  '(' || s.sid || ') - ' || username||' is running '||o.kglnaobj as sessusr,  --'(' || s.sid || ') - ' || username AS "(session) - username", 

        p.KGLPNMOD as proc_state,   --為2時就代表存儲過程在執(zhí)行

        o.kglhdnsp

  FROM V$SESSION s, 

       sys.x$kglob o, 

       sys.x$kglpn p

WHERE upper(o.kglnaobj) LIKE upper('%p_insert_tbl%')

AND p.kglpnhdl = o.kglhdadr

AND s.SADDR = p.kglpnuse

and o.KGLHDNSP=1

and p.KGLPNMOD=2; 

以sys用戶運(yùn)行上面的sql語句,也只能查出當(dāng)前連接上系統(tǒng)

這個也只能查出當(dāng)前的連接進(jìn)Oracle數(shù)據(jù)庫的用戶名!

其實(shí),還是查不出存儲過程p_insert_tbl的狀態(tài)的! 

--查詢存儲過程的各種信息

select *

  from all_source t

 where /*lower(t.text) like '%pay_succs_rate%' and*/ t.name='SP_RPT_MIS_COM_DAY_V3_S3' order by 4;

select *

  from all_dependencies t

 where t.name='SP_RPT_CREDIT_PAY_INFO_SUBDIV';  

select * from V$SQL_BIND_CAPTURE ;

select * from all_procedures;

select * from user_arguments where procedure_name='SP_TRUNCAT'

現(xiàn)需要提取存儲過程信息,因?yàn)閿?shù)據(jù)源為oracle8i,可是8中沒有提供諸如user_procedues這樣的view來提供存儲過程信息,只能在user_arguments這個view中可以找到存儲過程的一些信息,

可是user_arguments不包括所有的存儲過程,例如沒有參數(shù)的存儲過程,而且如果這個存儲過程是在一個包(package)中時,到哪里才能找到這個存儲過程的信息啊!



--【】v$process  該視圖提供的信息,都是oracle服務(wù)進(jìn)程的信息,沒有客戶端程序相關(guān)的信息

服務(wù)進(jìn)程分兩類,一是后臺的,一是dedicate/shared server

pid, serial#  這是oracle分配的PID

spid   這才是操作系統(tǒng)的pid

program 這是服務(wù)進(jìn)程對應(yīng)的操作系統(tǒng)進(jìn)程名

--【】v$session  該視圖主要提供的是一個數(shù)據(jù)庫connect的信息,

<1>主要是client端的信息

machine 在哪臺機(jī)器上

terminal 使用什么終端

osuser 操作系統(tǒng)用戶是誰

program 通過什么客戶端程序,比如TOAD

process 操作系統(tǒng)分配給TOAD的進(jìn)程號

logon_time 在什么時間

username 以什么oracle的帳號登錄

command 執(zhí)行了什么類型的SQL命令

sql_hash_value SQL語句信息

<2>有一些是server端的信息:

paddr 即v$process中的server進(jìn)程的addr

server 服務(wù)器是dedicate/shared


還有其它一些信息,可以理解為是client/server共享的信息,主要是針對這個session而言的

create or replace function func_get_json_extract(pcharjson varchar2,            --json字段值

                                                 pcharsub  varchar2,             --要取的map對    

                                                 pnum      number   default 1,   --第幾次出現(xiàn)                                             

                                                 psepchar  varchar2 default '"', --value引號

                                                 psepfield varchar2 default ':'  --key分隔符 

                                                 )

  return varchar2 IS 

  v_charjson varchar2(4000) := pcharjson;

  v_charsub  varchar2(4000) := psepchar||pcharsub||psepchar||psepfield||psepchar;                              

  v_subval  varchar2(4000);

begin

  select substr(v_charjson,

                i.poscod+i.len,

                posend-(poscod+len))  into v_subval   

    from (select instr(v_charjson,v_charsub,1,pnum) as poscod,

                 length(v_charsub) as len,

                 instr(v_charjson,v_charsub,1,pnum)+length(v_charsub) as posbeg,

                 instr(v_charjson,'"',instr(v_charjson,v_charsub,1,pnum)+length(v_charsub),1) as posend,

                 v_charjson              

            from dual t) i;

  return v_subval;   

  EXCEPTION 

   WHEN others THEN  

      DBMS_OUTPUT.PUT_LINE('請檢查參數(shù)重試!');     

end;

alter session set nls_date_language='american' ;  修改該命令,讓字符串格式,能順利導(dǎo)入到 日期格式中

select to_char(sysdate,'yyyy"年"mm"月"dd"日"'from dual;

select to_char(sysdate,'month','nls_date_language=American'from dual;

安全-權(quán)限-Oracle自帶用戶

①Sysdba和dba的區(qū)別

新建時給的是系統(tǒng)權(quán)限sysdba,

后面使用到該用戶的時候不能以normal狀態(tài)登錄plsql,

因?yàn)闆]有給用戶賦予創(chuàng)建session的權(quán)限。只要用sys登錄

grant connect,resource to xwm 給用戶賦權(quán)就行了

dba是Oracle里的一種對象,Role 和User一樣,是實(shí)實(shí)在在存在在Oracle里的物理對象,而sysdba是指的一種概念上的操作對象,在Oracle數(shù)據(jù)里并不存在。

所以說這兩個概念是完全不同的。

dba是一種role對應(yīng)的是對Oracle實(shí)例里對象的操作權(quán)限的集合,而sysdba是概念上的role是一種登錄認(rèn)證時的身份標(biāo)識而已。 

SYSDBA不是權(quán)限,當(dāng)用戶以SYSDBA身份登陸數(shù)據(jù)庫時,登陸用戶都會變成SYS。

sysdba身份登陸可以打開,關(guān)閉數(shù)據(jù)庫,創(chuàng)建SPFILE,對數(shù)據(jù)庫進(jìn)行恢復(fù)操作等,而這些是DBA角色無法實(shí)現(xiàn)的。

Oracle自帶用戶

以下這些賬戶有的為了管理目的、有些為了數(shù)據(jù)庫額外的功能、有些為了示例而存在。如果你啟用了一些比較偏的功能還會自動新增一些用戶,比如標(biāo)簽安全性、數(shù)據(jù)庫保險箱啊等等。

這些賬戶每個你Google一番都能講一個故事。。。

賬戶和訪問表沒有直接的關(guān)系,權(quán)限才是,拿SELECT ANY TABLE(查看任何表)為例,看看誰能查看任何表:

SQL> select grantee from dba_sys_privswhere privilege='SELECT ANY TABLE';

oracle中的帳戶分為兩類:

一類是必需的帳戶

一類是存儲各種應(yīng)用的帳戶

【】SYS   安裝時用戶指定/CHANGE_ON_INSTALL

描述:數(shù)據(jù)庫管理帳戶/執(zhí)行數(shù)據(jù)庫的管理任務(wù),實(shí)例的數(shù)據(jù)字典都在SYS/超級用戶,老大

Recreation Script$ORACLE_HOME/rdbms/admin/sql.bsq.Recover from backup or recreate the database.

Safe To RemoveNo

PurposeAnaccount used to perform. database administration tasks. Password is created atinstallation or database creation time.

【】SYSMAN    OEM_TEMP/manager

描述:企業(yè)管理器帳戶

Recreation ScriptCreatedas part of the dbconsole or Enterprise Manager build.

Safe To RemoveYes

PurposeTheaccount used to perform. Oracle Enterprise Manager database administrationtasks. The SYS and SYSTEM accounts can also perform. these tasks. Password iscreated at installation or database creation time.

【】SYSTEM    安裝時用戶指定      

描述:數(shù)據(jù)庫管理帳戶/用于執(zhí)行數(shù)據(jù)庫管理任務(wù),有少量的實(shí)例對象/權(quán)限也非常高,但是不具備以下權(quán)限:ALTER DATABASE LINK/  ALTERPUBLIC DATABASE LINK/  EXEMPT ACCESSPOLICY/  EXEMPT IDENTITY POLICY/  SYSDBA/ SYSOPER。其中SYSDBASYSOPER還能啟動關(guān)閉數(shù)據(jù)庫實(shí)例,所以SYSTEM當(dāng)然不能啟動關(guān)閉數(shù)據(jù)庫實(shí)例了。    

Recreation Script$ORACLE_HOME/rdbms/admin/sql.bsq.Recover from backup or recreate the database. 

Safe To RemoveNo      

PurposeA defaultgeneric database administrator account for Oracle databases. For productionsystems, Oracle recommends creating individual database administrator accountsand not using the generic SYSTEM account for database administrationoperations. Password is created at installation or database creation time.

【】ANONYMOUS  ANONYMOUS       

描述:訪問http的匿名用戶帳戶/用于訪問ORACLE XML DB知識庫的帳戶。     

Recreation Script$ORACLE_HOME/rdbms/admin/catqm.sql    

Safe To RemoveYes     

PurposeAccountthat allows HTTP access to Oracle XML DB. It is used in place of theAPEX_PUBLIC_USER account when the Embedded PL/SQL Gateway (EPG) is installed inthe database. EPG is a Web server that can be used with Oracle Database. Itprovides the necessary infrastructure to create dynamic applications. See alsoXDB.

【】CTXSYS    CTXSYS      

描述:interMedia Text用戶,是MEDIATEXT的用戶,有CONNECT\RESOURCE\DBA權(quán)限 

Recreation Script$ORACLE_HOME/ctx/admin/ctxsys.sql 

Safe To RemoveYes     

PurposeTheaccount used to administer Oracle Text. Oracle Text enables the building oftext query applications and document classification applications. It providesindexing, word and theme searching, and viewing capabilities for text.

【】DBSNMP    DBSNMP   

描述:目錄集成平臺用戶/具有NNECT\RESOUCEHE\SNMPAGENT 權(quán)限的角色,可用CATNSMP.SQL腳本刪除此用戶和角色        

Recreation Script$ORACLE_HOME/rdbms/admin/catsnmp.sql         

Safe To RemoveYes run $ORACLE_HOME/rdbms/admin/catnsnmp.sql     

PurposeTheaccount used by the Management Agent component of Oracle Enterprise Manager tomonitor and manage the database. Password is created at installation ordatabase creation time.

【】DIP    DIP  

描述:目錄集成平臺的帳戶(DIRECTORY INTEGERATION PLATFORM)   

Recreation Script$ORACLE_HOME/rdbms/admin/catdip.sql    

Safe To RemoveYes     

PurposeTheaccount used by the Directory Integration Platform. (DIP) to synchronize thechanges in Oracle Internet Directory with the applications in the database.

【】EXFSYS    EXFSYS       

描述:表達(dá)式過濾器帳戶(EXPRESSIO FILTER) 

Recreation Script$ORACLE_HOME/rdbms/admin/exfsys.sql    

Safe To RemoveYes     

PurposeTheaccount used internally to access the EXFSYS schema, which is associated withthe Rules Manager and Expression Filter feature. This feature enables thebuilding of complex PL/SQL rules and expressions. The EXFSYS schema containsthe Rules Manager and Expression Filter DDL, DML, and associated metadata.

【】MDDATA    MDDATA   

描述:oracle空間數(shù)據(jù)帳戶

Recreation Script$ORACLE_HOME/md/admin/catmd.sql

Safe To RemoveYes     

PurposeTheschema used by Oracle Spatial for storing Geocoder and router data. See alsoSPATIAL_CSW_ADMIN_USR , SPATIAL_WFS_ADMIN_USR and MDSYS.

【】MDSYS     MDSYS       

描述:oracle空間數(shù)據(jù)媒體管理員/空間數(shù)據(jù)(SPATIAL)\媒介(INTERMEDIA)\音頻(AUDIO)\視頻(VIDEO)和圖像管理員帳戶        

Recreation Script$ORACLE_HOME/ord/admin/ordinst.sql        

Safe To RemoveYes     

PurposeTheOracle Spatial and Oracle Multimedia Locator administrator account. See alsoSPATIAL_CSW_ADMIN_USR , MDDATA and SPATIAL_WFS_ADMIN_USR.

【】MGMT_VIEW  MGMT_VIEW       

描述:不擁有任何對象,僅用于查詢 SYSMAN 用戶對象。安裝OMS時自動創(chuàng)建的。     

Recreation Script$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager

Safe To RemoveYes     

PurposeAnaccount used by Oracle Enterprise Manager Database Control. Password israndomly generated at installation or database creation time. Users do not needto know this password.

【】OLAPSYS    MANGER         

描述:用于創(chuàng)建olap元數(shù)據(jù)/用于創(chuàng)建OLAP元數(shù)據(jù)的用戶。包括OLAP_DBA\RESOURCE\CONNECT角色        

Recreation Script$ORACLE_HOME/olap/admin/amdsys.sql     

Safe To RemoveYes     

PurposeTheaccount that owns the OLAP Catalog (CWMLite). This account has been deprecated,but is retained for backward compatibility.

【】ORDPLUGINS   ORDPLUGINS     

描述:ORACLE INTERMEDIAVIDEO的用戶名,有CONNECTRESURCE角色,與第三方連接    

Recreation Script$ORACLE_HOME/ord/admin/ordinst.sql        

Safe To RemoveYes     

PurposeTheOracle Multimedia user. Plug-ins supplied by Oracle and third-party, formatplug-ins are installed in this schema. Oracle Multimedia enables OracleDatabase to store, manage, and retrieve images, audio, video, DICOM formatmedical images and other objects, or other heterogeneous media data integratedwith other enterprise information. See also ORDSYS and SI_INFORMTN_SCHEMA.

【】ORDSYS   ORDSYS       

描述:image管理員/ORACLE INTERMEDIAVIDEO的用戶名,有CONNECTRESOURCE角色    

Recreation Script$ORACLE_HOME/ord/admin/ordinst.sql        

Safe To RemoveYes     

PurposeTheOracle Multimedia administrator account. See also ORDPLUGINS and SI_INFORMTN_SCHEMA.

【】OUTLN    OUTLN

描述:擁有connectresource角色 

Recreation Script$ORACLE_HOME/rdbms/admin/sql.bsq.Recover from backup or recreate the database. 

Safe To RemoveNo      

PurposeTheaccount that supports plan stability. Plan stability prevents certain databaseenvironment changes from affecting the performance characteristics ofapplications by preserving execution plans in stored outlines. OUTLN acts as arole to centrally manage metadata associated with stored outlines.

【】SCOTT    Tiger   

描述:簡單的樣例帳戶        

Recreation Script$ORACLE_HOME/rdbms/admin/utlsampl.sql         

Safe To RemoveYes     

PurposeAnaccount used by Oracle sample programs and examples.

【】HR   hr 

描述:簡單的樣例帳戶        

Recreation Script$ORACLE_HOME/demo/schema/human_resources/hr_main.sql

Safe To RemoveYes run $ORACLE_HOME/demo/schema/drop_sch.sql    

PurposeTheaccount that owns the Human Resources schema included in the Oracle SampleSchemas. See also BI, OE, SH, IX and PM.

【】SI_INFORMTN_SCHEMA    oracleineterMedia,video用戶     

描述:靜止圖像標(biāo)準(zhǔn)瀏覽帳戶    

Recreation Script$ORACLE_HOME/ord/admin/ordinst.sql        

Safe To RemoveYes     

PurposeTheaccount that stores the information views for the SQL/MM Still Image Standard.See also ORDPLUGINS and ORDSYS.

【】WK_TEST    WK_TEST         

描述:wksys/管理ORACLE 10g ULTRASEARCH的帳戶,和WKSYS有一樣的作用     

Recreation Script$ORACLE_HOME/ultrasearch/admin/wk0csys.sql

Safe To RemoveYes     

PurposeTheinstance administrator for the default instance, WK_INST. After unlocking thisaccount and assigning this user a password, then the cached schema passwordmust also be updated using the administration tool Edit Instance Page. UltraSearch provides uniform. search-and-location capabilities over multiplerepositories, such as Oracle databases, other ODBC compliant databases, IMAPmail servers, HTML documents managed by a Web server, files on disk, and more.See also WKSYS

【】WKPROXY        

描述:ORACLE 10g與代理服務(wù)器有關(guān)的帳戶   

Recreation Script$ORACLE_HOME/ultrasearch/admin/wk0csys.sql

Safe To RemoveYes     

PurposeAnadministrative account of Application Server Ultra Search.

【】WKSYS     WKSYS       

描述:wk_test/管理ORACLE 10g AS ULTRASEARCH帳戶,與WK_TEST有一樣的作用    

Recreation Script$ORACLE_HOME/ultrasearch/admin/wk0csys.sql

Safe To RemoveYes     

PurposeAnUltra Search database super-user. WKSYS can grant super-user privileges toother users, such as WK_TEST. All Oracle Ultra Search database objects areinstalled in the WKSYS schema. See also WK_TEST

【】WMSYS    WMSYS        

描述:工作空間管理帳戶/工作實(shí)景管理的帳戶       

Recreation Script$ORACLE_HOME/rdbms/admin/owmctab.plb       

Safe To RemoveYes     

PurposeTheaccount used to store the metadata information for Oracle Workspace Manager.

【】XDB    CHANGE_ON_INSTALL    

描述:ORACLE 10G XML DB帳戶

Recreation Script$ORACLE_HOME/rdbms/admin/catqm.sql    

Safe To RemoveYes     

PurposeTheaccount used for storing Oracle XML DB data and metadata. See also ANONYMOUS.

【】ORACLE_OCM

描述:Oracle預(yù)定義的非管理員用戶

Recreation Script$ORACLE_HOME/rdbms/admin/catocm.sql  

Safe To RemoveYes     

PurposeThisaccount contains the instrumentation for configuration collection used by theOracle Configuration Manager.

【】BI

描述:    

Recreation Script$ORACLE_HOME/demo/schema/bus_intelligence/bi_main.sql    

Safe To RemoveYes-run$ORACLE_HOME/demo/schema/drop_sch.sql   

PurposeTheaccount that owns the Business Intelligence schema included in the OracleSample Schemas. See also HR, OE, SH, IX and PM.

【】OE

描述:    

Recreation Script$ORACLE_HOME/demo/schema/order_entry/oe_main.sql

Safe To RemoveYes run $ORACLE_HOME/demo/schema/drop_sch.sql    

PurposeTheaccount that owns the Order Entry schema included in the Oracle Sample Schemas.See also BI, HR, SH, IX and PM.

【】IX

描述:    

Recreation Script$ORACLE_HOME/demo/schema/info_exchange/ix_main.sql        

Safe To RemoveYes run $ORACLE_HOME/demo/schema/drop_sch.sql    

PurposeTheaccount that owns the Information Transport schema included in the OracleSample Schemas. See also BI, HR, OE, SH and PM.

【】PM

描述:    

Recreation Script$ORACLE_HOME/demo/schema/product_media/pm_main.sql   

Safe To RemoveYes run $ORACLE_HOME/demo/schema/drop_sch.sql    

PurposeTheaccount that owns the Product Media schema included in the Oracle SampleSchemas. See also BI, HR, OE, SH and IX.

【】SH

描述:    

Recreation Script$ORACLE_HOME/demo/schema/sales_history/sh_main.sql         

Safe To RemoveYes run $ORACLE_HOME/demo/schema/drop_sch.sql    

PurposeTheaccount that owns the Sales History schema included in the Oracle SampleSchemas and is only available for Enterprise Edition installations. See alsoBI, HR, OE, IX and PM.

【】APEX_030200

描述:    

Recreation Script$ORACLE_HOME/apex/apexins.sql        

Safe To RemoveYes     

PurposePartof the Oracle Application Express Suite - (Oracle APEX, previously named OracleHTML DB) which is a freeware software development environment. It allows a fastdevelopment cycle to be achieved to create web based applications. The accountowns the Application Express schema and metadata. See also APEX_PUBLIC_USER andFLOW_FILES.

【】APEX_PUBLIC_USER

描述:    

Recreation Script$ORACLE_HOME/apex/apexins.sql        

Safe To RemoveYes     

PurposePartof the Oracle Application Express Suite - (Oracle APEX, previously named OracleHTML DB) which is a freeware software development environment. It allows a fastdevelopment cycle to be achieved to create web based applications. Thisminimally privileged account is used for Application Express configuration withOracle HTTP Server and mod_plsql. See also APEX_030200 and FLOW_FILES.

【】APPQOSSYS  

描述:    

Recreation Script$ORACLE_ADMIN/rdbms/admin/catqos.sql 

Safe To RemoveYes     

PurposeUsedfor storing/managing all data and metadata required by Oracle Quality ofService Management.

【】FLOWS_FILES

描述:    

Recreation Script$ORACLE_HOME/apex/apexins.sql        

Safe To RemoveYes     

PurposePartof the Oracle Application Express Suite - (Oracle APEX, previously named OracleHTML DB) which is a freeware software development environment. It allows a fastdevelopment cycle to be achieved to create web based applications. This accountowns the Application Express uploaded files. See also APEX_030200 andAPEX_PUBLIC_USER.

【】OWBSYS

描述:    

Recreation Script$ORACLE_HOME/owb/UnifiedRepos/cat_owb.sql         

Safe To RemoveYes     

PurposeTheaccount for administrating the Oracle Warehouse Builder repository. Access thisaccount during the installation process to define the base language of therepository and to define Warehouse Builder workspaces and users. A datawarehouse is a relational or multidimensional database that is designed forquery and analysis. See also OWBSYS_AUDIT.

【】OWBSYS_AUDIT

描述:    

Recreation Script$ORACLE_HOME/owb/UnifiedRepos/cat_owb.sql         

Safe To RemoveYes     

PurposeThisaccount is used by the Warehouse Builder Control Center Agent to access the heterogeneousexecution audit tables in the OWBSYS schema.

【】SPATIAL_CSW_ADMIN_USR

描述:    

Recreation Script$ORACLE_HOME/md/admin/sdocswpv.sql    

Safe To RemoveYes     

PurposeTheCatalog Services for the Web (CSW) account. It is used by the Oracle SpatialCSW cache manager to load all record type metadata, and record instances fromthe database into the main memory for the record types that are cached. Seealso SPATIAL_WFS_ADMIN_USR, MDDATA and MDSYS.

【】SPATIAL_WFS_ADMIN_USR

描述:    

Recreation Script$ORACLE_HOME/md/admin/sdowfspv.sql    

Safe To RemoveYes     

PurposeTheWeb Feature Service (WFS) account. It is used by the Oracle Spatial WFS cachemanager to load all feature type metadata, and feature instances from thedatabase into main memory for the feature types that are cached. See alsoSPATIAL_CSW_ADMIN_USR , MDDATA and MDSYS.

【】XS$NULL

描述:    

Recreation Script$ORACLE_HOME/rdbms/admin/sql.bsq.Recover from backup or recreate the database. 

Safe To RemoveNo      

PurposeAninternal account that represents the absence of a user in a session. BecauseXS$NULL is not a user, this account can only be accessed by the Oracle Databaseinstance. XS$NULL has no privileges and no one can authenticate as XS$NULL, norcan authentication credentials ever be assigned to XS$NULL.

【】LBACSYS

描述:    

Recreation Script$ORACLE_HOME/rdbms/admin/catlbacs.sql

Safe To RemoveYes     

PurposeTheaccount used to administer Oracle Label Security (OLS). It is created only whenthe Label Security custom option is installed.

【】ORDDATA

描述:    

Recreation Script$ORACLE_HOME/ord/admin/ordisysc.sql      

Safe To RemoveYes     

PurposeThisaccount contains the Oracle Multimedia DICOM data model.

【】TSMSYS

描述:Oracle?10g的所有目錄上的特點(diǎn)及與此相關(guān)的觀點(diǎn)/表的新特征是儲存在TSMSYS用戶下     

Recreation Script         

Safe To Remove  

Purpose

【】DMSYS

描述:Oracle數(shù)據(jù)挖掘賬號

Recreation Script         

Safe To Remove  

Purpose




向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI