Thursday, May 20, 2021

How restore database from TSM back for DR Test.

 Assume your oracle database rman backup files are stored in TSM.

Make sure the mount point is comes up.

dsmc

tsm > restore -inactive /apps/* sudir=yes

All the files will be restore from tsm for your environment. like oracle home, TNS_ADMIN/ ... etc.

tsm > restore - inactive /orafra/$SID subdir=yes

Sames as above all the files will be restored from /orafra/$SID/ Ctl, dbf, redo .. etc..

Restore function invoked.

Assume all the neccessary files are restored from TSM for your environment.


$rman target=/

STARTUP NOMOUNT

RESTORE CONTROL FILE FROM AUTOBACKUP;

SHUTDOWN IMMEDIATE;

STARTUP MOUNT;

RESTORE DATABASE;

RECOVER DATABASE;

SQL "ALTER DATBABASE OPEN RESETLOGS";

ALTER DATBASE OPEN RESETLOGS;



Friday, May 14, 2021

ADCGNJAR

Ref Notes:  Note 1609939.1

Oracle has introduced adcgnjar utililty for the deployments which helps to create customall.jar file in $JAVA_TOP. This jar file will picked and executed by the application server.

  • Place required OAF CO/VO/EO files in $JAVA_TOP respective folder.

  • Run adcgnjar utile package which is available in $AD_TOP.

  • Add the entry for customall.jar in the ebsProduct Manifest.xml file

  • Bounce the mid-tier server

     { sleep 1s; echo apps; sleep 1s; echo appspassword;} | adcgnjar


Friday, April 23, 2021

EBS Application and DB Tunning

 https://www.oracle.com/technetwork/apps-tech/ebs-performance-tuning-part-1-470542.pdf


How to run adconfig on Patch file system?

 1. you must disable trigger ebs_login prior to running autoconfig.

2. Log into sqlplus as SYSTEM

3.  SQL> alter trigger ebs_logon_disable; trigger altered.  exit;

4.$ehco $FILE_EDITIONS it should show patch file system PATCH

5. adautocfg.sh  once completed successfully enable the trigger.

6. log  into sqlplus as SYSTEM

7 . SQL>  alter trigger ebs_logon_enable;  trigger altered. exit;


Monday, January 11, 2021

oafm_server1 status was admin mode

 ####<Jan 11, 2021 9:58:56 PM EST> <Info> <JDBC> <suthakar.prince> <oaea_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1610420336490> <BEA-001177> <Creating data source connection pool named OAEADatasource, URL = jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=suthakar.prince)(PORT=1608)))(CONNECT_DATA=(SERVICE_NAME=DEV))), Properties = user=APPS;.>                                                                                                                                                          
####<Jan 11, 2021 9:58:56 PM EST> <Info> <Common> <suthakar.prince> <oaea_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1610420336505> <BEA-000626> <Free resources in pool "OAEADatasource" will be tested every "120" seconds.>                       
####<Jan 11, 2021 9:58:59 PM EST> <Info> <JDBC> <suthakar.prince> <oaea_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1610420339875> <BEA-001508> <Destroying data source connection pool OAEADatasource.>                                              
####<Jan 11, 2021 9:58:59 PM EST> <Info> <JDBC> <suthakar.prince> <oaea_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1610420339876> <BEA-001155> <The following exception has occurred:                                                                

weblogic.common.ResourceException: Unknown Data Source OAEADatasource
        at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownConnectionPool(ConnectionPoolManager.java:622)
        at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownAndDestroyPool(ConnectionPoolManager.java:594)
        at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownAndDestroyPool(ConnectionPoolManager.java:520)
        at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:320)  


Solution:

login into EBS weblogic Console Navigate to EBSDATASource and click OAEADataSource - > connectionpool - and update apps password.

admanagedsrvctl.sh stop oaea_server1

admanagedsrvctl.sh start oaea_server1


Wednesday, November 11, 2020

SQLT installation.

 FAQ: SQLT (SQLTXPLAIN) Frequently Asked Questions (Doc ID 1454160.1)

1.  Download sqlt_10g_11g_12c_18c_19c_5th_June_2020.zip 

2. mv the zip to $ORACLE_HOME

3. unzip -o sqlt_10g_11g_12c_18c_19c_5th_June_2020.zip

4. /apps2/oracle/product/12.1.0/sqlt
oracle@suthakar$ls -tlr
total 120
drwxr-x---. 3 oracle oinstall  4096 Jun  5 10:37 input
drwxr-x---. 2 oracle oinstall  4096 Jun  5 10:37 doc
drwxr-x---. 2 oracle oinstall  4096 Jun  5 10:38 run
drwxr-x---. 2 oracle oinstall  4096 Jun  5 10:38 install
drwxr-x---. 7 oracle oinstall  4096 Jun  5 10:38 utl
-rw-r-----. 1 oracle oinstall 58466 Jun  5 10:41 sqlt_instructions.html
-rw-r-----. 1 oracle oinstall 39368 Jun  5 10:43 sqlt_instructions.txt
oracle@suthakar$cd install
oracle@suthakar$pwd
/apps2/oracle/product/12.1.0/sqlt/install
oracle@suthakar$
oracle@suthakar$sqlplus '/as sysdba'
SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 11 21:43:55 2020
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> !ls -ltr sqdrop.sql
-rw-r-----. 1 oracle oinstall 1365 Oct 30  2014 sqdrop.sql
SQL> sta sqdrop.sql
SQL> SET ECHO OFF;
SQDUSR completed.
SQDROP completed.
SQL>

Execute installation script sqlt/install/sqcreate.sql connected as SYS
 

SQL> !ls -ltr sqdrop.sql
-rw-r-----. 1 oracle oinstall 1365 Oct 30  2014 sqdrop.sql

SQL> sta sqdrop.sql
... uninstalling SQLT, please wait
TADOBJ completed.                
SQDOLD completed. Ignore errors from this script
SQDOBJ completed. Ignore errors from this script
SQL>                                           
SQL> DECLARE                                   
  2    my_count INTEGER;                        

 29      END LOOP;                                                                                                                
 30    END IF;                                                                                                                    
 31  END;                                                                                                                         
 32  /                                                                                                                            
Cannot drop procedure sys.sqlt$_trca$_dir_set. ORA-04043: object                                                                  
SQLT$_TRCA$_DIR_SET does not exist                                                                                                
Ignore errors from here until @@@@@ marker as this is to test for NATIVE PLSQL Code Type
@@@@ marker . You may ignore prior errors about NATIVE PLSQL Code Type                 
old   1: ALTER SESSION SET PLSQL_CODE_TYPE = &&plsql_code_type                         
new   1: ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE                                    
Session altered.

Specify optional Connect Identifier (as per Oracle Net)
Include "@" symbol, ie. @PROD                         
If not applicable, enter nothing and hit the "Enter" key.
You *MUST* provide a connect identifier when installing 
SQLT in a Pluggable Database in 12c                     
This connect identifier is only used while exporting SQLT
repository everytime you execute one of the main methods.
Optional Connect Identifier (ie: @PROD): @DEV
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Define SQLTXPLAIN password (hidden and case sensitive).

Password for user SQLTXPLAIN: APPS
Re-enter password:            

PL/SQL procedure successfully completed.

The next step is to choose the tablespaces to be used by SQLTXPLAIN

The Tablespace name is case sensitive.

Do you want to see the free space of each tablespace [YES]
or is it ok just to show the list of tablespace [NO]?    

Type YES or NO [Default NO]: YES

... please wait

TABLESPACE                     FREE_SPACE_MB
------------------------------ -------------
APPS_TS_ARCHIVE                           96
APPS_TS_TX_DATA                          456
APPS_TS_NOLOGGING                        655
APPS_TS_INTERFACE                        728
APPS_TS_MEDIA                           1250
APPS_TS_QUEUES                          2084
OWB                                     2323
APPS_TS_SEED                            4616
APPS_TS_TX_IDX                         11173
APPS_TS_SUMMARY                        12029

10 rows selected.
Specify PERMANENT tablespace to be used by SQLTXPLAIN.
 

Tablespace name is case sensitive.
Default tablespace [UNKNOWN]: APPS_TS_SUMMARY
PL/SQL procedure successfully completed.
... please wait
TABLESPACE
------------------------------
TEMP                         
Specify TEMPORARY tablespace to be used by SQLTXPLAIN.
Tablespace name is case sensitive.
Temporary tablespace [UNKNOWN]: TEMP
PL/SQL procedure successfully completed.
The main application user of SQLT is the schema
owner that issued the SQL to be analyzed.     
For example, on an EBS application you would  
enter APPS.                                   
You will not be asked to enter its password.  
To add more SQLT users after this installation
is completed simply grant them the SQLT_USER_ROLE
role.                                           
Main application user of SQLT: XXXX
PL/SQL procedure successfully completed.
SQLT can make extensive use of licensed features
provided by the Oracle Diagnostic and the Oracle
Tuning Packs, including SQL Tuning Advisor (STA),
SQL Monitoring and Automatic Workload Repository
(AWR).                                          
To enable or disable access to these features   
from the SQLT tool enter one of the following   
values when asked:                              

"T" if you have license for Diagnostic and Tuning
"D" if you have license only for Oracle Diagnostic
"N" if you do not have these two licenses        
Oracle Pack license [T]: N
PL/SQL procedure successfully completed.

SQLT users must be granted SQLT_USER_ROLE before using this tool.
SQCREATE completed. Installation completed successfully.

SQL>SQL> grant SQLT_USER_ROLE to APPS;

Grant succeeded.
SQL>