You are on page 1of 17

export ORACLE_SID=`ps -ef | grep pmon | grep -i asm | awk '{print $8}' | cut -d

'_' -f3`
To check privileges added to user:----------------------------------COL grantee FORMAT A30
COL table_name FORMAT A30
COL privilege FORMAT A30
SET LINESIZE 200
SELECT
grantee,
table_name,
privilege
FROM
dba_tab_privs
WHERE
UPPER(grantee) = UPPER('&User_Name') AND
UPPER(table_name) = UPPER('&Table_Name') AND
UPPER(privilege) = UPPER('&Privilege_Name');
select * from dba_role_privs where GRANTEE = 'DEV_SOAFFL';
select * from dba_role_privs where GRANTEE = 'DEV_SOACUSTPUB';
select * from dba_sys_privs where GRANTEE = 'DEV_SOAFFL';
select * from dba_sys_privs where GRANTEE = 'DEV_SOACUSTPUB';
select * from dba_tab_privs where GRANTEE = 'DEV_SOAFFL';
select * from dba_tab_privs where GRANTEE = 'DEV_SOACUSTPUB';
select * from user_role_privs where username = 'DEV_SOAFFL';
select * from user_role_privs where username = 'DEV_SOACUSTPUB';
select * from user_sys_privs where username = 'DEV_SOAFFL';
select * from user_sys_privs where username = 'DEV_SOACUSTPUB';
select * from user_tab_privs where GRANTEE = 'DEV_SOAFFL';
select * from user_tab_privs where GRANTEE = 'DEV_SOACUSTPUB';
Extending an ASM Datafile:--------------------------COL file_name FORMAT A80
COL bytes FORMAT 999,999
set linesize 100
set pages 300
SELECT
file_name,
bytes/1024/1024 mb
FROM
dba_data_files
WHERE
tablespace_name = '&Tablespace_Name'
ORDER BY
file_name;
ALTER DATABASE DATAFILE '+DATA/SID/datafile/&File_Name' resize &ReSize_TO\m;

Adding an ASM Datafile:-----------------------ALTER TABLESPACE &Tablespace_Name add datafile '+DATA' size &Size_TO\m;
Tablespace altered.
Here is a simple script to display Oracle free space within the data file space.
Note the in-line view where dba_data_files is joined into dba_free_space:
SELECT
a.tablespace_name,
a.file_name,
a.bytes allocated_bytes,
b.free_bytes
FROM
dba_data_files a,
(SELECT file_id, SUM(bytes) free_bytes
FROM dba_free_space b GROUP BY file_id) b
WHERE
a.file_id=b.file_id
ORDER BY
a.tablespace_name;
SELECT
a.tablespace_name,
a.file_name,
a.bytes/1024/1024/1024 allocated_bytes,
b.free_bytes/1024/1024/1024
FROM
dba_data_files a,
(SELECT file_id, SUM(bytes) free_bytes
FROM dba_free_space b GROUP BY file_id) b
WHERE
a.file_id=b.file_id
ORDER BY
a.tablespace_name;
SET SERVEROUTPUT ON;
spool '/tmp/spool.log'
SQL> select state, count(*) from CRP_SOAINFRA.cube_instance group by state;
STATE COUNT(*)
---------- ---------5
1958
10
21600
9
125
SQL>

DECLARE
max_creation_date timestamp;
min_creation_date timestamp;
retention_period timestamp;
BEGIN

min_creation_date := to_timestamp('2005-10-01','YYYY-MM-DD');
max_creation_date := to_timestamp('2013-08-28','YYYY-MM-DD');
retention_period := to_timestamp('2013-08-28','YYYY-MM-DD');
CRP_SOAINFRA.soa.delete_instances(
min_creation_date => min_creation_date,
max_creation_date => max_creation_date,
batch_size => 10000,
max_runtime => 60,
retention_period => retention_period,
purge_partitioned_component => false);
END;
/
This shows the allocated and free bytes within the data files, but it DOES not s
how available free space on the OS filesystem:
TABLESPACE_NAME
FILE_NAME
ALLOCATED_BYTES
FREE_BYTES
-------------------- ------------------------- --------------- -------------TBS_LOCALS
/u01/app/oradata/devdb/de
20,971,520
20,774,912
vdb/devdb_tbs_locals_01.d
bf
Note that there are many other ways to create tablespace reports. This method c
reate an intermediate view to doisplay free space:
Rem free_space.sql
rem run this script first, to create the free_space view;
drOP VIEW SYS.FREE_SPACE;
CREATE VIEW SYS.FREE_SPACE AS
SELECT
TABLESPACE_NAME TABLESPACE,
FILE_ID,
COUNT(*)
PIECES,
SUM(BYTES) FREE_BYTES,
SUM(BLOCKS) FREE_BLOCKS,
MAX(BYTES) LARGEST_BYTES,
MAX(BLOCKS) LARGEST_BLKS
FROM
SYS.DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME, FILE_ID;
This is the next script, whixch show all free space within the tablespace:
rem tsfree.sql - Shows all free space within tablespaces.
Prompt be sure that you have run free_space.sql prior to this script
clear breaks;
clear computes;
set verify off;
set pagesize 66;
set linesize 79;
set newpage 0;
column temp_col new_value spool_file noprint;
column today new_value datevar noprint;
column TABLESPACE_NAME
FORMAT A15
HEADING 'Tablespace';

COLUMN
COLUMN
cOLUMN
COLUMN
COLUMN
COLUMN

PIECES
FILE_MBYTES
FREE_MBYTES
CONTIGUOUS_FREE_MBYTES
PCT_FREE
PCT_CONTIGUOUS_FREE

FORMAT
FORMAT
FORMAT
FORMAT
FORMAT
FORMAT

9,999
99,999
99,999
99,999
999
999

HEADING
HEADING
HEADING
HEADING
HEADING
HEADING

'Tablespace|Pieces';
'Tablespace|Mbytes';
'Free|Mbytes';
'Contiguous|Free|Mbytes';
'Percent|FREE';
'Percent|FREE|Contiguous';

ttitle left datevar right sql.pno center ' Instance Data File Storage' SKIP 1 center ' in ORACLE Megabytes (1048576 bytes)' skip skip;
BREAK ON REPORT
COMPUTE SUM OF FILE_MBYTES ON REPORT
select to_char(sysdate,'mm/dd/yy') today,
TABLESPACE_NAME,
PIECES,
(D.BYTES/1048576) FILE_MBYTES,
(F.FREE_BYTES/1048576) FREE_MBYTES,
((F.FREE_BLOCKS / D.BLOCKS) * 100) PCT_FREE,
(F.LARGEST_BYTES/1048576) CONTIGUOUS_FREE_MBYTES,
((F.LARGEST_BLKS / D.BLOCKS) * 100) PCT_CONTIGUOUS_FREE
from SYS.DBA_DATA_FILES D, SYS.DBA_FREE_SPACE F
where D.STATUS = 'AVAILABLE' AND
D.FILE_ID= F.FILE_ID AND
D.TABLESPACE_NAME = F.TABLESPACE_NAME
order by TABLESPACE_NAME;
Here is the report from this script.
Tablespace
Pieces
Mbytes
--------------- ---------- ---------MASTER1_DETAILS
1
18
MASTER1_DETAILS
1
20
MASTER2_DETAILS
1
2
MASTER3_DETAILS
1
5
MASTER4_DETAILS
2
3
RBS_ONE
11
490
RBS_TWO
11
490
SYSTEM
17
60
TEMP
1
650
TOOLS
2
15
USERS
41
100
---------13,255

Mbytes FREE
Mbytes Contiguous
------- ------- ---------- ---------2
10
2 10
20
100
20 100
1
65
1 65
5
95
5 95
1
36
1 35
380
78
280 57
379
77
279 57
45
76
45 75
650
100
650 100
9
61
8 55
31
31
4
4

This report is useful for finding the largest sized chunk of free space within a
tablespace.
Free space in Tablespace:-------------------------column "Tablespace" format a20
column "Used MB"
format 99,999,999
column "Free MB"
format 99,999,999
column "Total MB" format 99,999,999
select
fs.tablespace_name
(df.totalspace - fs.freespace)
fs.freespace

"Tablespace",
"Used MB",
"Free MB",

df.totalspace
"Total MB",
round(100 * (fs.freespace / df.totalspace)) "Pct. Free"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df,
(select
tablespace_name,
round(sum(bytes) / 1048576) FreeSpace
from
dba_free_space
group by
tablespace_name
) fs
where
df.tablespace_name = fs.tablespace_name and
fs.tablespace_name = '&Tablespace_Name';
Checking the package status and creation:-----------------------------------------COL owner FORMAT A30
COL OBJECT_NAME FORMAT A30
COL OBJECT_TYPE FORMAT a30
COL status FORMAT A10
SET LINESIZE 200
SELECT
owner,
object_name,
object_type,
status,
timestamp
FROM
dba_objects
WHERE
object_name = UPPER('&Packge_Name');
PCS_UPSERT_DOMESTIC_EMPLOYEES
PACKAGE BODY
select * from SYS.USER_ERRORS where NAME = '&object_name' and type = '&object_ty
pe';
Creation of DB Link:--------------------http://psoug.org/reference/db_link.html
create public database link "MYHOME.US.UL.COM"
connect to DCC
identified by "<pwd>"
using '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=usnbka143d.us.ul.com)(PORT=1521
))(CONNECT_DATA=(SID=ASDB)))';

Cloning:
Configuring Applications Node Services in Oracle E-Business Suite Release 12 [ID
406558.1]
This Service Group:
Supports:
----------------------------------------------------Root Services
Oracle Process Manager (OPMN)
Web Entry Point Services

HTTP Server

Web Application Services

OACORE OC4J
Forms OC4J
OAFM OC4J

Batch Processing Services

Applications TNS Listener


Concurrent Managers
Fulfillment Server

Other Service Group

Oracle Forms Services


Oracle MWA Service

Web and Forms Services: Root Services, Web Entry Point Services, Web Application
Services, Other Service Group
Concurrent Processing Services: Batch Processing Services
<service group>: <context variable>
<service>: <context variable> (<control script>)
Using this format, the Release 12 service groups, services, context variable
s, and control scripts are:
Root Services: s_root_status
Oracle Process Manager: s_opmnstatus (adopmnctl.sh)
Web Entry Point Services: s_web_entry_status
Oracle HTTP Server: s_oacorestatus (adapcctl.sh)
Web Application Services: s_web_applications_status
OACORE OC4J: s_oacorectrl (adoacorectl.sh)
FORMS OC4J: s_formsstatus (adformsctl.sh)
OAFM OC4J: s_oafmstatus (adoafmctl.sh)
Batch Processing Services: s_batch_status
OracleTNSListenerAPPS: s_tnsstatus (adalnctl.sh)
OracleConcMgr: s_concstatus (adcmctl.sh)
Oracle ICSM: s_icsmctrl (ieoicsm.sh)
Oracle Fulfillment Server: s_jtffsstatus (jtffmctl.sh)
Other Service Group: s_other_service_group_status
OracleFormsServer: s_formsserver_status (adformsrvctl.sh)
Oracle Metrics Client: s_metcstatus (adfmcctl.sh)
Oracle Metrics Server: s_metsstatus (adfmsctl.sh)
Oracle MWA Service: s_mwastatus (mwactlwrpr.sh)
R12 FNDCPASS change APPS SYSADMIN passwords
changing APPLSYS password changes the APPS password:
FNDCPASS apps/Fe771swh33l 0 Y system/manager SYSTEM APPLSYS F1R5T0N3
Change the SYSADMIN password:

FNDCPASS apps/F1R5T0N3 0 Y system/manager USER SYSADMIN 5Y54DM1N


Profile Option by Name and by Value:------------------------------------SELECT b.user_profile_option_name "Long Name",
a.profile_option_name
"Short Name",
DECODE (
TO_CHAR (c.level_id),
'10001', 'Site',
'10002', 'Application',
'10003', 'Responsibility',
'10004', 'User',
'Unknown'
) "Level",
DECODE (
TO_CHAR (c.level_id),
'10001', 'Site',
'10002', NVL (h.application_short_name, TO_CHAR (c.level_value)),
'10003', NVL (g.responsibility_name, TO_CHAR (c.level_value)),
'10004', NVL (e.user_name, TO_CHAR (c.level_value)),
'Unknown'
) "Level Value",
c.profile_option_value "Profile Value",
c.profile_option_id
"Profile ID",
TO_CHAR (c.last_update_date, 'DD-MON-YYYY HH24:MI') "Updated Date",
NVL (d.user_name, TO_CHAR (c.last_updated_by))
"Updated By"
FROM apps.fnd_profile_options a,
apps.fnd_profile_options_vl b,
apps.fnd_profile_option_values c,
apps.fnd_user d,
apps.fnd_user e,
apps.fnd_responsibility_vl g,
apps.fnd_application h
WHERE b.user_profile_option_name LIKE '&ProfileName'
AND a.profile_option_name = b.profile_option_name
AND a.profile_option_id = c.profile_option_id
AND a.application_id = c.application_id
AND c.last_updated_by = d.user_id(+)
AND c.level_value = e.user_id(+)
AND c.level_value = g.responsibility_id(+)
AND c.level_value = h.application_id(+)
ORDER BY b.user_profile_option_name,
C.level_id,
DECODE (
TO_CHAR (C.level_id),
'10001', 'Site',
'10002', NVL (h.application_short_name, TO_CHAR (C.level_value)),
'10003', NVL (g.responsibility_name, TO_CHAR (C.level_value)),
'10004', NVL (e.user_name, TO_CHAR (C.level_value)),
'Unknown'
);
SELECT

b.user_profile_option_name "Long Name",


a.profile_option_name
"Short Name",
DECODE (

TO_CHAR (c.level_id),
'10001', 'Site',
'10002', 'Application',
'10003', 'Responsibility',
'10004', 'User',
'Unknown'
) "Level",
DECODE (
TO_CHAR (c.level_id),
'10001', 'Site',
'10002', NVL (h.application_short_name, TO_CHAR (c.level_value)),
'10003', NVL (g.responsibility_name, TO_CHAR (c.level_value)),
'10004', NVL (e.user_name, TO_CHAR (c.level_value)),
'Unknown'
) "Level Value",
c.profile_option_value "Profile Value",
c.profile_option_id
"Profile ID",
TO_CHAR (c.last_update_date, 'DD-MON-YYYY HH24:MI') "Updated Date",
NVL (d.user_name, TO_CHAR (c.last_updated_by))
"Updated By"
FROM apps.fnd_profile_options a,
apps.fnd_profile_options_vl b,
apps.fnd_profile_option_values c,
apps.fnd_user d,
apps.fnd_user e,
apps.fnd_responsibility_vl g,
apps.fnd_application h
-- WHERE b.user_profile_option_name LIKE '&ProfileName'
WHERE c.profile_option_value = 'ERPTRN'
AND a.profile_option_name = b.profile_option_name
AND a.profile_option_id = c.profile_option_id
AND a.application_id = c.application_id
AND c.last_updated_by = d.user_id(+)
AND c.level_value = e.user_id(+)
AND c.level_value = g.responsibility_id(+)
AND c.level_value = h.application_id(+)
ORDER BY b.user_profile_option_name,
C.level_id,
DECODE (
TO_CHAR (C.level_id),
'10001', 'Site',
'10002', NVL (h.application_short_name, TO_CHAR (C.level_value)),
'10003', NVL (g.responsibility_name, TO_CHAR (C.level_value)),
'10004', NVL (e.user_name, TO_CHAR (C.level_value)),
'Unknown'
);
Applications Database ID
APPS_DATABASE_ID
ERPTRN 5874
ANONYMOUS
IES : SID of Oracle Scripting Database IES_SCRIPTING_SID
ERPTRN 4729
ANONYMOUS
Site Name
SITENAME
ERPTRN 125
SYSADMIN
Two Task
TWO_TASK
ERPTRN 2687
ANONYMOUS
Table and corresponding columns:--------------------------------SELECT

Site

Site

Site

Site

Site

Site

Site

Site

DATA_TYPE, NULLABLE
FROM
ALL_TAB_COLUMNS
WHERE
TABLE_NAME = '&tablename'
AND COLUMN_NAME = '&columnname'
CRM Snapshot:-------------login to oracle@usnbka020 as oracle user.. Win03db606
set the PROD env
source PROD_usnbka020.env
go to cd /home/oracle/cronjobs/PROD
there u have xxul_crm_extract_to_cda.sh
U:\Project\Opentext Cluster\Work area\CRM Snapshot from PROD
ee location lo place chesthe ayp[othundi
Concurrent Processing - The Concurrent Manager Fails to Start on
GSM Enabled Due to DBMS_LOCK.Request ResultCall Failed to Establish ICM [ID 2455
63.1]
CM and Services List:---------------------SQL> col webhost format a25
SQL> select node_name, status, webhost, support_db d, support_web w, support_adm
in a, support_cp c, support_forms f from fnd_nodes;
NODE_NAME
-----------------------------DB01
APP2
AUTHENTICATION
CONCMGR
EXTRANET

S WEBHOST
- ------------------------Y
Y app2.xyz.com
Y concmgr.xyz.com
N extranet.xyz.com

D
Y
N
N
N
N

W
N
Y
N
N
Y

A
N
Y
N
N
N

C
N
Y
N
Y
N

F
N
Y
N
N
N

Two Node RAC Cluster with db instances fistst1 and fistst2


Two Node EBS Apps Tier with Server names: actfisdevappz02 & actfisdevappz03
Concurrent Manager Batch processing must run from Node 1 i.e. actfisdevappz02. A
t the moment, we have not confiugured PCP but are in the process of doing so soo
n.
SQL> select CONCURRENT_QUEUE_NAME from FND_CONCURRENT_QUEUES where CONCURRENT_QU
EUE_NAME like 'FNDSM%';
CONCURRENT_QUEUE_NAME
-----------------------------FNDSM_ACTFISDEVAPPZ02
FNDSM_ACTFISDEVAPPZ03

Drop table tips:


normal drop table <table_name> wont drop the table completely.
It will move the table to recyclebin.

SQL> drop table TAB_INCL1


2 ;
Table dropped.
SQL> drop table TAB_INCL2;
Table dropped.
SQL>
SQL> show recyclebin
ORIGINAL NAME
RECYCLEBIN NAME
---------------- -----------------------------TAB_INCL1
BIN$4L30Dwga5m/gQxsQMAqlRw==$0
TAB_INCL2
BIN$4L30Dwgf5m/gQxsQMAqlRw==$0
SQL> purge recyclebin
2 ;

OBJECT TYPE
-----------TABLE
TABLE

DROP TIME
------------------2013-07-05:00:27:40
2013-07-05:00:27:44

Recyclebin purged.
SQL>
SQL> show recyclebin
SQL> select * from tab;
TNAME
-----------------------------TAB_EXCL1
TAB_EXCL2
TAB_INCL1
TAB_INCL2
TAB_INCL3

TABTYPE CLUSTERID
------- ---------TABLE
TABLE
TABLE
TABLE
TABLE

SQL>
To completely remove a table from the tablespace, we use the DROP TABLE command
.
This command s format follows:
DROP TABLE [schema.]table_name [CASCADE CONSTRAINTS]
To recover a dropped table use below (10g onewards)
SQL> FLASHBACK TABLE books TO BEFORE DROP;

How to check the base languange in Oracle Apps.


select nls_language, installed_flag
from fnd_languages
where installed_flag in ('I','B') ;
Check the status of the CUPS:- Common Unix Printing System
-----------------------------[abnpqa@nkxl2cn07 ~]$ /etc/init.d/cups status
cupsd (pid 5960) is running...
[abnpqa@nkxl2cn07 ~]$
List all the printers:-----------------------

lpstats -a
Print a file from the Linux:----------------------------lpr -#2 -sP <Priter Name> <File Name>
Note: Here -# designated for no of prints
Viewing the print queue:------------------------lpq [-P <Printe Name>]
$ lpq
lp is ready and printing
Rank Owner
Job Files
active mwf
31 thesis.txt

Total Size
682048 bytes

Cancelling a print job:-----------------------lprm [-P <Printe Name>] <Job Number>


Note : This can be achieved from the lpq.
Default status :----------------[abnpqa@nkxl2cn07 ~]$ lpstat -t |grep -i apshzb002
device for apshzb002: ipp://10.48.3.172:631/printers/apshzb002
apshzb002 accepting requests since Mon 08 Jul 2013 09:46:36 AM CDT
printer apshzb002 is idle. enabled since Mon 08 Jul 2013 09:46:36 AM CDT
[abnpqa@nkxl2cn07 ~]$ lpstat -t |grep -i apsghc246
device for APSGHc246: ipp://10.48.3.172:631/printers/APSGHc246
APSGHc246 accepting requests since Mon 08 Jul 2013 09:46:35 AM CDT
printer APSGHc246 is idle. enabled since Mon 08 Jul 2013 09:46:35 AM CDT
[abnpqa@nkxl2cn07 ~]$
Pasta Overview Note: 420019.1
Note 356501.1 "How to Setup Pasta Quickly and Effectively".
Note 269129.1 "How to Implement Printing for Oracle Applications: Getting Starte
d" for general driver information.
Note 365111.1 "How to Setup Pasta for PCL Based Printers "
Note 356501.1 "How to Setup Pasta Quickly and Effectively",
Once you run the test for the pasta printer, Oracle Diagnostics will generate an
HTML file report to display the configuration details and status report for the
printers.
My Oracle Support (MOS) Technical References
NOTE:356501.1 - How to Setup Pasta Quickly and Effectively
NOTE:728077.1 - How to Setup IX Library Quickly and Effectively
NOTE:365111.1 - How to Setup Pasta for PCL Based Printers
NOTE:189708.1 - Oracle Reports 6i Setup Guide for Oracle Applications 11i
NOTE:240864.1 - Activating and Configuring IX Library
Note 60936.1 Step By Step Guide to Set Up a Printer in Oracle Applications
Note 99495.1 Oracle Applications Postscript Printing

Note
Note
Note
s
Note

112172.1 Oracle Applications Character Printing


152285.1 Building a Printer Initialization String for Oracle Applications
106186.1 How to Test an Initialization String Outside of Oracle Application
1014599.102 How to Test Printer Initialization Strings in Unix

1. Printer Issue
2. Oracle Application Issue
3. Printer Setup Issue
Agnes.Fung@ul.com
Co-ordinate Unix Team
Kevin Duffy
4:30 PM IST

Cell:8474172730

User
Fung Agnes
apbngb127
l1733085.log
APSGHC246
Investigated in the below lines:
1. Verified whether CUPS is running or not in the CM Node on BnPQA.
[abnpqa@nkxl2cn07 ~]$ /etc/init.d/cups status
cupsd (pid 5960) is running...
[abnpqa@nkxl2cn07 ~]$
2. Verified whether printer is installed and status in the OS.
ipp://10.48.3.172:631/printers/APSHZB002
Shenzhen
ipp://10.48.3.172:631/printers/APSGHc246
Shanghai
[abnpqa@nkxl2cn07 ~]$ lpstat -t |grep -i apshzb002
device for apshzb002: ipp://10.48.3.172:631/printers/apshzb002
apshzb002 accepting requests since Mon 08 Jul 2013 09:46:36 AM CDT
printer apshzb002 is idle. enabled since Mon 08 Jul 2013 09:46:36 AM CDT
[abnpqa@nkxl2cn07 ~]$ lpstat -t |grep -i apsghc246
device for APSGHc246: ipp://10.48.3.172:631/printers/APSGHc246
APSGHc246 accepting requests since Mon 08 Jul 2013 09:46:35 AM CDT
printer APSGHc246 is idle. enabled since Mon 08 Jul 2013 09:46:35 AM CDT
[abnpqa@nkxl2cn07 ~]$
Centreware Internet Services
exp system/Realitatem123 file=XREF_DATA_07-13-2013.dmp tables=intg_xref.xref_dat
a log=XREF_DATA_07-13-2013.log feedback=1000
imp system/Ulsoadev1 FROMUSER=intg_xref TOUSER=CUSTMDMPIP_XREF file=XREF_DATA_07
-13-2013.dmp tables=xref_data \
log=XREF_DATA_07-13-2013_DEV.log feedback=1000
col ORACLE_USERNAME for a13
col OS_USER_NAME for a10
col object_name for a40

PROMPT "PRESSS ENTER FOR ALL SIDs"


select a.ORACLE_USERNAME,a.OS_USER_NAME,a.SESSION_ID,b.object_name,c.NAME "RBS N
AME",
decode(a.LOCKED_MODE,1,'No Lock',2,'Row Share',3,'Row Excl',4,'Share',5,'Shr Row
Excl',6,'Exclusive',null) "LOCK MODE",
d.module
from v$locked_object a,dba_objects b,v$rollname c,v$session d
where a.OBJECT_ID=b.object_id
and a.XIDUSN=c.USN
and a.session_id=d.sid
and a.SESSION_ID like '%&sid%'
order by session_id
/
1020007.6
Checking locks in database
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_idORDER BY 1, 2, 3, 4;


Memory allocation per session:
SELECT NVL(a.username, (oracle) ) AS username,
a.module,a.program,Trunc(b.value/1024) AS memory_kb
FROM

v$session a, v$sesstat b, v$statname c

WHERE a.sid = b.sid AND


AND

c.name =

b.statistic# = c.statistic#

session pga memory AND

a.program IS NOT NULL

ORDER BY b.value DESC; n Monitor session details:


SELECT s.sid, s.status, s.process, s.schemaname, s.osuser, a.sql_text,
p.program FROM

v$session s, v$sqlarea a, v$process p

WHERE s.SQL_HASH_VALUE = a.HASH_VALUE


AND

s.SQL_ADDRESS = a.ADDRESS

AND
s.PADDR = p.ADDR
Find user privileges
SELECT LPAD(

, 2*level) || granted_role

USER PRIVS

FROM (SELECT NULL grantee, username granted_role

FROM dba_users WHERE username LIKE UPPER( %&uname% )


UNION SELECT grantee, granted_role
FROM dba_role_privs UNION
SELECT grantee, privilege FROM dba_sys_privs)
START WITH grantee IS NULL
CONNECT BY grantee = prior granted_role;
Find current SQL in database:
select u.sid, substr(u.username,1,12) user_name,
s.sql_text from
v$sql s, v$session u
wheres.hash_value = u.sql_hash_value
and
sql_text not like %from v$sql s, v$session u%
order by u.sid;

SELECT SID, SQL_ID, USERNAME, BLOCKING_SESSION FROM v$session WHERE BLOCKING_SES


SION IS NOT NULL;
SELECT DISTINCT(BLOCKING_SESSION), count(SID) FROM v$session WHERE BLOCKING_SESS
ION IS NOT NULL
GROUP BY BLOCKING_SESSION;
1588

659

SELECT sid, blocking_session, username, event


FROM v$session
WHERE blocking_session_status = 'VALID';
select sid || ',' || serial# from v$session where SID in (
SELECT sid
FROM v$session
WHERE blocking_session_status = 'VALID');
alter system kill session '3926,159' immediate;
alter system kill session '(select sid || '','' || serial# from v$session where
SID in (
SELECT sid
FROM v$session
WHERE blocking_session_status = ''VALID''))' immediate;

select sid || ',' || serial# from v$session where SID in (


SELECT sid
FROM v$session
WHERE blocking_session_status = 'VALID');
select 'alter system kill session ''' ||sid|| ',' || serial#|| ''' immediate;' f
rom v$session where SID in (
SELECT sid
FROM v$session
WHERE blocking_session_status = 'VALID');
enableLBR.sh
Change password for APPS, SYSTEM, SYS, SYSADMIN
SYS/SYSTEM
ORAPWD
XXUL/XXUL
APPSROBNPCONV
SOA WSDL

FNDCPASS apps/Fe771swh33l 0 Y system/Ulbnpconv1 SYSTEM APPLSYS welcome321


FNDCPASS apps/welcome321 0 Y system/Ulbnpconv1 USER SYSADMIN St33lca5e
DECLARE
status boolean;
BEGIN
dbms_output.disable;
dbms_output.enable(100000);
status := FND_PROFILE.SAVE('SITENAME','BNPCONV Cloned From PRERP on 07/12/2013',
'SITE');
IF status THEN
dbms_output.put_line( 'SITENAME - profile updated' );
ELSE
dbms_output.put_line( 'SITENAME - profile NOT updated' );
END IF;
commit;
END;
WSDL Setup ...

In addition to the above, please go through the following documents, it should b


e helpful:
Note: 261693.1 - Troubleshooting ORA-20100 on Concurrent Processing
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database
_id=NOT&p_id=261693.1
Note: 749491.1 - ORA-20100: Error: FND_FILE Failure, Unable To Create File
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database

_id=NOT&p_id=749491.1
Note: 460643.1 - Concurrent Requests Errors Out With ORA-20100: Error: FND_FILE
Failure
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database
_id=NOT&p_id=460643.1
Clear Cache in 11i and R12:---------------------------Its much easier to clear cache in R12 as pointed out by you. In 11i, simple clea
ring file $COMMON_TOP/_pages will clear cache and recompile all jsp files.

But in R12 if you clear cache $COMMOT_TOP/_pages then you will have to recompile
the jsp files manually. You can achieve this in two ways:
- perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p 2
Or
- Change the XML context file parameter s_jsp_main_mode to a value of recompile fro
m the default value of justrun and run autoconfig. JSP pages will be recompiled au
tomatically

Refer following notes


- How To Clear The Cache Using Functional Administrator? [ID 759038.1]:
- JSP Pages Hanging in R12 After Removing Cached Class Files in _pages [ID 43338
6.1]
MLS Lite:1077709.1 see section 4.1 Set Steps.

We have to do all four steps

1. From Oracle Applications Manager, go to License Manager and activate the desi
red language.
2. From the AD Administration Main Menu, choose the 'Maintain Applications Datab
ase Entities' option and then the 'Maintain Multi-lingual Tables' task.
3. Run the message synchronization script $FND_TOP/patch/115/sql/AFMSGSYNC.sql T
his script asks for a language code to be entered, and synchronizes the new lang
uage data with the base language in the message dictionary. For a full list of l
anguage codes, see Appendix B of My Oracle Support Knowledge Document 393861, Gl
obalization Guide for Oracle Applications Release 12.
4. Shut down and restart the application tier services.
Remote connection to DB:
[applerp@usnbka338p install]$ sqlplus apps/Fe771swh33l@nkx101-vip:1521/PRERP
[applerp@usnbka338p install]$ sqlplus apps@\"nkx101-vip.global.ul.com:1521/PRERP
\"
jdbc:oracle:thin:@(DESCRIPTION =(ENABLE =BROKEN)(ADDRESS_LIST= (LOAD_BALANCE=YES
) (FAILOVER=YES) (ADDRESS=(PROTOCOL=tcp)(HOST=nkx202-vip.global.ul.com)(PORT=152
1))(ADDRESS =(PROTOCOL=tcp)(HOST=nkx203-vip.global.ul.com)(PORT=1521))) (CONNECT

_DATA= (SERVICE_NAME=SOADEV)))
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=nkx2-s
can.global.ul.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=SOADEV)(INSTANCE_NAME
=SOADEV1)))

You might also like