TECH
QUESTION
자주하는 질문답변 입니다.
Oracle
작성자 | 유건데이타 | 등록일 | 2015-05-16 |
제목 | ORACLE WEB SERVER에서 DB 서버와 WEB SERVER 사이의 관계 | ||
---|---|---|---|
오라클 웹서버에서 실행되는 wrb process와 DB process사이의 관계를 아래와
같이 SQL*Plus의 테스트한 경우과 비교해서 웹서버에서도 DB process사이의 관계를 테스트 해보았습니다. 잘못된 부분이 있으면 좀 알려주시고, 참고하시기 바랍니다. 테스트는 SQL*Plus와 Web, DB는 Dedicated와 MTS 그리고, SQL*Net을 사용하는 경우와 하지 않는 경우의 조합으로 테스트 하였습니다. 1. 테스트 경우의 수 1) SQL*Plus 에서 DB 접속 2) Web Server에서 DB 접속 3) Dedicated Server와 접속 4) MTS Server와 접속 5) SQL*Net V2 사용하지 않는 경우 (Local 에서 직접 연결) 6) SQL*Net V2 사용하는 경우 (Local, Remote 둘다) 2. 각 조합된 테스트 경우 (1) Dedicated Server 일 경우 1) SQL*Plus 1-1) Dedicated Server + local SQL*Plus (Direct) 1-2) Dedicated Server + local SQL*Plus (Listener 실행중) 1-3) Dedicated Server + local SQL*Plus (SQL*Net 통해서) @host 1-4) Dedicated Server + remote SQL*Plus (SQL*Net 통해서) 2) Web Server 2-1) Dedicated Server + OWS21 (Direct) 2-2) Dedicated Server + OWS21 (Listener 실행중) 2-3) Dedicated Server + OWS21 (SQL*Net 통해서) SQL*Net DCD 설정 (2) MTS Server 일 경우 3) SQL*Plus 3-1) MTS Server + local SQL*Plus (Direct) 3-2) MTS Server + local SQL*Plus (Listener 실행중) 3-3) MTS Server + local SQL*Plus (SQL*Net 통해서) @host 3-4) MTS Server + remote SQL*Plus (SQL*Net 통해서) 4) Web Server 4-1) MTS Server + OWS21 (Direct) 4-2) MTS Server + OWS21 (Listener 실행중) 4-3) MTS Server + OWS21 (SQL*Net 통해서) SQL*Net DCD 설정 3. 테스트의 결과 (1) Dedicated Server일 경우 owas 18411 1 0 10:29:47 ? 0:00 ora_pmon_OWAS owas 18413 1 0 10:29:47 ? 0:00 ora_dbwr_OWAS owas 18415 1 0 10:29:47 ? 0:00 ora_lgwr_OWAS owas 18417 1 0 10:29:47 ? 0:00 ora_smon_OWAS owas 18419 1 0 10:29:47 ? 0:00 ora_reco_OWAS 1) SQL*Plus 1-1) Dedicated Server + local SQL*Plus (Direct) - Listener는 실행 안된상태에서 - owas 23036 27609 1 15:13:04 pts/29 0:00 sqlplus bench/bench - owas 23037 23036 1 15:13:04 ? 0:00 oracleOWAS (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 1-2) Dedicated Server + local SQL*Plus (Listener 실행중) - Listener는 실행되었지만 SQL*Net V2를 사용하지 않는 경우 - owas 18323 1 0 10:29:26 ? 0:00 /bada/WAS/app/oracle/ product /7.3.3/bin/tnslsnr LISTENER -inherit - owas 12741 27609 1 14:25:56 pts/29 0:00 sqlplus bench/bench - owas 12742 12741 1 14:25:56 ? 0:00 oracleOWAS (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 1-3) Dedicated Server + local SQL*Plus (SQL*Net 통해서) @host - owas 18323 1 0 10:29:26 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit - owas 22436 27609 1 15:10:13 pts/29 0:00 sqlplus scott/tiger@ krtool - owas 22438 1 1 15:10:13 ? 0:00 oracleOWAS (LOCAL=NO) 1-4) Dedicated Server + remote SQL*Plus (SQL*Net 통해서) - owas 8751 1 0 14:16:44 ? 0:01 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit owas 13753 1 0 14:30:40 ? 0:00 oracleOWAS (LOCAL=NO) 2) Web Server 2-1) Dedicated Server + OWS21 (Direct) - owas 11501 1 0 10:03:20 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - root 11502 11501 0 10:03:20 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - owas 11794 11501 1 10:04:03 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/wrb21 13 4 /bada/WAS/app/oracle/product/ - owas 11805 11794 1 10:04:04 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 11809 11794 1 10:04:04 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 2-2) Dedicated Server + OWS21 (Listener 실행중) - owas 22450 1 0 13:18:30 ? 0:01 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit - owas 27441 1 1 13:35:12 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - root 27442 27441 0 13:35:12 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - owas 27538 27441 1 13:35:31 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/wrb21 13 4 /bada/WAS/app/oracle/product/ - owas 27551 27538 1 13:35:32 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 27552 27538 1 13:35:32 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 27554 1 1 13:35:33 ? 0:00 oracleOWAS (LOCAL=NO) 2-3) Dedicated Server + OWS21 (SQL*Net 통해서) SQL*Net DCD 설정 - owas 22450 1 1 13:18:30 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit - owas 24215 1 1 13:24:27 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - root 24216 24215 0 13:24:27 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - owas 24292 24215 1 13:24:43 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/wrb21 13 4 /bada/WAS/app/oracle/product/ - owas 24293 24292 1 13:24:43 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 24294 24292 1 13:24:43 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 24296 1 1 13:24:43 ? 0:00 oracleOWAS (LOCAL=NO) (2) MTS Server일 경우 owas 10425 1 0 14:19:39 ? 0:00 ora_pmon_OWAS owas 10427 1 0 14:19:39 ? 0:00 ora_dbwr_OWAS owas 10429 1 0 14:19:39 ? 0:00 ora_lgwr_OWAS owas 10431 1 1 14:19:39 ? 0:00 ora_smon_OWAS owas 10433 1 0 14:19:39 ? 0:00 ora_reco_OWAS owas 10435 1 0 14:19:39 ? 0:00 ora_s000_OWAS owas 10437 1 0 14:19:39 ? 0:00 ora_s001_OWAS owas 10439 1 0 14:19:39 ? 0:00 ora_s002_OWAS owas 10441 1 0 14:19:39 ? 0:00 ora_s003_OWAS owas 10443 1 0 14:19:39 ? 0:00 ora_s004_OWAS owas 10445 1 0 14:19:39 ? 0:00 ora_d000_OWAS owas 10447 1 0 14:19:40 ? 0:00 ora_d001_OWAS owas 10449 1 0 14:19:40 ? 0:00 ora_d002_OWAS owas 10451 1 0 14:19:40 ? 0:00 ora_d003_OWAS owas 10453 1 0 14:19:40 ? 0:00 ora_d004_OWAS owas 10455 1 0 14:19:40 ? 0:00 ora_d005_OWAS owas 10457 1 0 14:19:40 ? 0:00 ora_d006_OWAS owas 10478 1 1 14:19:41 ? 0:00 ora_d007_OWAS 3) SQL*Plus 3-1) MTS Server + local SQL*Plus (Direct) - Listener는 실행 안된상태에서 - owas 7896 4829 1 14:08:28 pts/18 0:00 sqlplus bench/bench - owas 7897 7896 1 14:08:28 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 3-2) MTS Server + local SQL*Plus (Listener 실행중) - Listener는 실행되었지만 SQL*Net V2를 사용하지 않는 경우 - owas 10689 1 0 14:20:45 ? 0:04 /bada/WAS/app/oracle/ product /7.3.3/bin/tnslsnr LISTENER -inherit - owas 11369 8438 0 14:23:25 pts/37 0:00 sqlplus bench/bench - owas 11370 11369 0 14:23:26 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 3-3) MTS Server + local SQL*Plus (SQL*Net 통해서) - owas 23302 1 1 10:50:38 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit - owas 23327 12590 1 10:50:47 pts/26 0:00 sqlplus bench/bench@ krtool - owas 23329 1 1 10:50:48 ? 0:00 oracleOWAS (LOCAL=NO) - 위의 경우는 MTS의 Dedicated로 접속된 경우고, 일반적으로는 Server Process는 화면에 보이지 않음 3-4) MTS Server + remote SQL*Plus (SQL*Net 통해서) - Server Process는 화면에 보이지 않음 4) Web Server 4-1) MTS Server + OWS21 (Direct) - owas 8313 1 0 14:10:22 ? 0:00 /bada/WAS/app/oracle/ product /7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - root 8314 8313 0 14:10:22 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - owas 8576 8313 1 14:11:06 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/wrb21 13 4 /bada/WAS/app/oracle/product/ - owas 8584 8576 2 14:11:06 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 8585 8576 3 14:11:06 ? 0:01 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 4-2) MTS Server + OWS21 (Listener 실행중) - root로 실행된 oraweb process는 제외 - owas 10689 1 2 14:20:45 ? 0:05 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit - owas 14651 1 1 14:39:27 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - owas 14709 14651 1 14:39:44 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/wrb21 13 4 /bada/WAS/app/oracle/product/ - owas 14710 14709 1 14:39:44 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 14711 14709 1 14:39:45 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 4-3) MTS Server + OWS21 (SQL*Net 통해서) SQL*Net DCD 설정 - root로 실행된 oraweb process는 제외 - owas 10689 1 0 14:20:45 ? 0:06 /bada/WAS/app/oracle/ product/7.3.3/bin/tnslsnr LISTENER -inherit - owas 15784 1 1 14:44:32 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/oraweb21 -C /bada/WAS/app/oracle/product - owas 15942 15784 1 14:44:49 ? 0:00 /bada/WAS/app/oracle/ product/7.3.3/bin/wrb21 13 4 /bada/WAS/app/oracle/product/ - owas 15943 15942 1 14:44:49 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) - owas 15944 15942 1 14:44:49 ? 0:00 oracleOWAS (DESCRIPTION= (LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 4. 테스트의 결론 SQL*Plus로 DB 접속시 리스너가 실행되어 있거나 DB가 MTS인지 상관없이 beq를 통해서 접속이 이루어진다. 그러나, 명시적으로 SQL*Net을 지정해서 사용할 경 우는 Server porcess 가 실행되어 서비스를 한다. MTS일 경우는 리스너가 완전 히 초기화 되기 전에는 server process가 보이긴 하지만 초기화가 이루어진 상 태에서는 server porcess는 ps 명령으로 확인되지 않는다. Local SQL*Plus YES 그러나, 웹서버의 경우는 SQL*Plus와는 약간 다르게 나타났다. 리스너가 실행 되지 않은 경우는 DB가 Dedicated나 MTS 둘다 beq를 통해서 접속이 이루어지고 리스너가 실행된 경우에 명시적으로 DCD에서 SQL*Net Service를 지정하거나 하 지 않거나 상관없이 beq를 통해서 server process를 실행하여 서비스를 받는 것 같다. 그런데, MTS일 경우는 server process를 ps 명령으로 확인 되지 않느다. Direct Listener SQL*Net SQL*Net -------------------------------------------- SQLPlus beq beq Local=No Local=No - Dedicated SQLPlus beq beq - - - MTS OWS beq Local=No Local=No x - Dedicated OWS beq - - x - MTS - beq는 모두 Local=Yes 로 표시됨 위의 결과로 웹에서는 해당 wrb process가 DB Server process를 매번 뛰우기 때문에 서버의 resource를 많이 사용하게 됩니다. 그래서, MTS Server로 설정하여 server process 수를 줄여 줄 수 있을 것 같습니다. |
Comment | |||
---|---|---|---|
등록된 코멘트가 없습니다. |