Tuesday, April 19, 2011

How To Know Which Linux Distribution You Are Using?

Here are a few ways to find out which linux distro you are using :

1. From the Boot Time messages
Fire up your favourite terminal program and type in the following

dmesg | head -1
The output would be similar to

Linux version 2.6.13-15-default (geeko@buildhost) (gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)) #1 Tue Sep 13 14:56:15 UTC 2005

2. Using /proc/version
In the terminal type

cat /proc/version
The output would be like

Linux version 2.6.13-15-default (geeko@buildhost) (gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)) #1 Tue Sep 13 14:56:15 UTC 2005

Thursday, April 14, 2011

QuickTip: Setting HTTP Proxy for SVN

For setting the HTTP proxy for SVN the regular setting of http_proxy environment variable would not work. i.e.

export http_proxy=http://my-proxy-server.com:8080/ would not work.

There is a “servers” file in svn which is present at the following location

Win : C:\Documents and Settings\hazrativ\Application Data\Subversion\servers

Linux: /etc/subversion/servers


Here you need to set the proxy server and port settings so that command line SVN can access the external world form the proxy. Uncomment and change the lines necessary

[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = myproxy.us.com
http-proxy-port = 8080
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no
# http-auth-types = basic;digest;negotiate
# No http-timeout, so just use the builtin default.
# No neon-debug-mask, so neon debugging is disabled.
# ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem


If you get something like

svn: C:\Documents and Settings\hazrativ\Application Data\Subversion\servers:73:
Option expected


then it means that you have a space at the start of the property which you have un-commented. Make sure that there is no space in the beginning of the property in the servers file.

OpenSuSE: Oracle 10gR2 startup script

#!/bin/sh
#modify for your environment


. /etc/rc.status


export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl
export ORACLE_USER=oracle


scriptname='basename $0'


case $1 in
    start)
    $ORACLE_HOME/bin/localconfig reset
    su - "$ORACLE_USER"<<EOO
    $ORACLE_HOME/bin/lsnrctl start
    $ORACLE_HOME/bin/isqlplusctl start
    $ORACLE_HOME/bin/emctl start dbconsole
    sqlplus /nolog
    connect / as sysdba
    startup


EOO
touch /var/lock/subsys/$scriptname
    ;;


    stop)
    /etc/init.d/init.cssd stop
    su - "$ORACLE_USER"<<EOO
    $ORACLE_HOME/bin/lsnrctl stop
    $ORACLE_HOME/bin/isqlplusctl stop
    $ORACLE_HOME/bin/emctl stop dbconsole
    sqlplus /nolog
    connect / as sysdba
    shutdown immediate


EOO
rm -f /var/lock/subsys/$scriptname
    ;;


    *)
    echo "Usage: $0 {start|stop}"
    ;;
esac

Thursday, April 7, 2011

Upgrade Oracle 10.2.0.1 to 10.2.0.2

1. Stop all Oracle processes
2. Get Oracle patch, extract and install
3. Do as follow to upgrade: 
cd $ORACLE_HOME/rdbms/admin
sqlplus "/as sysdba"
SQL>startup upgrade;
SQL>@catupgrd.sql
SQL>shutdown immediate;
SQL>startup;
SQL>@utlrp.sql

Oracle shutdown

During a normal shutdown, it's my understanding that Oracle will close all sessions (see modes below), close the database, un-mount the data files and then shut down the instance in two steps, first issuing a "free" the SGA RAM heap and finally, terminating the background processes.

Oracle has three shutdown modes:

· Normal (default) - waits for in-flight work to complete. This could take houes.

· Immediate - terminates all sessions and does a rollback on all
uncommitted transactions.

· Abort - aborts all sessions, leaving current DML in need of rollback, de-allocates the SGA and terminates the background processes. Note that a shutdown abort is NOT evil or dangerous. The "abort" simply means that Oracle will terminate all active work, which is what most people want during a shutdown!

The "normal" and "immediate" modes can take a long time in you have in-flight transactions, and many Oracle DBA's ensure a swift clean shutdown this way, aborting the sessions, re-starting to allow warmstart rollback of the aborted transactions, and a shutdown immediate to close cleanly:

SQL> shutdown abort
SQL> startup
SQL> shutdown immediate


Wednesday, April 6, 2011

Oracle® Database Patch Set Notes 10g Release 2 (10.2.0.2) Patch Set for Linux x86


10g Release 2 (10.2.0.2) Patch Set for Linux x86
February 2006
These patch set notes accompany the Oracle Database release 10.2.0.2 patch set. This document contains the following sections:
This document may be updated after release. To check for updates to this document, see document 316900.1 on the OracleMetalink Web site:
http://metalink.oracle.com

To locate document 316900.1:
  1. Log on to OracleMetalink.
  2. Click Advanced at the top of the OracleMetalink page.
  3. Enter 316900.1 in the Document ID field, then click Submit.


Stopping and Starting Oracle Software

This chapter describes how to identify Oracle Database processes, and provides basic information about how to stop and restart them. It also describes how to set up automatic startup and shutdown of the Oracle Database. It contains the following sections:

2.1 Stopping and Starting Oracle Processes

This section describes how to stop and start Oracle processes. It contains the following topics:

2.1.1 Starting Oracle Processes on Mac OS X

Note:
Ensure that you follow the instructions in this section every time you start an Oracle Database or Automatic Storage Management instance or an Oracle Net listener process.
To ensure that certain shell limits are set to the values required to run Oracle processes, you must use the sshrlogin, or telnet command to connect to the system where you want to start the process, even if that system is the local system. The syntax of this command is as follows:
$ ssh localhost

Tuesday, April 5, 2011

Install Oracle 10g on OpenSuSE 11.1

I am attracted to use OpenSuSE 11.1 (x86) because of attractive and nice desktop environment design. Beside OpenSuSe is one of RPM base Linux distro likes Red Hat Enterprise Linux (RHEL) and of course its free. So I’ve installed OpenSuse 11.1 into my machine.

Since I am working in one of Oracle Certified Company, then I must have Oracle database installed into my machine to do some learning and testing. Why I am not just install Oracle database on RHEL or OEL since there are officially supported by Oracle? Hurm..why not I am doing some experiment since both OpenSuse and RHEL were RPM base.

Here the step by step to install Oracle 10g database on OpenSuse 11.1:

1. I assumed that OpenSuse 11.1 has been installed on your machine, and Oracle Database isntaller has been downloaded from Oracle website (database.zip).

Make sure required package was installed:

#rpm -q gcc gcc-c++ glibc libaio libaio-devel make openmotif openmotif-libs
and install the following package:

# zypper install libstdc++33

How to enable proxy on opensuse 11.3

Quesion : How to configure the proxy in Opensuse to be able to use zypper,Yast ....?opensuse
There are 2 ways to configure the proxy in Opensuse:
1-Command line  methode:
To configure proxy using this methode, open terminal and type this command to edit proxy file
nano  /etc/sysconfig/proxy
Then add these lines :
PROXY_ENABLED="yes"
HTTP_PROXY="http://proxyhost:port"
FTP_PROXY="http://proxy-host.com:port"
HTTPS_PROXY="http://proxy-host:port"
If  you  are  using a username and  password  for  your  proxy  make the above lines looks like this :
HTTP_PROXY="http://user:password@proxyhost:port"
save  and  exit

Minimal openSUSE 11.1 install

Introduction

Every distribution has its goals and purpose. Some are designed to include everything, others like to take a small selection of what's available. But all distributions start from a small base and install more and more packages until they have a complete environment. For some that's GNOME or the latest snapshot of KDE 4, while for others it is a tiny footprint with the most lightweight window manager. As many readers will be aware, I like minimalist systems and wrote an article for DistroWatch Weekly on how to get a more lean Ubuntu system. Some readers however, thought I was stupid to choose Ubuntu if I wanted a light-weight system and claimed other distros were faster and better. Undoubtedly so, but I didn't choose it because it was lightweight, quite the contrary. I chose it because, by default, it's pretty hefty and like it or not, it is the most popular desktop distribution at the present time. The article intended to show that you don't have to be stuck with the Ubuntu way of doing things and that you could take control. You can do this with almost any distribution out there and today I'll show you how to do so with openSUSE.