Wednesday, 11 June 2008

End-Date all users from a Cloned 11i EBS Production Database Accept SYSADMIN

One off my customer wanted me to clone there live environment which was on 11.5.10.2 to a new environment called crmt. I was also asked to end date all the users accept sysadmin and Raf Hussain.

I managed to complete the clone in 2 day's which I though was pretty good. The next step was to end date all the users in fnd_user table accept SYSADMIN and RAF HUSSAIN. I used the following sql to end date the users and leave only sysadmin and Raf Hussain to have access to crmt environment.



Caution:
Before updating any tables through SQL*Plus, recommend you perform a backup of your system or backup the table to be updated using the following statement: SQL>CREATE TABLE FND_BKP AS SELECT * FROM FND_USER

update FND_USER set END_DATE = sysdate-1
where user_name not in ('SYSADMIN','RAF HUSSAIN')

Tuesday, 3 June 2008

Use TAR to backup Oracle 10g Home

Take a backup of the Oracle_Home using TAR on Linux

Command to use

tar cvfz dbcopy.tar.gz db_rac.10.2.0

Thursday, 29 May 2008

Migrating Oracle Applications 11i to RAC 10g

Today I was trying to complete the migration of Oracle Application 11i to RAC 10g and while running command rconfig to Convert Database to RAC I got disconnected from the network so I tried to start the database from the new oracle home so I could run the command again and this time I got the following error message

ORA-27504: IPC error creating OSD context
ORA-27300: OS system dependent operation:sendmsg failed with status: 12
ORA-27301: OS failure message: Cannot allocate memory
ORA-27302: failure occurred at: sskgxpsnd1


After continues searching on metalink & troubleshooting I finally found a way to start the database from the new home and the steps I followed are


2. Turn RAC option off:
- Log in as "oracle"
- cd $ORACLE_HOME/rdbms/lib
- make -f ins_rdbms.mk rac_off
- make -f ins_rdbms.mk ioracle

Monday, 18 February 2008

Create Oracle user in Linux

Create Groups

groupadd –g 500 dba
groupadd –g 501 oinstall

All nodes should have Oracle in the same group

useradd –u 500 –g oinstall –G dba oracle

Verify Oracle user setup

id oracle

Sunday, 10 February 2008

Oracle E-Business Suite R12 Installation Steps on Windows XP

I have installed Oracle E-Business Suite Release 12 on Windows XP Professional successfully.
I have done a single node installation as follows:

Hardware & Software Specifications:

- Intel Pentium 4, CPU 3.2 GHz
- 2 GB of RAM
- 180 GB Hard Drive
- Windows XP Professional with Sevice Pack 2

Installation Steps:

1) Install Windows XP Professional with SP2

2) Set 'Computer Name' as well as 'Domain Name'.

- Right click on 'My Computer' > Properties > 'Computer Name' > Change
- Set 'Computer Name' to
- Click on More
- Set a 'Primary DNS Suffix of this Computer' to

3) Install Microsoft Loopback adapter and define an IP address (10.10.10.10)

For more information on how to do this, please refer to "How to install the Microsoft Loopback adapter in Windows XP":

http://support.microsoft.com/kb/839013

4) Add a new entry in C:\windows\system32\drivers\etc\hosts as follows:


10.10.10.10 hostname.domainname.com

5) From the command prompt, make sure you can do the following:

C:\> ping 10.10.10.10
C:\> ping hostname
C:\> ping hostname.domainname.com

6) Create a new user 'hsawwan' and make this user a member of:
- Administrators (local user)

7) Install Visual C++ 8.0 (Which is included in Microsoft Visual Studio 2005) in 'C:\VCPlus' -- Make sure not to install VC++ in a directory that contains spaces.

8) Download 'Cygwin' and install the required packages:

- Create a Cygwin directory (C:\cygwin) -- Make sure not to install 'Cygwin' in a directory that contains spaces.
- Download the Cygwin Software (http://www.cygwin.com)
- Run 'Setup.exe' and choose 'Download without Installing'
- Select the following packages:

Archive - Default, plus manually select the zip package
Base - Default, plus manually select: ash, coreutils, diffutils, findutils, gawk, grep, sed, tar and which
Devel - Default, plus manually select binutils, gcc, gcc-core, gcc-g++, make and mktemp
Doc - Default, plus manually select cygwin-doc and man
Editors - Default, plus manually select vim
Interpreters - Default, plus manually select gawk
Shells - Default, plus manually select ash and tcsh
Utils - Default, plus manually select cygutils and file

- Once the download is complete, run 'Setup.exe' again and choose 'Install from Local Directory'
- Specify the directory where you want to install Cygwin (C:\cygwin) and DOS as the Default Text File Type

9) GNUMake is not required when using 'Cygwin' since it comes as a part of the 'Cygwin'.

C:\cygwin\bin>copy gawk.exe awk.exe
C:\cygwin\bin>copy grep.exe egrep.exe
C:\cygwin\bin>copy make.exe gnumake.exe
C:\cygwin\bin>copy gcc.exe cc.exe

10) Add 'C:\cygwin\bin' to the system path.

11) No JDK installation is required, JDK 5.0 (java version "1.5.0_08") is bundled with Oracle Applications R12 installation.

12) Set Up the Stage Area:

Stage Area (C:\Stage12) requires a 26 GB hard disk space.

Extract the zip files (25 files) which have been downloaded from (http://edelivery.oracle.com). Nothing special to do since the extracted files will create the stage area directory structure by itself. You should see the following structure under 'C:\Stage12' once you are done with the files extraction:

- startCD > Disk1
- oraAppDB > (Disk 1 to Disk 35)
- oraApps > (Disk 1 to Disk 7)
- oraAS > (Disk 1 to Disk 2)
- oraDB > (Disk 1 to Disk 3)

13) Start the installation:

C:\> cd Stage12\startCD\Disk1\rapidwiz
C:\Stage12\startCD\Disk1\rapidwiz> RapidWiz.cmd

The installation wizard is similar to 11.5.10 RapidWiz. For 'VC++' and 'Cygwin' I have provided the following paths:

s_MSDEVdir=C:\VCPlus\VC
s_MKSdir=C:\cygwin\bin

- It took almost 2 hours to install the production environment (3 hours when installing the Vision instance)
- Total space required to install the production environment is 60 GB (153 GB is required to install the Vision instance)

References:

[1] Oracle E-Business Suite R12 Installation on Windows 2003 (http://forums.oracle.com/forums/thread.jspa?threadID=484238)
[2] Note: 405293.1 (Oracle Applications Release Notes Release 12)
[3] Note: 402311.1 (Oracle Applications Installation and Upgrade Notes Release 12 (12.0) for Microsoft Windows)
[4] Note: 414992.1 (Using Cygwin to Maintain Oracle E-Business Suite Release 12 on Windows)
[5] Oracle® Applications Installation Guide: Using Rapid Install Release 12 (Part No. B31295-02)

Starting / Stopping the Oracle 10g RAC Cluster

# su - oracle

$ hostname
raclinux1

Stopping the Oracle RAC 10g Environment

The first step is to stop the Oracle instance. When the instance (and related services) is down, then bring down the ASM instance. Finally, shut down the node applications (Virtual IP, GSD, TNS Listener, and ONS).

$ emctl stop dbconsole
$ srvctl stop database -d RACDB
$ srvctl stop asm -n raclinux1
$ srvctl stop nodeapps -n raclinux1

Starting the Oracle RAC 10g Environment
The first step is to start the node applications (Virtual IP, GSD, TNS Listener, and ONS). When the node applications are successfully started, then bring up the ASM instance. Finally, bring up the Oracle instance (and related services) and the Enterprise Manager Database console.

$ srvctl start nodeapps -n raclinux1
$ srvctl start asm -n raclinux1
$ srvctl start database -d RACDB
$ emctl start dbconsole

Start/Stop All Instances with SRVCTL

Start/stop all the instances and their enabled services. I have included this step just for fun as a way to bring down all instances!

$ srvctl start database -d RACDB

$ srvctl stop database -d RACDB

Friday, 24 August 2007

Show any logins whose password is NOT SET to expire in 30 days

SELECT user_id, user_name, password_lifespan_days
FROM apps.fnd_user
WHERE
nvl(password_lifespan_days, 0) != 30
Profile - Oracle 11i AppsDBA
Over 7 years of experience as an Oracle Applications DBA managing Oracle Public Sector HRMS 11.5.10 and Oracle Financials 11i in Unix and Windows NT environments. Strong skills and experience with installing, patching, cloning and troubleshooting various Oracle E-Business Suite products in Oracle database 9i and 10g. Proactive in the different phases of architecture design, development, testing, maintenance, performance enhancement and postproduction support. Currently working as Oracle Application DBA at Warwickshire County Council.

------------------------------------------------------------------------------------------------------------------------------