Amazon Partner

Wednesday, 15 February 2017

Step by step Oracle Database 12.2 for Exadata - Download today

For those who are waiting for Oracle database 12cR2 ( Oracle 12.2), good news is that, it's available for download since 10 February 2017 from Oracle e-delivery website.

Here are the step by step instructions on downloading.


Step1: Go to https://edelivery.oracle.com and login using your Oracle Metalink username/Passsord.
Step2: Search for Oracle Database Enterprise Edition
Step3: Select Linux x86 - 64 from "Select platform" list



Step4 : Press continue
Step5:  click little down arrow key to see details and make sure your selection is correct.

Step6:  Press continue and accept oracle Term and Conditions.



and Oracle 12.2 is available to download and install on your Test system so you can start planning the upgrade when you fully tested against your application.


Please beware this download is available for Exadata  and it will be available for  standard x86-64 bit platform from 15-March 2017.

Here is the list of version available for different component.  you will notice all components are available for 12.2 except database client on windows platform which is still 12.1.0.2


Oracle Database Client (12.2.0.1.0 Exadata/SuperCluster)
V839967-01.zip Oracle Database 12c Release 2 Client (12.2.0.1.0) for Linux x86-64
V839968-01.zip Oracle Database 12c Release 2 Client (12.2.0.1.0) for Linux x86

Oracle Database Global Service Manager (12.2.0.1.0 Exadata/SuperCluster)
V840019-01.zip Oracle Database 12c Release 2 Global Service Manager (12.2.0.1.0) for Linux x86-64

Oracle Database Grid Infrastructure (12.2.0.1.0 Exadata/SuperCluster)
V840012-01.zip Oracle Database 12c Release 2 Grid Infrastructure (12.2.0.1.0) for Linux x86-64

Oracle Database Client (12.1.0.2.0)
V47121-01.zip Oracle Database 12c Release 1 Client (12.1.0.2.0) for Microsoft Windows x64 (64-bit)
V47124-01.zip Oracle Database 12c Release 1 Client (12.1.0.2.0) for Microsoft Windows (32-bit)

Oracle HTTP Server (12.2.1.1.0)

V266898-01.zip Oracle Fusion Middleware 12c (12.2.1.1.0) HTTP Server for Linux x86-64


Happy Upgrading. !!!!






Saturday, 21 January 2017

How to Enable Unified Auditing in Oracle 12c database

Unified Auditing:
Oracle 12c introduced the consolidated way of auditing Oracle database. It introduces the Simplicity with little or minimal overhead to database performance.

It comes with the following features.


  • Simplicity
  • Consolidation
  • Security 
    • It rely on read only audit trail table
    • It audit all configuration related operations
    • Seperation of duties 
  • Performance
    • Implemented using queue in Oracle SGA, leaving very overhead in database performance

Unified Auditing Architecture
  1. User perform auditable action
  2. Audit records in SGA based Queue in memory
  3. either GEN0 process flush queue to disk on regular interval or you can perform manual flush on demand (EXECUTE SYS.DBMS_AUDIT_MGMT.FLUSH_UNIFIED_AUDIT_TRAIL)
  4. once data flushed to disk, its available via SYS.UNIFIED_AUDIT_TRAIL 
There two mode of setup Queued or

How to Enable :

You need outage to enable unified auditing as it will be done by relinking the Oracle Library.  Shutdown all oracle process before relinking.

oracle@dbserver01:~$. oraenv
ORACLE_SID = [CDB2] ? CDB2
The Oracle base remains unchanged with value /u01/app/oracle
oracle@dbserver01:~$    

oracle@dbserver01:~$  lsnrctl stop 

oracle@dbserver01:~$  sqlplus "/ as sysdba"

SQL*Plus: Release 12.1.0.2.0 Production on Sun Jan 22 06:15:47 2017

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> shutdown immediate;
Database closed.
Database dismounted.

ORACLE instance shut down.




oracle@dbserver01:~$ cd $ORACLE_HOME/rdbms/lib
oracle@dbserver01:/u01/app/oracle/product/12.1.0.2/rdbms/lib$ make -f ins_rdbms.mk uniaud_on ioracle ORACLE_HOME=$ORACLE_HOME
/usr/bin/ar d /u01/app/oracle/product/12.1.0.2/rdbms/lib/libknlopt.a kzanang.o
/usr/bin/ar cr /u01/app/oracle/product/12.1.0.2/rdbms/lib/libknlopt.a /u01/app/oracle/product/12.1.0.2/rdbms/lib/kzaian
g.
o
ch
mod 755 /u01/app/oracle/product/12.1.0.2/bin

 - Linking Oracle
rm -f /u01/app/oracle/product/12.1.0.2/rdbms/lib/oracle
/u01/app/oracle/product/12.1.0.2/bin/orald  -o /u01/app/oracle/product/12.1.0.2/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12.1.0.2/rdbms/lib/ -L/u01/app/oracle/product/12.1.0.2/lib/ -L/u01/app/oracle/product/12.1.0.2/lib/stubs/   -Wl,-E /u01/app/oracle/product/12.1.0.2/rdbms/lib/opimai.o /u01/app/oracle/product/12.1.0.2/rdbms/lib/ssoraed.o /u01/app/oracle/product/12.1.0.2/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv12 -Wl,--no-whole-archive /u01/app/oracle/product/12.1.0.2/lib/nautab.o /u01/app/oracle/product/12.1.0.2/lib/naeet.o /u01/app/oracle/product/12.1.0.2/lib/naect.o /u01/app/oracle/product/12.1.0.2/lib/naedhs.o /u01/app/oracle/product/12.1.0.2/rdbms/lib/config.o  -lserver12 -lodm12 -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/12.1.0.2/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12  -lrt -lplp12 -lserver12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u01/app/oracle/product/12.1.0.2/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u01/app/oracle/product/12.1.0.2/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -lslax12 -lpls12  -lrt -lplp12 -ljavavm12 -lserver12  -lwwg  `cat /u01/app/oracle/product/12.1.0.2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /u01/app/oracle/product/12.1.0.2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u01/app/oracle/product/12.1.0.2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /u01/app/oracle/product/12.1.0.2/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnzst12 -lzt12 -lztkg12   -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u01/app/oracle/product/12.1.0.2/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u01/app/oracle/product/12.1.0.2/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12  -lgeneric12 -loraz -llzopro -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged  -lippsmerged -lippcore  -lippcpemerged -lippcpmerged  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12  -laio -lons    `cat /u01/app/oracle/product/12.1.0.2/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/12.1.0.2/lib -lm    `cat /u01/app/oracle/product/12.1.0.2/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/12.1.0.2/lib
test ! -f /u01/app/oracle/product/12.1.0.2/bin/oracle ||\
           mv -f /u01/app/oracle/product/12.1.0.2/bin/oracle /u01/app/oracle/product/12.1.0.2/bin/oracleO
mv /u01/app/oracle/product/12.1.0.2/rdbms/lib/oracle /u01/app/oracle/product/12.1.0.2/bin/oracle
chmod 6751 /u01/app/oracle/product/12.1.0.2/bin/oracle


By Default oracle Defined Two policies (ORA_SECURECONFIG and ORA_LOGON_FAILURES)  get enabled. 

Check Current Enabled policy in database by default.

oracle@dbserver01:~$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.1.0.2.0 Production on Sun Jan 22 06:50:28 2017

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, Real Application Testing
and Unified Auditing options


SQL> select * from audit_unified_enabled_policies;

USER_NAME                      POLICY_NAME                    ENABLED_ SUC FAI
------------------------------ ------------------------------ -------- --- ---
ALL USERS                      ORA_SECURECONFIG               BY       YES YES
ALL USERS                      ORA_LOGON_FAILURES             BY       NO  YES


Once unified auditing is enable all audit_xx parameters will be ignored and will have no impact.



Auditing can be enabled in two modes

  • Queued Write mode (Default ) - In this mode you might loose some audit data in case of instance crash (data which was not flushed to disk at time of instance crash).
  • Immediate Write mode - this will ensure no audit data is lost. The audit records are written immediately.


Unified auditing is enabled in Queued Write mode by default to ensure minimal performance overhead.

How to switch mode:

.• Immediate Write mode:

SQL> EXECUTE  DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY(DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED, DBMS_AUDIT_MGMT.AUDIT_TRAIL_WRITE_MODE, DBMS_AUDIT_MGMT.AUDIT_TRAIL_IMMEDIATE_WRITE);


• Queued Write mode:

SQL> EXECUTE  DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY(DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED, DBMS_AUDIT_MGMT.AUDIT_TRAIL_WRITE_MODE, DBMS_AUDIT_MGMT.AUDIT_TRAIL_QUEUED_WRITE);




Friday, 20 January 2017

Change Sysman Password in OEM repository


Recently I come across the issue when sysman password was changed as it was expired based on password policy.

We have changed the password for sysman user in database using the following command .

alter user sysmand identified by new_password;

then we check the status of OMS and it failed with following error , which is genuine.

[oracle@exadata-an-ora-oem middleware]$ emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is not functioning because of the following reason:
Connection to the repository failed. Verify that the repository connection information provided is correct.
Check EM Server log file for details: /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out
JVMD Engine is Down
BI Publisher Server is Down



Error message above itself is explanatory  what the issue is with OMS.  Even if you haven't changed the sysman password itself and you come across this issue, you can easily figure out OMS is not able to connect to repository and so something wrong with either database/listener/ or password.

i checked database was running, so was listener, so we pretty much knew the it was database for sure.

Fix:
update the new password in repository.

emctl config oms -list_repos_details

You have two option.

Option1: if you don't know the old sysman password.

[oracle@oemserver middleware]$ emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd sys_user_password -new_pwd new_password_4_sysman

Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.

Changing passwords in backend ...
Passwords changed in backend successfully.
Updating repository password in Credential Store...
Successfully updated Repository password in Credential Store.
Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.
Successfully changed repository password.


OR

Option2: You know sysman old password

[oracle@oemserver middleware]$ emctl config oms -change_repos_pwd -old_pwd sysmanoldpassword -new_pwd mynewpassword
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.

Changing passwords in backend ...
Passwords changed in backend successfully.
Updating repository password in Credential Store...
Successfully updated Repository password in Credential Store.
Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.
Successfully changed repository password.


Reference :
       emctl config oms -change_repos_pwd [-old_pwd ] [-new_pwd ] [-use_sys_pwd [-sys_pwd ]]
          Note: Steps in changing Enterprise Manager Root (SYSMAN) password are:
                1) Stop all the OMSs using 'emctl stop oms'
                2) Run 'emctl config oms -change_repos_pwd' on one of the OMSs
                3) Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'


Tuesday, 26 April 2016

Register today for IOUG's May 2 & 3, 2016 Oracle Exadata Virtual Conference (FREE) !

Register today for IOUG's May 2 & 3, 2016 Oracle Exadata Virtual Conference (FREE) !

Register today for May 2 & 3, 2016 Oracle Exadata Virtual Conference (FREE)!
Brought to you by IOUG Exadata SIG.

https://attendee.gotowebinar.com/register/844766152064328705

Join IOUG's Exadata SIG for the most comprehensive online Exadata event you can attend this year - and it's free! Register for two days of expert insight from community members, partners and Oracle team members. The schedule is set - reserve your spot for the Virtual Conference today!

Monday Sessions

Oracle Exadata X6: Technical Deep Dive - Architecture and Internals [May 2: 10:00 a.m. - 11:00 a.m. CT]
Featured Speaker: Manish Shah, Senior Principal Product Manager, Oracle
Oracle Public Cloud Machine: Bringing the Oracle Cloud On Premise [May 2: 11:00 a.m. - 12:00 p.m. CT]
Featured Speaker: Srini Chavali, Product Management Director, Oracle
Exadata Database Machine Security [May 2: 12:00 p.m. - 1:00 p.m. CT]
Featured Speaker: Dan Norris, Consulting Member of Technical Staff, Oracle
Tuesday Sessions

The General Electric (GE) Power Journey: Oracle E-Business Suite 12.2 on Oracle Exadata and Exalogic [May 3: 10:00 a.m. - 11:00 a.m. CT]
Featured Speaker: Gary Gordhamer, General Electric

SAS Institute Applications with Oracle Exadata and Big Data Appliance: Turning Data into Knowledge [May 3: 11:00 a.m. - 12:00 p.m.]
Featured Speaker: Speaker TBD, SAS Institute
Database Machine Administration (DBMA) and Database Administration (DBMA): Similarities and Differences, What you need to know [May 3: 12:00 p.m. - 1:00 p.m.]
Featured Speaker: Vivek Puri, Sherwin Williams

Wednesday, 9 March 2016

How to upgrade dbconsole after manual database upgrade without re-creating

Recently i been involved in upgrading the database from 11.2.0.2 to 11.2.0.4 , and client was using dbconsole , I was end up learning something new ( as in past all my client always happen to be using grid control not dbconsole) , specially with upgrade assignments.



When i google arround to see the best practice to dbconsole upgrade, i found some notes on upgrade mostly recommending to deconfig the repository( drop) and create the dbconsole confiugration again.


Here is how you can simply upgrade the dbconsole with single commad (very simple ).


Set env to new  ORACLE_HOME

Pls note ORACLE_HOME for the database to be upgraded is $OLD_ORACLE_HOME .

$emca -upgrade db

STARTED EMCA at Mar 9, 2016 8:47:26 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
ORACLE_HOME for the database to be upgraded: /cluster/app/grid/product/11.2.0/db_1/
Database SID: DBSID
Listener port number: 1521
Password for SYS user:

Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 9, 2016 8:53:43 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /cluster/app/oracle/cfgtoollogs/emca/bblearn/emca_2016_03_09_08_47_26.log.
Mar 9, 2016 8:53:44 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 9, 2016 8:53:48 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Mar 9, 2016 8:55:33 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 9, 2016 8:55:36 AM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for blerndb2.brunel.ac.uk
Mar 9, 2016 8:55:49 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Mar 9, 2016 8:55:56 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Mar 9, 2016 8:55:56 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 9, 2016 8:56:03 AM oracle.sysman.emcp.EMDBPostConfig performUpgrade
INFO: Database Control started successfully
Mar 9, 2016 8:56:06 AM oracle.sysman.emcp.EMDBPostConfig performUpgrade
INFO: >>>>>>>>>>> The Database Control URL is https://dbhost1.oraconsultancy.uk:1158/em <<<<<<<<<<<
Mar 9, 2016 8:56:06 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /cluster/app/oracle/product/11.2.0.4/db_1/dbhost1_DBSID/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 9, 2016 8:56:06 AM

Happy Learning

Monday, 4 January 2016

Exadata Compute node timeout when connecting to Storage Cell

Recently while building Exadata Simulator for Training my students I had issue in Connecting from Exadata  Compute Node( DB Server) to Storage Cell.

Configuration:

DB server/Compute Node : 1 = exadbserver1
Storage Cell: 2  = exacell01 and exacell02

[root@exadbserver1 trace]# /grid/stage/ext/bin/kfod disk=all op=disks
--------------------------------------------------------------------------------
 Disk          Size Path                                     User     Group
================================================================================
   1:        448 Mb o/192.168.56.151/DATA_CD_DISK01_stocell1
   2:        448 Mb o/192.168.56.151/DATA_CD_DISK02_stocell1
   3:        448 Mb o/192.168.56.151/DATA_CD_DISK03_stocell1
   4:        448 Mb o/192.168.56.151/DATA_CD_DISK04_stocell1
   5:        448 Mb o/192.168.56.151/DATA_CD_DISK05_stocell1
   6:        448 Mb o/192.168.56.151/DATA_CD_DISK06_stocell1
   7:        448 Mb o/192.168.56.151/DATA_CD_DISK07_stocell1
   8:        448 Mb o/192.168.56.151/DATA_CD_DISK08_stocell1
   9:        448 Mb o/192.168.56.151/DATA_CD_DISK09_stocell1
  10:        448 Mb o/192.168.56.151/DATA_CD_DISK10_stocell1
  11:        448 Mb o/192.168.56.151/DATA_CD_DISK11_stocell1
  12:        448 Mb o/192.168.56.151/DATA_CD_DISK12_stocell1

But no disk were visible from 2nd storage cell,   running on 192.168.56.152

checked the logs , discovered that its timing out on storage cell02 from logs

[root@texadbserver1 trace]# cat ora_26784_47984932300480.trc
Trace file /u01/oracle/app/oracle/oradiag_root/diag/clients/user_root/host_482230158_80/trace/ora_26784_47984932300480.trc
connect: sosstcpopen failed. boxname = 192.168.56.152, port = 5042
OS system dependent operation:connect_error failed with status: 115
OS failure message: Operation now in progress
failure occurred at: sosstcpconne
Connect retry: sleeping for 1 seconds, connect attempt 2 out of maximum 7 attempts

Troubleshooting

Checked RDS is enabled on exacell02 ( cloned from exacell01, this shouldn't be problem but checked in case , it not restarted).

[root@exacell02 sysconfig]# lsmod |grep rds
rds_rdma              106561  0
rds_tcp                48097  0
rds                   155561  144 rds_rdma,rds_tcp
rdma_cm                73429  2 rds_rdma,ib_iser
ib_core               108097  7 rds_rdma,ib_iser,rdma_cm,ib_cm,iw_cm,ib_sa,ib_mad

All looks good


[root@exacell02 ~]# cellcli
CellCLI: Release 11.2.3.2.1 - Production on Mon Jan 04 08:29:48 GMT 2016

Copyright (c) 2007, 2012, Oracle.  All rights reserved.
Cell Efficiency Ratio: 1

CellCLI> list cell detail
         name:                   stocell2
         bbuTempThreshold:       60
         bbuChargeThreshold:     800
         bmcType:                absent
         cellVersion:            OSS_11.2.3.2.1_LINUX.X64_130109
         cpuCount:               2
         diagHistoryDays:        7
         fanCount:               1/1
         fanStatus:              normal
         flashCacheMode:         WriteThrough
         id:                     ba486e52-db76-4ac8-b08a-01048f6bfb5d
         interconnectCount:      2
         interconnect1:          eth1
         iormBoost:              0.0
         ipaddress1:             192.168.56.152/24
         kernelVersion:          2.6.18-371.el5xen
         makeModel:              Fake hardware
         metricHistoryDays:      7
         offloadEfficiency:      1.0
         powerCount:             1/1
         powerStatus:            normal
         releaseVersion:         11.2.3.2.1
         releaseTrackingBug:     14522699
         status:                 online
         temperatureReading:     0.0
         temperatureStatus:      normal
         upTime:                 0 days, 0:34
         cellsrvStatus:          running
         msStatus:               running
         rsStatus:               running


All looks Good 


CellCLI> list griddisk
         DATA1_CD_DISK01_stocell2        active
         DATA1_CD_DISK02_stocell2        active
         DATA1_CD_DISK03_stocell2        active
         DATA1_CD_DISK04_stocell2        active
         DATA1_CD_DISK05_stocell2        active
         DATA1_CD_DISK06_stocell2        active
         DATA1_CD_DISK07_stocell2        active
         DATA1_CD_DISK08_stocell2        active
         DATA1_CD_DISK09_stocell2        active
         DATA1_CD_DISK10_stocell2        active
         DATA1_CD_DISK11_stocell2        active
         DATA1_CD_DISK12_stocell2        active

all 12 disk are also active.

Till now i didn't notice the issue. until i run strace on kfod again.  and noticed gettimeofday function and realized i missed to setup the ntp and time difference in both server(cell1/dbserver1 and cell2) is almost 12 hours

[root@exacell02 ~]# date
Mon Jan  4 08:37:20 GMT 2016

[root@exacell01 sysconfig]# date
Mon Jan  4 20:23:55 GMT 2016

[root@exadbserver1 trace]# date
Mon Jan  4 20:24:09 GMT 2016


strace /grid/stage/ext/bin/kfod disk=all op=disks

gettimeofday({1451938797, 257309}, NULL) = 0
sendmsg(8, {msg_name(16)={sa_family=AF_INET, sin_port=htons(14825), sin_addr=inet_addr("192.168.56.151")}, msg_iov(3)=[{"\4\3\2\1\3033\0\0\0\0\0\0MRON\0\3\0\0\0\0\0\0<\205\360g\0\0\0\0"..., 76}, {"\1W\3249\377\177\0\0\34\0\0\0\223+\0\0XZ\3249\377\177\0\0\1\0\0\0", 28}, {"\4\3\2\1\2\0\0\0\2607(\5\0\0\0\0\263>\0\5\211\323\2247,\200\0\0", 28}], msg_controllen=0, msg_flags=0}, 0) = 132
gettimeofday({1451938797, 257422}, NULL) = 0
sendmsg(8, {msg_name(16)={sa_family=AF_INET, sin_port=htons(40542), sin_addr=inet_addr("192.168.56.151")}, msg_iov(3)=[{"\4\3\2\1\3033\0\0\0\0\0\0MRON\0\3\0\0\0\0\0\0<\205\360g\0\0\0\0"..., 76}, {"\1W\3249\377\177\0\0\34\0\0\0\223+\0\0XZ\3249\377\177\0\0\1\0\0\0", 28}, {"\4\3\2\1\2\0\0\0\312\305\6(\0\0\0\0n\237*P\212\323\2247\26\200\0\0", 28}], msg_controllen=0, msg_flags=0}, 0) = 132
times({tms_utime=7, tms_stime=6, tms_cutime=0, tms_cstime=0}) = 430767563
gettimeofday({1451938797, 257621}, NULL) = 0
gettimeofday({1451938797, 257641}, NULL) = 0
socket(PF_NETLINK, SOCK_RAW, 0)         = 14
bind(14, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(14, {sa_family=AF_NETLINK, pid=29303, groups=00000000}, [4294967308]) = 0
sendto(14, "\24\0\0\0\26\0\1\3\355\323\212V\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(14, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"<\0\0\0\24\0\2\0\355\323\212Vwr\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 468
recvmsg(14, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\355\323\212Vwr\0\0\0\0\0\0\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
close(14)                               = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 14
fcntl(14, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
connect(14, {sa_family=AF_INET, sin_port=htons(5042), sin_addr=inet_addr("192.168.56.151")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=14, events=POLLOUT}], 1, 2000) = 1 ([{fd=14, revents=POLLOUT}])




Tuesday, 8 December 2015

Demo Schema Script not updated for Container Database in 12c

This afernoon i was installing OE/HR Demo script supplied with Oracle 12c Binaries. When I try to install OE schema into one of my pluggable Database PDBOE01 it could not complete successfully as script are not compatible with Container/Pluggable database architecture.


you must modify the script before running otherwise you will end up with lots of garbage stuff into your root container database.


You will notice in the log1, user CREATED successfully and then grant failed to find the user created as its looking into the wrong database(root container) etc etc.

Its causing issue because script still connecting to database without TNS string and hence it connect to CDB everytime its re-connect while running the script.

cd /u01/app/oracle/product/12.1.0/dbhome_1/demo/schema/order_entry

$ grep -i  -e 'CONNECT SYS/' -e  'CONNECT OE/' *.sql
coe_xml.sql:CONNECT sys/&pass_sys AS SYSDBA;
coe_xml.sql:CONNECT oe/&pass_oe;
coe_xml.sql:CONNECT sys/&pass_sys AS SYSDBA;
coe_xml.sql:CONNECT oe/&&pass_oe;
createUser.sql:CONNECT OE/&pass_oe
createUser.sql:CONNECT sys/&&pass_sys AS SYSDBA;
createUser.sql:CONNECT OE/&pass_oe
oe_main.sql:CONNECT sys/&pass_sys AS SYSDBA;
oe_main.sql:CONNECT oe/&pass
oe_main.sql:CONNECT sys/&pass_sys AS SYSDBA;
xdb03usg.sql:CONNECT sys/&&pass_sys AS SYSDBA;
xdb03usg.sql:CONNECT OE/&pass_oe

all of above need to updated before running against pluggable database .

Simple script to update all to point to my Pluggable database PDBOE01 i used the following.

for i in `ls`
do
sed -i 's/CONNECT sys\//CONNECT SYS@PDBOE1\//g' $i
sed -i 's/CONNECT oe\//CONNECT oe@PDBOE1\//g' $i
sed -i 's/CONNECT OE\//CONNECT oe@PDBOE1\//g' $i
done

where PDBOE01 is pluggable database TNS entry.

If feel this all could be done with single SED command , comments welcome for suggestion on that.

now all files updated with TNS entry. 
coe_xml.sql:CONNECT SYS@PDBOE1/&pass_sys AS SYSDBA;
coe_xml.sql:CONNECT oe@PDBOE1/&pass_oe;
coe_xml.sql:CONNECT SYS@PDBOE1/&pass_sys AS SYSDBA;
coe_xml.sql:CONNECT oe@PDBOE1/&&pass_oe;
createUser.sql:CONNECT oe@PDBOE1/&pass_oe
createUser.sql:CONNECT SYS@PDBOE1/&&pass_sys AS SYSDBA;
createUser.sql:CONNECT oe@PDBOE1/&pass_oe
oe_main.sql:CONNECT SYS@PDBOE1/&pass_sys AS SYSDBA;
oe_main.sql:CONNECT oe@PDBOE1/&pass
oe_main.sql:CONNECT SYS@PDBOE1/&pass_sys AS SYSDBA;
xdb03usg.sql:CONNECT SYS@PDBOE1/&&pass_sys AS SYSDBA;
xdb03usg.sql:CONNECT oe@PDBOE1/&pass_oe





----------------------- Log1 of run without update (Failed ) -----------------------
SQL> @oe_main.sql

specify password for OE as parameter 1:
Enter value for 1: oracle

specify default tablespeace for OE as parameter 2:
Enter value for 2: OEHR_DATA

specify temporary tablespace for OE as parameter 3:
Enter value for 3: TEMP

specify password for HR as parameter 4:
Enter value for 4: oracle

specify password for SYS as parameter 5:
Enter value for 5: oracle

specify directory path for the data files as parameter 6:
Enter value for 6:
SP2-0137: DEFINE requires a value following equal sign

writeable directory path for the log files as parameter 7:
Enter value for 7:
SP2-0137: DEFINE requires a value following equal sign

specify version as parameter 8:
Enter value for 8: v3

Enter value for log_path:

User dropped.

old   1: CREATE USER oe IDENTIFIED BY &pass
new   1: CREATE USER oe IDENTIFIED BY oracle

User created.

old   1: ALTER USER oe DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs
new   1: ALTER USER oe DEFAULT TABLESPACE OEHR_DATA QUOTA UNLIMITED ON OEHR_DATA

User altered.

old   1: ALTER USER oe TEMPORARY TABLESPACE &ttbs
new   1: ALTER USER oe TEMPORARY TABLESPACE TEMP

User altered.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.

Connected.
GRANT execute ON sys.dbms_stats TO oe
                                   *
ERROR at line 1:
ORA-01917: user or role 'OE' does not exist


ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
ERROR:
ORA-01017: invalid username/password; logon denied


SP2-0640: Not connected
SP2-0640: Not connected

specify Sample Schema version as parameter 1:

specify password for OE as parameter 2:

PROMPT password for SYS as parameter 3:

SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
----------------------------------------------------