Thread monitoring for database query

Hi,
I need to be able to store a database query in a thread. This means that the entire query from executing to return should take place in this thread (as well as connection etc). I would then like to know when it have finished its work so i can carry on some more porcessing.
I tried doing this with two threads, one to do the work and the other to 'watch' and then tell me when is is done. However, i errors 'every now and again' to which i can attribute to my thread structure not working properly. I am using a synchronised class and code post the code if anyone wishes to see it, however, i would appreciate it if someone could give me a basic structure to how i can go about this so that i do not get these 'random' errors.
Thanks Rudy

Okay -
I have an idea. Withut fully implementing your code, mind you.
If looks like you're having problems with concurrent access to your Vector.
A Vector is, of course, a Collection and a List (interfaces) - these are not thread safe. To make them thread safe, you need to "wrap" them.
<lifted from JavaDocs>
public static Collection synchronizedCollection(Collection c)
    Returns a synchronized (thread-safe) collection backed by the specified collection. In order to guarantee
serial access, it is critical that all access to the backing collection is accomplished through the returned
collection.
    It is imperative that the user manually synchronize on the returned collection when iterating over it:
  Collection c = Collections.synchronizedCollection(myCollection);
  synchronized(c) {
      Iterator i = c.iterator(); // Must be in the synchronized block
      while (i.hasNext())
         foo(i.next());
    Failure to follow this advice may result in non-deterministic behavior.
    The returned collection does not pass the hashCode and equals operations through to the backing
collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the
contracts of these operations in the case that the backing collection is a set or a list.
    The returned collection will be serializable if the specified collection is serializable.
    Parameters:
        c - the collection to be "wrapped" in a synchronized collection.
    Returns:
        a synchronized view of the specified collection.</lifted from JavaDocs>
Give your Vector a wrapper and see if that solves your problem.
+M                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Data Driven Subscriptions Error - the query processor could not start the necessary thread resources for parallel query execution

    Hi,
    We are getting the following error when certain data driven subscriptions are fired off: "the query processor could not start the necessary thread resources for parallel query execution".  I've read other posts that have the same error, and
    the solution usually involves adjusting MaxDOP to limit the number of queries that are fired off in parallel.  
    Unfortunately, we cannot change this setting on our server for performance reasons (outside of data driven subscriptions, it negatively impacts our ETL processing times).  We tried putting query hints like "OPTION (MAXDOP 2);" in the reports
    that are causing the error, but it did not resolve the problem.
    Are there any settings within Reporting Services that can be adjusted to limit the number of subscriptions that get fired off in parallel?
    Any help is appreciated - thanks!

    Yes, that is correct.  It's a painful problem, because you don't know which specific subscription failed. For example, we have a data driven subscription that sends out about 800 emails. Lately, we've been having a handful of them fail. You don't know
    which ones out of the 800 failed though, even from the RS log files - all it tells you is that "the
    query processor could not start the necessary thread resources for parallel query execution".
    Thanks, I'll try changing <MaxQueueThreads> and will let you know if it works.
    On a side note: I've noticed that it is only reports with cascading parameters (ex. where parameter 2 is dependent on the selection from parameter 1) that get this error message...

  • Syntax for Database query on a simple java appl?

    Connection con;
    private boolean conFree = true;
    private String dbName = "java:comp/env/jdbc/gene";
    public geneDB () throws Exception {
    try{
         Context ic = new InitialContext();
         DataSource ds = (DataSource) ic.lookup(dbName);
    con = ds.getConnection();
    catch (Exception ex){
    throw new Exception("Couldn't open connection to database: " + ex.getMessage());
    String insertStatement =     "insert into gene (cds,status) values(" + cds + "," + status + ")";
    PreparedStatement prepStmt = con.prepareStatement(insertStatement);
    prepStmt.setString(1, cds);
    prepStmt.setString(2, status);
    prepStmt.executeUpdate();
    prepStmt.close();
    Any comments??? This is what i have done, pls comment....

    actually i m having some kind of trouble and i would like to confirm about the code design suggestion regarding about the database query using pointbase through a java web service.

  • Value settings for database query

    I have a database set up for item prices. Currently, the
    database is set for currency and I have 1.99 and 2.99 entered in
    the two fields. However, the cfm page form displays them as 1.9900
    and 2.9900. Why is it adding the extra "00" at the end? The value
    in the page coding is integer. Should I have it set at something
    different? Also, how would I get a "$" to show before the price?
    Thanks,
    Dave

    It is probable that your database is adding the extra zeros
    as an
    indication of the precision the field contains for currency.
    Many
    people care about those fractions of a cent and would not
    want them
    rounded off.
    To display the data the way your desire, check out the
    DecimalFormat(),
    DollarFormat() and|or NumberFormat() functions.
    Dave Blake wrote:
    > I have a database set up for item prices. Currently, the
    database is set for
    > currency and I have 1.99 and 2.99 entered in the two
    fields. However, the cfm
    > page form displays them as 1.9900 and 2.9900. Why is it
    adding the extra "00"
    > at the end? The value in the page coding is integer.
    Should I have it set at
    > something different? Also, how would I get a "$" to show
    before the price?
    >
    > Thanks,
    > Dave
    >

  • Jstack shows a thread waiting for monitor entry but it's already acquired

    I have a heavy load website powered by tomcat-6.0.14 and jdk1.6.0_02-b05(amd64) on a 2 dual-core amd Opteron. When tomcat started, and I directed the http request(~200/s) abruptly to tomcat, it looks choked for over one minute, and if I took off the http requests, tomcat can recover in a few minutes.
    Then I use jstack during the choke time to find what's the cause, where I found a strange situation. Almost all threads are blocking on getting a log4j lock(I think it's normal,since log4j use a coarse lock), but one thread which already got the lock are also blocked. Below is the stack trace.
    "http-172.23.24.29-8011-exec-175" daemon prio=10 tid=0x00002aad37843400 nid=0x542d waiting for monitor entry [0x0000000052e55000..0x0000000052e55da0]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
    at com.xxx.xxxx.TimingLogFilter.doFilter(TimingLogFilter.java:39)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    And all the other threads waiting for the log4j lock.
    "http-172.23.24.29-8011-exec-176" daemon prio=10 tid=0x00002aad37773800 nid=0x542e waiting for monitor entry [0x0000000052f56000..0x0000000052f56b20]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - waiting to lock <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
    at com.xxx.xxxxx.TimingLogFilter.doFilter(TimingLogFilter.java:39)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    I'm really wondering why jstack shows the first thread is BLOCKED but no blocker.
    And also, it's not a deadlock, since I made jstack log after sever seconds, and found this time another thread has the same problem.
    "http-172.23.24.29-8011-exec-170" daemon prio=10 tid=0x00002aad3784d800 nid=0x5428 waiting for monitor entry [0x0000000052950000..0x0000000052950c20]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
    at com.xxx.xxxx.TimingLogFilter.doFilter(TimingLogFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    What's the cause? Is jstack accurate? Or, the problem is caused by hotspot compling since tomcat is just started? Or it's just because log4j's coarse lock? ( but after the starup, tomcat can handle the same traffic without any problem, and jstack shows no log4j block at all.)
    Thanks in advance.
    Jimcgnu

    "http-172.23.24.29-8011-exec-175" daemon prio=10 tid=0x00002aad37843400 nid=0x542d waiting for monitor entry [0x0000000052e55000..0x0000000052e55da0]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    It seems like a Dead Lock.
    The thread must have entered into a synchronized block/method1() and acquired a lock.
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    While having lock the thread might be trying to acquire a lock to another synchronized block/method2()
    waiting for monitor entry
    java.lang.Thread.State: BLOCKED (on object monitor)
    and someother thread might have already acquired a lock to that block/method2().
    Can we check for Dead Lock??

  • Thread waiting for monitor - appending to previous post

    04:25:51,721 ERROR [ExecuteThread: '55' for queue: 'weblogic.kernel.Default'] com.documentum.web.common.Trace - SessionSynch@bc53ac[lockCount=2,lockOwner=Thread[ExecuteThread: '54' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']]: Timed out waiting in lock()
    java.lang.IllegalStateException: SessionSynch@bc53ac[lockCount=2,lockOwner=Thread[ExecuteThread: '54' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']]: Timed out waiting in lock()
    at com.documentum.web.common.SessionSync.lock0(SessionSync.java:181)
    at com.documentum.web.common.SessionSync.lock(SessionSync.java:68)
    at com.documentum.web.form.FormProcessor.lockSession(FormProcessor.java:2026)
    at com.documentum.web.form.FormProcessor.invokeMethod(FormProcessor.java:1614)
    at com.documentum.web.form.FormProcessor.fireOnExitEvent(FormProcessor.java:1463)
    at com.documentum.web.form.FormProcessor.fireOnExitEvent(FormProcessor.java:1459)
    at com.documentum.web.form.FormProcessor.fireOnExitEvent(FormProcessor.java:1438)
    at com.documentum.web.form.JumpOperation.execute(JumpOperation.java:80)
    at com.documentum.web.form.FormProcessor.openForm(FormProcessor.java:219)
    at com.documentum.web.form.WebformTag.doStartTag(WebformTag.java:127)
    at jsp_servlet._wdk.__historyreleased._jsp__tag0(__historyreleased.java:164)
    at jsp_servlet._wdk.__historyreleased._jspService(__historyreleased.java:125)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:525)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:454)
    at com.documentum.web.form.FormProcessor.dispatchURL(FormProcessor.java:2194)
    at com.documentum.web.form.FormProcessor.doFreshInclude(FormProcessor.java:1082)
    at com.documentum.web.form.FormProcessor.doFreshInclude(FormProcessor.java:1058)
    at com.documentum.web.form.FormProcessor.redirect(FormProcessor.java:1010)
    at com.documentum.web.form.FormProcessor.openForm(FormProcessor.java:257)
    at com.documentum.web.form.WebformTag.doStartTag(WebformTag.java:127)
    at jsp_servlet._webcomponent._library._locator.__locatorcontainer._jsp__tag2(__locatorcontainer.java:704)
    at jsp_servlet._webcomponent._library._locator.__locatorcontainer._jsp__tag1(__locatorcontainer.java:671)
    at jsp_servlet._webcomponent._library._locator.__locatorcontainer._jspService(__locatorcontainer.java:154)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.documentum.web.servlet.ResponseHeaderControlFilter.doFilter(ResponseHeaderControlFilter.java:317)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.documentum.web.servlet.CompressionFilter.doFilter(CompressionFilter.java:84)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.documentum.web.env.WDKController.processRequest(WDKController.java:95)
    at com.documentum.web.env.WDKController.doFilter(WDKController.java:83)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

    Yes Jay, You are right. I have taken thread dump 10 samples and i could see that Thread State is not moving... I have increased the StuckThread Timeout to 800 from 600
    Thread dump 1/10 "ExecuteThread: '32' for queue: 'weblogic.kernel.Default'" daemon prio=3 tid=0x01b28350 nid=0xa9 waiting for monitor entry [0x71e3e000..0x71e3fc70]      at com.documentum.wp.app.WpRoleService.getRoleModel(WpRoleService.java:174)      - waiting to lock <0x9c986ed0> (a java.lang.Object)      at com.documentum.wp.app.WpRoleService.getUserRole(WpRoleService.java:92)      at com.documentum.wp.session.LoginUtil.validateUserDomain(LoginUtil.java:58)      at com.documentum.wp.session.WpAuthenticationService.login(WpAuthenticationService.java:70)      at com.documentum.web.formext.session.Login.authenticate(Login.java:1041)      at com.documentum.web.formext.session.Login.onLogin(Login.java:359)      at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)      at java.lang.reflect.Method.invoke(Method.java:585)      at com.documentum.web.form.FormProcessor.invokeMethod(FormProcessor.java:1633)      at com.documentum.web.form.FormProcessor.invokeMethod(FormProcessor.java:1487)      at com.documentum.web.form.FormProcessor.fireActionEvent(FormProcessor.java:1303)      at com.documentum.web.form.RecallOperation.execute(RecallOperation.java:101)      at com.documentum.web.form.FormProcessor.processAction(FormProcessor.java:113)      at com.documentum.web.form.FormAction.processAction(FormAction.java:107)      at com.documentum.web.env.WDKController.doStartRequest(WDKController.java:191)      at com.documentum.web.env.WDKController.processRequest(WDKController.java:92)      at com.documentum.web.env.WDKController.doFilter(WDKController.java:83)      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)      at weblogic.security.service.SecurityManager.runAs(Unknown Source)      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)      at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

  • Significant difference in response times for same query running on Windows client vs database server

    I have a query which is taking a long time to return the results using the Oracle client.
    When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
    When I run the same query on a Windows client it completes in 47 minutes.
    Ideally I would like to get a response time equivalent on the Windows client to what I get when running this on the database server.
    In both cases the query plans are the same.
    The query and plan is shown below :
    {code}
    SQL> explain plan
      2  set statement_id = 'SLOW'
      3  for
      4  SELECT DISTINCT /*+ FIRST_ROWS(503) */ objecttype.id_object
      5  FROM documents objecttype WHERE objecttype.id_type_definition = 'duotA9'
      6  ;
    Explained.
    SQL> select * from table(dbms_xplan.display('PLAN_TABLE','SLOW','TYPICAL'));
    PLAN_TABLE_OUTPUT
    | Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)|
    |   0 | SELECT STATEMENT   |           |  2852K|    46M|       | 69851   (1)|
    |   1 |  HASH UNIQUE       |           |  2852K|    46M|   153M| 69851   (1)|
    |*  2 |   TABLE ACCESS FULL| DOCUMENTS |  2852K|    46M|       | 54063   (1)|
    {code}
    Are there are configuration changes that can be done on the Oracle client or database to improve the response times for the query when it is running from the client?
    The version on the database server is 10.2.0.1.0
    The version of the oracle client is also 10.2.0.1.0
    I am happy to provide any further information if required.
    Thank you in advance.

    I have a query which is taking a long time to return the results using the Oracle client.
    When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
    When I run the same query on a Windows client it completes in 47 minutes.
    There are NO queries that 'run' on a client. Queries ALWAYS run within the database server.
    A client can choose when to FETCH query results. In sql developer (or toad) I can choose to get 10 rows at a time. Until I choose to get the next set of 10 rows NO rows will be returned from the server to the client; That query might NEVER complete.
    You may get the same results depending on the client you are using. Post your question in a forum for whatever client you are using.

  • CCMS monitoring for DB2/400 database backup.

    Hi,
    sap on iseries experts,
    We need a good monitoring for the alerts from DB2/400 database backup failure with CCMS for a solution manager management.
    Actually I don,t see a specific node (or MTE class) inside CCMS for this alert;
    But DB12 display well the daily backup status . . . . . . . .
    Can anybody help me ?
    Kind Regards
    Fabio

    Hi all,
    I'm searching also for such an possibilty.
    When running Oracle there is following MTE:
    RZ20 -> SAP CCMS Technical Expert Monitors -> All Monitoring Contexts -> Oracle -> Backup/restore -> Backup status -> Last succ
    Does anybody know a method to monitor the backup with SAP on Iseries?
    Tobias

  • PL/SQL procedure for database activity monitoring

    Can anyone help me in writing a procedure which will help me in monitoring the database, i.e. if anybody changes something inside a table say add, update or delete then this procedure will tell me about every operation on that table??

    This has nothing to do with forms whatsoever, and also is already invented. Search the documentation for "audit" or take a look at this: http://www.oracle-base.com/articles/10g/auditing-10gr2.php
    cheers

  • Disable monitoring for "There were database redundancy check failures for database ..."

    I'm trying to disable the monitor for a database in a DAG that we don't want to have copies for.
    I tried the following, but a few hours later the monitoring alert appears again;
    Set-MailboxDatabase –Identity "name” –AutoDagExcludeFromMonitoring $True
    Add-GlobalMonitoringOverride -Identity DataProtection\EnableDatabaseMonitoringResponder -ItemType Responder -PropertyName “Enabled” -PropertyValue “0” -Duration 60.00:00:00
    Does anybody know how to disable the database redundancy check for a specific database?

    Hi,
    According to your post, I understand that you want to disable the monitor for a specific database in a DAG.
    If I misunderstand your concern, please do not hesitate to let me know.
    I’m afraid we cannot disable the database redundancy check for a specific database.
    However if you don’t want this copy, you can remove this corrupted copy then create a new one:
    Remove-MailboxDatabaseCopy -Identity DB1\MBX1 -Confirm:$False
    More details about Add a Mailbox Database Copy, for your reference:
    https://technet.microsoft.com/en-us/library/dd298080(v=exchg.150).aspx
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Allen Wang
    TechNet Community Support

  • Certified Monitoring Template for Database Instances?

    I am setting up monitoring templates on OEM 12.1.0.3 for hosts, agents, database instances etc by copying and modifying the Oracle Certified Templates using "Create Like" then apply to my targets.  There are certified templates for hosts and agents but I don't see one for Database Instances.  Is there a certified templates for Database Instances (such as metrics for tablespace used %, share pool caching %, alert etc)?

    There is no Oracle Certified template for database instances. You may want to use default (out-of-box) metric collection settings for database instances as a basis for your template.
    Here is one way:
    - Navigate to Enterprise > Monitoring > Monitoring Templates.
    - Click Create and select a database target, which still has out-of-box (default) metric settings.
    - Continue to create the template.
    Regards,
    - Loc

  • Home-made monitors for thread synchronization

    I have an assignment that request to implement a multiple-readers/one-writer algorithm on a shared ressource. I know Java already provide such methods as wait() and notify() but I have to write my own.
    So far, i have figured the startReading(), startWriting(), stopReading() and stopWriting() methods, but i don't understand how to write my own wait() and notify() methods. It was told that we could use a queue for the readers and another one for the writers. Also, i cannot use Threads anywhere.
    I find it very hard to figure it out. Anybody has an idea or some links where i could find the information?

    The purpose of the assignment is to understand how such mecanisms are working on a OS. We do this with a simulation. Maybe i didn't explain very well what i'm trying to do. Here is the code i've come with, it is working fine, but because i don't understand really well these mecanisms i am not sure it is good.
    class Dispatcher {
      Queue tpcb;                                 // All processes currently running
      MultipleReadersSingleWriterMonitor monitor; // Monitor for read/write lock
      Queue signaled;                             // Processes that were allowed to access the critical section
      public Dispatcher() {
        this.tpcb = new Queue();
        this.monitor = new MultipleReadersSingleWriterMonitor() {
          public void signal(final Processus p) {
            signaled.enqueue(p);
        this.signaled = new Queue();
      public void execute() { // When we arrive here, the tpcb has been filled
        for (Iterator i=tpcb.iterator(); i.hasNext(); ) { // Call the appropriate monitor for each processus
          Processus p = (Processus)i.next();
          if (p.mode == p.MODE_READ) {
            monitor.startReading(p);
          else {
            monitor.startWriting(p);
       // Pseudo-execute all the processus
       while (!tpcb.empty()) {
         if (!signaled.empty()) executeProcessus(signaled.dequeue());
      public void executeProcessus(Processus p) {
        // Code that simulate a processus running in the critical section
        // We are done, call the appropriate unlocking monitor
        if (p.mode == p.MODE_READ) {
          monitor.stopReading();
        else {
          monitor.stopWriting();
    }Anyway, unless i come with a suddent idea this is the final version. Thanx for answering.

  • Tcode for database monitoring

    Hi
    Can any one plz help me with the Tcode for database monitoring and to check the how much space occupies my BI Object in Database...
    Regards
    Adward

    Hi........
    Apart from those two tcodes :
    RSRCACHE  OLAP: Cache Monitor 
    DB02  Tables and Indexes Monitor 
    DB14  Display DBA Operation Logs 
    DB16  Display DB Check Results 
    DB20  Update DB Statistics 
    Regards,
    Debjani.........

  • How to clear Local-Cache Entries for a Query in BW?

    Hi There,
    i`m student und i need please your help for my Thesis!!
    I execute the same Query many times in BEx Web Analyzer und note a Query Response Time under ST03N using each time a different READ Mode and Cache Mode is inactiv (Query Monitor RSRT).
    First time i exectue the Query, it reads also from database, second time it uses the local Cache and  that `s okay!
    My problem is:
    When i change the Read mode and execute the Query again, it uses for the first run also the old entries from the Cache so i get wrong response time for the first run!!
    I know that while the mode cache inactiv , the local cache will still be used, so how can i delete the local cache entries each
    time i change the read mode and execute the Query? In Cache monitor (rsrcache) i find only entries for Global cache etc..
    I've already tried to close the session and login in to the System again but it doesn`t solve the Problem!!
    i don't have a permission (access rights) to switch off the complete Cache (local and global ).
    Any idea please??
    Thanks und Best Regards,
    Rachidoo
    P.S: sorry for my bad english!! i have to refresh it soon:)

    Hi Praba,
    the entries stored in RSRCACHE are for global cache, there is no entry for my query in Cache monitor!
    i execute the query in RSRT using java web button and cache mode inactiv so, the results will be stored in local cache.
    this is as below what i want to do for my performance tests in my Thesis:
    1. run a query for the first time with cache inactiv and note runtime of it
    2. run the query again with cache inactiv and note runtime of it
    3. clear the local cache (i don't know how to do it??)
    4. change the read mode of query in RSRT then run the same query for the first time and note runtime of it
    5. run the query again and note runtime of it.
    i'm doing the same procedure for each Read mode.
    the problem is in step 4 , The olap Processor gets the old results form the cache so i get wrong runtime for my tests.
    Generate the report doesn't help, any idea please?

  • How to use taglibs in JSP for Database access

    Hi
    Could any one please tell me how to use taglibs in JSP for Database access
    with regrds
    Jojo

    This is a sample how to connect to a MySQL database with JSTL 1.0:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>JSTL MySQL</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <c:catch var="e">
    <sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
                           user="Your_Username_Here" password="Your_Password_Here"
                           driver="com.mysql.jdbc.Driver"/>
    <c:out value="datasource= ${datasource},  Class = ${driver.class}"/>
    <br />
    <br />
    <sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
    <table>
    <%-- Get the column names for the header of the table --%>
    <c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
    <tbody>
    <%-- Get the value of each column while iterating over rows --%>
    <c:forEach var="row" items="${deejays.rows}">
      <tr><c:forEach var="column" items="${row}">
            <td><c:out value="${column.value}"/></td>
          </c:forEach>
      </tr>
    </c:forEach>
    </tbody>
    </table>
    </c:catch>
    <br />
    <br />
    <c:if test="${e!=null}"><span class="error">Error</span>�
      <c:out value="${e}" />
    </c:if>
    </body>
    </html>And this thread might help you:
    http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44

Maybe you are looking for

  • Hardware servers to build medium OVM for 12.1.1 EBS

    I am looking for low cost server recommendations for building out two new servers for testing 12.1.1 EBS OVM environments and 11gR2 RAC. Thanks Ben

  • Registering Portal in Oracle Ultra Search

    Hi, I am in the process of setting up Oracle Ultra Search. I have followed the documentation down as far as Configuring Ultra Search to Index Portal Pages and I get to the point where I am adding the OracleAS Portal registration details. I am not sur

  • Sending files from computer to bb Curve 8310 via bluetooth?

    I was trying to send music files to my blackberry curve 8310 from my computer via my usb bluetooth. I am having trouble figuring out how to do it. My pc seems to be recognizing the curve but I cant figure out how to send music to it. Can anyone tell

  • Apple 2.0 Update?

    Hello all, I guess I should check in more often... I just checked for updates (don't know why) on my 2.0 ATV and lo and behold there is one! How long has this been available?

  • File Status and Source Control

    We recently started using Source Control with one of our projects.  After opening up the project, we noticed under the Status Field, we're no longer seeing "Writeable" and it's just blank.  Please see screen shot below. In our other project that is N