Sunday, January 30, 2011

APPS DBA – Patching Driver Files


AutoPatch uses driver files to direct the installation of patch.  These driver files, or .drv files, are files that adpatch uses to determine what jobs to perform and these files are

ü  Copy driver
ü  Database  driver
ü  Generate Driver
ü  Unified Driver

Copy driver, cXXXXXX.drv

The copy driver is the first driver, which must be run using adpatch. This driver contains commands to change Oracle Applications files.

The commands include directives to copy and update files, libraries, and/or Java, and commands for generating JAR files and/or C executables.

In a multi-node system, the copy portion runs on all application tier APPL_TOPs.

Database driver, dXXXXXX.drv

Database driver, which is the second driver file executed. This driver contains 
commands to  change Oracle Applications database objects, such as PL/SQL 
and table definitions, or to update or migrate data. Some examples are scripts 
that

·         Create packages
·         Create new error message
·         Add a new table or view to the database
·         Add a new column to a table
·         Add new seed data to a table 

In a multi-node system, the database portion runs only on the application tier 
APPL_TOP that  implements the administration server

Generate Driver, gXXXXXX.drv

Generate Driver Contains commands to generate forms, reports, messages, and/or graphics files.

In a multi-node system, the generate portion runs on all application tier APPL_TOPs, unless the APPL_TOP only implements the administration server. The following are some examples of commands in a ‘g’ driver.

·         The .fmb files are stored in $AU_TOP, and when generated the executable (.fmx) is stored under the product.

·         The .pll is stored under $AU_TOP, and when generated the executable (.plx) is also stored under $AU_TOP.

Unified Driver, uXXXXXX.drv

This unified driver is named u<patchnumber>.drv. It contains all the driver actions (copy, database, and generate) that the patch requires, and it performs these actions in the stated order.

Typically, you run the driver on all APPL_TOPs and AutoPatch determine which actions are required for the current APPL_TOP and run only those actions

Reference Tables:

AD_PATCH_DRIVERS: This table holds information about all patch drivers included in specific patch

AD_PATCH_DRIVER_LANGS: NLS patches (or more specifically, NLS patch drivers) pertain to a language or multiple languages

AD_PATCH_DRIVER_MINIPKS: This table holds information about the various Mini Packs contained in a patch (driver)


Thursday, January 27, 2011

APPS DBA – Patching Basic info


One of the main tasks is as a oracle application dbas to applying the patches. Patches  are  required to resolve problems with the application code, to fix production issues, to install new features, or to upgrade components of the technology stack.

Applying a patch involves several steps, such as unbundling the patch, enabling maintenance mode, applying the patch with adpatch, and implementing manual steps. This section will discuss each of the steps involved

Application Patch: AutoPatch (adpatch) is a utility that is used to fix a bug or new enhancement.

Types of Application Patches

 There are several different types of Oracle Applications patches. These are the more common patches


One-off patch: This is the simplest type of patch. It is created to resolve a specific bug.

Minipack patch: This is a collection of one-off patches and enhancements related to a particular module. Alphabetic characters denote the Minipack version for the module; for example, the product code for the Application DBA utilities is AD, and version Minipack I of this product would be called AD.I.

Family Pack patch: This is a collection of Minipack patches for a particular family group of application modules. Alphabetic characters denote the Family Pack version; for example, the J version of the Human Resources Suite Product Family would be HR_PF.J.

Maintenance Pack patch: This is a collection of Family Packs that serves as a point-level release upgrade

Consolidated patch: This is a collection of one-off fixes for a Family Pack or Maintenance Pack.

Interoperability patch: This is a patch that is required for Oracle Applications to function with a newer version of a technology stack component; for example, you would apply an interoperability patch when upgrading the database to version 10g.

NLS patch: This is a patch that updates language-specific information for multi-language installations.

Rollup patch: This is a collection of one-off patches that update code levels for particular products

Legislative patch: This is a special patch for HR Payroll customers; it contains legislative data for multiple countries



Sunday, January 23, 2011

Tablespace &Data files Queries


select name from v$datafile;

select name from v$logfile;

select name from v$controlfile;

select file_name,tablespace_name from dba_data_files where file_name like '%media%';-Find  the files contains  media---

select file_name,status from dba_data_files where tablespace_name = 'APPS_TS_MEDIA'; - Shows the data files  under particular TS

Rename the data file:

1.alter tablespace APPS_TS_MEDIA offline;

2.cp from Os

3.alter tablespace APPS_TS_MEDIA rename datafile '/testdb/TEST/testdata/logdata/media_6.dbf' to '/testdb/TEST/testdata/appsdata/media_6.dbf'
                                 or
Shut DB,Start Mount,ALTER DATABASE RENAME file '/testdb/TEST/testdata/logdata/media_6.dbf'  to '/testdb/TEST/testdata/appsdata/media_6.dbf';

4.alter tablespace APPS_TS_MEDIA offline;

To see the all tablespaces total MB, used MB, free MB, used and free order min

set linesize 170
SELECT TabSpaceName,
SUM(TotBytes) "TOTAL MB",
SUM(BytesUsed) "USED MB",
SUM(BytesFree) "FREE MB",
AVG(PCUSED) "% USED",
AVG(PCFREE) "% FREE"
FROM (
SELECT SUBSTR (df.file_id, 1, 3) "ID#",
df.tablespace_name TabSpaceName,
df.BYTES/1024/1024 TotBytes,
round (NVL(df.BYTES/1024/1024 - SUM (fs.BYTES/1024/1024),df.BYTES/1024/1024)) BytesUsed,
round (NVL(SUM (fs.BYTES/1024/1024),0)) BytesFree,
round (NVL((100 * ((SUM (fs.BYTES)) / df.BYTES)),0)) PCFREE,
round (NVL((100 * ((df.BYTES - SUM (fs.BYTES)) / df.BYTES)),100)) PCUSED
FROM SYS.dba_data_files df,
SYS.dba_free_space fs
WHERE df.file_id = fs.file_id (+)
GROUP BY df.tablespace_name, df.file_id,
df.tablespace_name,
df.BYTES,
df.blocks)
GROUP BY TabSpaceName
ORDER BY 6 ;

To Find Database  Instance name,Startup Time,Host Name,Status,Archivelog Mode

COLUMN "Instance" FORMAT a10
COLUMN "Startup Time" FORMAT a16
COLUMN "Status" FORMAT a08
COLUMN "Archivelog Mode" FORMAT a18
COLUMN "Logins" FORMAT a12
COLUMN "Archiving" FORMAT a10
COL "HOST_NAME" format a30

set linesize 132
select i.instance_name "Instance" ,i.host_name,
TO_CHAR(i.startup_time, 'MM/DD/YY HH24:MI') "Startup Time",
i.status "Status",
d.log_mode "Archivelog Mode",
i.logins "Logins",
i.archiver "Archiving"
from v$instance i, v$database

How to replace the default Oracle Logo with a Customized Logo


To change the logo Instead of Oracle Brand logo at the Site level and the steps is as follows

Step1: Upload a new image (test.jpg, for example) $OA_MEDIA directory.

Step2: Log into (N) System Administrator > Profile > System

Step3: Query the "Corporate Branding Image for Oracle Applications"profile

Step4: Type "test.jpg" (following our example image) under the Site column

Step5: Save & Log out and log back into the application

SolutionS


Error: ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes

ERROR at line 1:
ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 97
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at line 96

Description:

When I m running the pl&sql procedure I  ve got the following above error .This is error might be occur due to the amount of information, in bytes, to buffer.  Varchar2, number and date items are stored in their internal representation.  The   information is stored in the SGA. An error is raised if the buffer size is exceeded.  If there are multiple calls to enable,   then the buffer size is generally the largest of the values specified, and will always be >= than the smallest value specified.  Currently a more accurate determination is not possible.  The maximum size is 1,000,000, the minimum is 2000.

Solution:

To change the default buffer size to 150,000 characters use a call   similar to the following within a PL/SQL block:

         DBMS_OUTPUT.ENABLE (150000);

  (Where 150000 is the required buffer size)
To see output from DBMS_OUTPUT.PUT_LINE and similar calls in SQL*Plus   Or Server Manager uses the command:

         SET SERVEROUTPUT ON

This causes SQL*Plus / Server Manager to use DBMS_OUTPUT.GET_LINES to   read the output and writes it to the terminal.


SolutionS


Error:  FDPSTP failed due to ORA-20100: Error: FND_FILE failure.
           Unable to create file, o8819870.tmp in the directory, /usr/tmp

Description: while running concurrent requests getting error unable to create file o8819870.tmp
                     in the directory, /usr/tmp
Solution:  

1. Check APPLPTMP is set to a valid directory
                 applusr:
                 Login to the applusr
                 echo $APPLPTMP
                 /usr/tmp      
 
                 orauser:
                cd $ORCLE_HOME/dbs
                Check the parameter in initsid.ora  utl_file_dir = /usr/tmp
      
2. Check the availbe free space if not delete the delete the tmp files under  tmp directory.
  
                 rm -rf *
  
3. Ensure that particular file is exits  or not if it is exits delete it that file /usr/tmp/
               
 Eg: o8819870.tmp
  
4. check the permissions(Read and Writer) utl/tmp directroy  if not    login to the root give this
     
       chmod -R 755 usr
      
5. Run the Concurrent Requests again.
 
Sources: Troubleshooting ORA-20100 on Concurrent Processing [ID 261693.1]


Wednesday, January 19, 2011

Oracle Database Administrator Faqs -1

Hi I m Presenting the frequently asked interview questions which are helpful who are preparing the interviews
                    
1. Can u explain the relationship among database, tablespace and data file?

2. How many control files are required for a database and what it contains?

3. What is the difference between "SYS" & "SYSTEM" Schema?

4. Explain the difference between a data block, an extent and a segment?

5. What is Ur Backup Strategy and what type of backups can take in oracle?

6. What is the difference between media recovery and crash recovery?

7. What is the difference between recovery and restoring of the database?

8. Can u explain the steps for Configuring the Recovery Manager?

9. Can u tell me what is catalog and what is non catalog?

10. What is Automatic Workload Repository and How u run ?

11. What are the 11g features  and explain it?

12. How U add the Data file to the particular tablespace?

Thursday, January 13, 2011

R12 (R12.1.1) Apps Installation Software

Download Link: http://edelivery.oracle.com/EPD/GetUserInfo/process_form

Step 1Go to the Command Prompt -Right mouse click on the cmd.exe entry and choose ' Run as administrator'

Step 2 Go to the Apps Software location and run the rapidwiz.cmd


            StageR12->startcd->Disk1->rapidwiz->rapidwiz.cmd


Screen 1:  It Prompts Rapid Install Wizard window and Click Next



Screen 2: Select the Installation Radio Button. 




Screen 3: Enter the Email Address and Proceed to Next


Screen 4: Select the Unix Toolkit Directory Path ,Visual Studio Directory Path and other  appropriate paths


Screen 5: It’s Performing the System Checks


Screen 6: It Checks the File Space, System Utilities, Port availability and etc. In this case If any of the checks failed u can fix it and can continue


Screen 7: Click Next


Screen 8: Click Yes to Install


Screen 9: Installation is Processing and it may complete 4 to 5 hours (depends on the system configuration)


Screen 10: It Checks the Post installation checks




Screen 10: Click Next


Screen 8:Apps Installation Completed Successfully And U can finish the Button.


Step 3Checks the apps and database Services are up and running or not


Apps Services Scripts


C:/oracle/VIS/inst/apps/VIS_erp/admin/scripts/adstpall.cmd apps/apps

C:/oracle/VIS/inst/apps/VIS_erp/admin/scripts/adstrtal.cmd apps/apps

Database Services Scripts:

C:/oracle/VIS/db/tech_st/11.1.0/appsutil/scripts/VIS_erp/ addlnctl.cmd stop/start VIS

C:/oracle/VIS/db/tech_st/11.1.0/appsutil/scripts/VIS_erp/addbctl.cmd stop/start immediate


Link: http://appsvista.blogspot.com/2011/01/step-by-step-oracle-apps-r12-r1211.html