Monday, August 15, 2011

How to change User Name/Login name in Oracle EBS (FND_USER_PKG)

A very rare requirement, this is what I did to change the name for an active login. Oracle provides a user maintenance package FND_USER_PKG, this has a routine that allows login name change. For example, existing application user name is AMARKP and this needs to be changed to AMAR.PADHI.










() Before Change
The Application FND tables have below information.

SQL> select user_name, end_date from fnd_user 

  2  where user_name in ('AMARKP', 'AMAR.PADHI');

USER_NAME       |END_DATE
----------------|---------
AMARKP          |


SQL> select user_name, role_name from wf_local_user_roles
  2  where user_name in ('AMARKP', 'AMAR.PADHI');



USER_NAME              |ROLE_NAME
-----------------------|-------------------------------------
AMARKP                 |FND_RESP|SQLGL|MS_GL|STANDARD

AMARKP                 |FND_RESP|SYSADMIN|SYSTECH|STANDARD
AMARKP                 |FND_RESP|SYSADMIN|SYSTEM_ADMINISTRATOR|STANDARD


() Performing the change
Below simple routine call is made to change the user name.


begin
  fnd_user_pkg.change_user_name(
                               x_old_user_name => 'AMARKP',
                               x_new_user_name => 'AMAR.PADHI'
                              );


  commit;
end;
/


() After change

SQL> select user_name, end_date from fnd_user
  2  where user_name in ('AMARKP', 'AMAR.PADHI');

USER_NAME         |END_DATE
------------------|---------
AMAR.PADHI        |

SQL> select user_name, role_name from wf_local_user_roles
  2  where user_name in ('AMARKP', 'AMAR.PADHI');

USER_NAME              |ROLE_NAME
-----------------------|-------------------------------------

AMAR.PADHI             |FND_RESP|SQLGL|MS_GL|STANDARD
AMAR.PADHI             |FND_RESP|SYSADMIN|SYSTECH|STANDARD
AMAR.PADHI             |FND_RESP|SYSADMIN|SYSTEM_ADMINISTRATOR|STANDARD


The new user name is now being accepted at login time. Checked few old transactions created by the user, all are now showing the new user in Audit information.


Wednesday, August 10, 2011

Fedora 15 Installation issue - Graphics card Fan not stopping

Just installed Fedora 15 on my workstation (HP pavilion p6610) that has a graphics card (NVIDIA GeForce G315). All went well except I kept hearing a paced-up wheezing sound of an internal fan. The fan failed to slowdown or stop even when there was no activity on the system. Never had this issue in Fedora 14. Little bit of analysis made me realise that card specific drivers are required. Fedora 15 by default installed the Nouveau driver for this card, this one is incompatible with Nvidia card I had.

 I downloaded the driver file from http://www.nvidia.com/Download/index.aspx?lang=en-us site. Provided the applicable information about my card to get the appropriate driver. Following steps were then taken to resolve the issue.

- Ran "yum update" as root to get all latest RPMs installed.

- Blacklisted the Nouveau driver to prevent its usage. Below line added in /etc/modprobe.d/blacklist.conf
blacklist nouveau


-Made a copy of the latest initramfs<>.img file present under the /boot folder.

- Rebuilt the initramfs file using following command as root.
# dracut -v /boot/initramfs-$(uname -r).img $(uname -r)

- Rebooted the system in runlevel 3. Note that the runlevel setup in /etc/inittab file is no more usable in Fedora 15. A new service and system manager functionality, systemd, is implemented in this release. This uses sysmlinks to manage runlevels.The link file is /etc/systemd/system/default.target. This needs to be pointed to the correct target. There are basically two commonly used targets as below -

multi-user.target : this is the equivalent of runlevel 3 (character, multi-user).
graphical.target : this is the default and equivalent of runlevel 5 (graphical access).

To get into character mode, I issued the below command as root.

# rm /etc/systemd/system/default.target
# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
# init 6



- The machine now restarted in character mode. Logged in as root and invoked the nvidia graphics driver, followed on screen instructions and completed installation.
# ./NVIDIA-Linux-x86_64-280.13.run



- To get back to graphical mode, changed the symlink again to point to graphics file now.

# rm /etc/systemd/system/default.target
# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
# init 6


- The fan will continue to wheeze every time the system is started, till the time Nvidia driver gets loaded as part of booting.


Links
I got most details from below links.
http://www.linuxquestions.org/questions/ubuntu-63/nouveau-kernel-driver-825432/
http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions