Oct 232014
 
 Posted by on October 23, 2014 at 9:42 am Oracle HTTP Server Tagged with: ,  No Responses »
Oracle HTTP Server

We had a issue after a power failure in one of the server where the OHS use to fail to start and keep on throwing “failed to start a managed process after the maximum retry limit” all the time even after rebooting the OS.

The error looked like below:

[bin]# ./opmnctl startall
opmnctl startall: starting opmn and all managed processes...
================================================================================
opmn id=newart.techpaste.com:6701
Response: 0 of 1 processes started.

ias-instance id=instance1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------
ias-component/process-type/process-set:
webcache1/WebCache-admin/WebCache-admin/

Error
--> Process (index=1,uid=1508762676,pid=3781)
failed to start a managed process after the maximum retry limit
Log:
/home/oracle/Middleware/Oracle_WT1/instances/instance1/diagnostics/logs/WebCache/webcache1/console~WebCache-admin~1.log

OHS Error

And in webcache admin logs we use to see below error:
Continue reading »

Sep 262014
 
 Posted by on September 26, 2014 at 3:01 pm bash, FAQ, Linux, Must Know, Security Tagged with: , , ,  No Responses »
Must Know

Recently a Bash Code Injection Vulnerability or Bash remote command injection bug Shellshock bash was announced in the computer program ‘bash’ (ref CVE-2014-6271). This vulnerability enables unauthenticated users to run arbitrary commands, and in some configurations remote code execution is possible. This has been scored the highest possible threat ratings by independent security research bodies, including NIST, for both impact and exploitability. Bash is a standard program installed on most machines running non-Windows operating systems as standard including, but not limited to, Unix, Linux, MacOS and many embedded architecture devices. The affected versions go back to bash 1.14 which was first released in ~1995. Unlike the Heartbleed vulnerability which affected only openssl (an additional program that only certain users actually implemented), SHELLSHOCK is likely to affect a much wider community.
Continue reading »

Aug 272014
 
 Posted by on August 27, 2014 at 8:46 am Database, Oracle Database Tagged with:  No Responses »
Oracle Database

After installing the oracle database software’s we need to create oracle database to start with our tasks. Here to achieve the same we will use the DBCA ( Database Configuration Assistant) tool to create oracle database instance . After installing the Oracle database software’s  we can follow below mentioned steps to create a new database.

dbca tool will be available in environment variables itself after Oracle database installation or at $ORACLE_HOME/bin/dbca location.

Please follow below steps to create a new DB instance.

cd to $ORACLE_HOME/bin/ and run ./dbca to start the database configuration Assistant wizard .

Database Configuration Assistant Screen
Continue reading »

Jul 292014
 
 Posted by on July 29, 2014 at 4:36 pm bash, Scripting Languages, Shell Scripting Tagged with: ,  No Responses »

Many times as a system administrator you will be requiring the need to check few db details time to time or need to update,insert or simply execute a sql file automatically. For all these requirements a simple solution is to script the execution of sql files. here in this example we will see how to run sql files from a folder to oracle DB using bash shell script.

For this pre-requisites is sqlplus client shall already be installed on the machine and shall be available. you can just run below command to make sure sqlplus client is installed. “sqlplus /nolog”. Make sure your tns entry is setup correctly and you are able to login to the database with the username and password.

Having said that below are the script details:

In this script we have kept all the sql files in a folder i.e. /home/oracle/sqls
Continue reading »

Jul 272014
 

If you are trying to learn bash scripting and want to learn arithmetic operations and arrays in bash then this example will be helpful to you.

Here we are using bash scripting to calculate average, minimum and maximum grade and its subsequent letter grade using bubble sorting. Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. If you are sorting the data in Ascending order, at the end of the first pass, the  “heaviest” element has move to bottom. In the second pass, the comparisons are made till the last but one position and now second largest element is placed at the last but one position. And so forth.
Continue reading »