Use of SQL fetchlet to create a custom management plug-in

Hi,
I would appreciate if you anyone could help me out on this:
I need to fetch some data from EMF tables and create a custom Management plug-in in OEM so that it can be monitored from OEM itself. For getting the data from database table i am using SQL fetchlet coz it provides the facility to use SQL statement in it. Following is the code i have developed in target-type.xml file.
<TargetMetadata META_VER="1.0" TYPE="emf_filer">
<Display>
<Label NLSID="emf_filer">Error Management Filer</Label>
</Display>
<Metric NAME="emf_filer" TYPE="TABLE">
<Display>
<Label NLSID="emf_filer_resp">Response</Label>
</Display>
<TableDescriptor>
<!-- <ColumnDescriptor NAME="tcpPing" TYPE="NUMBER" >
<Display>
<Label NLSID="netapp_filer_resp_tcpPing">TCP Ping, Milliseconds</Label>
</Display>
</ColumnDescriptor> -->
<ColumnDescriptor NAME="Status" TYPE="NUMBER" >
<Display>
<Label NLSID="emf_filer_resp_status">Status</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="PROGRAM_NAME" TYPE="STRING" >
<Display>
<Label NLSID="PROGRAM_NAME">Program Name</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="PROGRAM_TYPE" TYPE="STRING" >
<Display>
<Label NLSID="PROGRAM_TYPE">Program Type</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="RICEW_ID" TYPE="STRING" >
<Display>
<Label NLSID="RICEW_ID">Rice Id</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Request_id" TYPE="NUMBER" IS_KEY="TRUE" >
<Display>
<Label NLSID="Request_id">Request Id</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="EBIZ_INSTANCE_NAME " TYPE="STRING" >
<Display>
<Label NLSID="EBIZ_INSTANCE_NAME">Instance Name</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="SQL">
<Property NAME="MachineName" SCOPE="INSTANCE">MachineName</Property>
<Property NAME="Port" SCOPE="INSTANCE">Port</Property>
<Property NAME="SID" SCOPE="INSTANCE">SID</Property>
<Property NAME="UserName" SCOPE="UserName">apps</Property>
<Property NAME="password" SCOPE="password">password</Property>
<Property NAME="ServiceName" SCOPE="INSTANCE">ServiceName</Property>
<Property NAME="STATEMENT" SCOPE="INSTANCE">
BEGIN
SELECT PROGRAM_NAME, PROGRAM_TYPE,
RICEW_ID,REQUEST_ID, EBIZ_INSTANCE_NAME FROM XX_EMF_MESSAGE_HEADER WHERE STATUS = 'ERROR' AND RICEW_ID = 'INT-DL019';
END;
</Property>
<!-- <Property NAME="SQLINPARAM1" SCOPE="ENV">HOSTNAME</Property>
<Property NAME="SQLOUTPARAMPOS" SCOPE="GLOBAL">2</Property>
<Property NAME="SQLOUTPARAMTYPE" SCOPE="GLOBAL">SQL_CURSOR</Property>-->
<Property NAME="NUMROWS" SCOPE="GLOBAL">40
</Property>
</QueryDescriptor>
<ExecutionDescriptor>
<GetTable NAME="emf_filer"/>
<GetView NAME="emf_View" FROM_TABLE="emf_filer">
<Column NAME="PROGRAM_NAME"/>
<Column NAME="PROGRAM_TYPE"/>
<Column NAME="RICEW_ID"/>
<Column NAME="REQUEST_ID"/>
<Column NAME="EBIZ_INSTANCE_NAME"/>
<Filter COLUMN_NAME="REQUEST_ID" OPERATOR="GT">0</Filter>
</GetView>
</ExecutionDescriptor>
<InstanceProperties>
<InstanceProperty NAME="UserName" CREDENTIAL="TRUE" OPTIONAL="FALSE" NEED_REENTER="FALSE" HIDE_ENTRY="FALSE">
<Display>
<Label NLSID="UserName_emf">Username</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="password" CREDENTIAL="TRUE" OPTIONAL="FALSE" NEED_REENTER="TRUE">
<Display>
<Label NLSID="password_emf">Password</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="MachineName" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="MachineName_emf">Listener Machine Name</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="Port" CREDENTIAL="FAL
My doubt here is:
As per Oracle it is importent to use response matrics with status column. How can i accomodate Response matrics with this code. what will be the columns except Status that i need to mention? if i use just one matrics i.e response then what will i use in in FROM clause in ExecutionDescriptor [<GetView NAME="emf_View" FROM_TABLE="emf_filer">]? i wuld appreciate if anyone could clarify my issues.
Thanks for your help.
Regards,
AS

That is what i am trying to ask..as i will b using 2 dfifferent matrics so i will have to use 2 diffrent QueryDescriptors one for Response matric and one for other one. Now following QueryDescriptor will be added in other(Not Response) matric then what should i add in QueryDescriptor in Response matric?
Query Descriptor for matric other than "Reposnse":
QueryDescriptor FETCHLET_ID="SQL">
     <Property NAME="MachineName" SCOPE="INSTANCE">MachineName</Property>
     <Property NAME="Port" SCOPE="INSTANCE">Port</Property>
     <Property NAME="SID" SCOPE="INSTANCE">SID</Property>
     <Property NAME="UserName" SCOPE="UserName">UserName</Property>
     <Property NAME="password" SCOPE="password">password</Property>
     <Property NAME="ServiceName" SCOPE="INSTANCE">ServiceName</Property>
     <Property NAME="STATEMENT" SCOPE="GLOBAL">
          SELECT PROGRAM_NAME,
                         PROGRAM_TYPE,
                         RICEW_ID,REQUEST_ID,
                         EBIZ_INSTANCE_NAME
          FROM XX_EMF_MESSAGE_HEADER WHERE STATUS = 'ERROR' AND RICEW_ID = 'INT-DL019';
          </Property>
</QueryDescriptor>
what should be the QueryDescriptor for Response matric?? Will it be same or different?
Thanks for your help.
Regards,
AS
Edited by: user9959418 on Oct 31, 2008 1:10 PM

Similar Messages

  • Using Apache Commons HTTPClient to create a custom socket for Java mail

    Does anyone know how to use Apache Commons HTTPClient to create a custom socket for Java mail. This is necessary for me to use NTLM authentication

    JavaMail doesn't use HTTP.
    If you want to add support for NTLM authentication to one of the standard protocols,
    your best bet is to create a SASL provider, although note that only JavaMail's IMAP
    provider uses SASL currently. The other protocols should add SASL support, but that
    hasn't been done yet.

  • Error using the SQL conversion tool for Hand Held Management 7

    This is for Zenworks 7 HandHeld Management.
    I can't seem to find any mention of the SQLConv.exe tool in the
    documentation for Hand Held Management??
    Does any one have any?
    Also when using this tool I get the following error message:
    Error: DB-29 Database Message (1 of 2)
    Thursday, October 05, 2006
    An error occurred while executing the SQL command <CREATE
    DATABASE [ZENHM]>.
    Error: GEN-2 General Message (2 of 2)
    Thursday, October 05, 2006
    A database exception was caught: <>.
    ODBC Return Code: <-2>
    Return Code Meaning <>
    Additional Information: <>

    cactus,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Convert custom management plug-in in OEM 11g to OEM 12c compatible plug-in

    Hi All,
    We have a custom plug-in developed and deployed in OEM 11g. We are planning to move to OEM 12c(12.1.0.4) and installing OEM 12c(fresh install) in a new host instead of migrating existing 11g to 12c as part of upgrade process.
    Now question is what are the options if I want to use existing 11g custom plug-in in OEM 12c ? As I understand 11g plug-ins are jar file but OEM 12c plug-ins are OPAR files.
    Can we export plug-in from OEM 11g and import directly in OEM 12c or if there are any steps to conver 11g plugin to 12c plugin before importing it in 12c.
    Please suggest the options available without re-developing the plug-ins for OEM 12c.
    Thanks

    To overwrite and update your current custom plug-in update that is stored in a repository, use the overwrite option.
    $emcli create_custom_plugin_update
    -agent_name="agent_name"
    -plugin_id="plugin_id"
    [-overwrite]
    This command creates and imports a custom plug-in update from an existing Management Agent where the selected plug-in is deployed. The custom plug-in update will be used for all subsequent plug-in deployments on any Management Agent, in place of Oracle supplied versions.
    Custom plug-in update is created as per plug-in type. If a custom plug-in update is created, and after three days, a patch is applied, in order to include the patch, the custom plug-in update will have to be created again.
    $emcli list_custom_plugin_updates
    Please refer the below doc for more info..
    http://docs.oracle.com/cd/E24628_01/doc.121/e24473/plugin_mngr.htm#CJGCHGIH
    Regards
    Krishnan

  • Couldnt create management plug in archive..

    When i tried to create a custom management plug in, i got the given error...
    Warning: -jar not understood. Ignoring.
    Exception in thread "main" java.lang.NoClassDefFoundError: ..emCLI.jar....
    I specified metadata,collection and a .sql report file for the jar.
    what could be the problem?

    If you type "emcli help add_mp_to_mpa" it will give you a description of all the inputs that are expected and how to use them. -jar is not a valid option, which is why you're getting an error.
    If you address these questions on the Extensibility forum, you will get a more prompt response.

  • How to create a counter using Oracle SQL Developer?

    Is there any way to create a counter using Oracle SQL Developer to create the below scenario. Meaning it will recorded down the name of user and ID and time and the date they login.
    Library portal home statistics shows how many users (outside and within the campus) visit the library portal.
    Page Access statistics is recorded on an hourly basis. Users may select the statistics by
    yearly (statistics displayed by all months in the selected year)
    monthly (statistics displayed by all days in the selected month)
    daily (statistics displayed by all hours in the selected day)

    I'm giving here one basic post - hope this will solve your problem --
    SQL>
    SQL>
    SQL> create table audit_info
      2   (
      3     usr        varchar2(50),
      4     log_time   timestamp(6)
      5    );
    Table created.
    SQL>
    SQL>
    SQL>  create table err_log
      2     (
      3       log_cd      varchar2(20),
      4       log_desc    varchar2(500)
      5     );
    Table created.
    SQL>
    SQL>
    SQL>   create or replace procedure ins_err(errcd   in  varchar2,
      2                                        errnm   in  varchar2)
      3    is
      4      pragma autonomous_transaction;
      5    begin
      6      insert into err_log values(errcd,errnm);
      7      commit;
      8    end;
      9  /
    Procedure created.
    SQL>
    SQL>
    SQL>   create or replace procedure ins_aud(ud   in varchar2,
      2                                        unm  in varchar2)
      3    is
      4      pragma autonomous_transaction;
      5    begin
      6      insert into audit_info values(ud,unm);
      7      commit;
      8    exception
      9      when others then
    10        ins_err(sqlcode,sqlerrm);
    11    end;
    12  /
    Procedure created.
    SQL>
    SQL>
    SQL>
    SQL> create or replace trigger log_odsuser1
      2   after logon on odsuser1.schema
      3   begin
      4     ins_aud('ODSUSER1',sysdate);
      5   exception
      6     when others then
      7       ins_err(sqlcode,sqlerrm);
      8   end;
      9  /
    Trigger created.
    SQL>
    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Jun 12 12:21:09 2007
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    SQL>
    SQL>
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL>
    SQL> select * from audit_info;
    USR
    LOG_TIME
    ODSUSER1
    12-JUN-07 12.00.00.00000000 AMHope this will solve your purpose.
    Regards.
    Satyaki De.

  • HOW TO CALL ANOTHER PAGE USING PL/SQL PDK?

    Hi,
    I am using pl/sql pdk to create portlets. When I need to call
    another page I am using wwpob_page.show(p_pageid) but instead it
    displays File Download wizard.
    Anyone knows workaroud for this?
    Are there any other ways to call other pages with portlets from
    pl/sql portlets?
    Thank you,
    ya

    Hello Yuri
    If you want to call any component of an application from PL/SQL
    you have to take a look to the manage of the component and then
    to Call Interface (Show), There you can see the way to call the
    component, but if you want to call a Page the way I found to do
    it, even thought it is not the best, was put an url like
    this /pls/portal30/url/page/PAGE_NAME on the link.
    I hope this could help you, if you dont understand please let me
    know and I'll give you a hand
    Ana Maria

  • How can i create a custom control, indicator

    This is FredFred,
    How can i create a custom control switch with 3 or more options,
    OFF
    ON
    STANDBY
    Other than rocker, slide, or toggle switch, are there other switches that we can use, hence, the question of creating a custom switch.
    Also, is there a way to create an indicator with two options. Enclosed is a jpeg with an example of what i need
    Thanks in Advance
    Attachments:
    sample switches_displays.bmp ‏720 KB

    Hello.
    Boolean controls can only have 2 possible values, true or false, and there is no way to add more values to them.
    If you need more values, then you must use a numeric control (or a string, but I tend to like numerics better, although strings could be just as useful).
    There are several types of numeric controls you could use to provide 3 or more options. Attached is a VI which shows a ring, a knob, and a slide each with 3 possible values. In your code, you would then perform different actions depending on the numeric value of your control.
    Hope this helps,
    Alejandro
    Attachments:
    NumericsWith3Options.vi ‏14 KB

  • How to create new Custom XML Report without using Form Builder

    Hi,
    What are the steps to create new Custom XML Report without using Report Builder ?
    Thanks and Regards,
    Abhi

    Hi,
    Steps we now follow
    1)Create Data Model in Reports Builder
    2)Create xml
    3)Insert xml in Publisher to build Fomat
    4)FTp rdf
    5)Create Data Definition and Template
    6)Create executable and Concurrent Program
    Is there any way we can build reports without use of Report Builder ? By writing PL SQL Package for Before Report and After Report etc ...
    Thanks and Regards,
    Abhijit Rode

  • Can I create a file using pl/sql code in application server ?

    Hi
    I wanted to create a file(any kind of file .txt .csv .exe etc..) using pl/sql code in application server?
    Please help me with an example...in this regard
    Regards
    Sa

    864334 wrote:
    I wanted to create a file(any kind of file .txt .csv .exe etc..) using pl/sql code in application server?And how is this "file" to be delivered?
    Files can be created by PL/SQL code and stored in the Oracle database as CLOBs. This a fairly easy and robust process. It runs entirely in the database. It conforms to transaction processing. The "file" (as a CLOB) resides in the database and can thus be secured via database security, is part of database backups and so on.
    The basic issue is how to deliver the contents of the CLOB to the user. If via FTP, then the database can directly FTP the contents of the CLOB to the FTP server as a file. If via HTTP, the database can deliver the CLOB as a HTTP download directly to the web browser.
    If the client is Java or .Net, then the CLOB contents can be delivered via SQL or DBMS_LOB or a custom PL/SQL interface.
    In such cases, there is no need to step outside the secure and flexible database environment and create a physical o/s file in the wild (outside the controls of database security, data integrity and transaction processing). This is thus recommended and is the preference.

  • Create PDF file using PL SQL

    Hello All:
    I have an requirement of generating a PDF file using Oracle PL SQL program. Can anyone please let me know the procedure/code of doing this?
    Thanks,
    k Ramesh Gupta

    I have steps to generate Excel sheet output, apply appropriate content-type for PDF in the PL/SQL written below, to get the same in PDF. i suppose it should be application/pdf
    1. Create a custom DAD if required using Enterprise Manager Console of MidTier for HTTP Server or use Portal DAD itself to implement the solution.
    2. Create a new procedure (a webdb solution) to stream the HTML for the excel sheet report which will be downloaded.
    a. Login to Portal schema through SQL*Plus or the respective DAD based schema if custom DAD is created. (below example is created in custom DAD - 'scott').
    SQL>CREATE OR REPLACE
    PROCEDURE generateCsv
    as
    cursor p_emp is select * from PORTAL_DEMO.EMP;
    begin
    owa_util.mime_header( 'application/vnd.ms-excel', False ); -- Here change the content-type to PDF Format accordingly
    htp.print('Content-Disposition: attachment;filename="pvasista.csv"');
    owa_Util.Http_Header_Close;
    for v_emp_cur in p_emp
    LOOP
    htp.p (v_emp_cur.ename || ',' || v_emp_cur.deptno || chr(13));
    END LOOP;
    end;
    SQL> grant execute on generateCsv to public;
    For education purpose getting the report of employee and deptno of al employees from PORTAL_DEMO.EMP table. Implement the necessary query/ Business Logic accordingly.
    b. Now access http://midtier_host:port/pls/dad_name/generateCsv, will download a .csv based excel file report as shown in the screenshot below,
    3. Open the Portal Page where the link is to be added, createa URL Item Link and add the above URL, select option "Open in new browser window"
    4. It can also be enhanced to have filtering enabled on the report by using Portal Form using Option, "Form based on stored procedure" and selecting the above stored procedure.

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • Create a custom web template using VS 2012 with web features,site features sections applied

    hi,
     Want to create a  custom web template using VS 2012  in my SP 2013 environment.  i know "Vesku" has posted a great artice on this [  based on prev. version of SP].
    here -
    http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx
    i am  looking for a code based article  which has step by step process which provides how to add the site features, web features and attach the eventreceivers etc etc on sitecollection creation when i apply this template from central admin. 
    can anyone provide me any links / any source how to create a custom web template with one / two  custom features -  site features element and web features element , / master page etc ....
    I am stuck with this. as part of my reqmnt, i need to create a webtemplate with all the customlistinstances, custompagelayouts, custom masterpages, custom appln pages, custom web parts.
    help is appreciated !
    Das

    The problem is that Web Templates are deployed to a gallery in a site collection and aren't available in Central Admin when creating a new site collection.  YOu have to create the site collection without choosing a template and then choose your web
    template when you first access the root site in the site collection.  Here's an article that discusses that process here:
    http://sharepointchick.com/archive/2011/02/10/using-web-templates-to-create-site-collections.aspx
    Other than that Vesa's article is still the best one and works essentially the same in 2013 as it does in 2010.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How do I create a custom screen to show after a person logs in we are using windows 7

    I have been asked to create a custom welcome screen that would load after a person logs into their computer. This screen is to have links to applications.  But I need this to show after they log in and before they see their desktop. and I
    need it to be full screen size.
    this is mandatory:
    I need this to show up AFTER people have logged in, and b4 they see their Desktop.  auto adjustment to fill the screen  and the screen will have multiple images with them being hyperlinks to the various applications. The kicker is we
    are running windows 7.  Of course one of the links will go to the desktop.(basically shut down the window screen)
    I seem to recall there is a way of doing this using group policy to trigger a screen and possible using HTA or VB6 method or a scripted page but I'm not sure how to accomplish this...
    This is coming from upper upper management  and they have it mocked up in access 2013.
    How do I do this or even accomplish this screen for windows 7.
    PS:
    I realize that windows 8/8.1 has this type of thing built in, but the company is NOT ready for windows 8/8.1

    I built a System Message HTA for my previous employer that was used in a computer lab setting. It was a nice way to inform the users about things happening in the lab, as well as a nice way to ensure people knew who to contact if there were problems.
    The HTA lived on a network UNC and each computer had a shortcut to the HTA in their All Users Startup folder (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup). While you could push the shortcut with GPP, likes the others recommended, that's
    about all you should do with Group Policy. This was neat - I had the HTA run custom .cmd files (in a hidden window) when it loaded (the Windows_onLoad subroutine) and then when it was closed by the user (button press that called an ExitProgram subroutine).
    This allow me to capture who was logged on, how long the HTA was open, and what computer they were using. In a computer lab such as that one, it was nice to have additional way to track who was using what computer and when. Good luck and let us know if there
    are any more questions - I really enjoyed that project.
    Edit: Added additional info.

Maybe you are looking for