Prevented from creating User Defined Metric

I am using Oracle Enterprise Manager 10g Database Control.
When I try to create a User Defined Metric I get a screen that says:
Information:
You cannot create a User Defined Metric because host <my_host> is currently unavailable. Try again later when it becomes available.
I cannot find any information on how to resolve this.

In case anyone else is looking for this answer - at least what worked for us.
It seems Oracle is parsing the "select TO_CHAR(SID,'99999'), other_column from ...." by comma instead of by what the output is coming back with. So in this case it thinks the output has three columns because of the two commas in the select clause. So we just went with an inline view similar to select a.sid, a.other_column from (select TO_CHAR(SID,'99999'), other_column from .... ) a and that worked for us. Assuming its a version thing since the non-inline view worked for someone else. We're on 11.1 of the oms.

Similar Messages

  • How to create user defined metrics for SQL Server target?

    The customer is not able to create a user defined metrics for SQL Server target.
    This is very important for him to use this product.
    He is asking how to create user defined metrics?
    I sent him Note 304952.1 How to Create a User-Defined SQL Metric in EM 10g Grid Control
    But it would work for an Oracle DB, but his target is SQL Server DB
    Not able to find the "User-Defined Metrics" link from Database home page.
    How to create user defined metrics for SQL Server target?

    http://download-uk.oracle.com/docs/cd/B14099_19/manage.1012/b16241/Monitoring.htm

  • Is it possible to create user defined metrics in Grid Control 10.2.0.1 ?

    Hi,
    Is it possible to create user defined metrics(my SQL statement) in Grid Control 10.2.0.1
    (not 10.2.0.3) Linux/AIX ?
    Łukasz

    I am not sure if I am correct, but for reasons best known to them, Oracle replaced rather than add.
    Even if you want to do a smart search using the part# (e.g B16242-03) in oracle.com, you get a whole list of results, but when you click on them, you get http://www.oracle.com/errors/404.html
    I found this copy http://www.oracle.polcreate.pl/em.102/b16242/toc.htm

  • 10g EM Creating User-Defined Metrics

    I am trying to create some user-defined metrics to get a threshold for our ASM disk group used space percentage, archiving used space percentage, and so on.
    I have read the article 'System Monitoring Using Oracle Enterprise Manager 10g Release 2' on link of http://www.oracle.com/technology/obe/obe10gemgc/monitoring/monitoring.html. It has a screen shot for Related Link of User-Defined Metrics, but I don't have it on my 10g EM (which is version 10.2.0.2).
    I would like to know if any one have any idea telling where I can find it?

    You create User Defined Metrics (UDM) by selecting the User Defined Metrics link on the Database page. The type of UDM you create will dpend on what result you are expecting. For instnace, you want to be alerted when the balance on an account falls below zero (overdraft). So you can use an SQL query that returns a number which is checked against the threshold you set.

  • Problem creating user-defined metric for Database

    I am logged in to EM/Grid Control as SYSMAN, any user with superadmin privileges or a 'normal' user with operator/full privileges for my database target. When I go to set up user-defined metrics for the target db I get the following warning "You will only be able to view User Defined metrics because you do not have Operator Privileges on host <db target name>". The Create button is disabled.
    Can anyone offer any advise on where to identify the privilege problem?
    Thanks

    Well I did it with a host UDM calling a local script (which will be installed on shared drives for the development/test and production systems).
    The local script cats the /var/opt/oracle/oratab file eliminating lines beginning with # or $ then takes the second argument of each line and loops through all entries using a checkit procedure. The checkit procedure determines if the appropriate log directores exist for the oracle home and does a find on the diretory looking for alert*.log and *.trc. If there are any then global variables get updated with the count and directory name.
    There is an if statement before exit that checks of the count of files is greater than zero and write an appropriate em_result and em_message depending on the results.
    I then created the UDM in EM to call this script and check for critical/warning thresholds.
    Regards
    Tim

  • Environment variables in a OS User-Defined Metric Page

    I'm creating an OS-based User-Defined Metric in a Grid Control through a perl script
    How can I pass my own environment variables in the script setting the User-Interface Element- Environment, where for example i can specify var1=%perlBin% var2=%scriptsDir% etc ?
    The description in the User-Defined Metric Page says:
    Environment
    See Available Properties box for values you can assign to environment variables. Enter as space-separated list: var1=prop1 var2=prop2
    -r
    Josh

    That's exactly correct, you can specify them in the Environment field as defined here:
    Table 15-3 Create User-Defined Metric Page: Definition
    User-Interface Element      Description
    Metric Name
    Metric name identifying the user-defined metric in the Enterprise Manager user interface. This name must be unique for all User-Defined Metrics created on that host.
    Metric Type
    Type of the value returned by the user-defined script. Choose "NUMBER" if your script returns a number. Choose "STRING" if your script returns an alphanumeric text string.
    Command Line
    Enter the complete command line entry required to execute the user-defined script. You must enter the full command path as well as full path to the script location. For example, to run a Perl script, you might enter something like the following in the Command Line entry field:
    /u1/bin/perl /u1/scripts/myScript.pl
    The content of the Command Line is passed as a literal string, so you may use any syntax, special characters, or parameters allowed by your operating system.
    Environment
    Optional. Enter any environmental variable(s) required to run the user-defined script. A list of predefined properties that can be passed to your script as variables is listed in the Available Properties box. You may also specify your own environment variables. Multiple variables can be defined as a space-separated list.
    Example: If your script uses three variables (var1, var2, var3) where var1 is the location of the Perl directory (predefined), var2 is the directory where your Perl scripts are stored (predefined), and var3 is an Oracle home, your entry in the Environment text entry field would appear as follows:
    var1=%perlBin% var2=%scriptsDir% var3=/u1/orahome10
    For example, simply set var1=/this/is/the/directory/i/want/to/have/set/in/var1
    then var1 will be /this/is/the/directory/i/want/to/have/set/in/var1

  • Creating user defined pay items in a complex PO which will be created from an Approved requisition

    Hi,
    We want to create user defined pay items in a complex PO which will be created from an Approved Requisition.
    User will select the approved Req. through WebADI and update the pay Items which will be uploaded and a complex PO will be created with user defined Pay Items.
    Approach 1:
    The API po_interface_s.create_documents is running good but there is one issue with this API as below.
    When we add user defined pay items to the po_lines_locations interface table against a line they are also getting added to the complex PO correctly.
    But the issue is coming when the API is creating default shipment lines and distribution which we dont want.
    Is there any way to stop creating the default pay items and distributions?
    We only want the shipments we have entered in the po_lines_locations interface.
    We can delete the lines from the PO_line_locations and po_distributions base tables for the default lines but that will be the last option to do delete on base tables.
    Approach 2:
    We can also do the same with the open PO import interface but it is not linking the complex PO to the approved requisition from which it is created.
    Oracle mentioned that this is a future enhancement and this functionality is not available in standard PO import prog.
    We are trying for Approach 1 so any suggestions/solutions are appreciated to achieve the requirement.
    Regards,
    Sanket

    UDT cannot be created in sbo-common. You may create new db and work with table in this db (but it will be not UDT, but standard sql table), or create new company db only for this purposes and create UDT there.

  • Error creating user defined tables: Ref count (-1120)

    Hi all !
    I have to create user defined tables per code, so I wrote <b>2 main functions</b>, first <i>to create a table</i> (with TableName,TableType and TableDescription properties)and  and <i>second to add fields</i> (to a certain table which is sent as parameter).
    I call these functions to create multiple tables. For the first 6 tables it works totally ok. But beginning from the 7th table it gives that "<b>Ref count for this object is higher then 0.</b> " (-1120) error. All parameters are ok just as the first 6 tables.
    Found such an explanation like below in help files.
    <i>The DI API allows only one instance of a meta data object at a time. This maintains data integrity by preventing any manipulation of a business object while modifying the object's user fields. Therefore, verify that no other DI object is active except the meta data object.</i>
    But why do I get such an error after sixth call of the function (but not beginning from the second table )?

    Gül,
    Have you tried doing some grbage collection?
    Search for a topic: "Add Usertables and Fields while having a recordset"
    HTH
    Juha

  • User-Defined Metric: Number Format

    Hi,
    I created an User-Defined Metric, but the result of my SQl command is a little bit strange.
    select sid,min
      from (select username,
                   osuser,
                   machine,
                   sid,
                   serial#,
                   round(last_call_et/60) min,
                   module
              from v$session s
             where username is not null
               and machine like (select machine || '_%' from v$session where sid = 1)
               and last_call_et>(120*60)
               and status='ACTIVE'
               and lockwait is null
             union
            select username,
                   osuser,
                   machine,
                   sid,
                   serial#,
                   round(last_call_et/60) min,
                   module
              from v$session s
             where username is not null
               and machine not like (select machine || '_%' from v$session where sid = 1)
               and last_call_et>(480*60)
               and status='ACTIVE'
               and lockwait is null) sess
    where nvl(sess.module,'any') not in ('XDP_Q_EVENT_SVC','XDP_Q_IN_MSG_SVC')
    ;and my result:
    Key             Value
    32.000000     1,222
    40.000000     1,186
    73.000000     1,194
    410.000000     1,190
    2115.000000     2,178
    400.000000     1,224
    1766.000000     1,220How can I modify my SELECT statement that the Key values don't contain the 0 and the point?
    So I would like this format:
    Key     Value
    32     1,222
    40     1,186
    73     1,194
    4100     1,190
    2115     2,178
    400     1,224
    1766     1,220

    In case anyone else is looking for this answer - at least what worked for us.
    It seems Oracle is parsing the "select TO_CHAR(SID,'99999'), other_column from ...." by comma instead of by what the output is coming back with. So in this case it thinks the output has three columns because of the two commas in the select clause. So we just went with an inline view similar to select a.sid, a.other_column from (select TO_CHAR(SID,'99999'), other_column from .... ) a and that worked for us. Assuming its a version thing since the non-inline view worked for someone else. We're on 11.1 of the oms.

  • Is it possible to create user defined control in labview

    in .net we can create user defined contol in which i can put more then one control and,, can use it as single control when needed,, but,, how this possible in labview,,
    actually in my program i have a tab control and,, in that tab control there are 8 pages,, now there are 5 different kind option selection for each page lets say "a" "b" "c" "d" "e",,,,,.,. so,, when i select "a" configuration for tabpage 1 should show.. "a"(control collection)  on tabpage1....and,, same should b possible for all 8 pages............................. this can possible if its possible to create user defined contorl in labview
    while in .net its very easy task i m confused here,..,.
    i put these controls in another 5 different  VI,,,, and tried to call in subpanel but,, i dont find the solution,,,
    Attachments:
    tabcontrol.vi ‏1 KB

    Hi,
    I've tried to open you attachment but LabVIEW tells me it's not a vi... could you check it and repost please ?
    I'm not really sure of what you need but you CAN customize you control in LabVIEW, it is not hard, you just have to know how it works
    Sometimes being good at another programation language confuse you more than it helps because you try to do as you are used to... the difficulty it to "translate" functions from a language to another.
    I do know how frustrating it can be when you think "Damned, it would take me only 5 minutes to do that with language a and after 10 hours with language b it is still not working "
    You have to get in LabVIEW way of thinking, I wish you good luck !
    A quick exemple... this might not do exactly what you need but it may help you anyway.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    exemple.vi ‏55 KB

  • SQL Statement Works In sqlplus, Not Grid Ctl For User Defined Metric

    I'm trying these queries:
    Query 1:
    select '0', '0' from dual
    union
    SELECT
    to_char(d.sid),
    to_char(d.serial#)
    FROM v$sql a,
    dba_Users c,
    v$session d
    WHERE
    c.Username = 'SYSADM'
    AND (a.Elapsed_Time * 0.000001 > 5
    OR a.Executions > 1000)
    AND a.Executions > 0
    AND c.User_Id = a.ParSing_User_Id
    AND (Round(a.Elapsed_Time * 0.000001 / a.Executions)) > 10
    AND a.last_active_time > (sysdate - 1)
    and a.sql_id = d.sql_id
    Query 2:
    select 0, 0 from dual
    union
    SELECT
    d.sid,
    d.serial#
    FROM v$sql a,
    dba_Users c,
    v$session d
    WHERE
    c.Username = 'SYSADM'
    AND (a.Elapsed_Time * 0.000001 > 5
    OR a.Executions > 1000)
    AND a.Executions > 0
    AND c.User_Id = a.ParSing_User_Id
    AND (Round(a.Elapsed_Time * 0.000001 / a.Executions)) > 10
    AND a.last_active_time > (sysdate - 1)
    and a.sql_id = d.sql_id
    As you can see, Query 1 is selecting character results, Query 2 is selecting numerical results. Both work from sqlplus on the host. Trying to run either of them in a user defined metric in Grid Control returns: ORA-00918: column ambiguously defined
    1. Why is the error returned in Grid Control?
    2. Is there a way to see exactly which column Grid Control has the issue with?

    Never mind, I got it.

  • Does SQL Server agent/IIS plugin support User-Defined metrics?

    Hi,
    Does anyone know if there is a way to add a user-defined metric that connects to a SQL Server database?
    Thanks

    Recently, I released a full MySQL plug-in, for example - http://www.pythian.com/blogs/mysql-plug-in-for-oracle-grid-control
    For me it's not very difficult but it takes some time to get used to.
    I did presentations on creating Management plug-ins and couple articles in IOUG SELECT Magazine. The latest presentation and whitepaper is here - http://www.pythian.com/blogs/466/ioug-collaborate-07-oracle-10g-grid-control
    Official extensibility guide has much more details and is priceless reference but, still, not everything is documented there.

  • User Defined Metric and Notification rules

    I've created a user defined metric to list the age of my backups. My warning is set to 24 hours and my critical threshold is set to 48 hours. The metric is working fine.
    I want to be alerted if the metric goes critical for e.g.. When I go to Notification rules, under metric i don't see my user defined metric. This is GC 10g R2 10.2.0.2.
    Anyone has seen this?
    Thanks.

    You have to create notification template according to your requirements and define respective metrice with required threshold values.

  • 8i personal : error when Create user defined aggregate function

    Hi,
    I have problem on creating user defined aggregate function.
    I try to create the sample aggregate function "SecondMax" from 9i developer guide(append at the end of this post).
    It's work to create object type and the type body, but
    there is error when I create the aggregate function..
    "CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;"
    I am using 8i personal now.. is that the syntax of create function in 9i is different from that in 8i?
    Example: Creating and Using a User-Defined Aggregate
    This example illustrates creating a simple user-defined aggregate function SecondMax() that returns the second-largest value in a set of numbers.
    Creating SecondMax()
    Implement the type SecondMaxImpl to contain the ODCIAggregate routines.
    create type SecondMaxImpl as object
    max NUMBER, -- highest value seen so far
    secmax NUMBER, -- second highest value seen so far
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number,
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl,
    value IN number) return number,
    member function ODCIAggregateTerminate(self IN SecondMaxImpl,
    returnValue OUT number, flags IN number) return number,
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl,
    ctx2 IN SecondMaxImpl) return number
    Implement the type body for SecondMaxImpl.
    create or replace type body SecondMaxImpl is
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number is
    begin
    sctx := SecondMaxImpl(0, 0);
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl, value IN number)
    return number is
    begin
    if value > self.max then
    self.secmax := self.max;
    self.max := value;
    elsif value > self.secmax then
    self.secmax := value;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN SecondMaxImpl, returnValue OUT
    number, flags IN number) return number is
    begin
    returnValue := self.secmax;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl, ctx2 IN
    SecondMaxImpl) return number is
    begin
    if ctx2.max > self.max then
    if ctx2.secmax > self.secmax then
    self.secmax := ctx2.secmax;
    else
    self.secmax := self.max;
    end if;
    self.max := ctx2.max;
    elsif ctx2.max > self.secmax then
    self.secmax := ctx2.max;
    end if;
    return ODCIConst.Success;
    end;
    end;
    Create the user-defined aggregate.
    CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;
    Using SecondMax()
    SELECT SecondMax(salary), department_id
    FROM employees
    GROUP BY department_id
    HAVING SecondMax(salary) > 9000;

    This could be a x64/x86 problem. Try following this thread
    [GetCompanyService|GetCompanyService] and recompile your code for the platform you need.

  • User Defined metric getting deleted

    Hi,
    We are running Oracle 10.2.0.5 Enterprise Manager and we have one of the database running Oracle 11.2.0.3. I created a User defined metric and every time I create it gets deleted and the rule fails. Can someone please let me know where to check which process is deleting the user defined metric?

    What you are trying to di is certainly possible.
    You need however to create a Plugin for this. By creating a Plugin you will be able to create a "Custom" target type, which allows you to display and use it in the OEM Console just like all other targets.
    Check http://www.oracle.com/technetwork/oem/extensions/index.html for more information on how to do this.
    Regards
    Rob
    http://oemgc.wordpress.com

Maybe you are looking for