Professional Documents
Culture Documents
'_' -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
OACORE OC4J
Forms OC4J
OAFM OC4J
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:
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
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;
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
Note
Note
Note
s
Note
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
(oracle) ) AS username,
Row-X (SX) ,
dba_objects a,v$locked_object b
c.name =
b.statistic# = c.statistic#
s.SQL_ADDRESS = a.ADDRESS
AND
s.PADDR = p.ADDR
Find user privileges
SELECT LPAD(
, 2*level) || granted_role
USER PRIVS
659
_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
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)))