반응형

MariaDB와 Mysql 성능을 테스트하기 위해

 

HammerDB를 사용하다가

 

보니...

 

정작 중요한 my.cnf 설정이 정상적인가? 물음에 도달하게 되었습니다.

 

정확한 설정값을 위해 자동 튜닝 스크립트를 제공하는 사이트를 발견하였습니다.

 

보통 정상적으로 튜닝 범주라고 체크 할려면 48시간이상 이용해야 한다는 사실은 존재합니다.

 


 

virtualbox 상에서 실행한 결과 (OK : 정상 / !! 설정 이상 / -- SKIP)

 

 >>  MySQLTuner 1.7.15 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[OK] Logged in using credentials passed on the command line
[OK] Currently running supported MySQL version 10.3.17-MariaDB
[OK] Operating on 64-bit architecture

-------- Log file Recommendations ------------------------------------------------------------------
[--] Log file: /var/lib/mysql/hammerdb.err(0B)
[!!] Log file /var/lib/mysql/hammerdb.err doesn't exist
[!!] Log file /var/lib/mysql/hammerdb.err isn't readable.

-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
[--] Data in InnoDB tables: 999.9M (Tables: 9)
[OK] Total fragmented tables: 0

-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.

-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[!!] User 'root@%' does not specify hostname restrictions.
[!!] There is no basic password file list!

-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 34m 1s (279K q [136.873 qps], 133 conn, TX: 74M, RX: 38M)
[--] Reads / Writes: 50% / 50%
[--] Binary logging is disabled
[--] Physical Memory     : 1.8G
[--] Max MySQL memory    : 15.2G
[--] Other process memory: 0B
[--] Total buffers: 1.4G global + 28.2M per thread (500 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[!!] Maximum reached memory usage: 1.7G (94.00% of installed RAM)
[!!] Maximum possible memory usage: 15.2G (845.58% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (0/279K)
[OK] Highest usage of available connections: 2% (11/500)
[OK] Aborted connections: 1.50%  (2/133)
[!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
[!!] Query cache may be disabled by default due to mutex contention.
[!!] Query cache efficiency: 0.0% (0 cached / 1M selects)
[OK] Query cache prunes per day: 0
[OK] No Sort requiring temporary tables
[OK] No joins without indexes
[OK] Temporary tables created on disk: 0% (22 on disk / 37K total)
[OK] Thread cache hit rate: 90% (13 created / 133 connections)
[OK] Table cache hit rate: 95% (141 open / 147 opened)
[OK] Open file limit used: 1% (59/4K)
[OK] Table locks acquired immediately: 100% (108 immediate / 108 locks)

-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is disabled.
[--] Memory used by P_S: 0B
[--] Sys schema isn't installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 2 thread(s).
[--] Using default value is good enough for your version (10.3.17-MariaDB)

-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.2% (24M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/123.0K
[OK] Read Key buffer hit rate: 98.9% (180 cached / 2 reads)

-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 4
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 1.0G/999.9M
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (99.609375 %): 340.0M * 3/1.0G should be equal to 25%
[!!] InnoDB buffer pool <= 1G and Innodb_buffer_pool_instances(!=1).
[--] Number of InnoDB Buffer Pool Chunk : 8 for 8 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.84% (26160668 hits/ 26202270 total)
[!!] InnoDB Write Log efficiency: 83.1% (617680 hits/ 743341 total)
[OK] InnoDB log waits: 0.00% (0 waits / 125661 writes)

-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/1B

-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.

-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.

-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: MIXED
[--] XA support enabled: ON
[--] Semi synchronous replication Master: OFF
[--] Semi synchronous replication Slave: OFF
[--] This is a standalone server

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    Restrict Host for user@% to user@SpecificDNSorIp
    MySQL was started within the last 24 hours - recommendations may be inaccurate
    Reduce your overall MySQL memory footprint for system stability
    Dedicate this server to your database for highest performance.
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
    Performance schema should be activated for better diagnostics
    Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL
    Consider installing Sys schema from https://github.com/good-dba/mariadb-sys for MariaDB
    Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU
Variables to adjust:
  *** MySQL's maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    query_cache_size (=0)
    query_cache_type (=0)
    query_cache_limit (> 1M, or use smaller result sets)
    performance_schema = ON enable PFS
    innodb_log_file_size should be (=85M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
    innodb_buffer_pool_instances (=1)

 


Perl로 작성된 쉘이 아래 주소에 있으며,

 

https://github.com/major/MySQLTuner-perl

 

major/MySQLTuner-perl

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability. - major/MySQLTuner-perl

github.com

 

2019.08.14 

mysqltuner.pl
0.22MB

 

실행법

#> perl mysqltuner.pl --user root --pass='root'

 

지원하는 DB는

 

Test result are available here: Travis CI/MySQLTuner-perl

  • MySQL 8 (partial support, password checks don't work)
  • MySQL 5.7 (full support)
  • MySQL 5.6 (full support)
  • MariaDB 10.3 (full support)
  • MariaDB 10.2 (full support)
  • MariaDB 10.1 (full support)
  • MariaDB 10.0 (full support, 6 last month support)
  • Percona Server 5.7 (full support)
  • Percona Server 5.6 (full support)
  • Percona XtraDB cluster (full support)
  • MySQL 3.23, 4.0, 4.1, 5.0, 5.1, 5.5 (partial support - deprecated version)
  • Perl 5.6 or later (with perl-doc package)
  • Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
  • Windows is not supported at this time (Help wanted !!!!!)
  • Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)
  • CVE vulnerabilities detection support from https://cve.mitre.org

 

반응형
반응형


후암..


잘 다니던 회사를 퇴직하고


오라클이 필요할때... -_-....


어렵다.. 구하기 어렵다..


다행히도 otn 정보는 아직 유효하여


참고 사항을 올린다. ~


1. 오라클 사이트 (https://support.oracle.com ) 방문하여 로그인한다.

   : 예전회사는 OTN 계약을 별도로 했었다... -_-...


 - 로그인 후 우측 상단에 Contact US 를 눌러 아래 화면을 띄운다.

    ※ 참고로 한글 언어셋으로 설정시 안된다는 소문(?)을 들어 영문으로 설정하고 시작하였다.

    Problem Summary : DVD

    => 문제점을 요약하면 : DVD  (ㅋㅋㅋ -_-..)

    Support Identifier : 현재 유효한 8자리 ID값이 출력됨. (우측 상단에 Next를 눌러 넘어감 : 총 3단계!)






 - 2단계 각 화면들이다.

    Problem Type : Software & OS Media Requests

    문제 유형 : 소프트웨어와 OS 미디어 요청


    1) IS this a physical software media shipment request?

       이것은 물리적 소프트웨어 미디어 수송 요청인가?

       -> 난 물리적으로 받고 싶다 -_- Yes ~

    

    2) Which Product line does the media request involve?

        Oracle Database

        미디어 포함 요청에 어떤 제품 라인을 할것인가?

        난 오라클 10g 이므로 Oracle Database

 

    3) Are you requesting a required password for a path download?

        NO

        다운로드 경로를 위한 패스워드가 필요한 요청인가?

        다운로드 한 것에 대한 암호를 설정하는 것 같은데.. 필요 없으므로.. NO.... (잘 모르겠음 -_- ㅋ)




   4) Are you requesting a patch on CD/DVD?

      NO

      당신은 CD/DVD의 패치가 필요한가?

      아니요 


      난 설치본이 필요함 -_-... 패치는 otn에서 걍 받을꺼임...


   5) 4번항목의 패치 필요한 내역을 기재하는 것인데.. 없으므로 난 스킵 (*가 아닌것은 필수 아님)

   6) List the product name and version requested for physical media shipment?( EX: E-business Suite 12.1.1...)

       Oracle Database 10G / Oracle Client 10G

       물리적 미디어 배송을 위한 제품 이름과 버전 목록을 요청하라.

       오라클 데이터베이스 서버 10g와 오라클 클라이언트 10G

   7) What is the OS/platform for the requested media?(EX : Windows 32bit. ....)

       IBM Aix Power 32,64 bit / hp up risc 32/64 bit

       요청한 미디어의 OS(운영체제)와 Platform(플렛폼)은 무엇인가?

      IBM Aix Power 시리즈의 32,64 bit와

      HP ux risc 32/64 비트




 8) Are any language required for this shipment?

     YES

     이번 배송을 위한 어떠한 언어라도 괜찮은가?

  11) Ship to Contact Name :

      배송을 위한 이름 : 

       


12. 배송을 위한 전화번호

     82(국제번호)-10(010이라도 0을 뺌)-xxxx-xxxx


13. 배송을 위한 이메일 주소

     aaa@naaa.aaa


14. 회사명 :



15. 주소1 :

     실제 주소를 알면 -> 다음, 네이버등을 통해 주소 영문 변환으로 검색 뒤 ...

                                  한글 주소를 영문으로 변환하여 붙여넣기 한다.






위와 같이 입력뒤 우측 상단에 Next를 누른다.


아래는 최종 단계인 Contact 확정 단계로


Primary Contact : 이름

Phone Numbers : 전화번호

Email-Address : 이메일 주소

Coontact Method : WEB (웹상에 아래 조회항목을 통해 확인 가능할듯...)

(영어가 약해서 전화오면 챙피해서 죽어버릴지도 모름 -_-....)




위와 같은 최종 확인 뒤 우측 상단에 Submit를 눌러 확정함.





위와 같이 정상 Submit 하고 난뒤 상태를 조회하거나 WEb를 통한 메시지를 확인하고자 할 때는



상단에 Service Requests 메뉴를 클릭뒤


중간부분에 Contact Us Service Reqests 항목에 조회된다.

후암... 간략하게 정리해 봤다...


반응형
반응형


출처 : http://blog.naver.com/onlywin7788?Redirect=Log&logNo=140155221360

출처 : http://cafe.naver.com/ocmkorea/book2025209/9365


/*


--> 방식 1. (이 sql문은 이 방식임)

        1. 테이블 전체 목록 조회

           SQL> select * from tab;


        2. 수행한 쿼리의 Plan을 조회

           SQL> @xplan.sql


        3. 정확한 통계를 위해 힌트 실행

           SQL> select /*+ gather_plan_statistics */ * from tabs;


        * 오타 나지 않도록 주의함.


--> 방식 2

        1. 실행시 Plan  수집

           SQL> EXPLAIN FOR

                 SELECT * FROM TAB;


        2. 실제 정보 조회

           SQL> select * from tab(dbms_xplan.display());


                or


           SQL> select *

                from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST +alias +outline +predicate'))

/




--> 인자 정보


        dbms_xplan.display_cursor(인자1, 인자2, 인자3);


        인자1 : plan table 명을 입력하며, 따로 지정하지 않았을 때는 기본으로 'PLAN_TABLE'이다.


        인자2 : Execution Plan시 Set STATEMENT_ID를 지정한 경우 이를 불러올 수 있다.

                값이 Null일 경우 마지막에 실행된 문장을 불러온다.


        인자3 : 출력 포맷 형태 지정한다.



--> 세번째 인자의 포맷 정보


        1) 기본 Format Controller : 반드시 적용되어야 하는 기본적인 Controller임.

                                    적용하지 않더라도 자동으로 기본값으로 적용된다.


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


                basic    : 가장 기본적인 포맷으로서 Id, Operation, Object Name을 출력한다.

                typical  : basic 옵션에서 한발 더 나아가서 Optimizer가 예상할 수 있는 모든 것을 보여준다.

                           출력되는 정보로는 예상 Rows, 예상 Bytes, 예상 Temporary Space 사용량, Cost 예상 시간 Predicate Imformat(Operation 별로 Access 및 Filter 정보)이다.

                serial   : typical과 같으나 Parallel 쿼리 사용시 관련정보가 나오지 않는다.

                all      : Plan 정보는 typical과 같으나 Plan이외의 정보 중에서 Outline Data 정보를 제외하고 전부 출력한다.

                advanced : all과 같지만 Peeked Binds, Outline Data, Note 등을 더 보여준다.


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


        2) 세부 Format Controller : 기본 포맷정보에 의해서 표시되거나 생략되는 세부적인 포맷을 Control한다.

                                    이 Control은 +표시로 추가되거나 - 표시로 생략이 가능하다.


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


                alias    : 가장 기본적인 포맷으로서 Id, Operation, Object Name을 출력한다.

                bytes    : basic 옵션에서 한발 더 나아가서 Optimizer가 예상할 수 있는 모든 것을 보여준다.

                           출력되는 정보로는 예상 Rows, 예상 Bytes, 예상 Temporary Space 사용량, Cost 예상 시간 Predicate Information (Operation 별로 Access 및 Filter 정보)이다.

                cost     : typical과 같으나 Parallel쿼리 사용시 관련 정보가 나오지 않는다.

                note     : Plan 정보는 typical과 같으나 Plan이외의 정보 중에서 Outline Data 정보를 제외하고 전부 출력한다.

                outline  : all과 같지만 Peeked Binds, Outline Data, Note 등을 더 보여준다.

                parallel : Parallel 쿼리인 경우 TQ, IN-OUT, PQ Distribute 등의 정보를 Control한다.

                partition : Partition Access가 포함된 경우

                peeked_binds : Bind 변수의 값을 control 한다. 단, _optim_peek_user_binds 파라미터의 값이 true로 되어 있는 경우에만 해당되며 파라미터는 세션 단위로 수정이

                               가능하다. (Explain Plan은 출력되지 않음)

                predicate : Predicate Information을 Control한다. Operation 별로 Access 및 Filter 정보를 나타낸다.

                            일반적인 튜닝시 가장 눈 여겨봐야 할 정보이다.

                projection : Projection Information을 Control한다. Operation 별로 Select 되는 컬럼 정보를 나타낸다.

                remote   : DB Link를 사용할 때 Remote 쿼리의 수행 정보를 Control한다.

                rows     : Plan상의 E-Rows 수를 Control한다.


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


        3) 실행통계 Format Controller : 이 Control을 적용하면 실행시의 PGA 통계를 출력한다.


        이 정보들은 DBMS_XPLAN.DISPLAY 함수에는 적용되지 않는다.

        왜냐하면 Explain Plan은 실제 수행되는 것이 아니므로 실행통계정보가 없기 때문이다.


        또한 DBMS_XPLAN.DISPLAY_CURSOR 이나 DBMS_XPLAN.DISPLAY_AWR등의 함수 수행시에도 GATHER_STATISTICS 힌트를 주거나 아니면 STATISTICS_LEVEL 파라미터를 ALL로 설정해야 출력이 가능하다.


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


                allstats : I/O 통계정보(Buffers, Reads, Writes)와 PGA 통계 정보(OMem, 1Mem, Used-Mem, Used-Tmp, Max-Tmp 등)를 동시에 Control 한다.

                iostats  : I/O 통계정보(Buffers, Reads, Writes)를 Control 한다.

                last     : 실행 통계 출력시 이 Control을 명시하면 가장 마지막에 수행된 실행 통계를 출력한다.

                           이 Control을 명시하지 않으면 실행 통계츼 누적치를 출력하므로 주의가 필요합니다.

                memstats : PGA 통계정보(OMem, 1Mem, Used-Mem, Used-Tmp, Max-Tmp등)를 동시에 Control한다.

                runstats_last : iostats과 last Control 과 동일하다.

                                이 Control은 Oracle 10g Release 1에서만 사용할 수 있다.

                runstats_tot : iostats Control과 동일하다.

                               이 Control은 oracle 10g Release 1 에서만 사용할 수 있다.


                * runstats_last와 runstats_tot를 제외한 4가지의 Control은 Oracle 10g Release 2 이상에서만 사용할 수 있다.


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


        4) format 사용 예제


        Format중 가장 많은 정보를 출력 할 수 있는 포맷은 'advanced allstats last'이며 출력 가능한 모든 내용이 출력되게 되므로 상황이나, 자신에 맞는 포맷을 사용해야 적절함.


        4-1) 쿼리 변형이 없는 단순 쿼리 튜닝의 경우(최대한 단순한 포맷형태 사용)


             SQL> select * from table(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'allstats last-rows + predicate');


             => 포맷을 'allstats last-rows + predicate'로 주었으므로 예측 Row 수(E-row)가 생략되고 실행통계와 Predicate Information 만 출력된다.


        4-2) 쿼리 변형이 발생하거나 복잡한 쿼리 튜닝시 쿼리 블러과 힌트 정보를 추가로 출력


             SQL> select * from table(DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'allstats last-rows + alias + outline + predicate');


             => 'allstats last-rows + alias + outline + predicate' 포맷을 사용하면 Query Block Name / Object Alias 정보와 Outline Data 정보가 추가로 출력된다.


                + alias는 쿼리블럭 정보를 추가하는 것이며, + Outline는 오라클이 내부적으로 사용하는 힌트정보 출력의 의미이다.


                쿼리 변형이 발생한 경우나 뷰(혹은 인라인뷰) 등을 튜닝할 경우 적합한 옵션이다.


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



        10046 + tkprof 와 동일한 정보를 조회는

        select /*+ gather_plan_statistics */ * from tab;


        select *

        from table(dbms_xplan.display_cursor(null, null, 'advanced ALLSTATS LAST +alias +outline +predicate'))


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



AWR 정보를 이용

SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_AWR(SQL_ID입력,NULL,NULL, 'ADVANCED ALLSTATS LAST'));


사용 권한 뷰


DISPLAY_CURSOR 함수 : V$SQL_PLAN, V$SESSION, V$SQL_PLAN_STATISTICS_ALL 뷰에 대한 SELECT 권한 필요

DISPLAY_AWR    함수 : DBA_HIST_SQL_PLAN, DBA_HIST_SQLTEXT, V$DATABASE 뷰에 대한 SELECT 권한 필요

DISPLAY_SQLSET 함수 : ALL_SQLSET_STATEMENTS, ALL_SQLSET_PLANS 뷰에 대한 SELECT 권한 필요


*/

select *

  from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST +alias +outline +predicate'))

/




반응형
반응형

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html



Oracle Database 10g Release 2 JDBC Drivers


You must accept the OTN Development and Distribution License Agreement to download this software.
Accept License Agreement | Decline License Agreement

Oracle Database 10g Release 2 (10.2.0.5) JDBC Drivers

 JavaDoc (4,383,404 bytes)
 README
 
JDBC Thin for All Platforms
 classes12.jar (1,621,582 bytes) - for use with JDK 1.2 and JDK 1.3
 classes12_g.jar (2,070,298 bytes) - same as classes12.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 classes12dms.jar (1,629,454 bytes) - same as classes12.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
 classes12dms_g.jar (2,078,718 bytes) - same as classes12dms.jar except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14.jar (1,569,316 bytes) - classes for use with JDK 1.4 and 1.5
 ojdbc14_g.jar (1,965,422 bytes) - same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14dms.jar (1,576,882 bytes) - same as ojdbc14.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
 ojdbc14dms_g.jar (1,973,634 bytes) - same as ojdbc14dms.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 demo.tar (604,160 bytes) - contains sample JDBC programs.
 
Note: For platform specific JDBC-OCI libraries See Instant Client


Oracle Database 10g Release 2 (10.2.0.4) JDBC Drivers

 JavaDoc (4,383,404 bytes)
 README
 
JDBC Thin for All Platforms
 classes12.jar (1,609,607 bytes) - for use with JDK 1.2 and JDK 1.3
 classes12_g.jar (2,055,921 bytes) - same as classes12.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 classes12dms.jar (1,617,382 bytes) - same as classes12.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
 classes12dms_g.jar (2,064,313 bytes) - same as classes12dms.jar except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14.jar (1,555,682 bytes) - classes for use with JDK 1.4 and 1.5
 ojdbc14_g.jar (1,950,033 bytes) - same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14dms.jar (1,563,375 bytes) - same as ojdbc14.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
 ojdbc14dms_g.jar (1,958,237 bytes) - same as ojdbc14dms.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 orai18n.jar (1,646,178 bytes) - NLS classes for use with JDK 1.2, 1.3, 1.4, and 1.5. This jar file replaces the old nls_charset jar/zip files.
 demo.tar (604,160 bytes) - contains sample JDBC programs.
 
Note: For platform specific JDBC-OCI libraries See Instant Client


Oracle Database 10g Release 2 (10.2.0.3) JDBC Drivers

 JavaDoc (4,383,404 bytes)
 README
 
JDBC Thin for All Platforms
 classes12.jar (1,600,090 bytes) - for use with JDK 1.2 and JDK 1.3
 classes12_g.jar (2,044,594 bytes) - same as classes12.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 classes12dms.jar (1,607,745 bytes) - same as classes12.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
 classes12dms_g.jar (2,052,968 bytes) - same as classes12dms.jar except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14.jar (1,545,954 bytes) - classes for use with JDK 1.4 and 1.5
 ojdbc14_g.jar (1,938,906 bytes) - same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14dms.jar (1,553,561 bytes) - same as ojdbc14.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
 ojdbc14dms_g.jar (1,947,136 bytes) - same as ojdbc14dms.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 orai18n.jar (1,645,114 bytes) - NLS classes for use with JDK 1.2, 1.3, 1.4, and 1.5. This jar file replaces the old nls_charset jar/zip files.
 ons.jar (48,492 bytes) - for use by the pure Java client-side Oracle Notification Services (ONS) deamon.
 demo.tar (604,160 bytes) or demo.zip (529,267 bytes) - contains sample JDBC programs.
 
Note: For platform specific JDBC-OCI libraries See Instant Client


Oracle Database 10g Release 2 (10.2.0.2) JDBC Drivers

 JavaDoc (4,383,404 bytes)
 README
 
JDBC Thin for All Platforms
 classes12.jar (1,594,191 bytes) - for use with JDK 1.2 and JDK 1.3 
 classes12_g.jar (2,038,127 bytes) - same as classes12.jar, except that classes were compiled with "javac -g" and contain some tracing information. 
 classes12dms.jar (1,601,843 bytes) - same as classes12.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service. 
 classes12dms_g.jar (2,046,467 bytes) - same as classes12dms.jar except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14.jar (1,540,457 bytes) - classes for use with JDK 1.4 and 1.5
 ojdbc14_g.jar (1,932,834 bytes) - same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information. 
 ojdbc14dms.jar (1,548,006 bytes) - same as ojdbc14.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service. 
 ojdbc14dms_g.jar (1,940,478 bytes) - same as ojdbc14dms.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 orai18n.jar (1,645,109 bytes) - NLS classes for use with JDK 1.2, 1.3, 1.4, and 1.5. This jar file replaces the old nls_charset jar/zip files. 
 ons.jar (48,492 bytes) - for use by the pure Java client-side Oracle Notification Services (ONS) deamon.
 demo.tar (604,160 bytes) or demo.zip (529,267 bytes) - contains sample JDBC programs.
 
Note: For platform specific JDBC-OCI libraries See Instant Client



Oracle Database 10g Release 2 (10.2.0.1.0) JDBC Drivers

 JavaDoc (4,383,404 bytes)
 README
 
JDBC Thin for All Platforms
 classes12.jar (1,590,491 bytes) - for use with JDK 1.2 and JDK 1.3 
 classes12_g.jar (2,033,507 bytes) - same as classes12.jar, except that classes were compiled with "javac -g" and contain some tracing information. 
 classes12dms.jar (1,598,183 bytes) - same as classes12.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service. 
 classes12dms_g.jar (2,041,904 bytes) - same as classes12dms.jar except that classes were compiled with "javac -g" and contain some tracing information.
 ojdbc14.jar (1,536,979 bytes) - classes for use with JDK 1.4 and 1.5
 ojdbc14_g.jar (1,928,714 bytes) - same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information. 
 ojdbc14dms.jar (1,544,468 bytes) - same as ojdbc14.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service. 
 ojdbc14dms_g.jar (1,936,765 bytes) - same as ojdbc14dms.jar, except that classes were compiled with "javac -g" and contain some tracing information.
 orai18n.jar (1,551,155 bytes) - NLS classes for use with JDK 1.2, 1.3, 1.4, and 1.5. This jar file replaces the old nls_charset jar/zip files. 
 ons.jar (48,492 bytes) - for use by the pure Java client-side Oracle Notification Services (ONS) deamon.
 demo.tar (604,160 bytes) or demo.zip (529,267 bytes) - contains sample JDBC programs.
 
Note: For platform specific JDBC-OCI libraries See Instant Client

반응형
반응형

가이드에는 <database> 안에 <encryption>암호..</encryption> 으로 지정되어 있으나...

제길슨...

안먹어... jeus5는 모르는 child 원소란다 -_-ㅋ

아놔...


 찾아보니

<password>tiger</password>

값이

base64일 경우
<password>{base64}dGlnZXI=</password>

형태로 변경적용 하면 된다.


특정 값을 암호화 하는 방법은

 jeus 계정으로

$> encryption base64 tiger

하면
[base64] : [tiger] --> [encode:dGlnZXI=]
[base64] : [dGlnZXI=] --> [decode:tiger]


적용가능한 암호화 알고리즘
- base64
  많이 쓰이나 암호화와 복호화가 쉬움.
   또한 복호화 툴이 많이... 2초면 복호화..

- SHA
  해쉬 암호화 방식 (중간 유추가 안되고)
   입력 A -> 해쉬함수 -> XADDD (값이라면)
   비교시 값을 입력받아 똑같이 해쉬 결과값을 비교하는 방식 비교적 안전

- DES
- DESede
- AES
- SEED
- Blowfish




반응형

'WAS > JEUS' 카테고리의 다른 글

제우스에서 log4sql 사용하기  (0) 2011.03.15
JEUS 5 세션 공유  (0) 2011.03.09
IBM JVM 튜닝 - 3  (0) 2009.08.24
제우스 환경 설정 부분  (0) 2009.03.05
JAVA HEAPDUMP 분석방법  (0) 2009.03.05
반응형


Oracle version이 10.2.0.4로 동일하고 DB간 character set 도 동일하다고 가정한다면....

 

그냥 데이타파일을 copy하면 안되고요...

Cross-Platform Transportable Tablespaces 기능을 사용하시면 됩니다.

 

이때 Source 와 Target DB에서 아래를 조회해서 endian format이 같은지 검사해서...

아래 경우 little endian인데...source db와 target db의 os가 동일한 endian이면 상관없지만

 

 

        SQL> select PLATFORM_ID, PLATFORM_NAME  from v$database;
       
        PLATFORM_ID PLATFORM_NAME
        ----------- ------------------------------
                 10 Linux IA (32-bit)

 

        SQL> select  * from v$transportable_platform;
       
        PLATFORM_ID PLATFORM_NAME                  ENDIAN_FORMAT
        ----------- ------------------------------ --------------
                  1 Solaris[tm] OE (32-bit)        Big
                  2 Solaris[tm] OE (64-bit)        Big
                  7 Microsoft Windows IA (32-bit)  Little  
                 10 Linux IA (32-bit)              Little   <--- Little endian임.
                  6 AIX-Based Systems (64-bit)     Big
                  3 HP-UX (64-bit)                 Big
                  5 HP Tru64 UNIX                  Little
                  4 HP-UX IA (64-bit)              Big
                 11 Linux IA (64-bit)              Little
                 15 HP Open VMS                    Little
                  8 Microsoft Windows IA (64-bit)  Little
                  9 IBM zSeries Based Linux        Big
                 13 Linux 64-bit for AMD           Little
                 16 Apple Mac OS                   Big
                 12 Microsoft Windows 64-bit for A Little
                    MD

 

다를 경우 Rman으로 Data File Conversion 을 해야 합니다.

 

     - Source 에서
       > rman target=/
       RMAN> Convert Tablespace 'FINANCE, HR' to Platform ='AIX_Based System (64-bit)'  <--    

                  v$transportable_platform.platform_name
                     DB_FILE_NAME_CONVERT = '/orahome/dbs1', '/orahome/dbs/transport_aix',
                                            '/orahome/dbs2', '/orahome/dbs/transport_aix'; 
         <--해당 디렉토리 아래 FINANCE, HR TS에 해당하는 모든 것을 convert하여 지정된 디렉토리 아래로 copy
        
     또는
    
     - Target 에서
       > rman target=/    
       RMAN> Convert Datafile '/tmp/transport_stage/*' From Platform = 'Solaris[tm] OE (32-bit)'
                     DB_FILE_NAME_CONVERT = '/tmp/transport_stage/fin', '/orahome/dbs1/fin',
                                            '/tmp/transport_stage/hr',  '/orahome/db2/hr';
     - DB_FILE_NAME_CONVERT 가 없으면 flash recovery area에 같은 이름으로 만들어진다.
     - Parallelism option은 parallel하게 복수개의 file을 convert할때 사용.  Convert 시간은 Rman으로
       백업할때 걸리는 시간과 같다. Convert 전후의 file size는 변함이 없다.





TDB라는 방법도 있습니다.

http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-platformmigrationtdb-131164.pdf


HP.UX -> AIX로 진행 해 봤는데..

시간이 많이 걸리던 순서대로 나열하면 exp/imp, TTS, TDB 순서 더군요...

참고 하세요..





반응형
반응형

일반적으로 DB link 를 생성하기 위해서는 Client 쪽의 tnsnames.ora 파일에

등록이 되어야 합니다. 하지만 다음과 같이 tnsnames.ora 에 등록할 내용을

직접 사용해서 db link 를 생성할 수 있습니다.

 

CREATE DATABASE LINK link_test

   CONNECT TO scott IDENTIFIED BY tiger
   USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.23.1.13)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=ORCL)))'

반응형

'Database > ORACLE' 카테고리의 다른 글

오라클 exp 명령에서 Query 옵션 사용하기  (0) 2010.08.05
DBMS_METADATA  (0) 2010.08.05
System Account Lock (System 계정 락 걸림)  (0) 2010.07.15
오라클 클론 디비로 복구 하기  (0) 2010.07.13
PL/SQL Exception  (0) 2010.07.06
반응형

--- Arup Nanda 의 사이트에 자주 들어가봅니다. DBA 로서의 장애 Case 를 대응하는 절차가 비교적 자세히 나와있더군요. 요즘 일이 많아서 빠르게 쓰다보니 오역과 중간중간 빼먹는게 많은건 이해해주시길...아래는 실제로 DMA (direct memory access)를 사용해서 처리한 사례더군요..

  

Diagnosing Library Cache Latch Contention: A Real Case Study

 

어느날 DW 서버가 갑자기 다운됐다. 그래서 데이타베이스를 올리고 다시 구동했지만 모든 접속을 시도하면
hang 이 걸리는 것이였다. 따라서 접속은 실패하고 DBA는 접속된 세션들이 구동되고 있는지 어떤지를 확인할 수 조차도
없었다. DBA 는 WAIT 이벤트를 체크했다 (그러나 로긴조차도 안되기 때문에 실행할수 없었다)
흥미롭게도 CPU는 70% 정도의 수준이였고 이는 낮시간대의 일반적인 수치이다. 그리고 I/O또한 약 90%로서 이또한
일반적인 수치였다.

따라서 전형적인 방법인 system 관리자에게 보고하고 재부팅을 하는 방법을 사용했다. 재부팅은 30분정도
소요되었고 그 후로 10여분간은 모든것이 정상적으로 보였다. 그러나 얼마되지 않아 아까와같은 똑같은 문제에 부딪쳤다- 데이타베이스가 먹통이 되어버린 것이였다.

이것 때문에 DBA가 나에게 도움을 요청하였다. 이 블로그에서는 내가 이후의 30분동안에 어떻게 수행했고 문제를
해결했는지에 대해서 기술해보도록 하겠다.

 

증상


(1) 데이타베이스 접속 Hanging
(2) SQL*PLUS AS SYSDBA 로 접속해도 동일한 HANGING 현상: 증상을 확인할 수도 없는 상태
(3) 시스템은 아무때나 리부팅할 수 없는 상태

 

Action

 

여기서 접속이 불가능할 때 데이타베이스 인스턴스에서 바로 써먹을 수 있는 꼼수가 존재한다.
대부분의 사람들은 SQL*Plus 에서 "prelim" 이라고 불리는 옵션을 잘알지 못한다. 이 옵션은 세션을 열지 않고
SGA에 바로 접속한수 있는 옵션이다. (10g 이상에서만 가능) 

 

(1) 먼저 SQL*plus 를 실행시키고 아래의 명령문을 실행했다.

 

$ sqlplus -prelim / AS SYSDBA
SQL>

 

명심하라. "Oracle Database 10.2.0.3 에 접속" 과 다르다. 지금 보이는 SQL> 프롬프트는 실제로는
데이타베이스에 접속한 상태가 아니다.

 

(2) 그다음 SGA 를 분석하기 위한 "oradebug" 를 사용하였다.

 

SQL> oradebug setmypid
SQL> oradebug hanganalyze 12

 

이 명령은 USER_DUMP_DEST 에 trace파일을 생성한다. 이 파일을 가장 최근에 생겨났기 때문에
쉽게 찾을 수 있다. 심지어는 내가 파일을 찾지 못해도 process ID를 사용해서 파일을 찾을 수 있다.
내가 찾은 파일은 프로세스ID 가 13392인 crmprd1_ora_13392.trc 였다.

(3) 파일을 조사하니 다음과 같았다.

 

*** 2008-08-23 01:21:44.200
==============
HANG ANALYSIS:
==============
Found 163 objects waiting for
<0/226/17/0x1502dab8/16108/no>
Open chains found:
Chain 1 : :
<0/226/17/0x1502dab8/16108/no>
<0/146/1/0x1503e898/19923/latch:>

이 파일을 많은 것을 말해준다. SID 146 에 Serial# 1 이 library cache latch 를 대기하고 있는 것을 보여준다.(맨마지막줄)
그리고 blocking 세션은 SID 226 Serial# 17 로 나와있다. 

나는 일단 이 OS process ID 인 16108 과 19923 을 기록해두었다.

 

(4) 다음으로 위의 두개의 OS PID 명으로 되어 있는 TRACE 파일을 체크했다.

 

crmprd1_ora_16108.trc
crmprd1_ora_19923.trc

 

(5) 먼저 BLOCKER인 첫번째 파일을 열었다. 다음 몇줄의 예이다.

 

*** 2008-08-23 01:08:18.840
*** SERVICE NAME:(SYS$USERS) 2008-08-23 01:08:18.781
*** SESSION ID:(226.17) 2008-08-23 01:08:18.781
LIBRARY OBJECT HANDLE: handle=c0000008dc703810 mtx=c0000008dc703940(8000) cdp=32737
name=UPDATE DW_ETL.FRRS_PROFILER SET CONSUMER_LINK = :"SYS_B_0", ADDRESS_LINK = :"SYS_B_1", ADDRESS_MATCH = :"SYS_B_2", PROC
ESSED=:"SYS_B_3" WHERE RNUM = :"SYS_B_4"
hash=a029fce7bb89655493e7e51a544592a4 timestamp=08-23-2008 00:10:23
namespace=CRSR flags=RON/KGHP/TIM/OBS/PN0/MED/KST/DBN/MTX/[504100d0]
kkkk-dddd-llll=0000-0001-0001 lock=N pin=0 latch#=10 hpc=0058 hlc=0058
lwt=c0000008dc7038b8[c0000008dc7038b8,c0000008dc7038b8] ltm=c0000008dc7038c8[c0000008dc7038c8,c0000008dc7038c8]
pwt=c0000008dc703880[c0000008dc703880,c0000008dc703880] ptm=c0000008dc703890[c0000008dc703890,c0000008dc703890]
ref=c0000008dc7038e8[c0000008dc7038e8,c0000008dc7038e8] lnd=c0000008dc703900[c0000008dc703900,c0000008dc703900]
LOCK OWNERS:
lock user session count mode flags
---------------- ---------------- ---------------- ----- ---- ------------------------
c0000008d079f1b8 c0000006151744d8 c0000006151744d8 16 N [00]
c0000008d4e90c40 c0000006151bcb58 c0000006151bcb58 16 N [00]
c0000008d0812c40 c0000008151a0438 c0000008151a0438 16 N [00]

 
(6) 이것은 디버깅을 위해 보물과 같았다. 첫번째에 SID와 Serial#(226,17) 를 확인할수 있다.
이를 사용해서 정확한 SQL문장을 볼수 있다. 또한 락에 대한 전체적인 상황을 볼 수 있다. 락의 자세한 사항은 신경쓰지 않아도 되지만 SID 226 이 전체 세션의 대기를 유발시키는 것이라는 충분한 정보를 제공해주었다.

 

(7) 나의 조사는 여기서 그치지 않고  이 대기를 유발하는 세션을 찾기를 시도했다. 따라서 나는 파일의 "PROCESS STATE" 이라는 섹션을 조사했다. 다음은 이 파일의 일부분이다.

 

PROCESS STATE
-------------
Process global information:
process: c00000081502dab8, call: c000000817167890, xact: 0000000000000000, curses: c00000081519ef88, usrses: c000000815
19ef88
----------------------------------------
SO: c00000081502dab8, type: 2, owner: 0000000000000000, flag: INIT/-/-/0x00
(process) Oracle pid=370, calls cur/top: c000000817167890/c000000817167890, flag: (0) -
int error: 0, call error: 0, sess error: 0, txn error 0
(post info) last post received: 115 0 4
last post received-location: kslpsr
last process to post me: c000000615002038 1 6
last post sent: 0 0 24
last post sent-location: ksasnd
last process posted by me: c000000615002038 1 6
(latch info) wait_event=0 bits=20
holding (efd=4) c0000008d7b69598 Child library cache level=5 child#=10
Location from where latch is held: kglhdgc: child:: latch
Context saved from call: 13
state=busy, wlstate=free
waiters [orapid (seconds since: put on list, posted, alive check)]:
291 (197, 1219468295, 197)
279 (197, 1219468295, 197)
374 (197, 1219468295, 197)
267 (197, 1219468295, 197)
372 (197, 1219468295, 197)
... several lines sniped ...
307 (15, 1219468295, 15)
181 (6, 1219468295, 6)
waiter count=58
Process Group: DEFAULT, pseudo proc: c0000008e03150d8
O/S info: user: oracrmp, term: UNKNOWN, ospid: 16108
OSD pid info: Unix process pid: 16108, image: oracle@sdwhpdb1


 

 

(8) 이파일은 내가 알기를 원하는 것을 모두 말해준다. 여기에 SID 226 에 의해서 발생하는 CACHE LATCH
로 인해서 대기하는 58 session들이 있다. 여기서 OS PROCESS ID 와 BLOCKING 세션의 SQL 문장을 알 수 있다.

 

 

(9) 나는 application 사용자가 어떠한 것을 실행했는지를 조사해봤더니 사용자는 loop를 돌면서 처리하는
update 문장을 실행시킨 것이였다. 그리고 그게 다가 아니라 다른 8개의 thread 에서 실행을 하였다.(역: 아마도 화면상에서 처리 가 되지 않으니 화면을 새로고쳐서 계속해서 8번을 처리 버튼을 누른것으로 생각됨)
의심할 여지가 없이 library cache latch 경합에 걸렸다. 모든 세션은 각각의 덤프 정보를 남겼다.
그리고 나는 같은 문장을 실행한 파일을 디렉토리에서 조사해보기로 했다.

 

$ grep “UPDATE DW_ETL” *.trc

 

(10) 나는 9개 이상의 세션(프로세스) 파일을 찾았다. 이중 한개의 파일의 일부분이다.

 

350 (167, 1219470122, 167)
197 (167, 1219470122, 167)
waiter count=185
Process Group: DEFAULT, pseudo proc: c0000008e03150d8
O/S info: user: oracrmp, term: UNKNOWN, ospid: 16114

 

이 프로세스 한개가 185개 waiter 를 가졌다!!!


 

$ kill -9

 

(12) 위의 명령으로 몇개의 프로세스를 죽인 후에야 데이타베이스는 응답하기 시작했다. 모든 프로세스를 죽인 후에는 데이타베이스 wait event 가 완벽히 정상적으로 돌아왔다.

 

참고사항


(1) Hang 이라고 생각되면 너무 그것에 대해 불안해하지 마라. 세션은 언제나 어떤것을 대기한다. 드물게 행을 만날 뿐이다.

v$session (10g) 이나  v$session_wait 의 EVENT 컬럼을 조회해서 대기하는 것이 무엇인지를 먼저 체크하라.

(2) 데이타베이스에 로긴하지 못해 정보를 얻을 수 없을 때는 oradebug 명령을 사용한다.

(3) oradebug 를 사용할때 SQL*Plus 를 이용한다. 로긴하지 못할때 "sqlplus -prelim " 로 SQL prompt 를 얻을 수 있을 것이다.

(4) oradebug setmypid  이용해서 oradebug 세션을 시작하고 oradebug hanganalyze  로 모든 hang 과 관련되어 있는

문제에 대한 덤프를 생성한다.

(5) oradebug help 를 사용해서 oradebug 커맨드의 모든것을 볼 수 있다.

 

 

반응형

+ Recent posts