일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- SQL
- Network
- 연산자
- Linux
- perl string
- 오라클
- MySQL
- patch
- oracle install
- perl one-liner
- Unix
- perl + 정규표현식
- bash
- solaris network
- php5
- command & perl
- dba
- mariaDB
- rac
- RHEL4
- sqlplus
- fdisk
- PERL
- memory
- oracle
- grid
- prompt
- cygwin
- solaris
- Oracle RAC
Archives
- Today
- Total
DATA 전문가로 가는 길
[TIP][성능측정도구] NHN - nGrinder Oracle 접속 방법(Oracle, OJDBC) 본문
nGrinder 설치 완료 후 데이터베이스 접속 테스트를 하기 위한 방법 이며, 그 중에서 오라클 DBMS에 접속 하는 방법을 자세하게 설명 하도록 하겠습니다. 오라클 데이터베이스에 접속 하기 위해서는 ojdbc를 lib 폴더에 반드시 적용 되어 있어야 합니다.
1. lib 폴더에 ojdbc6.jar 파일 업로드
- lib 폴더를 생성 한 후에 ojdbc6.jar 파일을 Update script or resources 버튼을 통해서 업로드
2. Script 화면
- OracleDBAccess.py : Oracle DBMS에 접속하는 스크립트 소스
- lib : 라이브러리 파일을 업로드 한 폴더
3. nGrinder Oracle Database Access(접속 테스트) 소스
- Create a script > Type : Jython
- DB_connect 접속하려는 오라클 IP, 포트, SID
- DB_user 사용자 ID
- DB_paassword :사용자 패스워드
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # -*- coding:utf-8 -*- # Oracle Database test. # from java.sql import DriverManager from oracle.jdbc import OracleDriver from net.grinder.script.Grinder import grinder from net.grinder.script import Test from java.util import Random from java.lang import System # Parameters DB_connect = "jdbc:oracle:thin:@192.168.0.171:1521:ESTSID" DB_user = "ESTENPARK" DB_password = "###PASSWORD###" test1 = Test( 1 , "Database select" ) random = Random( long (System.nanoTime())) # Load the JDBC driver. DriverManager.registerDriver(OracleDriver()) def getConnection(): return DriverManager.getConnection(DB_connect, DB_user, DB_password) def ensureClosed( object ): try : object .close() except : pass class TestRunner: def __init__( self ): test1.record(TestRunner.__call__) grinder.statistics.delayReports = True pass def __call__( self ): connection = None selectStatement = None try : # in this test, we will create connection and statement in every test transaction. connection = getConnection() selectStatement = connection.createStatement() selectStatement.execute( "SELECT COUNT(*) FROM ESP_MBR_INFO A" ) finally : ensureClosed(selectStatement) |
4. nGrinder Oracle Database Access 결과
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 2017 - 05 - 18 13 : 00 : 50 , 999 INFO The Grinder version 3.9 . 1 2017 - 05 - 18 13 : 00 : 51 , 026 INFO Java(TM) SE Runtime Environment 1.7 . 0_79 - b15: Java HotSpot(TM) 64 - Bit Server VM ( 24.79 - b02, mixed mode) on Linux amd64 3.10 . 0 - 327.el7 .x86_64 2017 - 05 - 18 13 : 00 : 51 , 029 INFO time zone is KST ( + 0900 ) 2017 - 05 - 18 13 : 00 : 51 , 192 INFO worker process 0 of agent number 0 2017 - 05 - 18 13 : 00 : 51 , 272 INFO Instrumentation agents: byte code transforming instrumenter for Jython 2.5 ; byte code transforming instrumenter for Java 2017 - 05 - 18 13 : 00 : 54 , 808 INFO Running "OracleDBAccess.py" using Jython 2.5 . 3 ( 2.5 :c56500f08d34 + , Aug 13 2012 , 14 : 54 : 35 ) [Java HotSpot(TM) 64 - Bit Server VM (Oracle Corporation)] 2017 - 05 - 18 13 : 00 : 54 , 940 INFO starting, will do 1 run 2017 - 05 - 18 13 : 00 : 54 , 940 INFO Start time is 1495080054940 ms since Epoch 2017 - 05 - 18 13 : 00 : 55 , 544 INFO finished 1 run 2017 - 05 - 18 13 : 00 : 55 , 545 INFO elapsed time is 605 ms 2017 - 05 - 18 13 : 00 : 55 , 545 INFO Final statistics for this process: 2017 - 05 - 18 13 : 00 : 55 , 553 INFO Tests Errors Mean Test Test Time TPS Time (ms) Standard Deviation (ms) Test 1 1 0 574.00 0.00 1.65 "Database select" Totals 1 0 574.00 0.00 1.65 Tests resulting in error only contribute to the Errors column. Statistics for individual tests can be found in the data file , including (possibly incomplete) statistics for erroneous tests. Composite tests are marked with () and not included in the totals. 2017 - 05 - 18 13 : 00 : 54 , 813 INFO validation - 0 : Starting threads 2017 - 05 - 18 13 : 00 : 55 , 553 INFO validation - 0 : Finished |
'IT' 카테고리의 다른 글
[TIP][성능측정도구] NHN - nGrinder MariaDB/MySQL 접속 방법(mysql.jdbc) (2) | 2017.05.18 |
---|---|
[TIP][성능측정도구] NHN - nGrinder 설치 가이드 (2) | 2016.12.14 |
[TIP] Windows 7 시스템 성능 향상 시키기 - ReadyBoost 켜기 (0) | 2010.12.30 |
[TIP] 윈도우 용량 체크하는 프로그램(TreeSize) (0) | 2010.10.18 |
[TIP] MS Windows System Utils(Sysinternals Suite) - 시스템 유틸리티 (0) | 2010.07.06 |