Parm Patram

Oracle, Linux and UNIX tips, tricks and stuff
  • Home
  • Site Map
  • Solaris equivalent of ethtool

    HEADS UP, Solaris 02-16-2011 Comments Off
    for i in `ndd -get /dev/${DEV} \? | awk '{print $1}'| grep ^[a-z]`;
    do
    echo -n "$i:"; ndd -get /dev/${DEV} $i;
    done
    
  • Change TimeZone in RHEL

    Enterprise Manager, HEADS UP, Linux 02-14-2011 Comments Off

    mv /etc/localtime /etc/localtime-old

    ln -sf /usr/share/zoneinfo/GMT /etc/localtime

    hwclock –systohc (or –utc)

  • NLS date format

    HEADS UP, SQL & PL/SQL, SQLPLUS 02-11-2011 Comments Off
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
    
  • Running a nohup command over ssh

    HEADS UP, Linux, Solaris 02-05-2011 Comments Off

    The problem is that the ssh session will wait for the command to complete and the ‘&’ to background the task does not seem to work. The net result is that the script running the nohup ssh command hangs.

    This is because by default ssh does not allocate a TTY to run a command. You can force TTY allocation by using the ‘-t’ option to ssh, which will permit backgrounding, and the ssh command will return immediately.

    In order to demonstrate, create a file /tmp/sleepy like so:

    #!/bin/bash
    while ( true ); do
    echo `date` “sleep”
    sleep 1
    done

    This command will invoke the script over ssh using nohup and &:

    ssh -t localhost ‘nohup /tmp/sleepy &’

    Tags: background, nohup output on remote, ssh

  • Solaris: force user to change password at next logon

    HEADS UP, Solaris 02-02-2011 Comments Off

    passwd -f <login>

  • Linux: force user to change password at next logon

    HEADS UP, Linux 02-02-2011 Comments Off

    chage -d0 <login>

  • check oracle applied patches

    HEADS UP 12-17-2010 Comments Off

    /o10g/grid/oracle/agent10g/OPatch/opatch lsinventory

  • See history of archivelog generation

    HEADS UP 09-15-2010 Comments Off

    select trunc(first_time), count(sequence#) from v$log_history group by trunc(first_time) order by trunc(first_time)

  • Check to see if supplemental log data is enabled.

    HEADS UP 09-14-2010 Comments Off

    select SUPPLEMENTAL_LOG_DATA_MIN,SUPPLEMENTAL_LOG_DATA_PK,SUPPLEMENTAL_LOG_DATA_UI,SUPPLEMENTAL_LOG_DATA_FK,SUPPLEMENTAL_LOG_DATA_ALL from v$database

  • Command line history/editing for sqlplus (rlwrap)

    HEADS UP, Linux, SQLPLUS 11-11-2008 Comments Off

    install rlwrap (available from http://utopia.knoware.nl/~hlub/rlwrap/)

    then add this to the bash_profile:

    alias sqlplus=’rlwrap sqlplus’

« Previous Entries Next Entries »

Category:

  • Administration
    • ASM
    • BLOCK SIZE
    • Database Recovery
    • DBVERIFY
    • GRANTS
    • OEM
    • REDO LOGS
  • APPS
    • AutoConfig
    • Change EBS IP Address
    • Cloning
    • DB Environment Vars
    • Discoverer
    • Environment Vars
    • Patching
    • Problems
    • Resources Online
    • Tricks & Tips
    • Upgrading
    • Workflow
  • Articles
  • Backup & Recovery
  • Certification
  • Configuration
  • DATABASE STRUCTURE
    • Data Dictionary
    • Logical Database Structure
    • Physical Database Structure
    • SCHEMA
  • DATAGUARD
  • Documentation
    • ASM (Automatic Storage Magement)
    • Command Reference
    • DataPump
    • Documentation Library
    • SQL Developer
  • EBS
  • Enterprise Manager
  • FLASHBACK
  • HACKING
  • HEADS UP
  • Installation
    • RAC
  • JDeveloper
  • Linux
    • iptables
    • Networking
  • Monitoring
    • Big Brother
  • MQ
  • NFS
  • NXclient/server
  • Online Resources
  • PERL
  • python
  • RMAN
    • RMAN Catalog Setup
  • Routing & Switching
  • SAN – NAS
    • Netapp
  • Scripts
  • Serial-Parallel-Port-Testers
  • SNMP
  • Software
  • Solaris
  • Spiritual
  • SQL & PL/SQL
  • SQLPLUS
  • Startup/Shutdown
  • Streams
  • Tuning
    • INDEXES
    • SQL Tuning
      • TKPROF and sql_trace
  • Version Control
  • Vertias
    • VCS
    • VxFS
  • VMWare
  • VNC
  • Windows XP
  • ZFS
© Blogname. All Rights Reserved. Entries RSS Comments RSS Login Open Source