Ganadeva's Blog

Personal and Technical musings

Yum update on cloned Virtualbox machine

leave a comment »


For cloned Virtual box which is unable to allow yum update, turn on nat ,delete network rules file, reboot.

Recycle mac address to match original instance and keep original instance down.

Written by ganadeva

August 29, 2014 at 6:03 pm

Posted in Uncategorized

Capture usb modem packets in wireshark

leave a comment »


command to capture usb modem packets in wireshark –
C:\Program Files\USBPcap>USBPcapCMD.exe -d \\.\Usbpcap2 -o – | “C:\Program Files (x86)\Wireshark\Wireshark.exe” -k -i -

Written by ganadeva

June 23, 2014 at 5:20 pm

Posted in Uncategorized

Tagged with ,

Remotely running script on multiple unix server

leave a comment »


Checking multiple servers ending with serial number

Linux command

for A in {2220..2223}; do ssh servernum-lx${A} free -m; done
 

Oracle command
for A in {2253..2256}; do srvctl stop asm -n servernum-lx${A}; done
for A in {2251..2256}; do srvctl stop nodeapps -n servernum-lx${A}; done

Written by ganadeva

June 15, 2014 at 3:44 pm

Posted in Uncategorized

Tagged with

Oracle database spool file compressed while querying — useful for large database table dumps on unix

leave a comment »


ORACLE_HOME=…;export ORACLE_HOME;
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH;
export ORACLE_SID=sid_name;
/usr/bin/mkfifo /file_system/table_name_fifo
/usr/bin/nohup /usr/contrib/bin/gzip </file_system/table_name_fifo> /file_system/table_name.log.gz&
$ORACLE_HOME/bin/sqlplus -s “username/password@db_tns_entry” @/file_system/table_query.sql > /file_system/table_name_fifo
rm /file_system/table_name_fifo

Below query uses delimiter |^ for onward share with analytics/data mining team
cat table_query.sql
set pagesize 0
set trimspool on
set headsep off
set recsep wr
set linesize 20000
set feedback off

/***** Query Start****/

select replace(‘column1
|^column2
|^…
,CHR(10),”) from dual /**header of table **/

union all
SELECT  column 1
||’|^’||column 2
||’|^’||column 3
||’|^’||…
||’|^’||to_char(DATE1,’DD-MON-YYYY’) /** date columns to be converted to char **/
||’|^’||to_char(DATE2,’DD-MON-YYYY’)
||’|^’||…
||’|^’||column n from schema.table ;

/***** Query End****/

exit;

Written by ganadeva

June 14, 2014 at 4:38 pm

Great minds

leave a comment »


Great minds discuss ideas, average minds discuss events, small minds discuss people.

- Eleanor Roosevelt

Written by ganadeva

November 10, 2013 at 2:43 pm

Posted in inspiration

Change your life

leave a comment »


If you can change your mind, you can change your life.

- William James

Written by ganadeva

November 10, 2013 at 2:39 pm

Posted in inspiration

People to trust

leave a comment »


People who truly deserve your trust are those who will never have the courage to lie to you.
-Unknown

Written by ganadeva

November 10, 2013 at 2:38 pm

Posted in inspiration

Follow

Get every new post delivered to your Inbox.