Thursday, May 27, 2010

How to preserve user password in Orac...


How to preserve user password in Oracle database (setting it back without knowing it )


oracle 11g

In 11g, if the PASSWORD_VERSIONS column of DBA_USERS contains 10G (along with 11g), then you can change it as follows
SQL> select name, password from sys.user$ where name like 'TAISMGR';

NAME                           PASSWORD
------------------------------ ------------------------------
TAISMGR                        BA0060B79A9624D8


save it - change to your own liking - and then set it back as follows

SQL>  alter user TAISMGR identified by values 'BA0060B79A9624D8';

User altered.



Oracle 10gR2 & below

Get the password from dba_users (from the "password" column), and then change it 


SQL> select username, password from dba_users where username like 'AJIT%';

USERNAME                       PASSWORD
------------------------------ ------------------------------
AJITS                          8D01EB2FEAF198B3


SQL> alter user ajits identified by values '8D01EB2FEAF198B3';

User altered.




Wednesday, September 16, 2009

Resume of a CIO

I found a very nice pdf doc from Tech Republic about CIO's resume. I think most of the principles mentioned therein also apply to any other job!

Here is the link to the doc

http://docs.google.com/fileview?id=0B3-ltEYqA7QUZGRjMjUyNGQtM2NhMy00M2U2LWEwNTgtYjdkYTQzYjg5NWRh&hl=en


http://docs.google.com/fileview?id=0B3-ltEYqA7QUZGRjMjUyNGQtM2NhMy00M2U2LWEwNTgtYjdkYTQzYjg5NWRh&hl=en

Sunday, September 13, 2009

gyaan about hostname that is taken wh...


gyaan about hostname that is taken while installing oracle;


the hostname for the machine while installing any oracle product is taken from the variable "hostname"
Now here is a catch.

When you and I type the command "hostname" manually, then we see some value - which actually may not necessarily be picked by the oracle software!
I burnt my fingers in this and I know that.


When I used to give the command  hostname, it gave the output as octopus.
[oracle@octopus bin]$ hostname
octopus.sungardhe.com


But while checking it in the oracle files, it will show as something else!

eg:

[oracle@octopus bin]$ opmnctl status

Processes in Instance: SEED.localhost.localdomain
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status
-------------------+--------------------+---------+---------
DSA                | DSA                |     N/A | Down
LogLoader          | logloaderd         |     N/A | Down
HTTP_Server        | HTTP_Server        |     N/A | Down
dcm-daemon         | dcm-daemon         |   17855 | Alive
WebCache           | WebCache           |     N/A | Down
WebCache           | WebCacheAdmin      |     N/A | Down
OC4J               | home               |   20902 | Alive
OC4J               | OC4J_BI_Forms      |   20840 | Alive





or

[oracle@octopus bin]$ opmnctl status

Processes in Instance: SEED.m038038.sct.com
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status
-------------------+--------------------+---------+---------
DSA                | DSA                |     N/A | Down
LogLoader          | logloaderd         |     N/A | Down
HTTP_Server        | HTTP_Server        |     N/A | Down
dcm-daemon         | dcm-daemon         |   17855 | Alive
WebCache           | WebCache           |     N/A | Down
WebCache           | WebCacheAdmin      |     N/A | Down
OC4J               | home               |   20902 | Alive
OC4J               | OC4J_BI_Forms      |   20840 | Alive







Solution:

After installing it a couple of times and playing around I found that the oracle software picks it up just like the following command picks up the hostname


ping `hostname`

[root@octopus ~]# ping `hostname`
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.025 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.041 ms




or

[root@octopus ~]# ping `hostname`
PING octopus.sungardhe.com (149.24.38.38) 56(84) bytes of data.
64 bytes from octopus.sungardhe.com (149.24.38.38): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from octopus.sungardhe.com (149.24.38.38): icmp_seq=2 ttl=64 time=0.048 ms





This ping command takes it up from /etc/hosts.


Therefore, the entries in the /etc/hosts play a very important role in determining what the instance name will be!


I found that the right order in /etc/hosts so that the above ping command gives the right answer is by putting the desired hostname towards the beginning.

[oracle@octopus bin]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
149.24.38.38    octopus.sungardhe.com   octopus
127.0.0.1       octopus.sungardhe.com octopus.sungardhe.com localhost.localdomain localhost
#AJ ::1         localhost6.localdomain6 localhost6
149.24.38.38    m038038.sungardhe.com   m038038




Monday, September 7, 2009

FRM-92150 after applying 10.1.2.3 patchset

After
applying the Oracle AS 10.1.2.3 patchset and trying to launch Webforms,
you are encountering the below error for all client connection:
-------
FRM-92150: WEB Client Version too new
------

Solution

Please manually rebuild the shared libraries by following the steps below:

1) ensure ORACLE_HOME is set in the environment
2) ensure all processes running in this oracle home are stopped.
3) enter the following commands at the unix prompt:
   cd $ORACLE_HOME/forms/lib
 make -f ins_forms.mk sharedlib
4) check the make.log for possible errors
5) if none, then test if the problem remains.

Wednesday, September 2, 2009

nfs share across Linux machines


in order to nfs share a directory from one linux machine to another, following these steps:


1-  nfs server type -> exportfs -rv
2- chkconfig portmap on
3- chkconfig nfs on
4- service portmap restart
5- service nfs restart
6- showmount -e localhost
This will show all the exported folders.
such as
[root@m039082 etc]# showmount -e localhost
Export list for localhost:
/var/ftp/pub *.sungardhe.com
/iso         *.sungardhe.com


Client side

1- On the client side make sure that the portmap service is running as


service portmap restart

2 Then mount the mount the exported folder as
mount  -t nfs <source_machine>:/path/to/export/<folder> /local_mount/point





Make a file system as swap

Make a file system as swap

use fdisk to create a partition

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (197-621, default 197):<RETURN>
Using default value 197
Last cylinder or +size or +sizeM or +sizeK (197-621, default 621): +128M


Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82 (Linux swap)
Command (m for help): p

#

Now that you have the swap partition, use the command mkswap to setup the swap partition. At a shell prompt as root, type the following:

mkswap /dev/hdb2

#

To enable the swap partition immediately, type the following command:

swapon /dev/hdb2

#

To enable it at boot time, edit /etc/fstab to include:

/dev/hdb2               swap                    swap    defaults        0 0

The next time the system boots, it will enable the new swap partition.
#

After adding the new swap partition and enabling it, make sure it is enabled by viewing the output of the command cat /proc/swaps or free

Monday, August 31, 2009

Root file system read write mount

Today I had to change the mount of a virtual machine.
I umounted the partition, howerver, I forgot to remove its mount line from /etc/fstab.

After I shutdown the machine, I removed the 4 GB physical(i.e virtual) disk from the Virtual Machine.
And then I added another partition of about 5.5 GB.

Then I rebooted the machine.

However, because of my not removing the entry from fstab, the boot failed, and the system went in read only mode.

I wanted to edit the fstab, but was not able to because of the read only mount of the root partition /

I then searched google, and found the way to mount the partition read-write in the following way


i.e. of the root filesystem is currently mounted read only, to remount it read-write, give the following command, at the root prompt.

#mount -n -o remount rw /

After this I was able to edit /etc/fstab - and the machine booted successfully.