Archive

Archive for the ‘Apps DBA’ Category

How To License A New Product in Oracle Applications

March 16th, 2011 sam No comments

How To License A New Product in Oracle Applications

1. After purchasing a license for an Application Product/Module, the first thing is to use license manager to record that the product/module is now licensed. License manager can be run 2 ways:

a. log in through Oracle Application Manager (OAM) and select Site Map -> Administration tab -> License Manager

b. run adlicmgr.sh from AD_TOP/bin

Using both methods you can license by Module or by individual Product. Select the check box for the Module/Product to be licensed and Save/Next

2. The Products are now licensed but not ready to be used as none of the Forms/Packages etc would have been compiled and loaded into the Database for these new Products. Use adadmin to generate the files for the new Product/s

a. run adadmin

b. Select Generate Application Files menu

c. Select all of the following Menu options:
- Generate message files
- Generate forms files
- Generate report files
- Generate graphic files
- Generate product JAR files

d. Back to Main Menu

e. Select Compile/Reload Applications Database Entities menu

f. Select all of the following Menu options:
- Compile APPS schema
- Compile menu information
- Compile flexfields

3. Once complete, check that the Forms/JSPs for the new Products licensed now work. The Products are now ready to be configured.

4. Run autoconfig.

Categories: Apps DBA Tags: ,

Oracle Metalink Notes for Oracle Apps DBAs.

March 1st, 2011 sam No comments

Here are the list of Oracle Metalink Notes, I do refer regularly. Moreover, these are very informative. So, I thought of sharing those note ids here with you.

Note: You have to have an account in Oracle Metalink to access notes.

Installation

Note: 452120.1 – How to locate the log files and troubleshoot RapidWiz for R12
Note: 329985.1 – How to locate the Rapid Wizard Installation log files for Oracle Applications 11.5.8 and higher
Note: 362135.1 – Configuring Oracle Applications Release 11i with Oracle10g Release 2 Real Application Clusters and Automatic Storage Management
Note: 312731.1 – Configuring Oracle Applications Release 11i with 10g RAC and 10g ASM
Note: 216550.1 – Oracle Applications Release 11i with Oracle9i Release 2 (9.2.0)
Note: 279956.1 – Oracle E-Business Suite Release 11i with 9i RAC: Installation and Configuration using AutoConfig
Note: 294932.1 – Recommendations to Install Oracle Applications 11i
Note: 403339.1 – Oracle 10gR2 Database Preparation Guidelines for an E-Business Suite Release 12.0.4 Upgrade
Note: 455398.1 – Using Oracle 11g Release 1 Real Application Clusters and Automatic Storage Management with Oracle E-Business Suite Release 11i
Note: 402311.1 – Oracle Applications Installation and Upgrade Notes Release 12 (12.0.4) for Microsoft Windows
Note: 405565.1 – Oracle Applications Release 12 Installation Guidelines

AD Utilities

Note: 178722.1 – How to Generate a Specific Form Through AD utility ADADMIN
Note: 109667.1 – What is AD Administration on APPS 11.0.x ?
Note: 112327.1 – How Does ADADMIN Know Which Forms Files To Regenerate?
Note: 136342.1 – How To Apply a Patch in a Multi-Server Environment
Note: 109666.1 – Release 10.7 to 11.0.3 : What is adpatch ?
Note: 152306.1 – How to Restart Failed AutoInstall Job
Note: 356878.1 – How to relink an Applications Installation of Release 11i and Release 12
Note: 218089.1 – Autoconfig FAQ
Note: 125922.1 – How To Find Oracle Application File Versions

Cloning

Note: 419475.1 – Removing Credentials from a Cloned EBS Production Database
Note: 398619.1 – Clone Oracle Applications 11i using Oracle Application Manager (OAM Clone)
Note: 230672.1 – Cloning Oracle Applications Release 11i with Rapid Clone
Note: 406982.1 – Cloning Oracle Applications Release 12 with Rapid Clone
Note: 364565.1 – Troubleshooting RapidClone issues with Oracle Applications 11i
Note: 603104.1 – Troubleshooting RapidClone issues with Oracle Applications R12
Note: 435550.1 – R12 Login issue on target after cloning
Note: 559518.1 – Cloning Oracle E-Business Suite Release 12 RAC-Enabled Systems with Rapid Clone
Note: 216664.1 – FAQ: Cloning Oracle Applications Release 11i

Patching

Note: 225165.1 – Patching Best Practices and Reducing Downtime
Note: 62418.1 – PATCHING/PATCHSET FREQUENTLY ASKED QUESTIONS
Note: 181665.1 – Release 11i Adpatch Basics
Note: 443761.1 – How to check if a certain Patch was applied to Oracle Applications instance?
Note: 231701.1 – How to Find Patching History (10.7, 11.0, 11i)
Note: 60766.1 – 11.0.x : Patch Installation Frequently Asked Questions
Note: 459156.1 – Oracle Applications Patching FAQ for Release 12
Note: 130608.1 – AdPatch Basics
Note::60766.1 – Patch Installation FAQ (Part 1)

Upgrade

Note: 461709.1 – Oracle E-Business Suite Upgrade Guide – Plan
Note: 293166.1 – Previous Versions of e-Business 11i Upgrade Assistant FAQ
Note: 224875.1 – Installation, Patching & Upgrade Frequently Asked Questions (FAQ’s)
Note: 224814.1 – Installation, Patching & Upgrade Current Issues
Note: 225088.1 – Installation, Patching & Upgrade Patches Guide
Note: 225813.1 – Installation, Patching & Upgrade Setup and Usage Guide
Note: 224816.1 – Installation, Patching & Upgrade Troubleshooting Guide
Note: 216550.1 – Oracle Applications Release 11i with Oracle9i Release 2 (9.2.0)
Note: 362203.1 – Oracle Applications Release 11i with Oracle 10g Release 2 (10.2.0)
Note: 423056.1 – Oracle Applications Release 11i with Oracle 10g Release 2 (10.2.0.2)
Note: 726982.1 – Oracle Applications Release 11i with Oracle 10g Release 2 (10.2.0.3)
Note: 452783.1 – Oracle Applications Release 11i with Oracle 11g Release 1 (11.1.0)
Note: 406652.1 – Upgrading Oracle Applications 11i DB to DB 10gR2 with Physical Standby in Place
Note: 316365.1 – Oracle Applications Release 11.5.10.2 Maintenance Pack Installation Instructions
Note: 418161.1 – Best Practices for Upgrading Oracle E-Business Suite

Printer

Note: 297522.1 – How to investigate printing issues and work towards its resolution ?
Note: 110406.1 – Check Printing Frequently Asked Questions
Note: 264118.1 – Pasta Pasta Printing Setup Test
Note: 200359.1 – Oracle Application Object Library Printer Setup Test
Note: 234606.1 – Oracle Application Object Library Printer Initialization String Setup Test
Note: 1014599.102 – Subject: How to Test Printer Initialization Strings in Unix

Performance

Note: 390137.1 – FAQ for Collections Performance
Note: 216205.1 – Database Initialization Parameters for Oracle Applications Release 11i
Note: 169935.1 – Troubleshooting Oracle Applications Performance Issues
Note: 171647.1 – Tracing Oracle Applications using Event 10046
Note: 153507.1 – Oracle Applications and StatsPack
Note: 356501.1 – How to Setup Pasta Quickly and Effectively
Note: 333504.1 – How To Print Concurrent Requests in PDF Format
Note: 356972.1 – 11i How to troubleshoot issues with printers

Others

Note: 189367.1 – Best Practices for Securing the E-Business Suite
Note: 403537.1 – Best Practices For Securing Oracle E-Business Suite Release 12
Note: 454616.1 – Export/Import Process for Oracle E-Business Suite Release 12 using 10gR2
Note: 394692.1 – Oracle Applications Documentation Resources, Release 12
Note: 370274.1 – New Features in Oracle Application 11i
Note: 130183.1 – How to Get Log Files from Various Programs for Oracle Applications
Note: 285267.1 – Oracle E-Business Suite 11i and Database FAQ
Note: 453137.1 – Oracle Workflow Best Practices Release 12 and Release 11i
Note: 398942.1 – FNDCPASS Utility New Feature ALLORACLE
Note: 187735.1 – Workflow FAQ – All Versions

Oracle Applications 11i/12 Online Documentation

http://www.oracle.com/technology/documentation/applications.html

Note: Above are only the few important notes, there are bunch of notes on many other issues and topics in the metalink. I would suggest one to refer the metalink for more note ids.

Leave your comments if you feel these Oracle Metalink Notes help you in solving your Application issues.

Categories: Apps DBA Tags: ,

how to cleanup FND_NODES table to clear corrupted setup

February 25th, 2011 sam No comments

##
## before cleanup
##

13:42:56 APPS@XTPR:host01> r
1 select node_name, node_mode, support_cp,
2 support_web, support_admin, support_forms
3* from FND_NODES

NODE_NAME N S S S S
—————————— – - – - –
HOST01 O Y N Y N
MIDTIER01 O N Y N Y
APPSERVER21 N Y N Y <– bogust host
APPSERVER22 N Y N Y <– bogust host
APPSERVER23 N Y N Y <– bogust host
AUTHENTICATION O N N N N

6 rows selected.

##
## Cleanup
##

13:42:58 APPS@XTPR:host01> EXEC FND_CONC_CLONE.SETUP_CLEAN;

PL/SQL procedure successfully completed.

13:44:12 APPS@XTPR:host01> commit;

Commit complete.

##
## After cleanup
##

13:44:47 APPS@XTPR:host01> r
1 select node_name, node_mode, support_cp,
2 support_web, support_admin, support_forms
3* from FND_NODES

no rows selected

##
## Run AutoConfig
##

## BE tier
$AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/XTPR_host01.xml appspass=<pass>

## MT tier
$AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/XTPR_midtier01.xml appspass=<pass>

##
## After AutoConfig runs
##

13:58:15 APPS@XTPR:host01> r
1 select node_name, node_mode, support_cp,
2 support_web, support_admin, support_forms
3* from FND_NODES

NODE_NAME N S S S S
—————————— – - – - –
MIDTIER01 O N Y N Y
AUTHENTICATION O N N N N
HOST01 O Y N Y N

3 rows selected.

Important Note

Be careful not to run this on production, it cleans out all printer
definitions, previsously executed requests logs and outputs. It is okay to run
only on the freshly created environment.
Categories: Apps DBA Tags: ,

Oracle Apps Patch info Scripts

March 1st, 2010 sam No comments

/* Query to find out if any patch except localisation patch is applied or not, if applied, that what all drivers it contain and time of it’s application*/
select A.APPLIED_PATCH_ID, A.PATCH_NAME, A.PATCH_TYPE, B.PATCH_DRVIER_ID, B.DRIVER_FILE_NAME, B.ORIG_PATCH_NAME, B.CREATION_DATE, B.PLATFORM, B.SOURCE_CODE, B.CREATIONG_DATE, B.FILE_SIZE, B.MERGED_DRIVER_FLAG, B.MERGE_DATE from AD_APPLIED_PATCHES A, AD_PATCH_DRIVERS B where A.APPLIED_PATCH_ID = B.APPLIED_PATCH_ID and A.PATCH_NAME = ‘<patch number>’

/* To know that if the patch is applied successfully, applied on both node or not, start time of patch application and end time of patch application, patch top location , session id … patch run id */
select D.PATCH_NAME, B.APPLICATIONS_SYSTEM_NAME, B.INSTANCE_NAME, B.NAME, C.DRIVER_FILE_NAME, A.PATCH_DRIVER_ID, A.PATCH_RUN_ID, A.SESSION_ID, A.PATCH_TOP, A.START_DATE, A.END_DATE, A.SUCCESS_FLAG, A.FAILURE_COMMENTS from AD_PATCH_RUNS A, AD_APPL_TOPS B, AD_PATCH_DRVIERS C, AD_APPLIED_PATCHES D where A.APPL_TOP_ID = B.APPL_TOP_ID AND A.PATCH_DRIVER_ID = C.PATCH_DRIVER_ID and C.APPLIED_PATCH_ID = D.APPLIED_PATCH_ID and A.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = ‘<patch number>’)) ORDER BY 3;

/* To find the latest application version */
select ARU_RELEASE_NAME||’.'||MINOR_VERSION||’.'||TAPE_VERSION version, START_DATE_ACTIVE updated,ROW_SOURCE_COMMENTS “how it is done”, BASE_RELEASE_FLAG “Base version” FROM AD_RELEASES where END_DATE_ACTIVE IS NULL

/* to find the base application version */
select ARU_RELEASE_NAME||’.'||MINOR_VERSION||’.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, ROW_SOURCE_COMMENTS “how it is done” from AD_RELEASES where BASE_RELEASE_FLAG = ‘Y’

/* To find all available application version */
select ARU_RELEASE_NAME||’.'||MINOR_VERSION||’.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, END_DATE_ACTIVE “when lasted”, CASE WHEN BASE_RELEASE_FLAG = ‘Y’ Then ‘BASE VERSION’ ELSE ‘Upgrade’ END “BASE/UPGRADE”, ROW_SOURCE_COMMENTS “how it is done” from AD_RELEASES

/* To get file version of any application file which is changed through patch application */
select A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME, max(B.VERSION) from AD_FILES A, AD_FILE_VERSIONS B where A.FILE_ID = B.FILE_ID and B.FILE_ID = 86291 group by A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME

/* To get information related to how many time driver file is applied for bugs */
select * from AD_PATCH_RUN_BUGS where BUG_ID in (select BUG_ID from AD_BUGS where BUG_NUMBER = ‘<BUG NUMBER>’

/* To find latest patchset level for module installed */
select APP_SHORT_NAME, max(PATCH_LEVEL) from AD_PATCH_DRIVER_MINIPKS GROUP BY APP_SHORT_NAME

/* To find what is being done by the patch */
select A.BUG_NUMBER “Patch Number”, B. PATCh_RUN_BUG_ID “Run Id”,D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and A.BUG_NUMBER = ‘<patch number>’ and B.PATCH_RUN_BUG_ID = ‘ < > ‘ and C.EXECUTED_FLAG = ‘Y’ GROUP BY A.BUG_NUMBER, B.PATCH_RUN_BUG_ID, D. APP_SHORT_NAME, D>SUBDIR, D.FILENAME, E.ACTION_CODE

/* To find Merged patch Information from database in Oracle Applications */
select bug_number from ad_bugs where bug_id in ( select bug_id from ad_comprising_patches where patch_driver_id =(select patch_driver_id from ad_patch_drivers where applied_patch_id =&n) );

/* Second Query to know, what all has been done during application of PATCH */
Select J.PATCh_NAME, H.APPLICATIONS_SYSTEM_NAME Instance_Name, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F, AD_PATCH_RUNS G, AD_APPL_TOPS H, AD_PATCH_DRIVERS I, AD_APPLIED_PATCHES J where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and G.APPL_TOP_ID = H.APPL_TOP_ID and G.PATCH_DRIVER_ID = I.PATCH_DRIVER_ID and I.APPLIED_PATCH_ID = J.APPLIED_PATCH_ID and B.PATCH_RUN_ID = G.PATCH_RUN_ID and C.EXECUTED_FLAG = ‘Y’ and G.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = ‘<Patch Number>’)) GROUP BY J.PATCH_NAME, H.APPLICATINS_SYSTEM_NAME, H.NAME, I.DRIVER_FILE_BNAME, D.APP_SHORT_NAME, D.SUBDIR, D.FILENAME, E.ACTION_CODE

/* Script to find out Patch level of mini Pack */
select product_version,patch_level from FND_PROUDCT_INSTALLATIONS where patch_level like ‘%&shortname%’;

Replace short name by name of Oracle Apps Minipack for which you want to find out Patch level . ex.
AD – for Applications DBA
GL – for General Ledger
PO – Purchase Order

Categories: Apps DBA Tags:

Concurrent Manager Scripts

September 22nd, 2009 asra No comments

Few Oracle Applications DBAs understand that sophisticated data dictionary queries can be run to reveal details about the workings within each Concurrent Manager. Oracle provides several internal tables that can be queried from SQL*Plus to see the status of the concurrent requests, and the most important are FND_CONCURRENT_PROGRAMS and FND_CONCURRENT_REQUESTS.

Oracle supplies several useful scripts, (located in $FND_TOP/sql directory), for monitoring the concurrent managers:

afcmstat.sql

Displays all the defined managers, their maximum capacity, pids, and their status.

afimchk.sql

Displays the status of ICM and PMON method in effect, the ICM’s log file, and determines if the concurrent manger monitor is running.

afcmcreq.sql

Displays the concurrent manager and the name of its log file that processed a request.

afrqwait.sql

Displays the requests that are pending, held, and scheduled.

afrqstat.sql

Displays of summary of concurrent request execution time and status since a particular date.

afqpmrid.sql

Displays the operating system process id of the FNDLIBR process based on a concurrent request id. The process id can then be used with the ORADEBUG utility.

afimlock.sql

Displays the process id, terminal, and process id that may be causing locks that the ICM and CRM are waiting to get. You should run this script if there are long delays when submitting jobs, or if you suspect the ICM is in a gridlock with another oracle process.

Categories: Apps DBA Tags:

Logical Standby Creation

February 20th, 2009 sam No comments

Create a Physical Standby
1. Perform a hot backup of the primary database.
This can be done in several ways depending on what your current
configuration is and where the logical standby database will be placed.
2. Turn this backup of the primary database into a physical standby following
a. Restore the backup to the target area if necessary.
b. Create the standby control file and the standby initialization parameter file
c. Define the standby parameters.
i. FAL_SERVER and FAL_CLIENT
ii. STANDBY_ARCHIVE_DEST
d. Enable redo shipping from the primary database to this new physical standby.
e. Start the Managed Recover Process to start bringing this database up to date.
Once the physical standby is up to date you can continue with the next step.
Prepare for the Logical Standby
From this point you begin to incur downtime of the Primary database.
1. Shutdown the Primary database.
a. SHUTDOWN IMMEDIATE
b. Make sure that the physical standby has applied all of the redo sent to it following the shutdown.
c. Defer any further redo shipping to this physical standby.
i. ALTER SYSTEM SET
LOG_ARCHIVE_DEST_STATE_3=DEFER;
1. Or whatever destination number you used.
2. Startup the production database in the restricted mode and build the dictionary.
a. Start the primary database in the mounted mode.
i. STARTUP MOUNT
b. Create a backup control file.
i. ALTER DATABASE BACKUP CONTROLFILE to ‘<file specification>;
c. Restrict access to the primary database
i. ALTER SYSTEM ENABLE RESTRICTED ESSION;
d. Open the database.
i. ALTER DATABASE OPEN;
e. Ensure that Supplemental logging is enabled and switch logs.
Note – If you have other Physical standbys already created you
need to perform this step on those physical standbys as well in
preparation for future switchovers.
i. ALTER DATABASE ADD SUPPLEMENTAL LOG
DATA (PRIMARY KEY, UNIQUE INDEX)
COLUMNS;
ii. ALTER SYSTEM ARCHIVE LOG CURRENT;
Street Proven Techniques for Deploying Data Guard SQL Apply Page 13
f. Record the checkpoint_change# number from v$database.
i. SELECT checkpoint_change# FROM
V$DATABASE;
g. Execute the dictionary build procedure
i. EXECUTE DBMS_LOGSTDBY.BUILD;
h. Switch log files again.
i. ALTER SYSTEM ARCHIVE LOG CURRENT;
i. Obtain archive logs necessary to start the logical standby.
i. SELECT NAME FROM V$ARCHIVED_LOG
WHERE FIRST_CHANGE# <
(SLECT MAX(*NEXT_CHANGE#*)
FROM V$ARCHIVED_LOG
WHERE DICTIONARY_END = ‘YES’ AND
STANDBY_DEST= ‘NO’)
AND NEXT_CHANGE# >
(SELECT MAX(*FIRST_CHANGE#*)
FROM V$ARCHIVED_LOG
WHERE DICTIONARY_BEGIN = ‘YES’ AND
STANDBY_DEST= ‘NO’) ;
3. At this point you can open the database for general use.
a. ALTER SYSTEM DISABLE RESTRICTED SESSION;
Once these steps are complete the Primary is back up and running.
Finish creating the Logical standby
Primary database has been down only for the amount of time it took to
perform the previous 3 steps. From this point on the rest of the steps are
performed on the new logical standby while production is up.
1. Shutdown the physical standby
a. SHUTDOWN IMMEDIATE
2. Copy over all required files from the Primary database to the future
Logical standby.
a. Copy the archive logs identified in the previous section, which
were created on the primary database from the time you restarted
the database to the point the dictionary build command
completed. You should copy the logs containing the dictionary
build as well as the archive log just prior to the dictionary build.
Put them in the directory where the original incoming archive
logs were placed.
i. For example: “/oracle/standby/arch/”
b. Copy the backup control file.
i. If you use a different name for the backup control file
you will have to fix the initialization parameter file to
reflect this change.
3. Finish up the processing on the soon to be logical standby
Street Proven Techniques for Deploying Data Guard SQL Apply Page 14
a. Using the newly created backup control file, mount the database.
i. STARTUP MOUNT;
b. Rename all of the data files and online redo log files to reflect
their current filename. For example, for each data file and log file:
i. ALTER DATABASE RENAME FILE ‘/primary/arch/system.dbf’
TO ‘/standby/arch/system.dbf’;
c. Perform a point in time recovery to the checkpoint change
number obtained in the previous steps.
i. ALTER DATABASE RECOVER AUTOMATIC FROM ‘/oracle/standby/arch/’
UNTIL CHANGE <checkpoint_change#>
USING BACKUP CONTROLFILE;
d. Turn on the Logical standby guard
i. ALTER DATABASE GUARD ALL;
e. Open the standby database the first time.
i. ALTER DATABASE OPEN RESETLOGS;
f. Shut the database down and run the nid utility to change the
database name and id.
i. SHUTDOWN IMMEDIATE;
ii. STARTUP MOUNT;
iii. nid TARGET=sys/password DBNAME=<new name>
iv. SHUTDOWN IMMEDIATE
v. Create the new password file and correct the init.ora file
with the new DBNAME.
vi. Mount the Logical standby and open reset logs.
1. STARTUP MOUNT;
2. ALTER DATABASE OPEN RESETLOGS;
g. Add the temporary files.
i. ALTER TABLESPACE <temp name> ADD TEMPFILE <filespec> SIZE nn;
h. Register the archive logs you copied over in the previous steps.
For each log file do the following:
i. ALTER DATABASE REGISTER LOGICAL
LOGFILE <filespec>;
i. Start Logical standby apply.
i. ALTER DATABASE START LOGICAL STANDBY
APPLY INITIAL <checkpoint_change#>;
4. Re-enable the redo shipping from the primary to this logical standby.
a. ALTER SYSTEM SET
log_archive_dest_state_3=enable;

Categories: Apps DBA, DBA Tags:

IP Restriction for Oracle EBS

January 20th, 2009 sam No comments

1. Oracle TNS Listener Security

ENABLE VALID NODE CHECKING

Valid Node Checking allows or denies access from specified IP addresses to Oracle services. To enable Valid Node Checking, set the following parameters in $TNS_ADMIN/sqlnet.ora

tcp.validnode_checking = YES

tcp.invited_nodes = (X.X.X.X, hostname,)

tcp.excluded_nodes = (hostname, X.X.X.X …)

The first parameter turns on Valid Node Checking. The latter two parameters respectively specify the IP

Addresses or hostnames that are permitted to make or are denied from making network connections to Oracle services. Replace X.X.X.X with the middle-tiers’ IP addresses. Middle-tier applications include web servers, forms servers, reports servers, concurrent managers, discoverer, terminal servers, central administrator machines and any remote monitoring tool that uses SQLNet. Note, to use SQLNet clients such as sqlplus, toad, ADI from windows desktop, that desktop cannot use DHCP. Use a static IP address.

Categories: Apps DBA Tags:

Chaning GUEST Password

January 20th, 2009 sam No comments

1.Change the GUEST user statement to the following in $CONFIG_FILE

<oa_user type=”GUEST”>
<username oa_var=”s_guest_user”>GUEST</username>
<password oa_var=”s_guest_pass”>GUEST</password>

Use upper case letters.

3. Run AP Tier Autoconfig.

4. Verify the $FND_TOP/secure/<host>.dbc file the entry for GUEST_USER_PWD is
set in the same letter case.

Categories: Apps DBA Tags:

Patch fails with error ” Error occurred in version checking”

January 20th, 2009 sam No comments

Patch fails with error “Error occurred in version checking”.

I was apply patch on the test instance, before applying on the production instance. While apply the patch I found this error “Error occurred in version checking”, I had searched on the internet I couldnt find the solution. My friend told me redowload the patch and try again. I had redownloaded the patch from the metalink. Then I had copied it to the test server through ftp and extracted the Patch. Then i had started patching through adpatch utility. It was completed successfully.

So, What may be the problem. First time I had downloaded the patch archive which was corrupted and some files where missing. Next time, it was ok. So, if the files are missing the adpatch will give this error “Error occurred in version checking”.

Categories: Apps DBA Tags:

Virtual Private Database (VPD) with Oracle Apps

December 14th, 2008 sam No comments

Virtual Private Database (VPD) with Oracle Apps

Virtual Private Database (VPD) with Oracle Apps
Virtual Private Database (VPD) is an Oracle database security technology, enabling row level access control.
With VPD we are able to control users access to data related to them only and preventing from them to access data they are not authorized to see.
For additional information about VPD take a look at Virtual Private Database in Oracle8i and Oracle9i.

VPD can be used with Oracle Applications 11i, and I’m going to show a very simple example.
So let’s assume, for example purpose only, that we would like to prevent some users to view requests that finished with status “ERROR”.

The steps to implement VPD are:
1) Create a profile to control which users can see error requests
2) Set profile value to ‘N’ at site level.
2) Create new context
3) Create context package
4) Create policy package
5) Add policy to concurrent request table

Create profile
To control which users will be restricted and which are not, create a new profile, name – XX_HIDE_ERROR_CONCURRENTS.
Set value at site level to ‘N’ and for specific user to ‘Y’:

declare
status boolean;
begin
status := fnd_profile.SAVE(X_NAME => ‘XX_HIDE_ERROR_CONCURRENTS’
,X_VALUE => ‘N’
,X_LEVEL_NAME => ‘SITE’);
status := fnd_profile.SAVE(X_NAME => ‘XX_HIDE_ERROR_CONCURRENTS’
,X_VALUE => ‘Y’
,X_LEVEL_NAME => ‘USER’
,X_LEVEL_VALUE => ’10083′);
end;
/
commit;

Create new context:
CREATE CONTEXT XX_APPS_CONTEXT USING APPS.XX_CONTEXT_PKG;

Create context package:
Create the package used by the new context.
This package will set the context for users according to the user level profile value.

CREATE OR REPLACE PACKAGE XX_CONTEXT_PKG AS
PROCEDURE Set_Context;
END;
/
CREATE OR REPLACE PACKAGE BODY XX_CONTEXT_PKG IS
PROCEDURE Set_Context IS
BEGIN
DBMS_SESSION.Set_Context(‘XX_APPS_CONTEXT’, ‘HIDE_ERROR_CONCURRENTS’, fnd_profile.VALUE(‘XX_HIDE_ERROR_CONCURRENTS’));
END Set_Context;
END;
/

Create policy package
Now, we need to create a policy package.
In this package we determine the policy for accessing data, according to the user context we determine how to access the table.

CREATE OR REPLACE PACKAGE XX_POLICY_PACKAGE AS
FUNCTION Select_Concurrent_Requests (Owner VARCHAR2, Objname VARCHAR2)
RETURN VARCHAR2;
END;
/
CREATE OR REPLACE PACKAGE BODY XX_POLICY_PACKAGE IS
FUNCTION Select_Concurrent_Requests (Owner VARCHAR2, Objname VARCHAR2) RETURN VARCHAR2 IS
predicate VARCHAR2(500);
BEGIN
predicate := null;
if (sys_context(‘XX_APPS_CONTEXT’,'HIDE_ERROR_CONCURRENTS’) = ‘Y’) then
predicate := ‘STATUS_CODE != ”E”’;
end if;
RETURN predicate;
END Select_Concurrent_Requests;
END;
/

Add policy to concurrent request table
Applying the policy on the relevant table.

begin
dbms_rls.add_policy(‘APPS’
,’FND_CONCURRENT_REQUESTS’
,’XX_SELECT_CONC_REQ_POLICY’
,’APPS’
,’XX_POLICY_PACKAGE.Select_Concurrent_Requests’
,’SELECT’);
end;
/

From now on, each access to this table will involve context value check and the data is secured.

Let’s check if it’s work…
Set the current session to my APPS user and execute the Set_Context procedure.

begin fnd_global.apps_initialize(10083, 0, 0); end;
/
begin XX_context_pkg.Set_Context; end;
/

Query all requests that finished with error status should return 0 rows:
select count(*) from fnd_concurrent_requests where status_code=’E';
COUNT(*)
———-
0

If we change the session owner:
begin fnd_global.apps_initialize(10084, 0, 0); end;
/
begin XX_context_pkg.Set_Context; end;
/

And execute the same query as before:
select count(*) from fnd_concurrent_requests where status_code=’E';
COUNT(*)
———-
157

To drop the policy from the table issue this command:
begin
dbms_rls.drop_policy(‘APPS’
,’FND_CONCURRENT_REQUESTS’
,’XX_SELECT_CONC_REQ_POLICY’);
end;
/

VPD & Oracle Apps
To set the context for each APPS user connect to the system, we can insert into CUSTOM.pll this line only:

begin XX_context_pkg.Set_Context; end;

For Each user connecting to Oracle Apps Forms, the context will be set and security will be on.

This is on VPD & Oracle Apps in a nutshell, The solution is very depents on specific requirements of security but this is a good starting point.

Categories: Apps DBA Tags: