Monday, June 30, 2014

RMAN - Basic backup/restore examples:

RMAN - Basic backup/restore examples:

 
Use the "archive log list" command to verify if your database is in archive log mode:


1. setup all RMAN variables correctly


RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name HPCDR1 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbs/snapcf_HPCDR1.f'; # default
RMAN>

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/HPCDR1/snapcf_HPCDR1.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/HPCDR1/snapcf_HPCDR1.f';
new RMAN configuration parameters are successfully stored
RMAN>

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/HPCDR1/%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/HPCDR1/%F';
new RMAN configuration parameters are successfully stored
RMAN>

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN>



2. control_file_record_keep_time


When you do not use a recovery catalog, the control file is the sole source of information about RMAN backups. As you make backups, Oracle records these backups in the control file. To prevent the control file from growing without bound to hold RMAN repository data, records can be reused if they are older than a threshhold you specify.
The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter determines the minimum age in days of a record before it can be overwritten:
CONTROL_FILE_RECORD_KEEP_TIME = integer
 
For example, if the parameter value is 14, then any record aged 14 days and older is a candidate for reuse. Information in an overwritten record is lost. The oldest record available for reuse will be used first.
When Oracle needs to add new RMAN repository records to the control file, but no record is older than the threshhold, Oracle attempts to expand the size of the control file. If the underlying operating system prevents the expansion of the control file (due to a disk full condition, for instance), Oracle overwrites the oldest record in the control file and logs this action in the alert log.
The default value of CONTROL_FILE_RECORD_KEEP_TIME is 7 days. If you are not using a recovery catalog, then set the CONTROL_FILE_RECORD_KEEP_TIME value to slightly longer than the oldest file that you need to keep. For example, if you back up the whole database once a week, then you need to keep every backup for at least seven days. Set CONTROL_FILE_RECORD_KEEP_TIME to a value such as 10 or 14.
Caution:
Regardless of whether you use a recovery catalog, never use RMAN when CONTROL_FILE_RECORD_KEEP_TIME is set to 0. If you do, then you may lose backup records.


I always set mine to 365 days:



3. Test RMAN by backing up all archive log files for past 24 hours:


run {
allocate channel dev1 type disk;
backup as compressed backupset
format '/backup/HPCDR1/arch_%d_T%T_s%s_p%p'
(archivelog from time 'sysdate-1' all);
release channel dev1;
}


Use this command to see all archive logs backed up so far:
list backup of archivelog all;


a Linux 'ls -l' will show the controlfile snapshot backup, as well as the archive log backupset:

4. Take a complete backup of the database


The below, shows that no backup of the database exist, which is correct as this is a newly created database:


Use the below RMAN script to take a full, compressed backup of the database, including all archived logs:

run {
allocate channel dev1 type disk maxpiecesize=10G;
backup as compressed backupset
full
format '/backup/HPCDR1/full_%d_T%T_s%s_p%p'
(database);
backup as compressed backupset
format '/backup/HPCDR1/arch_%d_T%T_s%s_p%p'
archivelog from scn=0 all delete input;
release channel dev1;
}


Do another "list backup of database" to see of the backup is registered in the controlfile:


The "list backup" command will list all backups registered in the control file.


You can once again confirm on an O/S level that the backups did take place:


5. Backup All ONLINE log files:


run {
allocate channel dev1 type disk;
sql "alter system archive log current";
backup as compressed backupset
format '/backup/HPCDR1/arch_%d_T%T_s%s_p%p'
(archivelog from time 'sysdate-1' all delete input);
release channel dev1;
}

6. Monitoring The Backup Progress


To monitor the backup progress run the following sql against the target database:
select sid, serial#, context ,round(sofar/totalwork*100,2) "% Complete",
         substr(to_char(sysdate,'yymmdd hh24: mi:ss'),1,15) "Time Now"
from  v$session_longops
where substr(opname,1,4) = 'RMAN';         


7. Take a full cold backup of the database


Exactly the same RMAN script as in use at 4) , but the database must be in MOUNTED mode, not opened:
startup mount;

8. Backup only the current control files:


run {
allocate channel dev1 type disk;
backup
format '/backup/HPCDR1/current_cf_%d_T%T_s%s_p%p'
(current controlfile);
release channel dev1;
}



Use "list backup of controlfile" to see all previous controlfile backups:



9. Make Incremental Backup Since Last Full backup – level 1


run {
allocate channel dev1 type disk;
backup as compressed backupset
incremental level 1
format '/backup/HPCDR1/database_lev1_%d_T%T_s%s_p%p'
(database);
release channel dev1;
}


10. Make Incremental Backup Since Last Incremental Backup – level 2


run {
allocate channel dev1 type disk;
backup as compressed backupset
incremental level 2
format '/backup/HPCDR1/database_lev2_%d_T%T_s%s_p%p'
(database);
release channel dev1;
}

You can see the difference below in the size between a Level0 and a level2 RMAN backup:
Full backup:                445Mb
Level0 Backup:           445Mb
Level2 Backup:           4.2Mb


12. Test the restore of a tablespace when a datafile was deleted AND the database is up and running – ONLY UNIX/Linux platforms:


SQL> select file_name,file_id from dba_data_files;
FILE_NAME                                               FILE_ID
--------------------------------------------------      --------
/u01/app/oracle/oradata/HPCDR1/system01.dbf              1
/u01/app/oracle/oradata/HPCDR1/sysaux01.dbf              2
/u01/app/oracle/oradata/HPCDR1/undotbs01.dbf             3
/u01/app/oracle/oradata/HPCDR1/users01.dbf               4

SQL>

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
 
SQL>

While the database is up and running, delete the USERS tablespace's datafile, and recover it again:


Test that there is a problem with the tablespace, before attempting to recover:

Use the below to recover either the datafile or the complete tablespace:
(a) Datafile recovery - use this when your tablespace as more than 1 datafiles, and only one datafile has a problem:
run {
allocate channel dev1 type disk;
restore datafile 4;
recover datafile 4;
alter database open;
release channel dev1;
}


(b) Tablespace recovery - use this when more than one datafile is corrupt, or if the corruption cannot be resolved by only restoring one or many, but not all datafiles. Database can be mounted, but not opened.

Delete the datafile again:



run {
allocate channel dev1 type disk;
restore tablespace USERS;
recover tablespace USERS;
alter database open;
release channel dev1;
} 


13. Full database restore when the SYSTEM datafile is corrupt/missing, and all archive log files are available:




The first step is to start the database in NOMOUNT mode, and to recover the controlfile from the latest autobackup:

SQL> startup nomount;

RMAN> restore controlfile from <backupfile location>;

Change the database to MOUNT mode, and use RMAN to restore the database from the last full backup RMAN is aware off ( as registered in the controlfile restore in the first step above)


Recover database up to the last archive log, using the "recover database" RMAN command:


Open the database

Thursday, June 26, 2014

Multiplexing control files using SPFILE OR PFILE

Multiplexing control files using SPFILE OR PFILE




Multiplexing Control file using SPFILE

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u02/abcprod/db/tech_st/11.2.0
                                                 /dbs/spfilePROD.ora

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/abcprod/db/apps_st/data/cntrl01.dbf
/u01/abcprod/db/apps_st/data/cntrl02.dbf
/u01/abcprod/db/apps_st/data/cntrl03.dbf

SQL> ALTER SYSTEM SET CONTROL_FILES = '/u01/abcprod/db/apps_st/data/cntrl01.dbf'
  2  ,'/u02/abcprod/db/tech_st/11.2.0/prod_controlfile/cntrl02.dbf',
  3  '/u03/abcprod/prod_controlfile/cntrl03.dbf' SCOPE = SPFILE;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Using cp or mv command to copy or move the control file to their location.

$ cp cntrl02.dbf /u02/abcprod/db/tech_st/11.2.0/prod_controlfile/
$ cp cntrl03.dbf /u03/abcprod/prod_controlfile/


Start the database

SQL> startup

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/abcprod/db/apps_st/data/cntrl01.dbf
/u02/abcprod/db/tech_st/11.2.0/prod_controlfile/cntrl02.dbf
/u03/abcprod/prod_controlfile/cntrl03.dbf

SQL>


Multiplexing Control file using PFILE

Shutdown the database

Edit the control_files parameter from init_ORACLESID.ora file

control_files='/u01/abcprod/db/apps_st/data/cntrl01.dbf',
'/u02/abcprod/db/tech_st/11.2.0/prod_controlfile/cntrl02.dbf',
'/u03/abcprod/prod_controlfile/cntrl03.dbf';

save the pfile

Now move or copy the control files to their appropraite locations using cp or mv command

Start the database

Howto disable the iptables firewall in Linux

Howto disable the iptables firewall in Linux


Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core)
Type the following command to turn on iptables firewall:

# /etc/init.d/iptables startOther Linux distribution

If you are using other Linux distribution such as Debian / Ubuntu / Suse Linux etc, try following generic procedure.

Save firewall rules

# iptables-save > /root/firewall.rules
OR
$ sudo iptables-save > /root/firewall.rulesNow type the following commands (login as root):
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
# iptables -P INPUT ACCEPT
# iptables -P FORWARD ACCEPT
# iptables -P OUTPUT ACCEPT

To restore or turn on firewall type the following command:
# iptables-restore < /root/firewall.rulesGUI tools

Wednesday, June 25, 2014

How to use OS commands to diagnose Database Performance issues

How to use OS commands to diagnose Database Performance issues

$ man vmstat

Here is some sample output from these commands:

$ prtconf |grep -i "Memory size"

Memory size: 4096 Megabytes

$ swap -s
total: 7443040k bytes allocated + 997240k reserved = 8440280k used, 2777096k available

$ df -k

...

$ top



$ vmstat 5 100



$ iostat -c 2 100



$ iostat -D 2 100



$ mpstat 2 100



HP-UX 11.0:
============

$ grep Physical /var/adm/syslog/syslog.log
$ df -k
$ sar -w 2 100
$ sar -u 2 100
$ /bin/top
$ vmstat -n 5 100
$ iostat 2 100
$ top


For example:

$ grep Physical /var/adm/syslog/syslog.log
Nov 13 17:43:28 rmtdchp5 vmunix: Physical: 16777216 Kbytes, lockable: 13405388 Kbytes, available: 15381944 Kbytes

$ sar -w 1 100

HP-UX rmtdchp5 B.11.00 A 9000/800 12/20/02



$ sar -u 2 100 # This command generates CPU % usage information.

HP-UX rmtdchp5 B.11.00 A 9000/800 12/20/02


$ iostat 2 100



AIX:
=======

$ /usr/sbin/lsattr -E -l sys0 -a realmem
$ /usr/sbin/lsps -s
$ vmstat 5 100
$ iostat 2 100
$ /usr/local/bin/top # May not be installed by default in the server



For example:

$ /usr/sbin/lsattr -E -l sys0 -a realmem

realmem 33554432 Amount of usable physical memory in Kbytes False

NOTE: This is the total Physical + Swap memory in the system.
Use top or monitor command to get better breakup of the memory.



$ /usr/sbin/lsps -s

Total Paging Space Percent Used
30528MB 1%



Linux [RedHat 7.1 and RedHat AS 2.1]:
=======================================

$ dmesg | grep Memory
$ vmstat 5 100
$ /usr/bin/top

For example:

$ dmesg | grep Memory
Memory: 1027812k/1048568k available (1500k kernel code, 20372k reserved, 103k d)$ /sbin/swapon -s


Tru64:
========
$ vmstat -P| grep -i "Total Physical Memory ="
$ /sbin/swapon -s
$ vmstat 5 100



For example:

$ vmstat -P| grep -i "Total Physical Memory ="

Total Physical Memory = 8192.00 M


$ /sbin/swapon -s

Swap partition /dev/disk/dsk1g (default swap):

After Cloning DB Tier Service Name Shows PROD Name

After Cloning DB Tier Service Name Shows PROD Name

After Cloning DB Tier, Service Name shows like this. This wrong, So we need do the folloing steps.

Error Message:

sql > show parameter service

service_names string UAT, SYS$APPLSYS.WF_CONTROL.PROD.DOYENSYS.COM

Solutions:

Step 1: Bounce the Apps Tier.

Then Go to respective Directory.

/UAT/oracle/uatappl/fnd/11.5.0/patch/115/sql

$ ls -lrt wfctqrec.sql

-----wfctqrec.sql

step 2:SQL> sqlplus apps/passwd
SQL> @wfctqrec.sql applsys passwd

Step 3: Bounce the DB and Listener in Both RAC Nodes

Setp 4: Start Both Nodes and Listener

Step 5: Now check the show parameter service, It shows


After finishing above tasks, its changed.

sql > show parameter service
service_names string UAT, SYS$APPLSYS.WF_CONTROL.UAT.DOYENSYS.COM

OR
sql > show parameter serviceservice_names string UAT

While running autoconfig R12 - Autoconfig Failed with Error: FsCtxFileException: Start of Root Element Expected

While running autoconfig R12 - Autoconfig Failed with Error: FsCtxFileException: Start of Root Element Expected

Autoconfig Error :

[applTEST@hostname scripts]$ adautocfg.sh
Enter the APPS user password:

The log file for this session is located at: /u01/oracle1/TEST/inst/apps/TEST_hostname/admin/log/05081154/adconfig.log

AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.
Using CONFIG_HOME location     : /u01/oracle1/TEST/inst/apps/TEST_hostname
Classpath                   : /app/oracle1/TEST/apps/apps_st/comn/java/lib/appsborg2.zip:/app/oracle1/TEST/apps/apps_st/comn/java/classes

Using Context file          : /u01/oracle1/TEST/inst/apps/TEST_hostname/appl/admin/TEST_hostname.xml

Context Value Management will now update the Context file
ERROR: FsCtxFile.XMLParseException
oracle.xml.parser.v2.XMLParseException: Start of root element expected.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:292)
at oracle.apps.ad.autoconfig.oam.FsCtxFile.init(FsCtxFile.java:58)
at oracle.apps.ad.autoconfig.oam.FsCtxFile.overwriteCtx(FsCtxFile.java:208)
at oracle.apps.ad.autoconfig.oam.CtxSynchronizer.downloadToFs(CtxSynchronizer.java:346)
at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateFileSysContext(FileSysDBCtxMerge.java:681)
at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateFileSysFiles(FileSysDBCtxMerge.java:210)
at oracle.apps.ad.context.CtxValueMgt.mergeCustomInFiles(CtxValueMgt.java:1790)
at oracle.apps.ad.context.CtxValueMgt.processCtxFile(CtxValueMgt.java:1608)
at oracle.apps.ad.context.CtxValueMgt.main(CtxValueMgt.java:763)
Error occured before Context Value Management could be completed
ERROR: Context Value Management Failed.
Terminate.

The logfile for this session is located at:

    /u01/oracle1/TEST/inst/apps/TEST_hostname/admin/log/05081154/adconfig.log



Solution:

Solution
To implement the solution, please execute the following steps:
1. Connect to SQL*PLUS as "APPLSYS" user. 
(The "APPLSYS" password is always the same as the "APPS" user.)
2. Backup the FND_OAM_CONTEXT_FILES table, for example: 
SQL> CREATE TABLE fnd_oam_context_files_bak 
AS SELECT * FROM fnd_oam_context_files; 
3. Truncate the FND_OAM_CONTEXT_FILES table, for example:
TRUNCATE TABLE fnd_oam_context_files; 

4. Re-run Autoconfig on all nodes to repopulate the data. 

RMAN BACKUP SHELL SCRIPTS

  
 
 
   1:  #!/bin/sh
   2:  . /home/oracle/.bash_profile
   3:  . /usr/local/bin/oraenv << END
   4:  ORCL
   5:  END
   6:   
   7:  cd /home/oracle/scripts
   8:  logfile=/home/oracle/scripts/log/rman_ORCL_LVL0.log.`date '+%d%m%y'`
   9:   
  10:  rman target / nocatalog CMDFILE /home/oracle/scripts/rman_ORCL_LVL0.sql LOG $logfile
  11:  status=$?
  12:   
  13:  if [ $status -gt 0 ] ; then
  14:     mailx -s "[BACKUP][FAILED] ORCL LVL0" me@myemail.com <<!
  15:  `cat $logfile`
  16:  !
  17:  else
  18:      mailx -s "[BACKUP][SUCCESS] ORCL LVL0" me@myemail.com <<!
  19:  `cat $logfile`
  20:  !
  21:  fi
  22:   
  23:  echo "Backup files removed (4+ days OLD):"
  24:  echo `find /u03/backup/ORCL  -mtime +4 -print`
  25:  find /u03/backup/ORCL -type f -mtime +4 -exec rm -f {} \;
  26:   
  27:  echo "Archive logs removed (2+ days OLD):"
  28:  echo `find /u03/archive/ORCL  -mtime +2 -print`
  29:  find /u03/archive/ORCL -type f -mtime +2 -exec rm -f {} \;

How to verify patch level in oracle


How to verify patch level in oracle



[oracle@cal3idbs01 ~]$ cd $ORACLE_HOME/
[oracle@cal3idbs01 10.2.0.3]$ cd OPatch/
[oracle@cal3idbs01 OPatch]$ ls
crs  docs  emdpatch.pl  fmw  jlib  ocm  opatch  opatch.bat  opatch.ini  opatch.pl  opatchprereqs  README.txt
[oracle@cal3idbs01 OPatch]$ ./opatch lsinventory
Invoking OPatch 11.2.0.1.1
Oracle Interim Patch Installer version 11.2.0.1.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/oracle/product/10.2.0.3
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.1
OUI version       : 10.2.0.3.0
OUI location      : /opt/oracle/product/10.2.0.3/oui
Log file location : /opt/oracle/product/10.2.0.3/cfgtoollogs/opatch/opatch2010-02-03_11-16-50AM.log
Patch history file: /opt/oracle/product/10.2.0.3/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /opt/oracle/product/10.2.0.3/cfgtoollogs/opatch/lsinv/lsinventory2010-02-03_11-16-50AM.txt
Installed Top-level Products (2):
Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2                            10.2.0.3.0
There are 2 products installed in this Oracle Home.
Interim patches (7) :
Patch  5957325      : applied on Sat Jan 02 11:37:43 MST 2010
   Created on 20 Mar 2008, 09:20:17 hrs PST8PDT
   Bugs fixed:
     5957325
Patch  5901891      : applied on Sat Jan 02 11:22:19 MST 2010
   Created on 16 Apr 2007, 00:14:55 hrs US/Pacific
   Bugs fixed:
     5548389, 5901923, 5885186, 5901891, 5881721
Patch  5240469      : applied on Sat Jan 02 11:18:23 MST 2010
   Created on 13 Feb 2007, 01:18:47 hrs US/Eastern
   Bugs fixed:
     5240469
Patch  5556081      : applied on Fri Jan 01 01:18:43  MST 2010
   Created on 29 May 2007, 00:23:10 hrs PST8PDT
   Bugs fixed:
     5556081
Patch  5632264      : applied on Fri Jan 01 01:17:45 MST 2010
   Created on 7 Feb 2007, 02:28:44 hrs US/Pacific
   Bugs fixed:
     5632264
Patch  5648872      : applied on Fri Jan 01 01:15:16 MST 2010
   Created on 23 Mar 2007, 21:04:04 hrs US/Pacific
   Bugs fixed:
     5648872
Patch  5557962      : applied on Fri Jan 01 01:01:49 MST 2010
   Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
   Bugs fixed:
     4269423, 5557962, 5528974

How to create AWR report manually

How to create AWR report manually



Oracle database 10g
If you do not have Oracle Enterprise Manager tool installed then you can create the AWR reports manually using the following commands:
1. Creating Snapshot
BEGIN
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
END;
/
The list of the snapshot Ids along with database Ids is availabe in the view DBA_HIST_SNAPSHOT.
2. Dropping a Range of Snapshots.
Refer to the DBA_HIST_SNAPSHOT view column SNAP_ID to view available snapshots. To delete contain SNAP_ID from from 102 to 122,
BEGIN
DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE (low_snap_id => 102, high_snap_id => 122, dbid => 8187786345);
END;
/
3. Modifying Snapshot Settings
If you want to modify the retention period as 43200 minutes (30 days), the interval between each snapshot is specified as 30 minutes, and the number of Top SQL to flush for each SQL criteria as 100 then use following:
BEGIN
DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS( retention => 43200,
interval => 30, topnsql => 100, dbid => 7123356265);
END;
/
The dbid is optional.
4. Extract the AWR Data
The awrextr.sql script extracts the AWR data for a range of snapshots from the database into a Data Pump export file. Once created, this dump file can be transported to another system where the extracted data can be loaded. To run the awrextr.sql script, you need to be connected to the database as the SYS user.
To extract AWR data at the SQL prompt, enter:
SQL> @$ORACLE_HOME/rdbms/admin/awrextr.sql
5. Load the AWR Data
Once the export dump file is transported to the target system, you can load the extracted AWR data using the awrload.sql script. The awrload.sql script will first create a staging schema where the snapshot data is transferred from the Data Pump file into the database. The data is then transferred from the staging schema into the appropriate AWR tables. To run the awrload.sql script, you need to be connected to the database as the SYS user.
To load AWR data at the SQL prompt, enter:
SQL> @$ORACLE_HOME/rdbms/admin/awrload.sql
6. Generate AWR Reports
The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids.
To generate an HTML or text report for a range of snapshot Ids, run the awrrpt.sql script at the SQL prompt:
SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql
First, you need to specify whether you want an HTML or a text report.
Enter value for report_type: text
Specify the number of days for which you want to list snapshot Ids.
Enter value for num_days: 2
After the list displays, you are prompted for the beginning and ending snapshot Id for the workload repository report.
Enter value for begin_snap: 95
Enter value for end_snap: 97
Next, accept the default report name or enter a report name. The default name is accepted in the following example:
Enter value for report_name:
Using the report name awrrpt_1_95_97
The workload repository report is generated.
awrrpt.sql
The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids.
awrrpti.sql
The awrrpti.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids on a specified database and instance.
awrsqrpt.sql
The awrsqrpt.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a range of snapshot Ids. Run this report to inspect or debug the performance of a SQL statement.
awrsqrpi.sql
The awrsqrpi.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a range of snapshot Ids on a specified database and instance. Run this report to inspect or debug the performance of a SQL statement on a specific database and instance.
awrddrpt.sql
The awrddrpt.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration settings between two selected time periods.
awrddrpi.sql
The awrddrpi.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration settings between two selected time periods on a specific database and instance

Thursday, June 19, 2014

Implementing Engineering Change Order (ECO)

Implementing Engineering Change Order (ECO)


Responsibility = Manufacturing and Distribution Manager

1.    Navigate to the Engineering Change Orders window.
·         (N) Engineering > ECOs > ECOs

2.    Use F11 to start a query.

3.    Enter the following data:
-        ECO Number = "enter the ECO number you wish to query"

4.    Use Ctrl F11 to run the query.

5.    (M) Tools > Implement (B) Yes

6.    Ensure that the request is Compeleted.
·         (M) View > Requests

View the components on the primary Bill of Material

7.    Navigate to the Bills of Material window.
·         (N) Bills of Materials > Bills > Bills

8.    Use F11 to start a query

9.    Enter the following data:
-        Item = "(XX 1000-User Defined Item Number)"

10.  Use Ctrl F11 to run the query.
























11.  Select the ECO tab to view the change order.
12.  Close the window.

Wednesday, June 18, 2014

Oracle Engineering - Setup steps

Oracle Engineering - Setup steps


Step 1: Set Profile Options (Must)
Set the Engineering profile options for
a) ENG: Change Order Autonumbering – System Administrator Access
b) ENG: ECO Department
c) ENG: ECO Revision Warning
d) ENG: Engineering Item Change Order Access
e) ENG: Mandatory ECO Departments
f) ENG: Model Item Change Order Access
g) ENG: Planning Item Change Order Access

Step 2: Enter Employee (Must)
Define employees for your organization. ECO requestors and approvers must be defined as employees

Step 3: Define Change Order Types (Optional)
You can assign a change order type to your ECOs, either using the ’ECO’ change order type that Oracle Engineering provides or choosing a change order type from any number of types you define using your own terminology, such as Design Revision, Manufacturing Change etc

Step 4: Define ECO Departments (Optional)
You can group users that use the engineering change order (ECO) system through ECO departments, creating multiple ECO departments within your Inventory organization.

Step 5: Define Autonumbering (Optional)
You can define customized autonumbering (for a user, organization, or site) for new ECOs or mass change orders

Step 6: Define Approval Lists (Optional)
You can define lists of approvers required to approve an ECO before it
can be released

Step 7: Define Material Dispositions (Optional)
You can define your own customized material dispositions, and then assign them to revised items when defining ECOs

Step 8: Define Material Dispositions (Optional)
You can define your own customized material dispositions, and then assign them to revised items when defining ECOs

Step 9: Define Priorities (Optional)
You can define scheduling priorities for engineering changes to describe the urgency of your ECO

Step 10: Start AutoImplement Manager (Optional)
If you automatically implement ECOs, you must specify the frequency that you want the AutoImplement manager to run

Procure To Pay Cycle in Oracle Apps R12 (P2P Cycle)


Procure To Pay Cycle in Oracle Apps R12 (P2P Cycle)

The screenshots given below are taken from R12.1.1 apps instance.

Stage 1: Choosing an Item

Let us choose an item to be procured in our example. 
Go to Purchasing Responsibility and follow the below navigation to check for the suitable item.

 

The item picked for our example should be purchasable item as above. Click on tools and choose “Categories” to view the below screen.


Stage 2: Creation of Requisition

Follow the below Navigation to reach Requisition Form. 


Create a new Requisition for the item viewed in Stage 1.



Click on Distributions to View the charge Account.

 

Save and Submit for Approval

 

Now note down the Requisition number and open the “Requisition Summary Form” to view the status of it. For our Example, Requisition number is: 14855

Stage 3 : Checking the Status of Requisition


 Query for the Requisition Number and click Find.


 Here for our example purpose, I kept the submitted and approved person has same and hence it shows the status as approved.


 To see the approval status, please follow the below navigation. 


  
Stage 4 : Creation of Purchase Order

For creating a Purchase order, let us use the “Autocreate Documents” Form. Follow the below Navigation

 Query for the Requisition


 Click on Automatic as shown in the above figure to create a Purchase Order

  
Click on “Create” button to create a Purchase order


  
 View the shipment screen to change the “Match Approval Level” to “2-Way”.

Click the “Receiving Controls” to make sure that the “Routing” is made as “Direct Routing”


 Click Save and submit for Approval.


                                     

 Note down the PO Number.
  
Stage 5: Creation of Receipts


Query with the Purchase order created in the above stage.


 Check the check box near to the lines that are received and click save.

  
Click the “Header Button” to view the Receipt Number.


Stage 6: Checking the On Hand

 Go to any Inventory Responsibility and follow the below Navigation


 Query for our Receipt and make sure the Organization is the same as we received.


 Below screen will show that our inventory has been increased by 5 quantities.


Stage 7: Check the Material Transactions

Follow the below Navigation to reach “Material Transactions” Form

 Query for the item and date as below


 Below screen shows the source and transaction Type

 Below screen shows you the Serial Numbers of the items received.

  
Stage 8: Creation of Invoice

Navigate to any Purchasing Responsibility and view à Requests 
Submit the below requests by providing the Receipt number as Parameter to create an invoice.



 Check the status of the program.


Stage 9: Checking the Invoice

Change to any Payables Responsibility and open the invoices Form.

Query for the Purchase order as below,


                                   

 Click “Actions” Button then tick the “Validate Check Box” and press “Ok” to validate the invoice

  
Below screenshot will give you the status of the invoice

  
Stage 10: Creation of Accounting and Payment

Once invoice got approved, we can “Create Accounting” and “Create Payments” via “Action” Button in the “Invoice Form” as we validated the invoice.


Thus the brief description of P2P cycle came to end.