欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

OracleAWR如何實現(xiàn)數(shù)據(jù)導入/導出

這篇文章主要介紹Oracle AWR如何實現(xiàn)數(shù)據(jù)導入/導出,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

我們提供的服務有:成都網(wǎng)站設計、成都網(wǎng)站建設、外貿(mào)網(wǎng)站建設、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認證、昌黎ssl等。為成百上千家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務,是有科學管理、有技術的昌黎網(wǎng)站制作公司

LINUX狀態(tài)下,連接oracle用戶:su - oracle 

1.上傳采集快照.dmp文件至服務器  (dbid:4292035712)  919219826

2.在服務器端創(chuàng)建目錄 (即文件夾awrtest)

$> mkdir /home/oracle/awrtest

3.把第一步中上傳的.dmp文件,移動到第二步中創(chuàng)建的文件夾中:

$> cp /var/ftp/AWR_10107.dmp(如果原文件后綴名是.DMP一定要改成小寫.dmp) /home/oracle/awrtest

4.切換至sqlplus狀態(tài),并且啟動數(shù)據(jù)庫:

$> sqlplus / as sysdba 
SQL>startup;

5. 創(chuàng)建數(shù)據(jù)庫目錄便于數(shù)據(jù)庫查找

SQL> create directory AWRTEST as '/home/oracle/awrtest';

6.加載數(shù)據(jù)文件:

SQL> @?/rdbms/admin/awrload.sql
SQL>Enter value for directory_name: AWRTEST ////注意:輸入directory name 時,字母需要大寫 
Enter value for file_name: AWR_10107 ///注意:此處不要加文件后綴名
Enter value for schema_name: AWR_STAGE //(一般默認就行)
Enter value for default_tablespace: USERS 
Enter value for temporary_tablespace: //(回車默認)

  出現(xiàn)一下文字,就說明導入成功了!

... Creating AWR_STAGE user | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Loading the AWR data from the following | directory/file: | /home/oracle/awr | AWRDAT_9239_9394.dmp | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | *** AWR Load Started ... | | This operation will take a few moments. The | progress of the AWR load operation can be | monitored in the following directory/file: | /home/oracle/awr | AWRDAT_9239_9394.log | ... Dropping AWR_STAGE user End of AWR Load ----------------------------------------------------------------------------------

報錯癥狀:(注意文件夾復權的問題?。?/p>

[root@localhost ~]# cd /home/oracle/ [root@localhost oracle]# ls -lt
total 660 drwxr-xr-x 2 root   root 4096 Aug 6 02:07 awr
drwxr-xr-x 2 root   root 4096 Aug 6 02:04 awrtest2 -rw-r--r-- 1 oracle oinstall 326088 Jul  8 22:13 zhongxing.html -rw-r--r-- 1 oracle oinstall 311525 Jul  1 12:48 HUAYOUSHIJI.html drwxr-xr-x 3 oracle oinstall 4096 Jul 1 11:32 awrtest1
drwxr-xr-x 2 oracle oinstall 4096 Jul 1 01:10 awrtest
drwxr-xr-x 2 oracle oinstall 4096 Jun 30 12:47 jishubu
drwxr-xr-x 3 oracle oinstall 4096 Jun 22 14:58 Desktop [root@localhost oracle]# chmod -R 777 awr [root@localhost oracle]# ls -lt
total 660 drwxrwxrwx 2 root   root 4096 Aug 6 02:07 awr
drwxr-xr-x 2 root   root 4096 Aug 6 02:04 awrtest2 -rw-r--r-- 1 oracle oinstall 326088 Jul  8 22:13 zhongxing.html -rw-r--r-- 1 oracle oinstall 311525 Jul  1 12:48 HUAYOUSHIJI.html drwxr-xr-x 3 oracle oinstall 4096 Jul 1 11:32 awrtest1
drwxr-xr-x 2 oracle oinstall 4096 Jul 1 01:10 awrtest
drwxr-xr-x 2 oracle oinstall 4096 Jun 30 12:47 jishubu
drwxr-xr-x 3 oracle oinstall 4096 Jun 22 14:58 Desktop [root@localhost oracle]#

其他報錯問題 解決參考地址:

http://space.itpub.net/12129601/viewspace-735524 http://www.xifenfei.com/3966.html   惜分飛  http://blog.163.com/jet_it_life/blog/static/205097083201262431444951/directory  創(chuàng)建不正確導致的ORA-39070 http://www.douban.com/note/37656300/oracle impdp/expdp 的權限問題
http://space.itpub.net/519536/viewspace-664406 侯圣文老師

AWR數(shù)據(jù)遷移參考地址:

春風:  http://www.dbdream.org/?p=223
eygle: AWR 與 Statspack 數(shù)據(jù)的導出與遷移  http://www.eygle.com/archives/2010/08/awr_statspack_extract.html

7.執(zhí)行相關腳本:(如邏輯讀腳本、db-time腳本等)

   查看dbid:

SQL> select dbid from v$database; 223805804 SQL> setpagesize 500 # su - oracle 
$  cd awrtest/ #根據(jù)自己的安裝目錄確認
$  ls (查看當前目錄下文件,確認相關文件名)

生成邏輯讀-語句: 

SELECT case when to_number(to_char(c.end_interval_time, 'mi'))<15 or to_number(to_char(c.end_interval_time, 'mi'))>=45             
                then to_char(round(c.end_interval_time, 'hh34'),'yyyy-mm-dd hh34:mi')                                              
else to_char(c.end_interval_time, 'yyyy-mm-dd hh34')||':30'                                                                        
      end end_time,                                                                                                                
      case when max(decode(a.instance_number, 1, a.value - b.value, null))<0 then null                                             
           else max(decode(a.instance_number, 1, a.value - b.value, null))                                                         
      end INST1,                                                                                                                   
      case when max(decode(a.instance_number, 2, a.value - b.value, null))<0 then null                                             
           else max(decode(a.instance_number, 2, a.value - b.value, null))                                                         
      end INST2,                                                                                                                   
      case when max(decode(a.instance_number, 3, a.value - b.value, null))<0 then null                                             
           else max(decode(a.instance_number, 3, a.value - b.value, null))                                                         
      end INST3,                                                                                                                   
      case when max(decode(a.instance_number, 4, a.value - b.value, null))<0 then null                                             
           else max(decode(a.instance_number, 4, a.value - b.value, null))                                                         
      end INST4                                                                                                                    
FROM sys.wrh$_sysstat a, sys.wrh$_sysstat b, sys.wrm$_snapshot c                                                                   
WHERE a.stat_id =3143187968                                                                                                        
  AND b.stat_id = a.stat_id                                                                                                        
  AND a.snap_id = b.snap_id + 1                                                                                                    
  AND a.snap_id = c.snap_id                                                                                                        
  and a.dbid =&dbid                                                                                                                
  and b.dbid = a.dbid                                                                                                              
  and c.dbid = a.dbid                                                                                                              
  and a.instance_number = b.instance_number                                                                                        
  and a.instance_number = c.instance_number                                                                                        
group by a.snap_id, case when to_number(to_char(c.end_interval_time, 'mi'))<15 or to_number(to_char(c.end_interval_time, 'mi'))>=45
                then to_char(round(c.end_interval_time, 'hh34'),'yyyy-mm-dd hh34:mi')                                              
else to_char(c.end_interval_time, 'yyyy-mm-dd hh34')||':30'                                                                        
      end                                                                                                                          
ORDER BY a.snap_id; 

注意:結尾的分號不能少。

生成db-time數(shù)據(jù)語句: 

SELECT TO_CHAR(b.end_interval_time, 'yyyy-mm-dd hh34:mi:ss') snap_time,
  --'DB Time(s)',
  CASE
    WHEN (ROUND((a.VALUE - lag(a.VALUE, 1) OVER(ORDER BY a.snap_id)) / 1000000))<0
    THEN 0
    ELSE ROUND((a.VALUE - lag(a.VALUE, 1) OVER(ORDER BY a.snap_id)) / 1000000)
  END AS "db time(s)"
FROM
  (SELECT snap_id,
    VALUE
  FROM dba_hist_sys_time_model
  WHERE stat_name     = 'DB time'
  and dbid=&db_id
  AND INSTANCE_NUMBER = &instance_id) a,
  dba_hist_snapshot b
WHERE b.dbid=&db_id
AND a.snap_id       = b.snap_id
AND b.INSTANCE_NUMBER = &instance_id
--AND b.end_interval_time > sysdate-30
ORDER BY 1;
 
Enter value for db_id: 4292035712
Enter value for instance_id: 1  ///(單實例輸入1,RAC 的根據(jù)實際情況輸入相應的值)
Enter value for db_id: 4292035712
Enter value for instance_id: 1     

8.導入excel表 ,生成趨勢圖

   excel里邊選擇數(shù)據(jù) -導入-自文本

   選擇導入的數(shù)據(jù)-生成曲線圖-雙擊橫坐標選擇文本格式

9. 觀察趨勢圖高峰值,導出AWR報告,Oracle用戶下執(zhí)行如下命令:

@?/rdbms/admin/awrrpti

導出的AWR報告有兩種類型格式: .txt 和 .html

系統(tǒng)默認導出是.html      一般輸入時間間隔天數(shù):7 

按照步驟,連續(xù)操作就行。

Enter value for dbid: 4292035712 Using 4292035712 for database Id
Enter value for inst_num: 1(輸入實例個數(shù))
Using 1 for instance number

例如:導出時間點為:7月1日 11點 12點 負載高峰時段的AWR數(shù)據(jù)。

注意:在導出報告時,文件起名時要手動添加后綴名.html

    Oracle AWR如何實現(xiàn)數(shù)據(jù)導入/導出

以上是“Oracle AWR如何實現(xiàn)數(shù)據(jù)導入/導出”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關知識,歡迎關注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

本文標題:OracleAWR如何實現(xiàn)數(shù)據(jù)導入/導出
URL鏈接:http://aaarwkj.com/article6/igcoog.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護、網(wǎng)站制作、品牌網(wǎng)站設計搜索引擎優(yōu)化、ChatGPT、服務器托管

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

綿陽服務器托管
国产97成人亚洲综合在线| 亚洲成人精品青青香蕉| 久久99久久精品视频国产| 国产精品深夜在线观看| 美女性生活免费视频网站| 色哟哟网站在线精品视频| 日韩av高清在线免费观看| 国产一区二区欧美日本| 日本师生三片在线观看| 日韩免费中文视频不卡| 精品欧美高清免费视频| 黄色录像黄色片黄色片| 在线免费观看国产不卡| 日韩女同一区二区三区在线观看| 日本免费观看一区久久| 在线 | 一区二区三区四区| 玩弄丰满熟妇班主任老师| 亚洲一区二区视频在线观看免费| 微拍福利一区二区三区| 久久99精品久久久国产| 十八禁在线观看点击进入| 亚洲一品道在线观看| 国产精品黑丝美女91| 日本五十路亲子在线一区| 青草成人在线视频观看| 欧美日韩综合精品无人区| 亚洲欧美一区二区三区三| 国产三级精品在线免费| 白白色最新福利视频二| 上海老熟女啪啪露脸高潮| 天堂中文在线官网在线| 久久麻豆精亚洲av品国产一区| 色综合久久天天射天天干| 久久国产精品亚洲欧美| 亚洲av日韩高清在线观看| 色91精品在线观看剧情| 国产精品一区午夜福利| 国产精品一区二区欧美激情| 午夜男女激情在线观看| 午夜精品三级一区二区三区| 在线观看国产高清自拍|