Search This Blog

Thursday, 13 July 2017

OBIEE 11g Startup Script

​#!/bin/bash

# File: /etc/init.d/obiee

# Purpose: Start and stop Oracle Business Intelligence 11g components.

# chkconfig: 2345 99 10

# description: Manage OBIEE service.

# These values must be adapted to your environment.


ORACLE_OWNR=obiee11g                                          # Local Unix user running OBIEE

ORACLE_FMW=/opt/app/Middleware11g                      # Deployment root directory

BIEE_USER=weglogic                                                # BIEE administrator name

BIEE_PASSWD=Admin@123                                      # BIEE administrator password

BIEE_DOMAIN=bifoundation_domain1                        # Domain name

BIEE_INSTANCE=instance1                                      # Instance name

BIEE_SERVER=bi_server1                                        # Server name

BIEE_MANAGER_URL=192.168.168.27:7001             # Admin server URL (hostname:port)


# These should require no change.


WL_PATH=$ORACLE_FMW/wlserver_10.3/server/bin

BIEE_PATH=$ORACLE_FMW/user_projects/domains/$BIEE_DOMAIN/bin

ORACLE_INSTANCE=$ORACLE_FMW/instances/$BIEE_INSTANCE


export ORACLE_INSTANCE


START_LOG=/var/log/obiee-start.log

STOP_LOG=/var/log/obiee-stop.log

SUBSYS=obiee


start()

{

echo "********************************************************************************"

echo "Starting Admin Server on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$BIEE_PATH/startWebLogic.sh" &

wait_for "Server started in RUNNING mode"

echo "********************************************************************************"

echo "Starting Node Manager on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$WL_PATH/startNodeManager.sh" &

wait_for "socket listener started on port"

echo "********************************************************************************"

echo "Starting Managed Server $BIEE_SERVER on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER http://$BIEE_MANAGER_URL" &

wait_for "Server started in RUNNING mode"

echo "********************************************************************************"

echo "Starting BI components on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl startall"

echo "********************************************************************************"

echo "OBIEE start sequence completed on $(date)"

echo "********************************************************************************"

}


stop()

{

echo "********************************************************************************"

echo "Stopping BI components on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl stopall"

echo "********************************************************************************"

echo "Stopping Managed Server $BIEE_SERVER on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$BIEE_PATH/stopManagedWebLogic.sh $BIEE_SERVER t3://$BIEE_MANAGER_URL $BIEE_USER $BIEE_PASSWD"

echo "********************************************************************************"

echo "Stopping Node Manager on $(date)"

echo "********************************************************************************"

pkill -TERM -u $ORACLE_OWNR -f "weblogic\\.NodeManager"

echo "********************************************************************************"

echo "Stopping Admin Server on $(date)"

echo "********************************************************************************"

su $ORACLE_OWNR -c "$BIEE_PATH/stopWebLogic.sh"

echo "********************************************************************************"

echo "OBIEE stop sequence completed on $(date)"

echo "********************************************************************************"

}


wait_for() {

res=0

while [[ ! $res -gt 0 ]]

do

res=$(tail -5 "$START_LOG" | fgrep -c "$1")

sleep 5

done

}


case "$1" in

start)

echo "********************************************************************************"

echo "Starting Oracle Business Intelligence on $(date)"

echo "Logs are sent to $START_LOG"

echo "********************************************************************************"

start &> $START_LOG &

touch /var/lock/subsys/$SUBSYS

;;


stop)

echo "********************************************************************************"

echo "Stopping Oracle Business Intelligence on $(date)"

echo "Logs are sent to $STOP_LOG"

echo "********************************************************************************"

stop &> $STOP_LOG

rm -f /var/lock/subsys/$SUBSYS

;;


status)

echo "********************************************************************************"

echo "Oracle BIEE components status...."

echo "********************************************************************************"

su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl status"

;;


restart)

$0 stop

$0 start

;;


*)

echo "Usage: $(basename $0) start|stop|restart|status"

exit 1

esac


exit 0

​

OBIEE 12c startup script

​#!/bin/bash

# chkconfig: 345 99 10

# description: OBIEE auto start-stop script.

# Source function library.

. /etc/rc.d/init.d/functions

OBIEE_HOME=/opt/app/Middleware/db_1

OBIEE_OWNER=obiee

if [ ! -f $OBIEE_HOME/user_projects/domains/bi/bitools/bin/start.sh ]

then

echo "OBIEE startup: cannot start"

exit

fi

case "$1" in

'start')

# Start the OBIEE databases:

echo -n $"Starting OBIEE Service:"

su - $OBIEE_OWNER -c "$OBIEE_HOME/user_projects/domains/bi/bitools/bin/start.sh"

echo "OBIEE is started"

;;

'stop')

# Stop the OBIEE:

su - $OBIEE_OWNER -c "$OBIEE_HOME/user_projects/domains/bi/bitools/bin/stop.sh"

echo "OBIEE is shutdown"

;;

'status')

su - $ORACLE_OWNER -c "$OBIEE_HOME/user_projects/domains/bi/bitools/bin/status.sh"

;;

*)

echo $"Usage: $0 {start|stop|status}"

esac

​

Thursday, 1 June 2017

How To Back Up Your Bookmarks in Google Chrome

​Open Google Chrome, and click the Customize and Control Google Chrome menu > Bookmarks.

Next, select Bookmarks manager, or press [CTRL] + [Shift] + [O] on your keyboard.

Now, click the Organize menu > Export bookmarks to HTML file:

Choose a location to save the file, and then click Save.​

Wednesday, 5 April 2017

RHEL7 firewall disable steps

On Redhat 7 Linux system the firewall run as firewalld daemon.

[root@I ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Wed 2017-04-05 17:13:28 IST; 4h 45min left
 Main PID: 677 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─677 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Apr 05 17:13:28 cognosv11 systemd[1]: Started firewalld - dynamic firewall ...n.
Hint: Some lines were ellipsized, use -l to show in full.

[root@I ~]# service firewalld stop  Redirecting to /bin/systemctl stop  firewalld.service

Stopped firewall will start again after system's reboot.

To disable Service permanently,

[root@I ~]# systemctl disable firewalld

rm '/etc/systemd/system/basic.target.wants/firewalld.service'
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'

To Enable Service permanently,

[root@I ~]# systemctl enable firewalld  ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'  ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/basic.target.wants/firewalld.service'








Monday, 20 March 2017

Oracle sys password reset steps

To Reset SYS user password, Login as oracle user or set environment variable to access sqlplus.

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export PATH=$ORACLE_HOME/bin:$PATH

sqlplus /nolog
connect / as sysdba
alter user sys identified by <your pwd>;

Wednesday, 8 March 2017

Bugzilla upgrade steps

​bash$ cd /var/www/html/bugzilla
bash$ wget  https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.2-to-5.0.3.diff.gz  bash$ gunzip bugzilla-2.22-to-2.22.1.diff.gz  bash$ patch -p1 < bugzilla-2.22-to-2.22.1.diff

Reversed (or previously applied) patch detected! Assume -R? [n] -R

      Apply anyway? [n] Y 

bash$ ./checksetup.pl

​

Tuesday, 14 February 2017

How to create swap and increase the partition.

​# sudo swapon -s
Filename                Type        Size    Used    Priority  /swapfile                               file        1048572 0   -1  # sudo swapoff /swapfile   # sudo fallocate -l 4G /swapfile  # sudo mkswap /swapfile  Setting up swapspace version 1, size = 4194300 KiB  no label, UUID=fb0aadaf-b52f-4928-b57f-c60ef7a0bd49  # sudo swapon /swapfile  # sudo swapon -s  Filename                Type        Size    Used    Priority  /swapfile                               file        4194300 0   -1
​