Monday, June 22, 2015

Using Azure at Command Line - Getting Started

Part 1.   Account Download.

at command line do azure account download

[root@ebscloud ~]# azure account download
info:    Executing command account download
info:    Launching browser to http://go.microsoft.com/fwlink/?LinkId=254432
help:    Save the downloaded file, then execute the command
help:      account import
info:    account download command OK
[root@ebscloud ~]#

Open a browser and you will see

A download file for a .publishsettings  link will appear at the bottom; copy it and move it to the location of the Azure CLI 

[root@ebscloud ~]# azure account import ./.publishsettings
info:    Executing command account import
info:    account import command OK
[root@ebscloud ~]#


Now when you do Azure account list you will see some rows ! 



Installing Azure CLI on Oracle Enterprise Linux - part 1 - dependencies



First thing we need is NPM

NPM is not part of the standard OEL distribution, so we need to get EPEL

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

[root@ebscloud ~]# yum -y install epel-release-latest-6.noarch.rpm
Setting up Install Process
Examining epel-release-latest-6.noarch.rpm: epel-release-6-8.noarch
Marking epel-release-latest-6.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                      Arch                                   Version                             Repository                                                     Size
=============================================================================================================================================================================================
Installing:
 epel-release                                 noarch                                 6-8                                 /epel-release-latest-6.noarch                                  22 k

Transaction Summary
=============================================================================================================================================================================================
Install       1 Package(s)

Total size: 22 k
Installed size: 22 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : epel-release-6-8.noarch                                                                                                                                                   1/1
  Verifying  : epel-release-6-8.noarch                                                                                                                                                   1/1

Installed:
  epel-release.noarch 0:6-8

now yum -y install NPM works.


nstalled:
  npm.noarch 0:1.3.6-5.el6


now  npm install azure-cli -g


results in lots of output 

now running azure -h results in lots of output ! 

So thats' it installed. let#s move on.. 




Friday, June 19, 2015

Upgrading to Cloud Control Part II



OK I had left you upgrading cloud control

THis took approximately 2.5 hours to run through all the steps, but eventually



[root@ebscloud oms]# ./allroot.sh

Starting to execute allroot.sh .........

Starting to execute /u01/oracle/oms12105/oms/root.sh ......
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/oracle/oms12105/oms

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist
/u01/oracle/oms12105/oms
Finished execution of  /u01/oracle/oms12105/oms/root.sh ......


[root@ebscloud oms]#


OK so that is all fine. 

Points to remember :  the details above can be found in OMS_HOME/install/setupinfo.txt. 

So let's try and log on to the new cloud control 



we can see we now have 12.1.0.5 

Finally edit our start environment script 

export ORACLE_BASE=/u01/oracle/
export ORACLE_HOME=/u01/oracle/oms12105/oms
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=EMREP

and we are done.   In a later blog we will looking at updating agents and all the other boring tedium of finishing out the upgrade. 





Thursday, June 18, 2015

Upgrading to Oracle Cloud Control 12.1.0.5 Cloud Control


OK so we'll do a few posts on running the upgrade process

So go to http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html

and download the software ( this will be on Linux 64 bit )


You download three large zip files ; create a directory and unzip them all into it.  You will end up with the typical large Oracle staging directory tree.

...  so run the Installer



As usual we do not want to receive security updates at this point so deselect the option and remain "uninformed". 

We also wish to skip software updates as this is a brand new product 
It now runs some checks to see if it is a supported system platform 

If it turns out that ulimit is needing fixing then don't forget to look in a: limits.conf and b : limits.d - this is a recent EL change in how userlimits are broken out.  ( limits.conf now takes a back seat ) 
Note that if you do need to do this in a vnc window you'll need to exit the installer, kill VNCserver and restart it to make the env change be picked up, but this should be a fairly quick change 


Now everything works 
In the next screen we want to do a 1-system upgrade ( that is all that is supported, we see the existing OMS in the list below ) 


On the next screen you are ( really confusingly ) asked to select a middleware home.  It does not tell you if this is an existing one or a new one ( since it is an upgrade process you do not know ) .  We will hope it is a new one.    Reading the documentation does not make it any clearer. 



We will try for a new directory as it does not seem to like the old one 


On the next screen enter the sys password for the DB :: 



You will get a warning to apply some possibly mandatory patches. 


These may not be mandatory ( e.g 11.2.0.4 ) 



If you have checked and they are OK , click OK and next  

OK now we are warned about emkey not being copied : 

OK so we can fix this by 
oracle@ebscloud ~]$ source oms_home.sh
[oracle@ebscloud ~]$ emctl config emkey -copy_to_repos -sysman_pwd xxxxxx
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey by running "emctl config emkey -remove_from_repos".
[oracle@ebscloud ~]$

OK Let's try again 

click back through the last two screens and now 
Click YES 


We get some warnings, let's fix them .. first one should be easy by running utlrp on the database to recompile the brokens 


so this leaves the EM triggers problem 


Looking in Metalink doesn't help.   Searching the logs in emdbprereqs shows some SQL which if we run it 


select trigger_name, trigger_type, table_name from (select trigger_name, trigger_type, table_name from DBA_TRIGGERS where table_owner ='SYSMAN'  and status = 'DISABLED');

TRIGGER_NAME                   TRIGGER_TYPE     TABLE_NAME
------------------------------ ---------------- ------------------------------
EM_ASSOC_INS_TRIG              AFTER EACH ROW   MGMT_ASSOC_INSTANCES
EM_ASSOC_DEL_TRIG              AFTER EACH ROW   MGMT_ASSOC_INSTANCES

SQL>

Interesting.  Why are they disabled; a search in Metalink shows someone else has had the problem but no fix was ever done.  Let's enable them and see what happens 

SQL> alter trigger EM_ASSOC_INS_TRIG  enable;

Trigger altered.

SQL> alter trigger EM_ASSOC_DEL_TRIG enable;

Trigger altered.

SQL> select trigger_name, trigger_type, table_name from (select trigger_name, trigger_type, table_name from DBA_TRIGGERS where table_owner ='SYSMAN'  and status = 'DISABLED');

no rows selected

SQL>


OK let's have another go at the above

Press Cancel, then Next 

It still recurs; I think there is a bug here .  even though there are no triggers disabled ( there are SYS triggers yes, but there is a  specific note from metalink NOT to enable them ) 

so just press OK 



These are OK so press Next 


We don't need any of these extra plugins 
now its time to stop the OMS 

[oracle@ebscloud ~]$ emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
Stopping BI Publisher Server...
BI Publisher Server Successfully Stopped
AdminServer Successfully Stopped
BI Publisher Server is Down
[oracle@ebscloud ~]$



On this second last picture we just enter our weblogic admin password and review the port - 7103 is fine. 


finally we review the above information ... and press install. 

THis is likely to take some time so we will end this blog post here and have another one for the trials encountered during the upgrade. 







Oracle Cloud Control 12.1.0.5 has been released

https://blogs.oracle.com/oem/entry/new_enterprise_manager_release_allows


In the coming days I will be blogging about using upgrading to and using 12.1.0.5