亚洲欧美精品沙发,日韩在线精品视频,亚洲Av每日更新在线观看,亚洲国产另类一区在线5

<pre id="hdphd"></pre>

  • <div id="hdphd"><small id="hdphd"></small></div>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 網(wǎng)絡(luò)知識(shí) > 網(wǎng)絡(luò)技術(shù) >

      Linux通過(guò)ps命令查看Oracle相關(guān)進(jìn)程的方法是什么

      時(shí)間: 加城1195 分享

        Oracle數(shù)據(jù)庫(kù)系統(tǒng)是目前世界上流行的關(guān)系數(shù)據(jù)庫(kù)管理系統(tǒng),系統(tǒng)可移植性好、使用方便、功能強(qiáng),適用于各類(lèi)大、中、小、微機(jī)環(huán)境,與Oracle相關(guān)的進(jìn)程也非常多,我們平時(shí)就可以通過(guò)ps命令來(lái)查看這些相關(guān)的進(jìn)程。

        Linux通過(guò)ps命令查看Oracle相關(guān)進(jìn)程的方法

        具體方法如下:

        Oracle Listener

        這個(gè)命令會(huì)列出Oracle Net Listener的進(jìn)程

        [oracle@ www.linuxidc.com ~]$ ps -ef | grep tnslsnr

        oracle 1999 29986 0 09:47 pts/2 00:00:00 grep tnslsnr

        oracle 3647 1 0 Jul03 ? 00:00:34 /u01/oracle/mc3yd213/db/tech_st/11.1.0/bin/tnslsnr mc3yd213 -inherit

        oracle 6431 1 0 Jul03 ? 00:00:00 /u01/oracle/mc3yd213/apps/tech_st/10.1.2/bin/tnslsnr APPS_mc3yd213 -inherit

        oracle 13616 1 0 May27 ? 00:00:40 /u01/oracle/mc3yd213/apps/tech_st/10.1.2/bin/tnslsnr LISTENER -inherit

        [oracle@ www.linuxidc.com ~]$

        Oracle Background Process

        [oracle@ www.linuxidc.com ~]$ ps -ef | grep -i "ora_"

        oracle 1887 1 0 09:42 ? 00:00:00 ora_w000_mc3yd213

        oracle 2159 1 0 09:54 ? 00:00:00 ora_j000_mc3yd213

        oracle 2167 29986 0 09:55 pts/2 00:00:00 grep -i ora_

        oracle 3516 1 0 Jul03 ? 00:02:00 ora_pmon_mc3yd213

        oracle 3518 1 0 Jul03 ? 00:02:08 ora_vktm_mc3yd213

        oracle 3522 1 0 Jul03 ? 00:00:27 ora_diag_mc3yd213

        oracle 3524 1 0 Jul03 ? 00:00:18 ora_dbrm_mc3yd213

        oracle 3526 1 0 Jul03 ? 00:00:35 ora_psp0_mc3yd213

        oracle 3528 1 0 Jul03 ? 00:05:59 ora_dia0_mc3yd213

        oracle 3530 1 0 Jul03 ? 00:00:19 ora_mman_mc3yd213

        oracle 3532 1 0 Jul03 ? 00:01:06 ora_dbw0_mc3yd213

        oracle 3534 1 0 Jul03 ? 00:02:53 ora_lgwr_mc3yd213

        oracle 3536 1 0 Jul03 ? 00:02:08 ora_ckpt_mc3yd213

        oracle 3538 1 0 Jul03 ? 00:01:36 ora_smon_mc3yd213

        oracle 3540 1 0 Jul03 ? 00:00:06 ora_reco_mc3yd213

        oracle 3542 1 0 Jul03 ? 00:02:01 ora_mmon_mc3yd213

        oracle 3544 1 0 Jul03 ? 00:03:20 ora_mmnl_mc3yd213

        oracle 3564 1 0 Jul03 ? 00:00:09 ora_fbda_mc3yd213

        oracle 3569 1 0 Jul03 ? 00:00:16 ora_qmnc_mc3yd213

        oracle 3584 1 0 Jul03 ? 00:00:36 ora_q000_mc3yd213

        oracle 3586 1 0 Jul03 ? 00:00:15 ora_q001_mc3yd213

        oracle 3690 1 0 Jul03 ? 00:02:30 ora_cjq0_mc3yd213

        oracle 3707 1 0 Jul03 ? 00:00:28 ora_smco_mc3yd213

        oracle 7676 1 0 Jul03 ? 00:42:49 ora_m000_mc3yd213

        eg.ora_pmon_mc3yd213 is PMON process,PMON (Process MONitor) is an Oracle background process created when you start a database instance. The PMON process will free up resources if a user process fails (eg. release database locks).

        這些后臺(tái)進(jìn)程,從數(shù)據(jù)庫(kù)里也是能查到的,可以使用下邊這個(gè)SQL來(lái)查后臺(tái)進(jìn)程,在program列中,你就能看到SMON,MMON,CKPT,PMON,MMAN,MMNL...后臺(tái)進(jìn)程

        select * FROM v$session WHERE type ='BACKGROUND';

        Oracle Management Agent

        ps -ef | grep emagent

        oracle 2097 29986 0 09:51 pts/2 00:00:00 grep emagent

        oraem 3130 1 0 May24 ? 00:08:57 /opt/oracle/oraem/agent10g/perl/bin/perl /opt/oracle/oraem/agent10g/bin/emwd.pl agent /opt/oracle/oraem/agent10g/sysman/log/emagent.nohup

        oraem 3150 3130 0 May24 ? 00:25:56 /opt/oracle/oraem/agent10g/bin/emagent

        補(bǔ)充:MySQL 數(shù)據(jù)庫(kù)常用命令

        create database name; 創(chuàng)建數(shù)據(jù)庫(kù)

        use databasename; 進(jìn)入數(shù)據(jù)庫(kù)

        drop database name 直接刪除數(shù)據(jù)庫(kù),不提醒

        show tables; 顯示表

        describe tablename; 查看表的結(jié)構(gòu)

        select 中加上distinct去除重復(fù)字段

        mysqladmin drop databasename 刪除數(shù)據(jù)庫(kù)前,有提示。

        顯示當(dāng)前mysql版本和當(dāng)前日期

        select version(),current_date;

        數(shù)據(jù)庫(kù)維護(hù)方法

        在MySQL使用的過(guò)程中,在系統(tǒng)運(yùn)行一段時(shí)間后,可能會(huì)產(chǎn)生碎片,造成空間的浪費(fèi),所以有必要定期的對(duì)MySQL進(jìn)行碎片整理。

        當(dāng)刪除id=2的記錄時(shí)候,發(fā)生的現(xiàn)象

        這個(gè)時(shí)候發(fā)現(xiàn)磁盤(pán)的空間并沒(méi)有減少。這種現(xiàn)象就叫做碎片化(有一部分的磁盤(pán)空間在數(shù)據(jù)刪除以后(空),還是無(wú)法被操作系統(tǒng)所使用。)

        常見(jiàn)的優(yōu)化:

        # alter table xxx engine myisam;

        # optimize table t1;

        注意: 在實(shí)際開(kāi)發(fā)的過(guò)程中,上面兩個(gè)語(yǔ)句盡量少使用,因?yàn)樵谑褂玫倪^(guò)程中,MySQL的表的結(jié)構(gòu)會(huì)整體全部重新整理,需要消耗很多的資源,建議在凌晨?jī)扇c(diǎn)鐘的時(shí)候執(zhí)行。(在linux下有定時(shí)器腳本可以執(zhí)行,crontab)


      oracle數(shù)據(jù)庫(kù)相關(guān)文章:

      1.oracle數(shù)據(jù)庫(kù)基礎(chǔ)使用方法

      2.如何將excel導(dǎo)入oracle數(shù)據(jù)庫(kù)的教程

      3.Oracle SQLDeveloper連接數(shù)據(jù)庫(kù)并創(chuàng)建用戶(hù)

      4.Oracle數(shù)據(jù)庫(kù)表空間擴(kuò)展教程

      5.excel表格導(dǎo)入sql數(shù)據(jù)庫(kù)的教程

      4015050