Pular para o conteúdo principal

Postagens

Clear Alerts on Oracle Grid

Generate SQL to remove alerts from specific targets: select t.target_name , t.target_type , collection_timestamp , message , 'exec em_severity.delete_current_severity(''' || t.target_guid || ''',''' || metric_guid || ''',''' || key_value || ''')' em_severity from mgmt_targets t inner join mgmt_current_severity s on t.target_guid = s.target_guid where target_name like '&TARGET'; Sample output: TARGET_NAME TARGET_TYPE COLLECTION_TIMESTAMP MESSAGE EM_SEVERITY Denilson host 10/3/2010 12:03:30 PM Memory Utilization is 82.46%, crossed warning (80) or critical (95) threshold. exec em_severity.delete_current_severity('4D11D922179D4A9532397244E91478AE','86821B5F0CE858D6E4A7F7390E88B73C',' ')

Manage Grid Jobs using PL/SQL

DECLARE BEGIN /* Modify this query for whatever jobs you want to suspend, e.g. job_name like 'RMAN_%', or job_name like 'BACLUP%' */ FOR jguid IN (SELECT job_id FROM mgmt_job WHERE job_name like 'BACKUP_%' AND job_owner = 'SYSMAN' AND parent_job_id is null AND is_library = 0) LOOP BEGIN -- to suspend JOB mgmt_job_engine.suspend_job(jguid.job_id); -- to resume JOB mgmt_job_engine.resume_job (jguid.job_id); dbms_output.put_line(jguid.job_id); END; END LOOP; END; / * see mgmt_job_engine package for more options and details.

adadmin: error while loading shared libraries: libclntsh.so.10.1 EBS R12.1

[oracle@mumanga ~]$ adadmin adadmin: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory Solution: [oracle@mumanga ~]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib/ [oracle@mumanga ~]$ adadmin Copyright (c) 2002 Oracle Corporation Redwood Shores, California, USA Oracle Applications AD Administration Version 12.0.0

Remap Keys on Oracle EBS

The file "fmrweb.res" contains a keyboard map. This map is used by Oracle Forms Server to detect key strokes entered in the user's browser and map them to Forms actions. The map assumes that the keyboard is similar to a VT100 keyboard. Therefore to change / customize mapping, one needs to modify the fmrweb.res file located under: + R12: $ORACLE_HOME/forms/admin/resource/US + R11i: $ORACLE_HOME/forms60/admin/resource/US Note: One needs to bounce the forms services for changes to take effect In case of multiple languages modify the appropriate mapping files (fmrweb.res) for that language E.g: "fmrweb .res" and "fmrpcweb .res", where is the Oracle language code.

Add Responsibility to USER using pl/sql - EBS

SELECT FAV.APPLICATION_SHORT_NAME, FAV.APPLICATION_NAME,FRV.RESPONSIBILITY_KEY, FRV.RESPONSIBILITY_NAME FROM FND_APPLICATION_VL FAV, FND_RESPONSIBILITY_VL FRV WHERE FRV.APPLICATION_ID=FAV.APPLICATION_ID ORDER BY FRV.RESPONSIBILITY_NAME Using fnd_user_pkg: Input (Mandatory) -- username: User Name -- resp_app: Application Short Name -- resp_key: Responsibility Key -- security_group: Security Group Key -- description: Description -- start_date: Start Date -- end_date: End Date Sample Usage: set serveroutput on BEGIN fnd_user_pkg.addresp ('Username','OE','ORDER_ENTRY_SUPER_USER','STANDARD','Responsability added by Denilson Using PL/SQL',SYSDATE, null); COMMIT; DBMS_OUTPUT.put_line ('Responsibility Added Successfully'); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line('Responsibility is not added due to'); DBMS_OUTPUT.PUT_LINE('ERROR: ...

Invisible Indexes

11G has a new feature called Invisible Indexes. An invisible index is invisible to the optimizer as default. Using this feature we can test a new index without effecting the execution plans of the existing sql statements or we can test the effect of dropping an index without dropping it. SQL> create table teste_ii (a number, b varchar2(10)); SQL> create index idx_invisible on teste_ii(id); begin for i in 1..20 loop insert into teste_ii(a,b) values(i,'TESTE'||i); end loop; end; / commit; SQL> select * from teste_ii where a=10; A B ---------- ---------- 10 TESTE10 SQL> explain plan for 2 select * from teste_ii where a=10; Explained SQL> sELECT * FROM TABLE(dbms_xplan.display); PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------- Plan hash value: 726495292 -------------------------------------------------------------------------------- | Id | Operation | Name | Rows |...