Thinking Out Loud

May 25, 2012

Extract tar files to current directory

Filed under: solaris — mdinh @ 3:34 am

I have a requirement to extract tar files residing in another directory to current directory, instead of copying tar files from the source to current directory, extracting tar files, and deleting tar files.

Here’s a shell script to do this. Did not think about including change directory in the shell script until now.

#!/bin/sh -x
 pax -rv -f /home/mdinh/fbo_ggs_Solaris_sparc_ora11g_64bit.tar -s ',^/,,'
 pax -rv -f /home/mdinh/ggs_FileWriter_Solaris_sparc_v11_1_1_0_0_007.tar -s ',^/,,'
 exit

The tar files reside on NFS which is mounted on every server I want to extract to.

Why do it this way? I am a lazy DBA.

Note: tested on Solaris 10

Reference:

>>directing solaris tar to extract to current directory

May 24, 2012

ldd – print shared library dependencies

Filed under: solaris — mdinh @ 2:43 am

I am sure most of you may already know about the command and just a quick post to demonstrate how ldd is used.

> ldd ggsci
 libm.so.1 => /lib/sparcv9/libm.so.1
 libnsl.so.1 => /lib/sparcv9/libnsl.so.1
 libsocket.so.1 => /lib/sparcv9/libsocket.so.1
 libdl.so.1 => /lib/sparcv9/libdl.so.1
 librt.so.1 => /lib/sparcv9/librt.so.1
 libumem.so.1 => /lib/sparcv9/libumem.so.1
 libgglog.so => /u01/app/ggs/libgglog.so
 libggrepo.so => /u01/app/ggs/libggrepo.so
 libdb-5.2.so => /u01/app/ggs/libdb-5.2.so
 libicui18n.so.38 => /u01/app/ggs/libicui18n.so.38
 libicuuc.so.38 => /u01/app/ggs/libicuuc.so.38
 libicudata.so.38 => /u01/app/ggs/libicudata.so.38
 libpthread.so.1 => /lib/sparcv9/libpthread.so.1
 libxerces-c.so.28 => /u01/app/ggs/libxerces-c.so.28
 libantlr3c.so => /u01/app/ggs/libantlr3c.so
 libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libclntsh.so.11.1
 libnnz11.so => /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnnz11.so
 libkstat.so.1 => /lib/sparcv9/libkstat.so.1
 libgen.so.1 => /lib/sparcv9/libgen.so.1
 libsched.so.1 => /usr/lib/sparcv9/libsched.so.1
 libCstd.so.1 => /usr/lib/sparcv9/libCstd.so.1
 libCrun.so.1 => /usr/lib/sparcv9/libCrun.so.1
 libthread.so.1 => /lib/sparcv9/libthread.so.1
 libc.so.1 => /lib/sparcv9/libc.so.1
 libmp.so.2 => /lib/64/libmp.so.2
 libmd.so.1 => /lib/64/libmd.so.1
 libscf.so.1 => /lib/64/libscf.so.1
 libaio.so.1 => /lib/64/libaio.so.1
 libresolv.so.2 => /lib/64/libresolv.so.2
 libpool.so.1 => /usr/lib/64/libpool.so.1
 libm.so.2 => /lib/64/libm.so.2
 libdoor.so.1 => /lib/64/libdoor.so.1
 libuutil.so.1 => /lib/64/libuutil.so.1
 libxml2.so.2 => /usr/lib/64/libxml2.so.2
 libnvpair.so.1 => /lib/64/libnvpair.so.1
 libexacct.so.1 => /usr/lib/64/libexacct.so.1
 libz.so.1 => /usr/lib/64/libz.so.1
 /platform/SUNW,Sun-Fire-V490/lib/sparcv9/libc_psr.so.1
 /platform/SUNW,Sun-Fire-V490/lib/sparcv9/libmd_psr.so.1

May 19, 2012

Upgrade from 11.2.0.2.0 to 11.2.0.3.0 & Apply PSU 11.2.0.3.2 Notes

Filed under: oracle — mdinh @ 12:11 am

>> Means URL opens in new window.

>> Upgrade from 11.2.0.2.0 to 11.2.0.3.0 & Apply PSU 11.2.0.3.2 Notes

>> Best approach for Oracle database patching sequence to latest/required patch set along with CPU/PSU/any-other-one-off patch [ID 865255.1]

>> Frequently Asked Questions (FAQ): Patching Oracle Database Server [ID 1446582.1]

>> Release Schedule of Current Database Releases [ID 742060.1]

May 14, 2012

Dont Follow Your Passion, Follow Your Effort

Filed under: Uncategorized — mdinh @ 4:42 am

Very interesting concept making me wonder if I was following wrong.

<quote>

1. When you work hard at something you become good at it.

2. When you become good at doing something, you will enjoy it more.

3. When you enjoy doing something, there is a very good chance you will become passionate or more passionate about it

4. When you are good at something, passionate and work even harder to excel and be the best at it, good things happen.

Don’t follow your passions, follow your effort. It will lead you to your passions and to success, however you define it.

</quote>

Retrieved from http://blogmaverick.com/2012/03/18/dont-follow-your-passion-follow-your-effort/ on May 13, 2012

May 13, 2012

My Oracle Support (MOS) Easy Access

Filed under: oracle — mdinh @ 3:50 am

Patch Number: 10098816

https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=10098816

Document Number: 1411356.1

11.2.0.3 Database specific bundle patch for Integrated Extract 11.2.x [ID 1411356.1]

https://supporthtml.oracle.com/epmos/faces/ui/km/DocContentDisplay.jspx?id=1411356.1

Just substitute the values for the document or patch number of interest.

May 10, 2012

ORA-12547: TNS:lost contact while connecting as sysdba

Filed under: 11g,oracle — mdinh @ 3:09 am

Connect as sysdba would take a long time and eventually fail with ORA-12547

> sysdba 
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 27 13:18:42 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact

> ipcs -a
 IPC status from as of Fri Apr 27 13:21:23 PDT 2012
 T ID KEY MODE OWNER GROUP CREATOR CGROUP CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME
 Message Queues:
 T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
 Shared Memory:
 m 8 0x759c6b1c --rw-rw---- oracle dba oracle dba 2 1895833600 7173 18689 13:21:21 13:21:21 14:56:53
 T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS OTIME CTIME
 Semaphores:
 s 14 0xab90108c --ra-ra---- oracle dba oracle dba 154 11:23:28 14:56:55

> ipcrm -m 8
> ipcrm -s 14

> ipcs -a
IPC status from as of Fri Apr 27 13:22:15 PDT 2012
 T ID KEY MODE OWNER GROUP CREATOR CGROUP CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME
 Message Queues:
 T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
 Shared Memory:
 T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS OTIME CTIME
 Semaphores:

REFERENCE:

connect / as sysdba Fails with Ora-12547 And Tns-12514 [ID 381566.1]

Create a free website or blog at WordPress.com.