Script for trimming alert log to 1 day and taking backup of previous day

Script for trimming alert log to 1 day and taking backup of prev day

#!/usr/bin/ksh

############################################################################
##  Program :   save_alert_log.sh                                          #
##                                                                         #
##  Purpose :   The alert logs on many Oracle databases can grow to a very #
##              large size over time.  This can often impede the maintenace#
##              of the system – because the DBA will need to sometimes scan#
##              through many days or months of data when researching an    #
##              issue.  This script tries to avoid that by ensuring that   #
##              the log file can be “refreshed” on a daily basis, meaning  #
##              that only the current day’s data will be kept in the log,  #
##              while the previous day’s data will be saved to another file#
##              in a backup area.                                          #
##                                                                         #
##              This script should be run from Oracle’s crontab at midnight#
##              every night, so that the database will always have a new   #
##              alert log file each day.  An example crontab entry could be#
##              0 00 * * * /oracle/product/local/scripts/save_alert.sh 2>&1#
##                                                                         #
##  Date    :   19 May 2006.                                               #
##  Author  :   Basil S. Mullings                                          #
############################################################################
##  Modified:                                                              #
##                                                                         #
##                                                                         #
#  Modification History:                                                   #
#  DATE       WHO      DESC                                                #
#  ——–   —–    —————————————————-#
#  05/29/06   Basil    Add an extra variable LOG_KEEP_DAYS to hold the     #
#                      number of days that the log files should be kept on #
##                     the server before being deleted.                    #
##                                                                         #
##                                                                         #
############################################################################

##Setup some needed variables.
BKUP=bkup   ##The backup directory to store the logs…
ORATAB=”/etc/oratab”
LOG_KEEP_DAYS=365   ##Keep this many days of log files on the server.
TMPFILE=/var/tmp/OracleAlertLog   ##Just a temp scratch work area.
SQLUSER=”/ as sysdba”
GEN_ORA_ERROR=”ORA\-[0-9][0-9]*”
PATH=”$HOME:$HOME/bin:/usr/contrib/bin:/usr/local/bin:/usr/bin:/bin:/etc:.”
export PATH

## Now, parse the oratab file for all databases on the system.
## Then use the ORACLE_SID that is found in the oratab file
## to log onto that database, and retrieve the directory where
## the alter log file is stored (.ie. retrieve the path to the
## bdump directory.
##
#for sidEntry in `cat $ORATAB | grep -v “^#”`
for sidEntry in `cat $ORATAB | awk -F: ‘{print $1}’ | grep -v “^#”`
do
## Get date and time
CURR_DATE=`date ‘+%a_%m%d%H%M’`    ##Example Fri_05191256   for Friday May 19th @1256 PM.

#ORACLE_SID=`echo  $sidEntry | cut -f 1 -d :`
ORACLE_SID=$sidEntry
echo “Oracle Sid is $ORACLE_SID”

export ORACLE_SID
## Set the Oracle environment for this SID.
ORAENV_ASK=NO
. /usr/local/bin/oraenv
rm -f $TMPFILE > /dev/null 2>&1

##Now, let’s log onto the DB, and try to
##retrieve the bdump directory path.
sqlplus -s /nolog << EOF > $TMPFILE
connect $SQLUSER
set heading off;
set echo off;
set feedback off;

select ‘BACKGROUND_DUMP_DEST=’ ||value
from   v\$parameter
where  name=’background_dump_dest’;
exit;
EOF

##Ok, we had a problem talking to the database.
if [ `grep -c $GEN_ORA_ERROR $TMPFILE` -ne 0 ]
then
echo “ERROR: Unable to find the path to the alert log for DB $ORACLE_SID”
rm -f $TMPFILE > /dev/null 2>&1

else  ##Ok, we can log into the DB, now let’s go find our bdump directory.

bdump=`grep BACKGROUND_DUMP_DEST $TMPFILE | awk -F “=” ‘{print $2}’`
#echo “BDUMP is $bdump”
bkupDir=$bdump/$BKUP

##Make sure our backup directory exists.
if [ ! -d $bkupDir ]
then
mkdir $bkupDir  > /dev/null 2>&1
fi

##Now, move the alert log.
#echo “now moving $bdump/alert_${ORACLE_SID}.log to $bkupDir/alert_${ORACLE_SID}.$CURR_DATE”
mv $bdump/alert_${ORACLE_SID}.log  $bkupDir/alert_${ORACLE_SID}.$CURR_DATE

#Procedure to shrink the log to 365 days
##Keep only the last 365 days worth of logs…delete all logs older than 365 days.
#echo “Now shrinking the logs in dir $bkupDir …”
find $bkupDir  -name “*.*” -mtime +${LOG_KEEP_DAYS} -exec rm -f {} \;
fi

done

Top 99 Responsibilities of a DBA


Top 99 Responsibilities of a DBA

Database Architecture Duties

1. Planning for the database's future storage requirements
2. Defining database availability and fault management architecture
3. Defining and creating environments for development and new release installation
4. Creating physical database storage structures after developers have designed an application
5. Constructing the database
6. Determining and setting the size and physical locations of datafiles
7. Evaluating new hardware and software purchase
8. Researching, testing, and recommending tools for Oracle development, modeling, database administration, and backup and recovery implementation, as well as planning for the future
9. Providing database design and implementation
10. Understanding and employing the optimal flexible architecture to ease administration, allow flexibility in managing I/O, and to increase the capability to scale the system
11. Working with application developers to determine and define proper partitioning

Backup and Recovery


12. Determining and implementing the backup/recovery plan for each database while in development and as the application moves through test and onto production
13. Establishing and maintaining sound backup and recovery policies and procedures
14. Having knowledge and practice of Oracle backup and recovery scenarios
15. Performing Oracle cold backups when the database is shut down to ensure consistency of the data
16. Performing Oracle hot backups while the database is operational
17. Performing Oracle import/export as a method of recovering data or individual objects
18. Providing retention of data to satisfy legal responsibilities of the company
19. Restoring database services for disaster recovery
20. Recovering the database in the event of a hardware or software failure
21. Using partitioning and transportable tablespaces to reduce downtime, when appropriate

Maintenance and Daily Tasks

22. Providing adjustment and configuration management of INIT.ORA
23. Adjusting extent size of rapidly growing tables and indexes
24. Administering database-management software and related utilities
25. Automating database startup and shutdown
26. Automating repetitive operations
27. Determining and setting critical thresholds for disk, tablespaces, extents, and fragmentation
28. Enrolling new users while maintaining system security
29. Filtering database alarm and alert information
30. Installing, configuring, and upgrading Oracle server software and related products installation
31. Logging Technical Action Reports (TARs); applying patches
32. Maintaining the "Database Administrator's Handbook"
33. Maintaining an ongoing configuration for database links to other databases
34. Maintaining archived Oracle data
35. Managing contractual agreements with providers of database-management software
36. Managing service level agreements with Oracle consultants or vendors
37. Monitoring and advising management on licensing issues while ensuring compliance with Oracle license agreements
38. Monitoring and coordinating the update of the database recovery plan with the site's disaster recovery plan
39. Monitoring and optimizing the performance of the database
40. Monitoring rollback segment and temporary tablespace use
41. Monitoring the status of database instances
42. Performing housekeeping tasks as required; purging old files from the Oracle database
43. Performing database troubleshooting
44. Performing modifications of the database structure from information provided by application developers
45. Performing monthly and annual performance reports for trend analysis and capacity planning
46. Installing new and maintaining existing client configurations
47. Performing ongoing configuration management
48. Performing ongoing Oracle security management
49. Performing routine audits of user and developer accounts
50. Performing translation of developer modeled designs for managing data into physical implementation
51. Performing correlation of database errors, alerts, and events
52. Planning and coordinating the testing of the new database, software, and application releases
53. Providing a focal point on calls to Oracle for technical support
54. Working as part of a team and providing 24x7 support when required

Methodology and Business Process


55. Coordinating and executing database upgrades
56. Coordinating upgrades of system software products to resolve any Oracle/operating system issues/conflicts
57. Creating error and alert processes and procedures
58. Creating standard entry formats for SQLNet files
59. Creating processes and procedures for functional and stress testing of database applications
60. Creating processes and procedures of application transport from DEV, to TEST, to PROD
61. Defining and maintaining database standards for the organization to ensure consistency in database creation
62. Defining database standards and procedures to cover the instance parameters, object sizing, storage, and naming. The procedures define the process for install/upgrade, corporate database requirements, security, backup/recovery, applications environment, source code control, change control, naming conventions, and table/index creation.
63. Defining the database service levels necessary for application availability
64. Defining methodology tasks for database software integration
65. Defining a methodology for developing and improving business applications
66. Creating a process to determine whether a new release is "stable" enough to be placed on the development system
67. Developing data-conversion processes for customization, testing, and production
68. Developing database test plans
69. Developing database administration procedures and responsibilities for production systems
70. Developing production migration procedures
71. Establishing and providing schema definitions, as well as tablespace, table, constraint, trigger, package, procedure, and index naming conventions
72. Facilitating design sessions for requirements gathering and defining system requirements
73. Providing database problem reporting, management, and resolution
74. Providing final approval for all technical architecture components that manage and exchange data, including database management software, serve hardware, data distribution management software, server hardware, data distribution management software, transaction processing monitors, and connecting client applications software
75. Providing processes for the setup of new database environments
76. Providing risk and impact analysis of maintenance or new releases of code
77. Providing standards and methods for database software purchasing
78. Providing standards and naming conventions
79. Handling multiple projects and deadlines

Education and Training

80. Attending training classes and user group conferences
81. Evaluating Oracle features and Oracle-related products
82. Understanding the Oracle database, related utilities, and tools
83. Understanding the underlying operating system as well as the design of the physical database
84. Understanding Oracle data integrity
85. Knowing the organization's applications and how they map to the business requirements
86. Knowing how Oracle acquires and manages resources
87. Knowing enough about the Oracle tool's normal functional behavior to be able to determine whether a problem lies with the tool or the database
88. Processing sound knowledge in database and system performance tuning
89. Providing in-house technical consulting and training
90. Staying abreast of the most current release of Oracle software and compatibility issues
91. Subscribing to database trade journals and web sources

Communication

92. Interfacing with vendors
93. Disseminating Oracle information to the developers, users, and staff
94. Training application developers to understand and use Oracle concepts, techniques, and tools that model and access managed data
95. Assisting developers with database design issues and problem resolutions, including how to run and understand the output from both TKProf and the Explain Plan utilities
96. Training interim DBAs and junior-level DBAs

Documentation

97. Creating and maintaining a database operations handbook for frequently performed tasks
98. Defining standards for database documentation
99. Creating documentation of the database environment

Source :  Link

LDT Commands FNDLOAD Scripts

  • Messages :

> Download
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct
XX_MESSAGE_NAME.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME=’ICX’ MESSAGE_NAME=’XX_MESSAGE_NAME’

To download all the messages within an application

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct
XX_MESSAGE_NAME.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME=’ICX’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XX_MESSAGE_NAME.ldt


  • Lookups:

> Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_LKP_NAME.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=’ICX’ LOOKUP_TYPE=’XX_LKP_NAME’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_LKP_NAME.ldt

  • Value Set :

> Download
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XX_VALUE_SET_NAME.ldt VALUE_SET FLEX_VALUE_SET_NAME=’XX_VALUE_SET_NAME’

If value set has values then,

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XX_VALUE_SET_NAME.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME=’XX_VALUE_SET_NAME’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct XX_VALUE_SET_NAME.ldt

  • Form Function:

> Download
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XX_FORM_FUNCTION_NAME.ldt FUNCTION FUNCTION_NAME=’XX_FORM_FUNCTION_NAME’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XX_FORM_FUNCTION_NAME.ldt

  • Menu:

> Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XX_MENU_NAME.ldt MENU MENU_NAME=’XX_MENU_NAME’

> Upload
FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XX_MENU_NAME.ldt

  • Responsibility:

> Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct XX_RESP_KEY.ldt FND_RESPONSIBILITY RESP_KEY=’XX_RESP_KEY’

> Upload
FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct XX_RESP_KEY.ldt
Profile Option Definition:
> Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct XX_PROFILE_NAME.ldt PROFILE PROFILE_NAME=’XX_PROFILE_NAME’ APPLICATION_SHORT_NAME=’ICX’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct XX_PROFILE_NAME.ldt

  • Request Group :

> Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct XX_REPORT_GROUP_NAME.ldt REQUEST_GROUP REQUEST_GROUP_NAME=’XX_REPORT_GROUP_NAME’ APPLICATION_SHORT_NAME=’PO’

> Upload

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct XX_REPORT_GROUP_NAME.ldt

  • Concurrent program:

> Download
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CONC_PRG_NAME.ldt PROGRAM APPLICATION_SHORT_NAME=’PO’ CONCURRENT_PROGRAM_NAME=’XX_CONC_PRG_NAME’

> Upload
FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CONC_PRG_NAME.ldt

  • Request Sets :

> Download
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XX_REQ_SET_NAME.ldt REQ_SET REQUEST_SET_NAME=’XX_REQ_SET_NAME’

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XX_REQ_SET_NAME_LINK.ldt REQ_SET_LINKS REQUEST_SET_NAME=’XX_REQ_SET_NAME’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct XX_REQ_SET_NAME.ldt
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct XX_REQ_SET_NAME_LINK.ldt

  • Alert :

> Download
FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct XX_ALERT_NAME.ldt ALR_ALERTS APPLICATION_SHORT_NAME=’PO’ ALERT_NAME=’XX_ALERT_NAME’

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $ALR_TOP/patch/115/import/alr.lct XX_ALERT_NAME.ldt CUSTOM_MODE=FORCE

  • Folders :

> Download
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/fndfold.lct XX_FOLDER_NAME.ldt FND_FOLDERS NAME=’XX_FOLDER_NAME’

Or can download all the folders

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/fndfold.lct XX_ALL_FOLDER.ldt FND_FOLDERS

> Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/fndfold.lct XX_FOLDER_NAME.ldt CUSTOM_MODE=FORCE

Customize Oracle E-Business Suite R12 Login Page

Customize Oracle E-Business Suite R12 Login Page

There are 5 areas on the login page that can be customized :-


FRONT SCREEN




Image No.
Image Name
Actual Image File Name
Directory
Actual Image Size
New Image Size / Type
1
Image (Oracle logo)
FNDSSCORP.gif
$OA_MEDIA
155 X 20  Pixels
Same
2
Image (people image)
people.jpg
$OA_MEDIA
417 X 54  Pixels
Same
3
Image (above globe)
topLines.gif
$OA_MEDIA
352 X 54  Pixels
Same
4
Image (globe)
globalTop.jpg
$OA_MEDIA
351 X 180 Pixels
Same
5
Image (below globe)
global.jpg
$OA_MEDIA
352 X 79  Pixels
Same


Login to Applications as System Administrator.
Select: System Administrator > Profile - System.
Query profile "Corporate Branding Image for Oracle Applications".
Change the SITE level value to the name of the custom image file (e.g. my_company_logo.gif).
Save the change.
The second action is performed on the Application server.


To customize the above regions, login to Oracle Applications as SYSADMIN
Switch to Functional Administrator responsibility then navigate to "Personalization" tab, and in the "Document Path" field enter:
'/oracle/apps/fnd/sso/login/webui/MainLoginPG' then click "Go".

In the results table, click "Personalize Page" icon, ensure the "Site" checkbox is selected then Apply.
In the "Personalization Structure" page region, click "Expand All".
The page contains the list of objects marked in the screen grab above:
1. Image (Oracle logo) /OA_MEDIA/FNDSSCORP.gif
2. Image (people image) people.jpg
3. Image (above globe) topLines.gif
4. Image (globe) globalTop.jpg
5. Image (below globe) global.jpg

Above images are located in $OA_MEDIA directory.

> To customize the login page, create own versions of the images, and save them in $OA_MEDIA directory with file names prefixed with client's initials, e.g. JAGFNDSSCORP.gif 
> To customize the regions, click the pencil icon in the corresponding region the "Personalize" column for the image.  Locate the "Image URI" attribute, then type the new image name in the "Site" column then Apply.  

Repeat the process for the remaining images.


Remove the following cache
rm -Rf $OA_HTML/_pages/*
rm -Rf $COMMON_TOP/_pages/*
rm -Rf $IAS_ORACLE_HOME/Apache/modplsql/cache/*

Disable Load Balancer Cache/Web acceleration if applicable
Compile all the JSPs

$FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p 2

Start Services

MOS: 579917.1 - How to Personalize Login page in R12?
MOS: 741459.1 - Tips For Personalizing The E-Business Suite r12 Login Page (MainLoginPG)
MOS: 473539.1 - How to Replace the Globe and People Images of the Release 12 Login page
MOS: 468971.1 - Tips For Personalizing The E-Business Suite 11i Login Page (AppsLocalLogin)