Wednesday, March 15, 2017

How to check Java path in windows

for %j in (java.exe) do @echo.   %~$PATH:j

FIPS 140-2 Settings and verification

How to check what client version is connecting you DB

set linesize 180
set pagesize 600
col sid format 99999
col client_info format a45
col network_service_banner format a85
col CLIENT_VERSION format a10
col CLIENT_DRIVER format a10

break on sid skip 1 on client_info on client_version on CLIENT_DRIVER

select sid,
 (select username||'/'||machine||'/'||osuser  from v$session s where s.sid = i.sid) client_info,
CLIENT_VERSION,
CLIENT_DRIVER,
NETWORK_SERVICE_BANNER
from v$session_connect_info i;


break on sid skip 0

Monday, March 13, 2017

How to Synchronize FND_NODES, ADOP_VALID_NODES, and FND_OAM_CONTEXT_FILES in 12.2

How to Synchronize FND_NODES, ADOP_VALID_NODES, and FND_OAM_CONTEXT_FILES in 12.2 When ADOP Phase=Prepare Fails with Error 'not able to detect any valid application tier nodes in ADOP_VALID_NODES table. ' (Doc ID 2064223.1)

R12.2.5 addition



3.2 New adop monitoring and validation features

CategoryDescriptionParameters
New featuresProgress of an online patching cycle can be followed by running the new Online Patching Monitoring utility (adopmon). This utility can be used to follow the overall progress of a patching cycle, as well as identifying the various individual adop actions being taken.

$ adopmon

Before you start a new patching cycle by running the prepare phase, you can optionally check your system's readiness by running adop with the 'validate' option. If you do this while a patching cycle is in progress, validation will take place for the cutover phase.
$ adop -validate

Wednesday, March 8, 2017

VM Install on Linux 7

yum VirtualBox-5.1-5.1.14_112924_el7-1.x86_64.rpm
Loaded plugins: langpacks, ulninfo
No such command: VirtualBox-5.1-5.1.14_112924_el7-1.x86_64.rpm. Please use /bin/yum --help
[root@prince Downloads]# yum install VirtualBox-5.1-5.1.14_112924_el7-1.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining VirtualBox-5.1-5.1.14_112924_el7-1.x86_64.rpm: VirtualBox-5.1-5.1.14_112924_el7-1.x86_64
Marking VirtualBox-5.1-5.1.14_112924_el7-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package VirtualBox-5.1.x86_64 0:5.1.14_112924_el7-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================
 Package                    Arch               Version                         Repository                                              Size
============================================================================================================================================
Installing:
 VirtualBox-5.1             x86_64             5.1.14_112924_el7-1             /VirtualBox-5.1-5.1.14_112924_el7-1.x86_64             167 M

Transaction Summary
============================================================================================================================================
Install  1 Package

Total size: 167 M
Installed size: 167 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : VirtualBox-5.1-5.1.14_112924_el7-1.x86_64                                                                                1/1

Creating group 'vboxusers'. VM users must be member of that group!

  Verifying  : VirtualBox-5.1-5.1.14_112924_el7-1.x86_64                                                                                1/1

Installed:
  VirtualBox-5.1.x86_64 0:5.1.14_112924_el7-1                                                                                              

Complete!

Friday, March 3, 2017

oerr ora 19809

To got a hit with oerr ora 19809 so I checked 
oerr ora 19809
19809, 00000, "limit exceeded for recovery files"
//*Cause: The limit for recovery files specified by the
//        DB_RECOVERY_FILE_DEST_SIZE was exceeded.
// *Action: There are five possible solutions:
//          1) Take frequent backup of recovery area using RMAN.
//          2) Consider changing RMAN retention policy.
//          3) Consider changing RMAN archived log deletion policy.
//          4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE.
//          5) Delete files from recovery area using RMAN.


I checked my v$recovery_file_dest;

select space_limit/1024/1024/1024 GB,space_used/1024/1024/1024 GB from v$recovery_file_dest;

Then added more GB to it.


ALTER SYSTEM DB_RECOVERY_FILE_DEST_SIZE = 300G scope=both;


Thursday, January 19, 2017

How to RMAN Duplicate from specified backup location ( if you using ASM)

There are many ways to Duplicate/Copy one database to another using RMAN. The details below are not meant to replace Oracle documenation and may not cover all scenarios. The intent for this wiki page is to document the steps frequently used to duplicate a database from a specified backup location.

The assumption is that all files needed for the restore (backupset, archive logs and control file) will be within a single directory location on the TARGET server under /backup.

PREPARE:
•  Comment out any backup or archivelog backups from running (via cron or otherwise) while this restore is occurring.
•  Capture any database accounts that will need to be restored. These will be needed in the POST-REFRESH steps.
•  cd $ORACLE_HOME/dbs
•  mv initPROD.ora initPROD.ora.orig
•  Connected as sysdba, create pfile from spfile; followed by exit;
•  vi initPROD.ora (remove top lines of file with PROD and update control_files line to read *.control_files='+REDO1','+REDO2' #Restore Controlfile

REFRESH:
•  On the Target database, connect to SQL*Plus as sysdba and issue shutdown immediate; followed by exit;
•  rm $ORACLE_HOME/dbs/snap*, .dat, lk files
•  Connect to ASM database using .oraenv and entering +ASM and then asmcmd -p
•  Clean out all ASM files UNDER directories DATA/PROD, FRA/PROD, REDO1, REDO2
•  Reconnect to TARGET database using .oraenv and entering PROD
•  srvctl remove database -d PROD
•  add to /etc/oratab the following entry: PROD:/u01/app/oracle/product/12.1.0.2/dbhome_1:N
•  Connected as sysdba, create spfile from pfile;
•  Connected as sysdba, startup nomount; followed by exit;
•  On the TARGET database server issue: Rman auxiliary /
•  DUPLICATE DATABASE TO PROD NOFILENAMECHECK BACKUP LOCATION '/backup/PPT1_BFR_LIVE_REFRESH/';

POST-REFRESH:
•  At the server prompt type: more initPROD.ora.orig (The purpose here is so you can cut and paste in the CREATE SPFILE line coming up.)
•  Connect to SQL*Plus as sysdba
•  create pfile from spfile;
•  create SPFILE='+DATA/PROD/spfilePROD.ora' from pfile;
•  shutdown immediate; followed by exit;
•  mv initPROD.ora initPROD.ora.lns
•  mv initPROD.ora.orig initPROD.ora
•  rm lkPROD spfilePROD.ora hc_PROD.dat
•  srvctl add database -d PROD -o /u01/app/oracle/product/12.1.0.2/dbhome_1 -p '+DATA/PROD/spfilePROD.ora' -a DATA,FRA,REDO1,REDO2
•  srvctl start database -d PROD
•  register database in RMAN
•  CONFIGURE RETENTION POLICY TO REDUNDANCY 3; <-- database="" dependent="" environment="" o:p="" on="">
•  CONFIGURE DEVICE TYPE DISK PARALLELISM 6 BACKUP TYPE TO BACKUPSET;
•  CONFIGURE COMPRESSION ALGORITHM 'LOW';
•  Turn on any cron entries that were commented out, if any.

•  Restore any database accounts captured before the process started.