Wednesday, December 10, 2008

Unix commands

How do you find files that are greater than 3GB in HP unix?
find / -size +3000000000c -exec ls -l {} \;
Check all logs for ORA- errors
grep ^ORA- *log |cut -f2 -d"-"|cut -f1 -d:|awk '{print "ORA-" $1}'|sort –u
How to Find out Top 10 Memory consuming processes?
UNIX95=1 ps -eo vsz,pid,args | sort +0n -1 | grep oracle | tail -10
Pass Database Name in places of SID
Find out mount points starts with oracle which exceeds 80%?
bdf|grep -e oracle grep '[7-9].%
How do you delete 3 days old log files?
find /location -name "*.log" -mtime +3 -exec rm -rf{} \;
Eg : find ./ -name "*.req" -mtime +4 -exec ls -ltr {} \;
Display latest 20 largest files/directories in current directory?
du -ka sort -n tail -20
How do you display/remove Specifice Month files in Unix?
rm `ls -l grep Jun awk '{print $9}'`
How do you find the files which contains a specific Word?
find /home/ganesh \( -type f \) -exec grep -l test {} \;

how to find all the soft links?
find . -type l -exec ll {} \; | grep ERPPROD

soft link
ln -s
eg : ln -s /u01/app/oracle/monitor.sql /u01/app/oracle/test.sql
monitor.sql orginal file

eg: ln -s /u01/app/oracle/monitor.sql /u01/app/oracle/test.sql
monitor.sql orginal file

How to get the OS is 32 bit or 64 bit

getconf HARDWARE_BITMODE

How to get the version of the os

Uname –vr
Eg: O/P--- 3 5

3-release
5- version



Friday, September 5, 2008

Important Tables

System Table Description
ALL_ARGUMENTS Arguments in object accessible to the user
ALL_CATALOG All tables, views, synonyms, sequences accessible to the user
ALL_COL_COMMENTS Comments on columns of accessible tables and views
ALL_CONSTRAINTS Constraint definitions on accessible tables
ALL_CONS_COLUMNS Information about accessible columns in constraint definitions
ALL_DB_LINKS Database links accessible to the user
ALL_ERRORS Current errors on stored objects that user is allowed to create
ALL_INDEXES Descriptions of indexes on tables accessible to the user
ALL_IND_COLUMNS COLUMNs comprising INDEXes on accessible TABLES
ALL_LOBS Description of LOBs contained in tables accessible to the user
ALL_OBJECTS Objects accessible to the user
ALL_OBJECT_TABLES Description of all object tables accessible to the user
ALL_SEQUENCES Description of SEQUENCEs accessible to the user
ALL_SNAPSHOTS Snapshots the user can access
ALL_SOURCE Current source on stored objects that user is allowed to create
ALL_SYNONYMS All synonyms accessible to the user
ALL_TABLES Description of relational tables accessible to the user
ALL_TAB_COLUMNS Columns of user's tables, views and clusters
ALL_TAB_COL_STATISTICS Columns of user's tables, views and clusters
ALL_TAB_COMMENTS Comments on tables and views accessible to the user
ALL_TRIGGERS Triggers accessible to the current user
ALL_TRIGGER_COLS Column usage in user's triggers or in triggers on user's tables
ALL_TYPES Description of types accessible to the user
ALL_UPDATABLE_COLUMNS Description of all updatable columns
ALL_USERS Information about all users of the database
ALL_VIEWS Description of views accessible to the user
DATABASE_COMPATIBLE_LEVEL Database compatible parameter set via init.ora
DBA_DB_LINKS All database links in the database
DBA_ERRORS Current errors on all stored objects in the database
DBA_OBJECTS All objects in the database
DBA_ROLES All Roles which exist in the database
DBA_ROLE_PRIVS Roles granted to users and roles
DBA_SOURCE Source of all stored objects in the database
DBA_TABLESPACES Description of all tablespaces
DBA_TAB_PRIVS All grants on objects in the database
DBA_TRIGGERS All triggers in the database
DBA_TS_QUOTAS Tablespace quotas for all users
DBA_USERS Information about all users of the database
DBA_VIEWS Description of all views in the database
DICTIONARY Description of data dictionary tables and views
DICT_COLUMNS Description of columns in data dictionary tables and views
GLOBAL_NAME global database name
NLS_DATABASE_PARAMETERS Permanent NLS parameters of the database
NLS_INSTANCE_PARAMETERS NLS parameters of the instance
NLS_SESSION_PARAMETERS NLS parameters of the user session
PRODUCT_COMPONENT_VERSION version and status information for component products
ROLE_TAB_PRIVS Table privileges granted to roles
SESSION_PRIVS Privileges which the user currently has set
SESSION_ROLES Roles which the user currently has enabled.
SYSTEM_PRIVILEGE_MAP Description table for privilege type codes. Maps privilege type numbers to type names
TABLE_PRIVILEGES Grants on objects for which the user is the grantor, grantee, owner, or an enabled role or PUBLIC is the grantee
TABLE_PRIVILEGE_MAP Description table for privilege (auditing option) type codes. Maps privilege (auditing option) type numbers to type names
ad_patch_driver_langs to find what all languages patch has ben applied
fnd_web_sec....
AD_APPL_TOPS
AD_APPLIED_PATCHES
AD_BUGS
AD_PATCH_DRIVERS
AD_FILE_VERSIONS
AD_FILES
AD_PATCH_DRIVER_LANGS
AD_PATCH_DRIVER_MINIPKS
AD_PATCH_RUN_BUG_ACTIONS
AD_PATCH_RUN_BUGS
AD_PATCH_RUNS
AD_RELEASES
AD_PATCH_COMMON_ACTIONS ad_program_run_task_jobs

Tuesday, August 19, 2008

Httpd

$ httpd -version
Server version: Oracle HTTP Server Powered by Apache/1.3.19 (Unix)

There are some core files which control the behavior of the Oracle HTTP Server. Again most of these files are autoconfig managed , so changes to them should be via the Oracle Applications Manager and autoconfig must be run to propagate these changes to the respective config files.

httpd.conf
This is manin config file for the Apache based OHS. It contains all vital configuration information for the OHS like the port on which the server is running, the portocol used etc.A detailed list of derivates supported by the httpd.conf file can be found in the apache documentation. Again as mentioned before this file is also autoconfig managed.

httpds.conf
The httpds.conf file is similar to the httpd.conf. The httpds.conf filers comes into use when apache runs in the Secure Sockets Layer implementation(SSL).Another way make sure if httpds.conf is being used in your environment or not is to open up the apachectl file in the Apache/bin directory and check if the httpds executable is being used along with the httpd executale. something similar to below

HTTPD=/d01/sam/samsora/iAS/Apache/Apache/bin/httpds

access.conf
The access.conf file is natively used to specify the acess control files for the HTTP server. But in Oracle Implementation of Apache server this file is essentially kept empty and instead the AccessConfig directive in httpd.conf is used.

url_fw.conf
The URL firewall or the url_fw.conf file implementation is used to provide an additional layer of security on the external tier.This file comes into play once you define a node as external. After this is enabled only the urls specified in the url_fw.conf files will be accessible through the external tier in a DMZ architecture.Once enabled the httpd.conf file will have a link to include this file.

security.conf
This file contains the security configuration for the OHS.It has information regarding security auditing and also location of the security audit log file location.

oracle-apache.conf
This a file that stores the configuration information for various supported modules in Oracle applications like imeeting , OEM etc.It will contain entries to include these configuration files. These module specific configuration file like the imeeting.conf will also reside in the Apache/conf directory on the application server.

CRONTAB Part 2

Actually it is called 'cron daemon'. Cron is an automatic task machine. You will use it on your Unix or Linux operating systems for doing some tasks at specific intervals with out your intervention every time. You set the clock and forget. The cron daemon runs the work for you.
What is cron tab?
'Cron tab(CRON TABle)' is a text file that contains a series of cron functions.
What cron will do for you?
>>>If you want to send your email cources to your subscribers at 11.30 night, you will set the cron job on your server.And your cron manager sends the one email every day at 11.30 until all the emails will be finished.

If you want to send them on Sundays, you can schedule it with your cron.

>>>You can schedule it to delete your website members with expired accounts.

>>>You can schedule it to recieve an update on your subscribers from your mailing list manager.

>>>You can check your links on other websites in link exchange programms.
Have your webserver cron enabled?
Have you seen any icon like this?

OR

OR
Have you seen a text link like 'Cron Manager' or 'Cron jobs'?
If you see one, then you are cron enabled.
Ask your host about your cron availability. Some host allows cron with out graphical interface. You have to access it through telnet. If you are hosted on Virtual hosting domains then your system administrator has to set up your cron tabs for you.
What are the components of cron?
=Field====Value====Description=
minute====00-59====exact minute the cron executes
hour======00-23====hour of the day the cron executes(0 means midnight)
day=======01-31====day of the month the cron executes
month=====01-12====month of the year the cron executes
weekday===00-06====day of the week the cron executes(Sunday = 0, Monday = 1, Tuesday = 2, and so forth)
command===Special==complete sequence of commands to execute
Examples how to set cron:
If you have installed a cgi script in your cgi-bin directory called members.cgi and wanted to run this program each night as 11.30 PM as in above example.

You would setup the following crontab line:

30 23 * * * /home/username/www/cgi-bin/members.cgi

30--represents the minute of cron work
23--represents the hour of the day
The * represent every day, month, and weekday.

If you want to set the cron job every sunday at midnight 11.30 PM then it would be like:

30 23 * * 0 /home/username/www/cgi-bin/members.cgi
0--represents the Sunday.
If you want the cron job to run at 1:00 and 2:00 A.M then you can set it like:

* 1,2 * * * /home/username/www/cgi-bin/members.cgi

This runs your cron at 1 and 2 A.M every day, every month and every week.

If you want to run the above task only from Monday to Friday then set it like:

* 1,2 * * 1-5 /home/username/www/cgi-bin/members.cgi
Setting up the cron:
You will be in one of these situations.

ONE:This would be your first cron tab function.

SECOND:You already have cron tab file on your server running one or more cron functions for you.

In any of the above two situations you can further proceed by TWO METHODS.
METHOD ONE:Using Cron tab manager:
If you have a cron tab manager in your webpanel, it will be easy for you to set the cron tab function. You can click on the icon to open cron manager.
There will be some box like text area where you can enter the the perl file path that you want to run the cron job.



Your cron manager may be different but basically it is easy to set up cron job with your cron manager. I highly recommend this unless you want to get to know about the Second Telnet Method.
METHOD TWO:Uploading 'cron.txt' file and checking using telnet:
Cron Commands:

crontab filename
Install filename as your crontab file. On many systems, this command is executed simply as crontab filename (i.e., without the -a option).

crontab -e
Edit your crontab file, or create one if it doesn't already exist.

crontab -l
Display your crontab file.

crontab -r
Remove your crontab file.

crontab -v
Display the last time you edited your crontab file. (This option is only available on a few systems.)
How to do it?
Basically FOUR steps:
• Create cron.txt
• Upload
• Install the txt file as cron file with the command 'crontab cron.txt'
• Check your cron file
1. Open your notepad on your computer and write cron job following the guidelines explained above under 'What are the components of cron?'. For example - If you write your cron job like this:

30 23 * * * /home/username/www/cgi-bin/members.cgi

After writing the above cron job PRESS return key so that a blank line will be there below the cron job line.
2. Always use absolute path for the command line. Turn off the 'Word Wrap' feature with the Notepad.
3. Save the file as 'cron.txt'. Upload it to your root directory ('/'). Or ask your webhost where to upload the cron files. Upload in ASCII mode.

4. Now telnet into your server. (Access easy to follow telnet tutorial, cgi tutorial, cgi debugging tutorial, My sql tutorial and many more...)
5. At command prompt type -

crontab cron.txt

Press Enter.

You will be back at command prompt.

Then type (Small L):

crontab -l

Press Enter.

You will see the list of cron jobs that you have entered in cron.txt.

That's it!!
Cron emails you everytime it runs. How to stop it?
Add this tag at the end of your cron job:

>/dev/null 2>&1

Taking the above example your cron job looks like:

30 23 * * * /home/username/www/cgi-bin/members.cgi>/dev/null 2>&1
TIPS in setting up your cron jobs:
>>>Ask your host about the procedure if you are not sure of a thing.

>>>Check your cron once in a while.For example you set your cron to send your ezine at 11.30 PM. Then you subscribe yourself to see it is working or not. Later you can unsubscribe yourself.

>>>If you are creating cron file first time and uploading it to your server, do it in ASCII mode.

>>>If you are setting the script path in your schedule, the path SHOULD be from your hosts server root. NOT your domain path.

Ex:/home/user/www/cgi-bin/scriptname.cgi

is correct.

http://www.yourdomain.com/cgi-bin/scriptname.cgi

is incorrect.

>>>Script names are case sensitive on Unix. So be careful in entering the script name.

>>>If you are creating cron.txt file and uploading, you should not allow spaces within 1-5 components except between them. (For example 10,30 * * * * is correct not 10 ,30 * * * *)

Tuesday, August 12, 2008

DB Links

Tables dba_db_links, all_db_links, dbms_dblink
Syntax :
CREATE [SHARED] [PUBLIC] DATABASE LINK
CONNECT TO CURRENT_USER
USING '';
Service name
Ex:
conn_link =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = perrito2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orabase)
)
)
EX:
CREATE DATABASE LINK conn_user USING 'conn_link';
Closing the link
Alter session close the database link
Drop the link
Drop database link


set pages 0
spool drop_gcgx_links.sql;
select 'drop database link ' || db_link || ';' from dba_db_links where owner = 'GCGX';
spool off


drop public database link TCAS_QUOTE.WORLD ;
create public database link TCAS_QUOTE.WORLD connect to tcquote identified BY quote45 using 'TCASDEV.world'

Thursday, August 7, 2008

ADPATCH

ADPATCH OptionsAfter having talked about the best practices related to applications patching. In today’s post i will talk about some frequently used options with adpatch. It is important to note here that the options described here are for information purposes only and you must understand them completely before using them on your system. Also any special instructions specified in the patch readme file automatically overrides the information cointained in this post.You can execute adpatch by logging in as the applications OS user and sourcing the appropriate environment file.
#su - applmgr $cd SAMAPPL
$. ./APPSORA.env
$adpatch
Running a patch in test modeYou can use the apply clause with adpatch to specify weather to run the patch in TEST mode or not, when you run the patch in test mode it does not do any changes but runs generates a log file with all the actions it would have performed. Applications should be maintenance mode.$adpatch apply=ny The default is apply=y
Pre-install ModeYou can also run a patch in pre install mode, this would be done normally during an upgrade or consolidated update. When a patch is applied in a preinstall mode the all the AD utilities are updated before the upgrade or update.$adpatch preinstall=yThe default is preinstall=n

AutoconfigYou can use the options=noautoconfig top specify autopatch that you do not wish to run autoconfig as a part of the patch application. This can be useful when applying a large number of patches when they are not merged. By default autoconfig is run as a part of adpatch. $adpatch options=noautoconfig

CheckfileThe chekfile option of adpatch tells adpathc to check for already executed exec, SQL, and exectier commands.You can use options=nocheckfile skips this check, however this can cause performance overheds so should be used only when specified.$adpatch options=nocheckfile

Compile DatabaseBy defaulty autopatch compiles the invalid objects after the patch application, in case you wish not to do so you can specify options=nocompiledb along with autopatch.$adpatch options=nocompiledb

Compile JSPBy defaulty autopatch compiles the java server pages (jsp) after the patch application, in case you wish not to do so you can specify options=nocompilejsp along with autopatch.$adpatch options=nocompilejsp

Copy PortionIf you wish adpatch not to execute the commands present in the copy driver portion of the patch you can use the options=nocopyportion.$adpatch options=nocopyportion

Database PortionIf you wish adpatch not to execute the commands present in the database driver portion of the patch you can use the options=nodatabaseportion.$adpatch options=nodatabaseportion

Generate PortionIf you wish adpatch not to execute the commands present in the generate driver portion of the patch you can use the options=nogenerateportion$adpatch options=nogenerateportion

Maintenance ModeIf you wish to apply a patch regardless of the system being in maintenance mode you can use options=hotpatch.$adpatch options=hotpatch

Integrity CheckIf you wish to check the integrity of the patch you can use the options=integrity. Since metalink patches are pre checked for their integrity it is generally not required to do an explicit check and the default value is nointegrity.$adpatch options=integrity

Maintain MRCYou can use the maintainmrc option to specify weather you wish adpatch to execute the Maintain MRC schema as a part of the patch application or not. By default maintain MRC is done for standard patches and is disbaled for tarnslation and documentation patches.$adpatch options=nomaintainmrc

Pre requisite Patch CheckIf you wish adpatch not to check for pre requisite patches before application of the main patch you can use options=noprereq.By default pre requsite checking is enabled.
$adpatch options=noprereq

Validate SchemasIf you wish adpatch to explicitly validate all the registed schems by making a connection you can use options=validate. By default this validation is not performed.$adpatch options=validate

Java ClassesIf you wish adpatch not to copy new java classes from the patch you can use options=nojcopy.By default java classes are copied.$adpatch options=nojcopy

Force CopyBy default adpatch copies the files without check the version of the existing files already present on the system.If you do not wish the newer version of the file to be replaced by the older version contained in the patch use options=noforcecopy.$adpatch options=noforcecopy

RelinkingIf you wish adpatch not do perform relinking you can use options=nolink.$adpatch options=nolink

Generate FormsIf you wish adpatch not to generate the forms files you can specify options=nogenform.$adpatch options=nogenform

Generate ReportsIf you wish adpatch not to generate the report files you can specify options=nogenrep.$adpatch options=nogenrepYou could specify multiple options at the command line using the , delimiter.$adpatch options=hotpatch,nojcopy

ADPATCH Utility Has An OPTIONS=NOREVCACHE. Will a Newer Version Of A Package Be Overwritten By An Older Version? [ID 150964.1]



The filesystem-level version checking will not overwrite a newer version of the 
file with an older version.  Using options=norevcache will cause the same 
packages to be re-created at their current revision, not create a lower 
revision of the packages.



Wednesday, July 30, 2008

Locations

Scripts location: $COMMON_TOP/admin/scripts/TRIAL_dba2
To start all the servers, script is adstrtal.sh apps/apps
To stop all the servers, script is adstpall.sh apps/apps

Apache
adapcctl.sh start/stop/status
1) adapcctl.sh status
2) ps –ef grep http
3) ps –ef grep –i apache

Conf file $IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf
LOG file $IAS_ORACLE_HOME/Apache/Apache/conf/error.log, access.log
JServer
Uses apachectl script
Uses apache commands
$IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties
log file $IAS_ORACLE_HOME/Apache/Jserv/logs/mod_jserv.log
Mod PL/SQL
Uses apache ctl script
Uses apache commands
$IAS_ORACLE_HOME/Apache/modplsql/cfg/wdbsvr.app
log file $IAS_ORACLE_HOME/Apache/modplsql/log
Apps listener
adalnctl.sh start/stop/status
ps –ef grep lsnrgrep APPS_
invokes FNDFS executable located at $FND_TOP/bin (starts Report Reviewing Agent (RRA) responsible for viewing CM log and output files)
Forms
adfrmctl.sh start/stop/status
1) adfrmctl.sh status
2) ps –ef grep f60
3) ls –of grep
$COMMON_TOP/html/bin/appsweb_$CONTEXT_NAME.cfg
log file
$ORACLE_HOME/forms60/log/TRIAL-dba or
$COMMON_TOP/admin/log/TRIAL-dba2
Reports
adrepctl.sh start/stop/status
1) adrepctl.sh status
2) ps –ef grep –i rep
3) ps –ef grep rwmts
$ORACLE_HOME/reports60/server/
CGIcmd.dat
Log file
$ORACLE_HOME/reports60/server/REP60_XX.log
or
$COMMON_TOP/admin/log/xxxx/rep60_xxx.txt
Concurrent Manager
adcmctl.sh start/stop/status apps/passwd
1) adcmctl.sh status apps/pwd
2) ps –ef grep FNDLIBR
Uses startmgr and batchmgr parameters
Located at $FND_TOP/bin

Discoverer
addisctl.sh start/stop/status
1) addisctl.sh status
2) ps –ef grep –i disco
Log file
$ORACLE_HOME/discwb4/util/locator.log
And
Oad.log
And
Osagent.log
Database Tier Scripts:

Scripts location: $ORACLE_HOME/appsutil/scripts/TRIAL_dba2
addbctl.sh stop
addbctl.sh start
ps –ef grep smon
Listener
adlnctl.sh start
adlnctl.sh stop
ps –ef grep tns grep –i

Saturday, July 26, 2008

Oracle User

create user alfredo identified by alfredos_secret;
create user alfredo identified externally;
create user alfredo identified globally as 'external_name';
create user alfredoidentified by alfredos_secretdefault tablespace ts_userstemporary tablespace ts_temp;
grant connect to alfredo;
ALTER USER username [ WITH PASSWORD 'password' ] [ CREATEDB NOCREATEDB ] [ CREATEUSER NOCREATEUSER ] [ VALID UNTIL 'abstime' ]

ALTER USER myuser IDENTIFIED BY new_password;
ALTER USER myuser
DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp
QUOTA 100M ON users QUOTA 0 ON my_data;
ALTER USER myuser ACCOUNT LOCK;
ALTER USER myuser ACCOUNT UNLOCK;
ALTER USER myuser PASSWORD EXPIRE;
ALTER USER mark WITH PASSWORD 'ml0215em'
ALTER USER mark VALID UNTIL 'Dec 24 2012'
DROP USER myuser CASCADE;

Object privileges allow a user to perform a specified action on a specific object. Other users can access user-owned objects by preceding the object name with the user name (username.object). Object privileges extend down to table columns.
GRANT {object privilege [, ... ] ALL [PRIVILEGES] } ON [schema.] objectTO { { user role PUBLIC } [, ... ] } [WITH GRANT OPTION];

GRANT {object privilege [, ... ] ALL [PRIVILEGES] } [(column [, ... ])] ON [schema.] objectTO { { user role PUBLIC } [, ... ] }[WITH GRANT OPTION];

Only INSERT, UPDATE and REFERENCES privileges can be granted at the column level.
To create users in Oracle whose authentication is done by the operating system or by password files, the DBA will use:

Method 1:
Step 1. Set the initSID.ora parameters as:
remote_os_authent=TRUE os_authent_prefix = "OPS$"
Step 2. Generate a new spfile
CREATE spfile FROM pfile='initorabase.ora';
3. Add the following to the sqlnet.ora
sqlnet.authentication_services = (NTS)
Method 2:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER ops$oracle IDENTIFIED EXTERNALLY;
GRANT create session TO ops$oracle;
Step 2: Create a user in the operating system named oracle if one does not already exist.
Step 3: Go to command line (terminal window in UNIX, cmd in Windows. Type 'sqlplus' (without the single quotes).
Method 3:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER "PC100USER" IDENTIFIED EXTERNALLY;
where PC100 is the name of the client computer. Then
GRANT CREATE SESSION TO "PC100USER";
Step 2: Create a user in Windows named USER.
Step 3: Log on Windows as USER and go to the C: command line. Object privileges allow a user to perform a specified action on a specific object. Other users can access user-owned objects by preceding the object name with the user name (username.object). Object privileges extend down to table columns.
GRANT {object privilege [, ... ] ALL [PRIVILEGES] } ON [schema.] objectTO { { user role PUBLIC } [, ... ] } [WITH GRANT OPTION];
GRANT {object privilege [, ... ] ALL [PRIVILEGES] } [(column [, ... ])] ON [schema.] objectTO { { user role PUBLIC } [, ... ] }[WITH GRANT OPTION];
Only INSERT, UPDATE and REFERENCES privileges can be granted at the column level.
To create users in Oracle whose authentication is done by the operating system or by password files, the DBA will use:
Method 1:
Step 1. Set the initSID.ora parameters as:
remote_os_authent=TRUE os_authent_prefix = "OPS$"
Step 2. Generate a new spfile
CREATE spfile FROM pfile='initorabase.ora';
3. Add the following to the sqlnet.ora
sqlnet.authentication_services = (NTS)
Method 2:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER ops$oracle IDENTIFIED EXTERNALLY;
GRANT create session TO ops$oracle;
Step 2: Create a user in the operating system named oracle if one does not already exist.
Step 3: Go to command line (terminal window in UNIX, cmd in Windows. Type 'sqlplus' (without the single quotes).
Method 3:
Step 1: Connect as system/manager in SQL*Plus and create the Oracle user:
CREATE USER "PC100USER" IDENTIFIED EXTERNALLY;
where PC100 is the name of the client computer. Then
GRANT CREATE SESSION TO "PC100USER";
Step 2: Create a user in Windows named USER.
Step 3: Log on Windows as USER and go to the C: command line.

Wednesday, July 16, 2008

Table Spaces

How to space for each schema
select sum(bytes),tablespace_name from dba_free_space where
tablespace_name not like 'TEMP%' and tablespace_name
not like 'RBS%' group by tablespace_name;

How to find the size of the database
select sum(BYTES)/1024/1024 from dba_free_space

Freespace/Largest Ext

select TABLESPACE_NAME,sum(BYTES) Total_free_space,
max(BYTES) largest_free_extent from dba_free_space
group by TABLESPACE_NAME

Objects in SYSTEM TS

select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME,BYTES
from dba_segments
where TABLESPACE_NAME = 'SYSTEM'
and OWNER not in ('SYS','SYSTEM')
order by OWNER, SEGMENT_NAME

SYSTEM TABLESPACE USAGE NOTES:

select USERNAME,CREATED,PROFILE,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE
from dba_users order by USERNAME

TABLESPACE USAGE NOTES:
select a.TABLESPACE_NAME,a.BYTES bytes_used,b.BYTES bytes_free, b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
( select TABLESPACE_NAME,sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
)
a,
( select TABLESPACE_NAME,sum(BYTES) BYTES ,max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
)
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc

TABLESPACE INFORMATION NOTES
select TABLESPACE_NAME,INITIAL_EXTENT,NEXT_EXTENT,MIN_EXTENTS,
MAX_EXTENTS,PCT_INCREASE,STATUS,CONTENTS
from dba_tablespaces
order by TABLESPACE_NAME
WAIT STATISTIC NOTES
select TABLESPACE_NAME,TOTAL_EXTENTS, EXTENTS_COALESCED, PERCENT_EXTENTS_COALESCED,TOTAL_BYTES, BYTES_COALESCED,
TOTAL_BLOCKS,BLOCKS_COALESCED, PERCENT_BLOCKS_COALESCED
from dba_free_space_coalesced
order by TABLESPACE_NAME

Table space with PCT free

select df.tablespace_name "Tablespace",
totalusedspace "Used MB",
(df.totalspace - tu.totalusedspace) "Free MB",
df.totalspace "Total MB",
round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
"Pct. Free"
from
(select tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from dba_data_files
group by tablespace_name) df,
(select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
from dba_segments
group by tablespace_name) tu
where df.tablespace_name = tu.tablespace_name ;

Monday, July 14, 2008

FNDLOAD

FNDLOAD Options --

1 - Printer Styles
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME="printer style name"

2 - Lookups
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="FND" LOOKUP_TYPE="lookup name"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt

3 - Descriptive Flexfield with all of specific Contexts
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=’COL_ALL:REF_ALL:CTX_ONE:SEG_ALL’ APPLICATION_SHORT_NAME="FND" DESCRIPTIVE_FLEXFIELD_NAME="desc flex name" P_CONTEXT_CODE="context name"

4 - Key Flexfield Structures
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=’COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL’ APPLICATION_SHORT_NAME="FND" ID_FLEX_CODE="key flex code" P_STRUCTURE_CODE="structure name"

5 - Concurrent Programs
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME="FND" CONCURRENT_PROGRAM_NAME="concurrent program short name"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt

SQL> select application_short_name from fnd_application;

6 - Value Sets
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME="value set name"

7 - Value Sets with values
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME="value set name"

8 - Profile Options
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct file_name.ldt PROFILE PROFILE_NAME="profile option" APPLICATION_SHORT_NAME="FND"

Select application_id,PROFILE_OPTION_NAME =PROFILE OPTION ID
USER_PROFILE_OPTION_NAME from FND_PROFILE_OPTIONS_VL
Where PROFILE_OPTION_NAME like ‘UPPER %profile option name ‘
Order by PROFILE_OPTION_NAME

FNDLOAD apps/apps pwd O Y $FND_TOP/patch/115/import/afscprof.lct file_name.ldt

9 - Request Groups
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct file_name.ldt REQUEST_GROUP_NAME="request group" APPLICATION_SHORT_NAME="FND"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/afcprepqg.lct

10 - Request Sets
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt REQ_SETAPPLICATION_SHORT_NAME="FND" REQUEST_SET_NAME="request set"

SELECT request set name from fnd_requests_sets_vl where user_request_set_name=’user name ‘

FNDLOAD apps/apps pwd OY UPLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt

11 - Responsibilities
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY="responsibility"

FNDLOAD apps/apps pwd O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt

12 - Menus
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt MENU MENU_NAME="menu_name"

Select user_menu_name from fnd_menues_vl where menu_name=’xx’

FNDLOAD apps/apps pwd O Y UPLOAD $FND_LOAD/patch/115/import/afsload.lct file_name.ldt

13 – users
FNDLOAD apps/apps pwd O Y DOWNLOAD $FND_TOP/patch/115/import/afscurp.lct file_name.ldt
FND_USER USER_NAME=”XYX”

Printers / Print queues / Executables Printers / Print queues / Executables.
Roles / Responsibilities / Forms Roles / Responsibilities / Forms.
Menus / Users / Request Sets Menus / Users / Request Sets.
Request Groups / Request Queues Request Groups / Request Queues.
Work shifts / Programs / Libraries Work shifts / Programs / Libraries.
Attachments / Help Files Attachments / Help Files.
Mime Types Mime Types.
Security Information.

Metalink Note id -- 274667.1


.ldt converted data file
.lct configuration file

Sunday, July 13, 2008

SQls

Display the current cursor being executed by a session.
select a.sid, a.username, b.sql_textfrom v$session a, v$open_cursor b where a.saddr = b.saddr;

Display the entire SQL statement being executed by a session.
select a.sid, a.username, b.sql_textfrom v$session a, v$sqltext bwhere a.sql_address = b.addressand a.sql_hash_value = b.hash_valueorder by a.sid, a.username, b.piece;

Display each cursor of the shared cursor cache, including the times executed and loaded into the cache.
select sql_text, version_count, executions, loads from v$sqlarea;

Displays licensing information, including the maximum number of licensed concurrent or named users, the current number of active concurrent sessions, and the highest number of users that were concurrently logged on at anyone time since the last database startup.
select sessions_max, sessions_current, sessions_highwater, users_max from v$license;

Display all the init.ora parameters and the current values, along with signifying if the value is the default value.
select name, value, isdefault from v$parameter order by name;

Redo LogsDisplay details on the redo log files, including the filename, size, and archive status. select a.member, b.*from v$logfile a, v$log bwhere a.group# = b.group#;

Display a history of the archive logs created along with the file names.
select * from v$log_history;

Rollback SegmentsDisplay rollback information and determine if more segments are needed. If the waits to gets goes over one, then add more rollback segments.
select a.name, b.extents, b.rssize, b.xacts, b.waits, b.gets, optsize, statusfrom v$rollname a, v$rollstat bwhere a.usn = b.usn;

Determine the number of sessions for each user.
select username, count(*) from v$sessiongroup by username;
Display detail information about a session, including the operating system username and process, and terminal.
select sid, username, program, osuser, process, machine, terminal, typefrom v$session;

Display detailed statistics per session to determine a session’s resource usage.
select a.sid, a.username, b.name, c.valuefrom v$session a, v$statname b, v$sesstat cwhere a.sid = c.sidand b.statistic# = c.statistic#and a.username = upper(‘&username’)order by a.sid, a.username, b.name;

Determine the objects that are being accessed by each session.
select a.sid, a.username, b.owner, b.object, b.ob_typfrom v$session a, v$access bwhere a.sid = b.sid;

Display the processes for each session. If the process is a background process, then the operating system and identifier are retrieved from the process table.
select a.sid, decode(b.background,1,b.program,a.username) "user", b.pid,decode (b.background,1,b.spid,a.audsid) "os id"from v$session a, v$process bwhere a.paddr = b.addr;

How to get the Patch set level
Select patch_level from fnd_product_installation where patch_level like ‘%AD%’;

SELECT a.sid, a.username, b.sql_textFROM v$session a, v$sqltext bWHERE a.sql_address = b.addressAND a.sql_hash_value = b.hash_value
ORDER BY a.username, a.sid, b.piece

The following query can be used to determine all objects that are currently being accessed by a user.
SELECT a.sid, a.username, b.owner, b.object, b.ob_typFROM v$session a, v$access bWHERE a.sid = b.sid

What Indexes Are Available on a Table?
SELECT index_name, column_name, column_ positionFROM all_ind_columnsWHERE table_name = ‘ACCOUNT’ORDER BY index_name,column_position

How to get the responsibility of the users

SELECT UNIQUE u.user_id, u.user_name,r.responsibility_name,a.application_name FROM fnd_user u, fnd_user_resp_groups g, fnd_application_tl a, fnd_responsibility_tl r WHERE g.user_id = u.user_id AND g.responsibility_application_id = a.application_id AND a.application_id = r.application_id AND g.responsibility_id = r.responsibility_id and user_name like 'userid'
How to get concurrent request ... sid
SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID
FROM apps.fnd_concurrent_requests a,apps.fnd_concurrent_processes b,
v$process c,v$session d WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND b.session_id=d.audsid
AND a.phase_code = 'P'
AND a.request_id = xxxxxxxxxx;


select REQUEST_ID , PHASE_CODE , STATUS_CODE, CONCURRENT_PROGRAM_ID, PARENT_REQUEST_ID ,ORACLE_PROCESS_ID,
ORACLE_SESSION_ID, OS_PROCESS_ID,QUEUE_ID from fnd_concurrent_requests where REQUEST_ID=55243326;
How to kill the concurrent request
update fnd_concurrent_requests set status_code ='D', phase_code = 'C' where request_id= request number;
How to find the version of WF
select TEXT from WF_RESOURCES where NAME='WF_VERSION';

LocK
SELECT b.session_id AS sid,
NVL(b.oracle_username, '(oracle)') AS username,
a.owner AS object_owner,
a.object_name,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.os_user_name
FROM dba_objects a,
v$locked_object b
WHERE a.object_id = b.object_id
ORDER BY 1, 2, 3, 4;

SELECT s.sid,s. serial#, s.last_call_et, s.MODULE, s.status,
s.machine,p. spid, s.osuser FROM v$process p, v$session s
WHERE p.addr = s.paddr and s.module like '&MODULE' and
s.last_call_et>3600;

select SID,SERIAL# ,LAST_CALL_ET,MODULE,STATUS from v$session where LAST_CALL_ET>3600 and MODULE='&MODULE';
select * from v$lock where LMODE=6 and block=1 order by sid;

select * from sys.dba_dml_locks order by session_id;
dead lock.... select * from v$lock where lmode>0 and id1 in (select distint id1 from v$lock where request >0)

fnd_concurrent_program_vl

select s.SID,s.SERIAL#,l.TIME_REMAINING,s.SQL_HASH_VALUE from v$session_longops l,v$session s where s.sid=l.sid and s.serial#=l.serial# and s.sid=$sid; .... to get the time for the query

select sum(BYTES/1024/1024) from dba_free_space where TABLESPACE_NAME like %XYZ%';
to get the free space

select sum( BYTES/1024/1024) from dba_data_files where TABLESPACE_NAME like '%SDBD%';
to get the total space

select FILE_NAME,TABLESPACE_NAME,BYTES/1024/1024 from dba_data_files where TABLESPACE_NAME like '% BOMX %’
toget the location of the datafile

alter database datafile '/busdata/rp01/eur0/_lgi/oracle/vol24/gld02.dbf ' resize 3072M.... to alter the datafile



How to check the NLS patchs applied or not

SELECT driver.driver_file_name
,TO_CHAR(run.start_date,'DD-Mon HH24:MI:SS') start_date
,TO_CHAR(run.end_date ,'DD-Mon HH24:MI:SS') end_date
,lang.language
FROM ad_patch_runs run
,ad_patch_driver_langs lang
,ad_patch_drivers driver
,ad_applied_patches applied
WHERE run.patch_driver_id = driver.patch_driver_id
AND driver.applied_patch_id = applied.applied_patch_id
AND applied.patch_name = '&p_patch_number'
AND lang.patch_driver_id = driver.patch_driver_id
ORDER BY 1,2,3;



Workfolw
==========
select fsc.COMPONENT_NAME,fsc.STARTUP_MODE, fsc.COMPONENT_ STATUS
from APPS.FND_CONCURRENT_QUEUES_VL fcq, fnd_svc_components fsc
where fsc.concurrent_queue_id = fcq.concurrent_ queue_id( +)
and fcq.USER_CONCURRENT_QUEUE_NAME like '%Mail%';

Check Maintanance Mode
============ ========= =
select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;

Enable/Disable Maintanance Mode
============ ========= =========
sqlplus -s apps/@$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
sqlplus -s apps/@$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE

Find invalid Object Count
============ ========= =
Select count(*) from dba_objects where object_Name= 'INVALID' ;

Compile invalid object
============ =======
Alter package APPS.MSC_CL_PRE_PROCESS compile body;

Compile all invalid objects
============ ========= ==
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Find Applications Release
============ ========= ==
select release_name from fnd_product_ groups;


Find Number of Languages installed in Oracle Applications
============ ========= ========= ========= ========= ====
select nls_language, language_code,installed_flag
from apps.fnd_languages where installed_flag in ('I','B');

Database Name and Version
============ ========= ===
select instance_name, version from v$instance;

Find Number of Nodes in instance
============ ========= ========
select node_name,support_cp from fnd_nodes;


Perl Version
==========
perl -version

Java Version
===========
$AFJVAPRG -version

Apache Server Version
============ ========
$IAS_ORACLE_ HOME/Apache/Apache/bin/httpd -version

Form Server Version
============ =======
f60gen |grep -i version

Reports Server Version
============ =========
rwcon60 |grep -version

Find workflow version
============ =======
exec $FND_TOP/sql/wfver.sql

Find apps password
============ =====
grep password $APACHE_TOP/modplsql/cfg/wdbsvr.app

Find URL of the isntance
============ =========
env |grep -i forms

select profile_option_ value from apps.fnd_profile_option_values
where profile_option_value like '%http%';


How to get the concurrent Manger Name from requested

SELECT b.user_concurrent_queue_name
FROM 
fnd_concurrent_processes a
,fnd_concurrent_queues_vl b
,fnd_concurrent_requests c
WHERE 1=1
AND a.concurrent_queue_id = b.concurrent_queue_id
AND a.concurrent_process_id = c.controlling_manager
AND c.request_id = &request_id 

FNDCPASS

FNDCPASS logon 0 Y system/password mode username new_password
Where MODE is SYSTEM/USER/ORACLE/ALLORACLE (Introduced with patch 4745998

Use this command to change the password of a schema provided by an individual product in Oracle Applications.
FNDCPASS apps/ 0 Y system/ ORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1
3.To change all ORACLE schema passwords:Use this command to change the passwords of all schemas provided by Oracle Application products.
FNDCPASS apps/ 0 Y system/ ALLORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ALLORACLE welcome
4.To change an Oracle Applications user’s password:You can use this command to change an individual Oracle Applications user’s password.
FNDCPASS apps/ 0 Y system/ USER Ex: FNDCPASS apps/apps 0 Y system/manager USER sysadmin welcome
FNDCPASS apps/gat5s 0 Y system/wynk00p USER st2008 oracle12

Changing passwords frequently helps ensure database security. Oracle Applications provides a command line utility,FNDCPASS, to set Oracle Applications schema passwords. This utility changes the password registered in OracleApplications tables and changes the schema password in the database. This utility can also change user passwords.
Note: You cannot change a schema name, such as APPLSYS or GL, after a product is installed, with FNDCPASS.
Attention: Ensure that the entire Oracle Applications system has been shut down before changing any schema passwords.
All users should log out and the Applications system should be down before running this utility.
If Oracle Applications user passwords are being changed then the relevant users should not be logged in.
Attention: Before changing any passwords, you should make a backup of the tables FND_USER and FND_ORACLE_USERID.
1.To change the APPS and APPLSYS schema password:Use this command to change passwords for schemas that are used by shared components of Oracle Applications.
FNDCPASS apps/ 0 Y system/ SYSTEM APPLSYS Ex: $FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS NEWPASSWORDAttention: Passwords for APPLSYS and the APPS schemas — including the MRC schema — must be the same.If you change the password for one, FNDCPASS automatically changes the others.This command does the following:
1. Validates APPLSYS.2. Re-registers password in Oracle Applications.3. Changes the APPLSYS and all APPS passwords (for multi-APPS schema installations) to the same password.Because everything with a Privilege Level [set to any of (’E', ‘U’, ‘D’)] in the FND_ORACLE_USERID tablemust always have the same password, FNDCPASS updates these passwords as well as APPLSYS’s password.For example, the APPS password will be updated when the APPLSYS password is changed.4. ALTER USER is executed to change the ORACLE password
for the above ORACLE users.
2.To change an Oracle Applications schema password (other than APPS/APPLSYS):Use this command to change the password of a schema provided by an individual product in Oracle Applications.
FNDCPASS apps/ 0 Y system/ ORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1
3.To change all ORACLE schema passwords:Use this command to change the passwords of all schemas provided by Oracle Application products.
FNDCPASS apps/ 0 Y system/ ALLORACLE Ex: FNDCPASS apps/apps 0 Y system/manager ALLORACLE welcome
4.To change an Oracle Applications user’s password:You can use this command to change an individual Oracle Applications user’s password.
FNDCPASS apps/ 0 Y system/ USER Ex: FNDCPASS apps/apps 0 Y system/manager USER sysadmin welcome
5.Post Step:
1. Use the FNDCPASS utility to change the password.
FNDCPASS APPS/ 0 Y SYSTEM/SYSTEM ORACLE ALLORACLE USER 2. Update configuration files.If you changed the APPS schema password (and APPLSYS) or the APPLSYSPUB password,update the following configuration files using AutoConfig (do not manually editthese files). They are used when connecting to Oracle Applications.If you changed the APPS (and APPLSYS) password, update the password in these files: iAS_TOP/Apache/modplsql/cfg/wdbsvr.appORACLE_HOME/reports60/server/CGIcmd.dat
If you changed the APPLSYSPUB password, update the password in these files: FND_TOP/resource/appsweb.cfg OA_HTML/bin/appsweb.cfgFND_TOP/secure/_.dbcNote: When changing APPS (or APPLSYS) and APPLSYSPUB passwords, do not restart thesystem until the entire password change process has been completed.
3. Verify the new password.
If you changed the password for APPS (and APPLSYS),restart all concurrent managers, then log on to Oracle Applications to test the new password.
passwd_chg.sh
#!/usr/bin/sh################################################################################# Program ID : passwd_chg.sh# Version : V1.0# Description: EBS 11.5.10 APPS passwd change# Reversion History# Date Version Name Description# ———- ——- ————– —————————————-# 2005.12.8 1.0 Bandari Huang Initial################################################################################
########## Initial Parameter ###############module_pass=”"old_apps_pass=”"new_apps_pass=”"system_pass=”"############################################
echo “GL password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle gl $module_pass
echo “AP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle ap $module_pass
echo “AR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle ar $module_pass
echo “FA password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle fa $module_pass
echo “INV password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle inv $module_pass
echo “PO password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle po $module_pass
echo “BOM password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle bom $module_pass
echo “WIP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle wip $module_pass
echo “HR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle hr $module_pass
echo “ZPGL password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxgl $module_pass
echo “ZPAP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxap $module_pass
echo “ZPAR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxar $module_pass
echo “ZPFA password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxfa $module_pass
echo “ZPINV password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxinv $module_pass
echo “ZPPO password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxpo $module_pass
echo “ZPBOM password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxbom $module_pass
echo “ZPWIP password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxwip $module_pass
echo “ZPHR password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxhr $module_pass
echo “ZPCST password : “$module_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass oracle oralnxcst $module_pass
echo “APPS password : “$new_apps_passFNDCPASS apps/$old_apps_pass 0 Y system/$system_pass system applsys $new_apps_pass
########## wdbsvr.app file update
cp $APACHE_TOP/modplsql/cfg/wdbsvr.app $APACHE_TOP/modplsql/cfg/wdbsvr.app.old
sed -e “s/$old_apps_pass/$new_apps_pass/g” $APACHE_TOP/modplsql/cfg/wdbsvr.app.old > $APACHE_TOP/modplsql/cfg/wdbsvr.app
rm $APACHE_TOP/modplsql/cfg/wdbsvr.app.old
########## CGIcmd.dat file update modified by huangbandari 07-09-19
cp $ORACLE_HOME/reports60/server/CGIcmd.dat $ORACLE_HOME/reports60/server/CGIcmd.dat.old
sed -e “s/$old_apps_pass/$new_apps_pass/g” $ORACLE_HOME/reports60/server/CGIcmd.dat.old > $ORACLE_HOME/reports60/server/CGIcmd.dat
rm $ORACLE_HOME/reports60/server/CGIcmd.dat.old
Note:159270.1, Note:159244.1, Note:398942.1

-->

Cron jobs

example :
applmgr@dnux062: /home/applmgr> crontab -l
# 0 6 * * * /opt/oracle/local/bin/applptmp_cleanup ERPPROD
0,15,30,45 0-23 * * * /opt/oracle/local/bin/applptmp_cleanup ERPPROD
0 * * * * /opt/oracle/local/bin/applcsf_cleanup ERPPROD
# 0 0-23 * * * /home/applmgr/kevin/gcca_update_oe_interface2.sh
minute(s) hour(s) day(s) month(s) weekday(s) command(s)

applmgr@dnux046: /etc> crontab -l
0 6 * * * /home/applmgr/local/bin/applptmp_cleanup ERPTEST1
0 6 * * * /home/applmgr/local/bin/applcsf_cleanup ERPTEST1


applmgr@dnux046: /home/applmgr/local/bin> vi applptmp_cleanup
"applptmp_cleanup" 4 lines, 221 characters
#!/bin/sh
find /opt/grc/mvs/$1/temprpt -mtime +3 -name "*.t" -exec rm -f {} \;
find /opt/grc/mvs/$1/temprpt -mtime +3 -name "*.tmp" -exec rm -f {} \;
find /opt/grc/mvs/$1/temprpt -mtime +3 -name "*.dbg" -exec rm -f {} \;

applmgr@dnux046: /home/applmgr/local/bin> vi applcsf_cleanup
#!/bin/sh
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +1 -name "M*.dat" -exec rm -f {} \;
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +1 -name "M*.ctl" -exec rm -f {} \;
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +11 -name "*.r[12345]" -exec rm -f {} \;
find /opt/grc/mvs/$1/temp/out/$1_dnux046 -mtime +11 -name "p*.c[12345]" -exec rm -f {} \;


Summary of the problem: The permissions of the FIFO file in /var/adm/cron was altered and the cron job started to work.

Can you check the following...
Verify that you actually have a /var/adm/cron/FIFO file.
If this file is absent, you can make the pipe by running:
mknod /var/adm/cron/FIFO p
Don't forget to include the p argument at the end.
The output destination for cron error messages is console.
cron aborted: can't change directory to the crontab directory.
Cause:
The directory could not be changed to the crontab directory.
Action:
Create a /usr/spool/cron/crontabs directory and restart cron.
cron aborted: can't read the crontab directory
Cause:
No directory information could be read from the crontab directory.
Action:
Check the permission of the /usr/spool/cron/crontabs directory and restart cron.
cron aborted: cannot create fifo queue
Cause:
A /usr/lib/cron/FIFO file could not be created.
Action:
There might be insufficient inodes in the disk containing usr/lib/cron or the directory might not exist. Check these possibilities, then restart cron.
cron aborted: cannot access fifo queue
Cause:
The FIFO file could not be accessed.
Action:
Check the permission of the /usr/lib/cron/FIFO file, enable the file to be accessed, then restart cron.
cron aborted: cannot stat cron: FIFO exists
Cause:
cron cannot be newly executed because the FIFO file already exists (cron is already active).
Action:
None.
cron aborted: cannot open fifo queue
Cause:
The FIFO file could not be opened.
Action:
Check the permission of the /usr/lib/cron/FIFO file, enable
Cause:
The log file could not be opened.
Action:
Check the permission of the /usr/lib/cron/log file, enable the file to be opened, then restart cron.
cron aborted: cannot start fifo queue
Cause:
No information could be acquired from the /usr/lib/cron/FIFO file.
Action:
The /usr/lib/cron/FIFO file or directory might not exist. Check these possibilities, then restart cron.
cron aborted: cron could not unlink FIFO
Cause:
The /usr/lib/cron/FIFO file could not be deleted.
Action:
Check whether the /usr/lib/cron/FIFO file exists. When the file exists, use the rm command to delete it.
cron aborted: SIGTERM
Cause:
cron terminated because it received the SIGTERM signal.
Action:
None.
cannot allocate n byte of space
Cause:
Memory could not be allocated.
Action:
If necessary, increase the value of the kernel system constant MAXUMEM.

Imp Links

http://neosatish.blogspot.com/2007/07/11idocid.html
http://advait.wordpress.com/2008/07/01/important-tables-for-adpatch/
http://www.redhat.com/docs/manuals/csgfs/Oracle_GFS-en-US/Setup_and_Scripts.html
http://www.dba-oracle.com/art_dbazine_conc_mgr.htm
http://www.orafaq.com/node/854 locks
http://www.itk.ilstu.edu/docs/Oracle/server.101/b10755/dynviews_1123.htm locks
http://www.fortunecity.com/skyscraper/oracle/699/orahtml/ioug/vtables.html
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
http://www.techonthenet.com/oracle/sys_tables/
http://dbafix.blogspot.com/search/label/Oracle%20DBA%20Issues
http://www.blacksheepnetworks.com/security/resources/www.think-forward.com/sqltips.htm

user level export and import

expdp parfile=PLCT170.par oracle@uslp123sd7dfcvxsza > more PLCT050.par userid= "/ as sysdba" dumpfile=T050.dmp logfile=expdpT0...