DIA-48316, DIA-48110, and DIA-48180 Permission Errors In Crs Alert.log Causing Lock File Issues (Doc ID 3061682.1)

 

19.24 패치 이후 아래와 같이 로그화일에 뜬금없이 Permission denied 가 기록되며 CRS가 올라가지 않는 버그가 있다고 한다.

 

증상 : alertlog 에 무수히 lck 화일관련 권한 에러가 반복되어 발생함.

 

[AutoCreate Relation]: following error encountered and ignored:
DIA-48316: relation [INCIDENT] unavailable or cannot be created
DIA-48110: error encountered while attempting to get a file lock [INCIDENT] [<ORACLE_BASE>/diag/crs/<hostname>/crs/lck/AM_1762783_4031814035.lck]
DIA-48180: OS open system call failure
Linux-x86_64 Error: 13: Permission denied
Additional information: 1

 

원인 : adrci purge 명령어 실행시 오류 이슈로 인하여 권한 설정 잘못

 

해결책 :

확장자 lck 화일들의 권한이 640 으로 바뀌어져 있을 것이다. 해당 디렉토리의 lock 화일들의 권한을  변경해 주

 

cd $ORACLE_BASE/diag/crs/<hostname>/crs/lck

chmod 660 *.lck.

Posted by pat98

### TO BACKUP THE CONTROLFILE USING RMAN:
run{
 allocate channel dev1 type disk format 'c:\backup\%U';
 backup current controlfile;
 }

 
 ### TO CHECK THE BACKUP OF CONTROLFILE USING RMAN:
list backup of controlfile;


### TO RECOVER USING BACKUP CONTROLFILE: (startup nomount)
run {
 allocate channel dev1 type disk;
 restore controlfile;
 alter database mount;
 restore database;
 recover database;
 sql "ALTER DATABASE OPEN RESETLOGS";
 }
 
 
### TO BACKUP ALL DATAFILES AND CONTROLFILE USING RMAN:
run {
 allocate channel dev1 type disk;
 backup full tag = 'full backup' database include current controlfile  format = 'c:\backup\db_t%t_s%s_p%p';
 release channel dev1;
 }
 
 
### TO CHECK ALL BACKUP OF DATAFILES USING RMAN:
list backupset;


### TO RESTORE BECAUSE OF MISSING/CORRUPT FILE(S) (First MOUNT the database and run RMAN)
run {
 allocate channel dev1 type disk;
 restore database;
 recover database;
 }
 
 
### RESTORE UNTIL TIME
The 'SET UNTIL TIME' must match with the variable NLS_DATE_FORMAT.
Prior logging on RMAN set the NLS_DATE_FORMAT in the desired format.
For example:
If unix ===> export NLS_DATE_FORMAT='YYYY-MM-DD:HH24:MI:SS';
If on windows nt ===> set this vaiable in the registery.
run {
 set until time 'May 1 2000 08:00:00';
 allocate channel dev1 type disk;
 shutdown abort;
 startup nomount;
 restore controlfile;
 alter database mount;
 restore database;
 recover database;
 sql 'alter database open resetlogs';
 }
 
 
### TO PURGE OBSOLETE BACKUPS: 
RMAN> #REPORTS ANY BACKUP WITH MORE THAN 3 COPIES
      report obsolete redundancy 3 device type disk; 
RMAN> #USE THIS REPORT TO FILL IN THE XXXXX BELOW
      report obsolete orphan; 
RMAN> allocate channel for maintenance type disk;
      allocate channel for delete type disk;
      change backuppiece 'C:\BACKUP\xxxx' delete;
      release channel;
RMAN> allocate channel for maintenance type disk;
      allocate channel for delete type disk;
      change datafilecopy 'C:\BACKUP\xxxx' delete;
      release channel;
  
  
### TO BACKUP ALL ARCHIVE LOGS 
run{
 allocate channel dev1 type disk format 'c:\backup\%U';
 backup archivelog all;
 }
 
 
### TO REMOVE ALL ARCHIVE LOG FILES AFTER BACKUP UPDATE TO THIS LINE
 backup archivelog all delete input;
 
 
### SKIP AN ARCHIVE LOG FILE THAT CAN NOT BE READ OR MANUALY DELETED UPDATE TO THIS LINE
 backup archivelog skip inaccessible
 
 
### TO REMOVE ONE ARCHIVE LOG THAT YOU MANUALY DELETED AND NOW GET AN RMAN-6089 <= 8.0
allocate channel for delete type disk; or 'SBT_TAPE'; 
change archivelog 'path/filename' delete;
and/or
 resync catalog;
 
 
### TO REMOVE ONE ARCHIVE LOG THAT YOU MANUALY DELETED AND NOW GET AN RMAN-6089 <= 8.1
allocate channel for maintenance type ....'  
change archivelog <name> uncatalog
Note:
The channels for delete and maintenance do not require the run command enclosed in {}.

Posted by pat98

작업 환경은 19c singleASM 사용

 

 19.3 -> 19.29 로 Opatch 패치작업중 아래와 같은 에러 발생 

-> GI_HOME 쪽은 에러없이 잘 진행됨, $ORACLE_HOME 진행시 Error

 

OPatchSession cannot load inventory for the given Oracle Home /u01/app/oracle/product/19.0.0.0/dbhome_1. Possible causes are:
   No read or write permission to ORACLE_HOME/.patch_storage
   Central Inventory is locked by another OUI instance
   No read permission to Central Inventory
   The lock file exists in ORACLE_HOME/.patch_storage
   The Oracle Home does not exist in Central Inventory

 

검색해보면 아래와 같은 문제 등이 제시되는데

 

1.ORACLE_HOME/.patch_storage 디렉토리가 없거나 

2. . patch_storage 밑에 patch_locked 화일이 있으면 lck 화일 지우기

3. Clone 작업했으면 백업받고 다시 깔아라..

 

전부 해당되지 않았다.

 

내 경우에는 황당하게도 Inventory 내에 ORACLE_HOME 이 등록되어 있지 않았다. (이유는 모름??)

-> 없어서 추가 시켜줌

-> 패치하려고 했는데 Invenrory 내에 $ORACLE_HOME 정보가 없어서 그냥 안됐던 것.

 

vi /u01/app/oraInventory/ContentsXML/inventory.xml 
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2025, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.2.0.7.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI19Home1" LOC="/u01/app/19.0.0.0/grid" TYPE="O" IDX="1"/>
<HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19.0.0.0/dbhome_1" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

 

추가 후 재진행..정상적으로 완료됨

 

./38298204/38322923/custom/scripts/prepatch.sh completed successfully.
Oracle Interim Patch Installer version 12.2.0.1.47
Copyright (c) 2025, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.47
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2025-11-12_09-53-46AM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 12.2.0.1.47
Copyright (c) 2025, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.47
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2025-11-12_09-53-55AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   38322923  

Do you want to proceed? [y|n]

 

 

Posted by pat98

2025. 11. 11. 21:26 투자

코스피 4200 시대


코스피 지수가 4200을 넘었다.

지금의 코스피는 과연 어디쯤 위치하고 있을까?

 

 

High Risk, High Return

 

 

 

 

Posted by pat98

2025. 11. 10. 15:56 오라클

ORA-00392 에러조치


Clone 해서 Retore/Recover 하다가 건드려서 상태 이상해 졌을 떄 복구 방법..

RMAN> ALTER DATABASE OPEN RESETLOGS;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 11/10/2025 15:30:19
ORA-00392: log 1 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 1 thread 1: '/oradata/TEST/redo01.log'

SQL> select GROUP#,THREAD#,SEQUENCE#,MEMBERS,ARCHIVED,STATUS,FIRST_CHANGE# from v$log order by first_change# ;

    GROUP#    THREAD#  SEQUENCE#    MEMBERS ARC STATUS           FIRST_CHANGE#
---------- ---------- ---------- ---------- --- ---------------- -------------
         6          1          0          1 YES UNUSED                       0
         4          1          0          1 YES UNUSED                       0
         5          1          0          1 YES UNUSED                       0
         1          1          0          1 NO  CLEARING_CURRENT       1901592
 

방법 1) 이걸로 되면 Happy 하게 작업완료
SQL> alter database clear unarchived logfile group 1 ;
SQL> alter database clear unarchived logfile group 2 ;
SQL> alter database clear unarchived logfile group 3 ;
SQL> alter database open resetlogs;

하지만 방법1로 안될시 방법2)

1.  RESETLOGS 옵션과 함께 Contolfile 재생성
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/tmp/control.sql' resetlogs ;

2. 편집해서 Online Redo log 생성위치 바르게 수정반영 후 저장
vi /tmp/control.sql

 GROUP 1 '/oradata/TEST/redo01.log'  SIZE 100M BLOCKSIZE 512 <--- old 위치 또는 잘못된 위치 제거

3. nomount 로 기동

SQL> STARTUP FORCE NOMOUNT
SQL> @/tmp/control.sql

4. 가짜로 복구시도

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL ;

5. RESETLOGS 로 OPEN
SQL> ALTER DATABASE OPEN RESETLOGS ;

Posted by pat98

오라클 EM 은 과연 무료인가?

결론부터 말하면 무료이다.

 

(좀더 정확하게는 EM 에는 Repository DB 와만 함께 사용할수 있수 있는 제한된 사용 라이센스가 포함되어 있다고 한다. 하지만 EM이 Targeting 하게 되는 대상을 모니터링 하거나 튜닝작업을 하게 되면 이에 상응하는 라이센스가 필요하다.)

 

EM 관련한 라이센스 정책이 세분화 되어 있어 EM내에 포함된 라이센스 정보를 찾아보았다. (왜 이런지는 모르겠지만 EM 메뉴내에 아주 꼼꼼히 숨겨놓았다 -_-;) 

 

- 관련 MOS 문서

EM 12c, EM 13c: Does the Cloud Control Repository Database Require Additional Oracle Database License? (Doc ID 2337138.1)

 

- Enterprise Manager Cloud Control 라이센스 문서 URL

 

https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.5/oemli/introduction-oracle-enterprise-manager-licensing.html#GUID-7B2095D3-4E88-4346-9566-638219FF1130

=======================================================================

내용 발췌...

 

Oracle Enterprise Manager Restricted-use License

  Oracle Enterprise Manager includes a restricted-use license of the Oracle Database Enterprise Edition for use only with the Oracle Management Repository as well as with the following complementary repositories used by Oracle Enterprise Manager: Always-on Monitoring Repository, AWR Warehouse, Ops Center, Real User Experience Insight, Load Testing, and Test Manager.

Any use of Oracle Database options by Oracle Enterprise Manager's SYSMAN schema is included with the restricted-use license and does not require a separate license.

Additional database options or additional servers for disaster recovery require separate licensing. Customers receive one single-nstance database with the Cloud Control, or RMAN, repository. To protect the repository with Data Guard, customers need to purchase a license for the standby site. To protect the repository with Oracle Real Application Clusters, customers must license the second node for the database, and both nodes require an Oracle Real Application Clusters license.

  Oracle Enterprise Manager includes a restricted-se license of the Oracle WebLogic Server for use with Oracle Enterprise Manager functions and interfaces only.

  A restricted-se license for WebLogic clustering is included to support the deployment of a cluster of Oracle Analytics Servers, only when used with Oracle Enterprise Manager.

Oracle Enterprise Manager includes restricted use of Oracle Analytics Server and Oracle Analytics Server for mobile web for use with Oracle Enterprise Manager functions and interfaces only. This restricted Oracle Analytics Sever license will allow reporting only against the Oracle Enterprise Manager repository and against data dictionary (including AWR and AWR Warehousing data) of target databases. The restricted-use license covers the monitoring of the FMW domain of OAS through Oracle Enterprise Manager. In order to report against other data sources, it is necessary to have Oracle Analytics Server license.

=======================================================================

 

- EM 에 접속해서 

Setup ->  Management Packs -> Management Packs Access 메뉴로 가면 해당되는 라이센스를 활성화/비활성화 할수 있다.

 

 

또한 세부적인 기능에 대한 내용은 

Setup ->  Management Packs -> License Information  메뉴로 가면 아래와 같이 해당 내용을 확인 할수 있다.

 

Licensing Information

Enterprise Manager provides central management and monitoring for your data center. Some premium functionality contained within this release is part of management packs that require separate Oracle license. These management packs are outlined below.

 

Abbreviation Pack Name Description
AMPFA Application Management Pack for Fusion Applications Application Management Pack for Fusion Applications provides comprehensive management capabilities to monitor and manage Oracle Fusion Applications.
CMDB Oracle Cloud Management Pack for Oracle Database Oracle Cloud Management Pack for Oracle Database helps enable a DevOps model of database management by creating on-demand database provisioning and management within your Hybrid Multicloud environment.
Out-of-box Self Service Portal for self-service users to access Cloud services.
Self-service database provisioning support on physical, virtual, Engineered Systems, an
    d Oracle Compute Cloud Service.

Deployment of Database-as-a-Service (DBaaS) and Pluggable Database-as-a-Service 
    (PDBaaS) models.

Data Refresh for Full Clones - the ability to refresh the data contained in full clones. Not
    e: Create 'new' full clones is licensed under DBLM, but the additional 'refresh' function
    requires CMP.

Create snap clones of source databases, including the ability to refresh the database.
Snap Clone using TestMaster Snapshots.
Grouping of Cloud Infrastructure under the umbrella of 'paas zone' and creation of Hom
     ogeneous Cloud Pool(s).

Resource control through quotas and retirement policies
Chargeback and Metering based on database utilization
Programmatic access to the Self Service Portal through REST APIs and EMCLIs.
CMPA Configuration Management Pack for Applications Automates the time-consuming and often error prone process of software and hardware configuration and deployments on systems not running Oracle software. This pack provides capabilities such as search and compare across all systems, configuration monitoring, policy management and compliance support, security configuration scoring and dashboards, and comprehensive reporting. The Configuration Management Pack includes:
 View and analyze configuration
 View and analyze deployments/installations
 Search configuration
 • Compare configurations And Drift Management
 Client System Analyzer
 Manage policies and policy notifications
 Security at a Glance
 Configuration reports
 Configuration change tracking
 Real time change detection
 Manage Application configuration across the deployment lifecycle
 Repository tables/views that store/expose the above data
COHMP Management Pack for Oracle Coherence Provides a comprehensive solution for monitoring, configuring, and deploying a Coherence cluster. This pack simplifies management of the Coherence clusters by providing automatic discovery of an entire cluster and all its components such as nodes, services, caches, connections, and connection managers. The Management Pack for Oracle Coherence includes:
Topology views showing target associations, highlighting dependencies and performanc
    e hotspots

Customizable performance views with advanced features such as overlays, time select
    or, etc. - create and save your own charts set

Proactive monitoring using performance Alerts and notifications
Monitor log alerts in context of a node
Centralized query based cache data management for important operations such as vie
    w, import, export, purge, etc.

Complete cluster provisioning with node update capabilities
Enhanced caches and nodes monitoring for reap sessions, transactional caches, push r
    eplication, etc.

Advanced configuration management with runtime configuration change capabilities
DBLM Oracle Database Lifecycle Management Pack Compliance management
Configuration management
Fleet Maintenance
Fleet Maintenance Hub
Integration of Fleet Patching and Provision with Fleet Maintenance
Exadata Engineered System Compliance with AHF EXAchk
Provisioning: Ability to provision single instance, RAC, and Multitenant databases
Cloning: Clone to create a copy of an existing single instance, RAC, and Multitenant dat
   abase

Database Change Management: End-to-end management of schemas and data change
   s

Inventory tracking: Ability to track inventory utilization and growth over a period of time
DD Database Diagnostics Pack Offers a complete, cost-effective, and easy to use solution for managing the performance of Oracle Database environments by providing unique functionality such as automatic identification of performance bottlenecks, guided problem resolution, and comprehensive system monitoring. The Diagnostics Pack includes:
Historical performance monitoring and trending (Database, RAC, Host and Cluster target)
RAC/Cluster Interconnect monitoring
ADDM (Automated Database Diagnostic Monitor)
Automatic Workload Repository
Event/Alert Notifications: Notification Methods, Rules and Schedules
Event/Alert history/metric history (Database, RAC, Host and Cluster target)
User-defined metrics
Blackouts/Planned Outages
Monitoring templates
Corrective actions (including response actions)
Memory Access Mode
Diagnostic, Performance and Event reports
Database and repository tables/views/api's that store/expose the above data
Database and Host Consolidation Planner
Automatic Workload Repository (AWR) Warehouse
DMS Oracle Data Masking and Subsetting Pack Oracle Data Masking and Subsetting (DMS) Pack for Oracle and non-Oracle Databases.
DMS helps to model, subset and mask Databases. This pack includes the following components and features:

Application Data Modeling (ADM)
ADM helps to automatically discover columns with sensitive data in Oracle Database.

Data Masking Format Library
Data Masking Definitions
Help to define, generate and execute masking rules by leveraging ADMs, data masking formats, primitives and templates (available for select versions of E-business suite and Fusion Applications).

Data Subsetting Definitions
Help to define, generate and execute subsetting rules by leveraging ADMs and data masking definitions.
DNOM Management Pack for Non-Oracle Middleware Offers a complete, cost-effective, and easy to use solution for managing the performance of non-Oracle middleware environments and applications running on them, by providing unique functionality such as low overhead in-flight monitoring of all Java activity, memory leak analysis, end-to-end tracing of java requests to Oracle database activity, and comprehensive system monitoring. It also includes:
Real-time monitoring of JVM provides a summary view of resource bottlenecks affecting performance, such as the database, I/O, CPU, and locks.
Trace in-flight transactions to view request performance problems in real time. Analyze time spent in each resource bottleneck (extend to each Java method).
DT Database Tuning Pack Offers a set of new, groundbreaking technologies that automate the entire application tuning process, thereby significantly lowering database management costs while enhancing performance and reliability. The Tuning Pack includes:
SQL Access Advisor
SQL Tuning Advisor
SQL Tuning Sets
Reorganize Objects
Note: Tuning Pack requires license for Diagnostics Pack for Oracle Database.
EXMP Exadata Management Pack The Exadata Management Pack offers advanced fleet-level Exadata management, monitoring, patching, performance analysis, and capacity analysis functionality, including:
Exadata Database Impact Advisor
Exadata I/O Resource Management Advisor
Exadata Exascale Advanced Performance Monitoring
Exadata Cloud Advanced Performance Monitoring
Exadata Infrastructure Patching using Fleet Maintenance
•  Advanced Dashboards for Capacity, Inventory, and Performance Analysis
Autonomous Health Framework (AHF) Management
IDM Management Pack Plus for Identity Management Enables enterprises to proactively monitor the availability, performance, load, and security metrics of Identity Management deployments. The pack includes:
Monitor the Identity Management environment from both a systems-oriented view and an end-user perspective. Out-of-box collection of key performance metrics for monitored components facilitates rapid time to value. This enables administrators to set up alerts based on warning and critical thresholds, view current and historical performance information using graphs and reports, and diagnose performance problems by identifying bottlenecks in any of the monitored targets. Administrators can also monitor the Identity Management environment from an end-user perspective using synthetic service tests. These tests simulate key end-user activities, such as logging into an application with single sign-on. The tests are run through beacons from locations within the enterprise network to actively measure the performance and availability of Identity and Access services.
Model Identity and Access services down to the key components they rely on, define service levels based on business requirements, and report against clearly defined Service Level Objectives (SLOs).
Track configuration metrics, take configuration snapshots, and compare configurations for Oracle Access Manager components, as well as Oracle Internet Directory, Oracle Directory Integration Platform, Oracle Virtual Directory, and Oracle Identity Federation.
Please refer to the EM licensing documentation for the features licensed for WebLogic-based containers included in the Identity Management product restricted-use licensing that are licensed and managed by the Management Pack Plus for Identity Management.
MPWCS Oracle WebCenter Portal Management Pack The Oracle WebCenter Portal Management Pack provides monitoring and management for the WebCenter Content: Server, WebCenter Portal: Spaces, WebCenter Portal: Services, and WebCenter Portal: Framework. The Oracle WebCenter Portal Management Pack includes:
Availability and monitoring of all components
Performance monitoring of all components
Historical analysis and reporting
Thresholds and events
Dashboard monitoring
OBIM Oracle BI Management Pack Provides monitoring and management of Oracle BI and OAS Components (Presentation Server, Cluster Controller, Analytics Server, Scheduler and DAC Server). The Oracle BI Management Pack includes:
Availability and monitoring of all components
Process control
Dashboard monitoring
Configuration Management
SLM Service Level Management Pack Delivers functionality to actively monitor and report on availability and performance of critical applications (services and web applications), sites, and infrastructure components using synthetic transactions executed from remote sites (beacons). The Service Level Management Pack includes:
Automated creation of system and service for deployed applications
Change tracking history of system membership
Service availability, performance and usage tests (for all test types)
Beacons for running tests
Service Level Rules
Service Monitoring: Historical performance and Events/Alerts
Metric Snapshots
Metric Baselines
Monitoring Templates
Monitor Forms application availability, performance, usage, and service level compliance
Service Level Reports
Repository tables/views that store/expose the above data
SOAM SOA Management Pack EE Delivers comprehensive management capabilities for a SOA environment. Enterprise Manager makes it easy for the IT administrator to manage SOA runtime environments by discovering Oracle SOA Suite, Oracle BPEL Processes and Oracle Service Bus instances.
The SOA Management Pack EE includes:
Centralized Management Console
Discovery and Service Modeling
Oracle SOA Suite Infrastructure
Oracle SOA Suite Composite
Oracle BPEL Process Manager
Oracle BPEL Processes
Oracle BPEL Partner Links
Oracle Service Bus
Oracle Service Bus Business Services
Oracle Service Bus Proxy Services
Web Services Monitoring
SOAP Tests
Request-Based Monitoring
End Point URI Monitoring
Proxy Service Flow
Infrastructure Management
Application Server
Dehydration Store
Business-IT Alignment
BAM-EM integration
Service Level Management for BPEL Business Processes and Partner Links
SOA Diagnostics
Fault Management
Fault Search
Fault Recovery
Error Hospital Integration
SOA Instance Tracing
Dehydration Store Monitoring
Historical Analysis and Reporting
Performance Monitoring
Thresholds and Metrics
Event/Alert Notifications
WLSEE WLS Management Pack EE WebLogic Server Management Pack Enterprise Edition provides comprehensive management capabilities for Oracle Fusion Middleware, Oracle WebLogic Server, Oracle GlassFish Server, and Oracle Application Server environments. This pack also includes Oracle Coherence and Oracle Exalogic Elastic Cloud engineered systems management. Key functional areas provided by this pack include:

Performance Management and Diagnostics that enable you to:

Track availability and performance data over time
Receive notifications of potential problems
Suspend monitoring during scheduled maintenance periods
Gain real-time visibility into a JVM and application state without instrumentation overhead
View response time breakdowns in each layer of a JVM (servlet, JSP, EJB, JDBC, SQL)
Isolate problems between Java and the database
View the impact of database problems on all associated applications and JVMs
Discover, record and correlate transactions as they flow across components
Search and monitor across log files for messages
Service Level Management that enables you to:
Measure availability and performance from representative key user locations
Monitor service availability, performance, usage and service level compliance
Model critical business functions based on a wide range of supported protocols
Lifecycle Management that enables you to:
Manage configurations via comparisons, change tracking, synchronizations, and compliance rules
Clone a WebLogic Domain or scale out a WebLogic Cluster (12c)
Deploy a Java EE application
Receive patch recommendations from My Oracle Support
Apply patches to multiple WebLogic Domains
Perform disaster recovery operations such as site failover or switchover
Posted by pat98

Oracle Standard Edition 환경에서는 RAT (Real Application Testing)를 정상적으로 진행할수 없는데 Trace 파일을 이용하여
편법으로 RAT 를 이용하는 방법이 있어 기록해 놓는다.
-> 원래 Oracle Enterprise Edition 의 라이센스가 있어야 가능하다.


설정하는 방법은 sqlplus 에서 직접 셋팅하거나 Tool 등에서 Trigger 를 사용하는 방법으로 할수 있고 본인의 테스트 환경에 맞춰어 
셋팅하면 될 듯 하다.

- 전반적인 SPA 작업순서는 아래와 같다.

운영환경 : SE
- Trace 화일-> Workload 진행 -> Trace 중지 -> 매핑 Table 생성 (Trace를 STS변환) -> Trace 화일 복사

테스트 환경 : EE
- 운영 환경 이관 (datapump) -> 매핑 table 생성 -> 매핑 table 마이그레이션 -> Trace 화일에서 STS 생성 -> STS 에서 1번째 SPA 실행  -> 테스트환경에서 2번쨰 SPA 실행 -> 2번 실행한 결과애서 리포트 생성

================================================================
작업시작~~

1) SQL*Plus에서 테스트 대상 워크로드를 실행할 수 있는 경우

- 해당 유저로 접속
SQL > conn scott/tiger

SQL Trace 설정
SQL> ALTER SESSION SET TIMED_STATISTICS=TRUE;
SQL> ALTER SESSION SET MAX_DUMP_FILE_SIZE=UNLIMITED;
SQL> ALTER SESSION SET TRACEFILE_IDENTIFIER='SQLTRACE';
SQL> ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 4';

2)  애플리케이션에서 테스트 대상 워크로드를 실행하는 경우

- 해당 유저로 접속
SQL > conn scott/tiger

- 로그온시 SQL Trace를 얻는 Trigger 생성

SQL > CREATE OR REPLACE TRIGGER logon_sqltrace AFTER LOGON ON SCHEMA
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET TIMED_STATISTICS=TRUE';
EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 4''; 
EXECUTE IMMEDIATE 'ALTER SESSION SET TRACEFILE_IDENTIFIER=''SQLTRACE'' ';
EXECUTE IMMEDIATE 'ALTER SESSION SET MAX_DUMP_FILE_SIZE=UNLIMITED'; 
END;
/

- 로그오프시 SQL Trace 중지하는 Trigger 생성

SQL> CREATE OR REPLACE TRIGGER logoff_sqltrace BEFORE LOGOFF ON SCHEMA
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS' '10046 TRACE NAME CONTEXT OFF'' '; 
END;
/

3) Trace 화일의 기본 위치 확인 (해당 경우에는 trc 화일명에 ~~SQLTRACE.trc 로 파일이 생성된다.

SQL > SHOW PARAMETER USER_DUMP_DEST

보통의 경우 $ORACLE_BASE/diag/rdbms/[DB명]/[SID]/Trace

4) Trace 화일을 STS (SQL Tuning Set)으로 변환하기 위한 매핑 Table 생성

create table mapping_table as select object_id id, owner, substr(object_name, 1,
30) name from dba_objects where object_type NOT IN ('CONSUMER
GROUP','EVALUATION CONTEXT','JAVA DATA','JAVA
RESOURCE','LIBRARY','LOB','OPERATOR','PACKAGE','PACKAGE
BODY','PROCEDURE','QUEUE','RESOURCE PLAN','TRIGGER','TYPE','TYPE BODY‘)
union all select user_id id, username owner, null name from dba_users;

5) 테스트 환경 생성
- datapump 의 기능을 사용하여 테스트 환경 만들기
• Test 환경에도 매핑 Table 을 만들고 Table의 데이터 마이그레이션
• 운영 환경에서 생성된 Trace 파일을  복사 (/home/oracle/STS_WORK)

6) SQL Trace  파일을 저장할 위치 지정

create or replace directory MYDIR as '/home/oracle/STS_WORK';

CREATE_SQLSET API를 사용하여 STS 를 만들고, SELECT_SQL_TRACE에서 반환되는 커서 LOAD_SQLSET에 전달

DECLARE
cur sys_refcursor;
BEGIN
dbms_sqltune.create_sqlset('trace_toSTS');
open cur for
select value(p)
from table(dbms_sqltune.select_sql_trace( directory
=> 'MYDIR',
file_name => '%DB0908_ora',    <<<<<<--------------- 이 부분을 출력된 실제 Trace 화일명으로 편집                   
mapping_table_name => 'MAPPING_TABLE')) p;
dbms_sqltune.load_sqlset(
sqlset_name => 'trace_toSTS',
populate_cursor => cur,
commit_rows => 1);
close cur;
END;
/

7) STS 에서 SPA 실행

SQL> begin
dbms_sqlpa.execute_analysis_task(
 task_name => 'SPA_TASK',
 execution_name => 'NewTrial',
 execution_type => 'CONVERT SQLSET',
 execution_desc => 'fromSTS');
end;
/

7) 테스트 환경에서 SPA 실행

begin
dbms_sqlpa.execute_analysis_task(
 task_name => 'SPA_TASK',
 execution_name => 'New19Trial',
 execution_type => 'TEST EXECUTE',
 execution_desc => '19Execute');
end;
/

================================================================
여기까지 끝..

100% 이해 못한 상태에서 테스트해 봤는데 잘 안되서 다시 해 봐야겠다.-_-;

* 환경에 따라 다르지만 완벽하게 작동하지 않으므로 SE에서 SPA를 실행하면 아래 오류가 있을 수 있다. 

1) 생성된 리포트에 오류가 있을 수 있다. (오류확인은 가능하나 성능정보가 출력되지 않거나 하는 경우)
2) 바인드 변수가 설정된 SQL 을 추출할 수 없음.

Posted by pat98

Critical Patch Update (CPU) Program Oct 2025 Patch Availability Document (DB-only) (Doc ID 3102899.1)

패치작업 19.29.0.0.251021 (GI RU 38298204 )

Database Patch Set Update : 19.29.0.0.251021 (38291812)
OCW Patch Set Update      : 19.29.0.0.251021 (38322923)
ACFS Patch Set Update     : 19.29.0.0.251021 (38311528)
Tomcat Release Update     : 19.0.0.0.0       (38380425)
DBWLM Release Update      : 19.0.0.0.0       (36758186)

Oracle Grid Infrastructure Patch Set Update 19.29.0.0.251021 
-------------------------------------
GI_HOME, ORACLE_HOME 을 개별로 각각 할때

- grid 유저
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/38291812
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/38322923
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/38311528
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/36758186
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/38380425

- oracle 유저
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/38291812
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/38298204/38322923

(oracle)
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

(root 유저)
export GI_HOME=/u01/app/19.0.0.0/grid
$GI_HOME/crs/install/rootcrs.sh -prepatch 

(grid 유저)
export GI_HOME=/u01/app/19.0.0.0/grid
cd /u01/patch
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/38298204/38322923 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/38298204/38311528 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/38298204/38291812 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/38298204/36758186 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/38298204/38380425 -silent

(oracle 유저)
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
cd /u01/patch
./38298204/38322923/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /u01/patch/38298204/38322923 -silent
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /u01/patch/38298204/38291812 -silent
./38298204/38322923/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME 

(root 유저)
export GI_HOME=/u01/app/19.0.0.0/grid
$GI_HOME/rdbms/install/rootadd_rdbms.sh
$GI_HOME/crs/install/rootcrs.sh -postpatch 

(oracle)
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name> 

- Loading Modified SQL Files into the Database
sqlplus /nolog
SQL> conect / as sysdba
SQL> startup
SQL> quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose

### [롤백하는 경우] ###########

(oracle)
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

GI Home
(root로)
$GI_HOME/crs/install/rootcrs.sh -prepatch -rollback

(grid 유저로)
export GI_HOME=/u01/app/19.0.0.0/grid
cd /u01/install
$GI_HOME/OPatch/opatch nrollback -local -id 38322923,38311528,38291812,36758186,38380425 -oh $GI_HOME -silent

(oracle 유저로)
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
cd /u01/install
./38298204 /38322923/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME 
$ORACLE_HOME/OPatch/opatch nrollback -local -id 38322923,38291812 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -silent
./38298204 /38322923/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME

Run post script
(root로)
export GI_HOME=/u01/app/19.0.0.0/grid
$GI_HOME/rdbms/install/rootadd_rdbms.sh
$GI_HOME/crs/install/rootcrs.sh -postpatch -rollback

(oracle)
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>

sqlplus /nolog
SQL> conect / as sysdba
SQL> startup
SQL> quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose

Posted by pat98

설치 로그를 모니터링하다가 귀찮아서 만들어 봄.

 

보통 작업할때 tail 명령어로 지금 생성되고 있는 로그화일 하나만 모니터링 하게 되는데..

특정 디렉토리 위치에 계속 화일 이름이 바뀌면서 시간순으로 쌓이고 있을때 매번 여는게 아니라 계속 끊김없이 보기 위해 만들어 보았다. (오라클의 경우 dbca 로그 등등)

 

- 단순하게 시간순으로 kill 하고 보면 되는거라 작동은 잘 되는듯 하다. (디렉토리 위치와 interval 5초만 수정하면 됨)

 

#!/bin/bash
DIR="/u01/app/oracle/cfgtoollogs/dbca/CDB"
LAST_FILE=""

while true; do
  NEW_FILE=$(ls -t "$DIR" | head -n 1)
  if [[ "$NEW_FILE" != "$LAST_FILE" ]]; then
    echo ">>> lastest file changed : $NEW_FILE"
    LAST_FILE="$NEW_FILE"
    pkill -P $$ tail 2>/dev/null   # previous process teminated
    tail -f "$DIR/$NEW_FILE" &
  fi
  sleep 5
done

Posted by pat98

ASM 환경에서 file system <-> ASM 간 화일 복사를 위해서는 아래 명령어를 사용하여 상호간 복사를 할수 있다.

asmcmd cp     (일반화일)
asmcmd pwcopy (password 화일)

 

 암호화 TDE 를 쓰는 환경에서는 keystore 화일을 kscopy 명령어로 복사 또는 백업이 가능하다. (일반적인 상황은 아니고 이관작업이나 구조변경시 필요할듯..)
 
TDE 환경에서 asmcmd cp 명령도 진행되지만 복사될때 해당  file의 format 이 그대로 복사되어 뭔가 문제를 일으키는 듯 한다.

- TDE Key 복사 또는 백업 방법

How to backup TDE keystore using ASMCMD (Doc ID 2951705.1)

---ASM to FileSystem---
ASMCMD> kscopy +DATA/wallet/tde/ewallet.p12 /tmp --local

---FileSystem to ASM---
ASMCMD> kscopy /tmp/ewallet.p12 +DATA/wallet/tde --local

ps. 19c 의 경우 현재 filesystem -> ASM 환경으로 복사시 아래와 같은 Bug 이 있으며 RU 19.23 이상에서 fix 되었다고 한다. 

This falls under bug 36013758.

How to backup TDE keystore using ASMCMD (Doc ID 2951705.1)

- Bug 36013758 - ASMCMD-8002: ENTRY ... DOES NOT EXIST IN DIRECTORY '+DATAFILE/NEW/'

Bug 36013758 included a fix in DBRU 19.23.
Currently, it is highly recommended to apply latest DBRU.

Posted by pat98

11-26 19:28
Flag Counter
Yesterday
Today
Total

글 보관함

최근에 올라온 글

달력

 « |  » 2025.11
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

최근에 달린 댓글