Wednesday, 8 May 2019

Oracle DBA: To un-quiesce Oracle database

SQL> select active_state from v$instance;
 
ACTIVE_ST
---------
QUIESCED
 
SQL> alter system unquiesce;
 
System altered.
 
SQL> select active_state from v$instance;
 
ACTIVE_ST
---------
NORMAL

Sunday, 31 March 2019

UNIX and Windows : Command to find a string in a files including sub-directories


Search for ORACLE_HOME in UNIX

grep -H -r "ORACLE_HOME" /home/oracle




Search for ORACLE_HOME in Windows

finstr /M /C:"ORACLE_HOME"  *.*

Saturday, 2 March 2019

ORA-39171: Job is experiencing a resumable wait

ORA-39171: Job is experiencing a resumable wait
                                                 Last update (2012-05-03 06:48:50)
                                                                                                                   Date added (2019-01-25 04:08:20)
Summary
In the datapump import phase you get errors related to tablespace allocation. For example you don't have any more space left at the filesystem. So at the import you have errors:
Import: Release 11.2.0.4.0 - 64bit Production on Wednesday, 25 Jan, 2019 12:06:16

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01":  HOSPITAL/******** DIRECTORY=DWH_TRANSFER_DIR DUMPFILE=HOSPITAL.dmp parfile=target_bill_par.par
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39171: Job is experiencing a resumable wait.
ORA-01658: unable to create INITIAL extent for segment in tablespace USERS
How to restart Datapump
1. In the IMPDP command line, press CTRL-C to stop the job.
2. At the command line of the import
Import> stop_job=immediate
Are you sure you wish to stop this job ([yes]/no): y
3. Fix the tablespace error
4. Attach again the job. Check sqlplus>SELECT * FROM DBA_DATAPUMP_JOBS;
Use the job name which is something like "SYS_IMPORT_FULL_*"
$impdp system/**** attach=SYS_IMPORT_FULL_01
5. At the command line of the import
Import> start_job
6. Check sqlplus>SELECT * FROM DBA_DATAPUMP_JOBS; It is running again.

Wednesday, 27 February 2019

Oracle Database: Open Wallet Automatically After Starting The Database.

create one trigger which will open the wallet automatically immediately after database opened:


CREATE or replace TRIGGER OPEN_WALLET
AFTER STARTUP ON DATABASE
BEGIN
execute immediate ‘ALTER SYSTEM SET ENCRYPTION WALLET OPEN identified by “xxxxx”’;
END;
/

Tuesday, 26 February 2019

Oracle Database 18c: Check latest applied patches queyr DBA_REGISTRY_SQLPATCH

Check latest applied patches queyr DBA_REGISTRY_SQLPATCH



Upgrading oracle 18.4 to 18.5 opatchauto: Prerequisite check "CheckApplicable" failed

Issue:
[Feb 27, 2019 10:13:52 AM] [INFO]   Patch 28864593:
                                    Copy Action: Source File "/oracle/PATCHES/28828717/28864593/files/bin/ocrcheck.bin" does not exists or is not readable
                                    'oracle.has.crs, 18.0.0.0.0': Cannot copy file from 'ocrcheck.bin' to '/grid/app/18.3/bin/ocrcheck.bin'
                                    Copy Action: Source File "/oracle/PATCHES/28828717/28864593/files/bin/ocrconfig.bin" does not exists or is not readable
                                    'oracle.has.crs, 18.0.0.0.0': Cannot copy file from 'ocrconfig.bin' to '/grid/app/18.3/bin/ocrconfig.bin'
[Feb 27, 2019 10:13:52 AM] [INFO]   Prerequisite check "CheckApplicable" failed.
                                    The details are:


Solution:
Owner of the patch file should be grid home owner, extract the patch with grid user or change file ownership to the user.

Upgrading oracle 18.4 to 18.5 Prerequisite check "CheckActiveFilesAndExecutables" failed.

I faced this issue: 
Following executables are active : libclntsh.so.18.1
                                    /oracle/app/product/18.3/lib/libclntsh.so.18.1
                                    /oracle/app/product/18.3/lib/libsqlplus.so
[Feb 26, 2019 2:47:28 PM] [SEVERE]  OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.



                                  The details are:


                                    Following executables are active :
                                    /grid/app/18.3/lib/libclntsh.so.18.1
                                    /grid/app/18.3/lib/libasmclntsh18.so
                                    /grid/app/18.3/lib/libskgxp18.so
                                    /grid/app/18.3/bin/oracle


Solution:
1- Stop the oracle emagent.
2- Stop the CRS using "crsctl stop crs -f"
3- Re-run the patch using opatchauto resume


Number of Visitors