When the last time the password has been changed ?

Do you want to know what is the last time the DBA or developers change the password ?

Using the below table :-
Name
Null
Type
USER#       
NOT NULL
NUMBER
NAME        
NOT NULL
NUMBER        
TYPE#       
NOT NULL
VARCHAR2(30)  
PASSWORD    
        
NUMBER        
DATATS#     
NOT NULL
NUMBER        
TEMPTS#     
NOT NULL
DATE          
CTIME       
NOT NULL
DATE          
PTIME       
        
DATE          
EXPTIME     
        
DATE          
LTIME       
        
NUMBER        
RESOURCE$   
NOT NULL
VARCHAR2(38)  
AUDIT$      
        
NUMBER        
DEFROLE     
NOT NULL
NUMBER        
DEFGRP#     
        
NUMBER        
DEFGRP_SEQ# 
        
NUMBER        
ASTATUS     
NOT NULL
NUMBER        
LCOUNT      
NOT NULL
VARCHAR2(30)  
DEFSCHCLASS 
        
VARCHAR2(4000)
EXT_USERNAME
        
NUMBER        
SPARE1      
        
NUMBER        
SPARE2      
        
NUMBER        
SPARE3      
        
VARCHAR2(1000)
SPARE4      
        
VARCHAR2(1000)
SPARE5      
        
DATE
SPARE6      
        
NUMBER        
USER#       
NOT NULL
VARCHAR2(30)  
NAME        
NOT NULL
NUMBER        
TYPE#       
NOT NULL
NUMBER        
PASSWORD    
        
DATE          
DATATS#     
NOT NULL
DATE          
TEMPTS#     
NOT NULL
DATE          
CTIME       
NOT NULL
DATE          
PTIME       
        
NUMBER        
EXPTIME     
        
VARCHAR2(38)  
LTIME       
        
NUMBER        
RESOURCE$   
NOT NULL
NUMBER        
AUDIT$      
        
NUMBER        
DEFROLE     
NOT NULL
NUMBER        
DEFGRP#     
        
NUMBER        
DEFGRP_SEQ# 
        
VARCHAR2(30)  
ASTATUS     
NOT NULL
VARCHAR2(4000)
Referring to Oracle Documentation :-
     
NAME – name for user or role
TYPE# – 0 for role or 1 for user
CTIME – the date of creation
PTIME – the date the password was last changed
EXPTIME – the date the password has last expired
LTIME – the date the resource was last locked
LCOUNT – number of failed logon
You Can use this query :-

SELECT name, ctime, ptime FROM sys.user$ WHERE name = ‘USER-NAME’;

Thank you
Osama 

OCP Upgrade 1Z0-060 Exam guide

This guide will get Oracle admins up to date with the latest developments in Oracle 12c. It includes all the necessary information that you need to implement in your existing systems.

All of the information in this book has been handpicked to help you study for the Oracle 12c upgrade exam. Each chapter has been written with the objective of helping you pass this exam with ease. Content in this book is aligned with the objectives of the exam, making it really easy to follow the course content. Every example mentioned in this book has been tried and tested in actual environment. Real-world examples will help you learn about new features such as multitenant containers database architecture, managing containers, pluggable databases, database administration enhancements, database auditing, tuning, backup, and flashback enhancements.

You will also learn about storage enhancements, security updates, tuning, troubleshooting, and backup enhancements. This book also covers section 2 of the exam course making this book a complete guide for passing OCP 12c upgrade exam 1Z0-060.

What you will learn

All of the new features of the Oracle 12c database that you are required to know for the OCP Upgrade Exam 1Z0-060
New multitenant architecture introduced in Oracle 12c and how it works
Monitor complex database operations and use the new enhanced SQL tuning features to tune bad SQLs
Manage data over time using information life cycle management
Make your data more secure by implementing new enhanced auditing
Learn new security features and how to implement encryption to secure your data
Explore how backup and flashback works with new multitenant architecture
Performance management techniques that will analyze and tune your database

The book link from here

Cheers
Osama

2016 Another Year In this world

I don’t know if it is early to write something now, most of people will share this during the end of December but i choose to write mine earlier, i will not share anything technical this time but i will share what i did during this year maybe it will be useful for someone 🙂 so enjoy reading.

I did a lot of things during 2016 and most of them related to my work and what i love which is Oracle and contribution in Oracle community there was differenct conference during this year which took a lot of time and travel i don’t how much time i spent in the air but i am sure it’s more than 10 days since i am living in the other side of the world which is Jordan – Amman or Sometimes Dubai.

I start the year with one of the best conference and the well known one which is Rocky mountains and this is was my first time in this amazing conference during the conference i celebrate my birthday in Denver with my friends, alot of the conference and traveling so i will mention them as point ( i don’t want the reader to get bored  ).

  • RMOUG 
  • OUGN
  • IOUG
  • TROUG
  • OUGF
  • OTN TOUR – LA 
  • OOW 
  • DOAG
For the Other contribution i did the following :- 
  • Organize Local event for Jordan Amman Oracle User Group.
  • Technical Reviewer for two books.
  • Technical Reviewer for Videos about Oracle database series. 
  • working on my new book.
  • write different oracle articles.
  • Sure … Post blogs about Oracle.
I feel like i forgot something to mention but if i remember anything i will publish it for sure and update the blog post here. 
I would like to take this opportunity to thanks Oracle ACE Program to allow us & support us do what we are doing for the community. which is one of the best community in the world.
I am always thankful for meeting new friends around the world and for my family for their continues support.

Thank you Oracle

Wish Happy new year everyone and all of the best next year.
Merry Christmas everyone enjoy the holiday. 
My friends see you next year Inchallah 🙂 Finally Inchallh next year will be better for all of us.
Cheers
Osama 
Like Usual comments are always welcome. 

adop exiting with status = 255 (Fail)

[oracle@ebsnew appl]$ adop phase=abort

Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:

 Please wait. Validating credentials…

Enter the RUN file system context file name [/u01/oracle/EBSTST/fs1/inst/apps/EBSTST_ebsnew/appl/admin/EBSTST_ebsnew.xml]:

Enter the PATCH file system context file name [/u01/oracle/EBSTST/fs2/inst/apps/EBSTST_ebsnew/appl/admin/EBSTST_ebsnew.xml]:

[STATEMENT] [END   2016/11/22 17:15:45] Performing verification of parameters
[STATEMENT] [START 2016/11/22 17:15:45] Checking for the required ENV setup
[STATEMENT] [END   2016/11/22 17:15:45] Checking for the required ENV setup

************* Start of  session *************
 version: 12.2.0
 started at: Tue Nov 22 2016 17:15:45

APPL_TOP is set to /u01/oracle/EBSTST/fs1/EBSapps/appl
[STATEMENT] [START 2016/11/22 17:15:45] Determining admin node
[STATEMENT] [END   2016/11/22 17:15:47] Determining admin node
[STATEMENT] [START 2016/11/22 17:15:49] Acquiring lock on sessions table
[STATEMENT] [END   2016/11/22 17:15:50] Acquiring lock on sessions table
[STATEMENT] [START 2016/11/22 17:15:50] Checking for any pending sessions
[STATEMENT] There is already a hotpatch session which is incomplete. Details are:
[STATEMENT]     Session Id: 2
[STATEMENT]     Prepare phase status: X
[STATEMENT]     Apply phase status: P
[STATEMENT]     Cutover  phase status: R
[STATEMENT]     Abort phase status: X
[STATEMENT]     Session status: F
[STATEMENT] [Note: Y denotes that the phase is done
[STATEMENT]        N denotes that the phase has not been completed
[STATEMENT]        X denotes that the phase is not applicable
[STATEMENT]        R denotes that the phase is running (in progress) or ran
[STATEMENT]        F denotes that the phase has failed
[STATEMENT]        P (is applicable only to APPLY phase) denotes atleast
[STATEMENT]           one patch is already applied for the session id
[STATEMENT] Online patching tool cannot proceed when a previous patching session is incomplete
[STATEMENT] Please ensure no pending patching sessions exist before trying a new patch
[ERROR]     Unrecoverable error occured. Exiting the current session.
[STATEMENT] [START 2016/11/22 17:16:08] Unlocking sessions table
[STATEMENT] [END   2016/11/22 17:16:09] Unlocking sessions table
[STATEMENT] Log file: /adop_20161122_171500.log
[STATEMENT] [START 2016/11/22 17:16:11] Unlocking sessions table
[STATEMENT] [END   2016/11/22 17:16:12] Unlocking sessions table
Can’t call method “close” on an undefined value at /u01/oracle/EBSTST/fs1/EBSapps/appl/au/12.0.0/perl/ADOP/Phase.pm line 239.

adop exiting with status = 255 (Fail)

I tried different thing but we run the abort again it’s working , and do the following as well.

Run Autoconfig
run adop phase=fs_clone

Thanks.

Remove Conflict Patch From Weblogic

When trying to apply new patch to the weblogic the following error shown up :-

[oracle@ebsnew bsu]$ ./bsu.sh -prod_dir=/u01/oracle/EBSTST/fs1/FMW_Home/wlserver_10.3/ -patch_download_dir=/u01/oracle/EBSTST/fs1/FMW_Home/utils/bsu/cache_dir/                                 -patchlist=EJUW -verbose -install
Checking for conflicts…

Conflict(s) detected – resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch EJUW is mutually exclusive and cannot coexist with patch(es): Y5AP,BLTG,FCX7,1LRI,VKXF,2GYW,CW9T

To solve this issue you have to remove the patch and reapply the one again;-

[oracle@ebsnew bsu]$ ./bsu.sh -prod_dir=/u01/oracle/EBSTST/fs1/FMW_Home/wlserver_10.3/ -patchlist=Y5AP,BLTG,FCX7,1LRI,VKXF,2GYW,CW9T -verbose -remove
Checking for conflicts……….

After this try to apply the patch again.
Thanks
Osama

Installing SIEBEL 15 on RAC took a lot of time

The Situation like the following when we was trying to install SIEBEL On RAC 12C its took 10 hours for importing 2 database which is usually takes 2 hours at max, storage was NFS , enabled DNFS for sure.

simulate the following case :-

  • On single node , 2 hours like usual.
  • On RAC 12c using DNFS file system 10 hours.
  • On RAC 12c using DNFS but single node of RAC took 10 hours.
  • On RAC 12c using local file system and single node 10 hours.
  • Install oracle 11gR2 RAC and try it again took 4 hours using ASM on DNFS.

Using SLOB didn’t see anything related to storage issue.

After investigation and a lot of working without tuning on 12c it’s took 1 Hour and 37 min.

The problem with two different way :-

  • Heartbeat not configured correctly.
  • SIEBEL Installation should not run with Index parallel option.
Thanks
Osama.

Create new swap file to Linux

to add new swap file to Linux just follow the below steps , in my case i will add 32GB and i am not using LVM :-

  • just create file by the below command :-
    • touch /new.swap
  • Write on the file :-
    •  dd if=/dev/zero of=/new.swap bs=1024 count=33554432
  • Format the file :-
    • mkswap /new.swap
  • Add the file to the system as a swap file.
    • swapon /new.swap
  • finally add it to fstab :-
    • /new.swap none swap sw 0 0
Thanks
Osama

Direct NFS: please check that oradism is setuid

The above error appeared in Database Alertlog  and it’s related to permission, i am using DNFS as file system for Database :-

 ls -ltr  $ORACLE_HOME/bin/oradism

-rwxrwxr-x 1 sorabill oinstall 109247 Jul  7  2014 /u01/app/oracle/product/12.1.0/dbhome_1//bin/oradism

as you see from the above the permission for this file is wrong 
  • Change to root user
  • Run the following command :-
    • cd /u01/app/oracle/product/12.1.0/dbhome_1//bin
    • chmod 750 oradism
    • chmod u+s oradism
  • Restart DB.
Check again.
Cheers
Osama

Change SCAN Listener from etc/host to DNS

Changing SCAN LISTENER from etc/hosts on Linux to use DNS which mean the from one IP to 3 IPs

The SCAN listener will remain the same without any change therefore like i mentioned before the these steps only provide changing for SCAN to use DNS.

“I Will not post any output”

the configuration for the IP should be added to DNS and to check this on OS level you should nslookup command :-

On node #1 run the below command to check the Listener status and see the current configuration:-

srvctl status scan
srvctl status scan_listener
srvctl config scan
srvctl config scan_listener

On node #2 run the below command to check the Listener status and see the current configuration:-

srvctl status scan
srvctl status scan_listener
srvctl config scan
srvctl config scan_listener

The output should be the same for both.

Stop all the listeners on your RAC as root :-

srvctl stop scan_listener
srvctl stop scan
srvctl status scan
srvctl status scan_listener

Remove or comment any entire in /etc/hosts after done stop the listener.

Let’s modify the scan :-

srvctl modify scan -n
srvctl modify scan_listener –u

Start listener :-

srvctl start scan
srvctl start scan_listener
srvctl status scan
srvctl status scan_listener

Thanks
Osama