Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to know when DB2 instance was last Stopped/Started

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
venkatm2012

New User


Joined: 14 Aug 2012
Posts: 8
Location: india

PostPosted: Mon Aug 27, 2012 4:38 pm    Post subject: How to know when DB2 instance was last Stopped/Started
Reply with quote

Hi,

How to know when DB2 instance was last Stopped/Started?

Thanks in Advance.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Aug 27, 2012 6:48 pm    Post subject:
Reply with quote

Are you talking about DB2 LUW?
Back to top
View user's profile Send private message
venkatm2012

New User


Joined: 14 Aug 2012
Posts: 8
Location: india

PostPosted: Mon Aug 27, 2012 7:16 pm    Post subject:
Reply with quote

Hi,

Sorry to say i don't have much idea of what is DB2 LUW (Googled after seeing your question). In my application , frontend ( JAVA ) is coneecting to DB2 via JDBC driver and connection to DB2 is lost sometimes. Just want to know if the DB2 is getting restarted. Is there any DB2 table where i can see the last restart time of the database?

Thanks in Advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Aug 27, 2012 7:22 pm    Post subject: Reply to: How to know when DB2 instance was last Stopped/Sta
Reply with quote

Quote:
DB2 LUW

LinuxUnixWindows
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Aug 27, 2012 7:50 pm    Post subject:
Reply with quote

<A small experience observation on>

"DB2 instance" is a term mostly used by DB2 users NOT from zOS back-ground. An instance in DB2 for LUW is like a copy of the RDBMS including all the processes that run DB2 and memory (address spaces) associated with that instance of DB2 and some configuration parameters (ZPARMS) to control that instance. OTOH, DB2 on zOS is like a "sub-system under zOS" -- that's why I asked if you talked about DB2 LUW. And the meaning of LUW you alrady 've from Enrico.

</A small experience observation off>

Having said that, you latest question sounds like - if you're talking about an pplication using DB2-store prcedures on zOS and a "Front end JAVA-screen", are you?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 27, 2012 8:08 pm    Post subject:
Reply with quote

still have not answered if the db2 is on a server or a z/OS machine.

if z/OS, read on. if not, you are in the wrong website.

you are wasting your time looking at the restart time of db2.
it will be a failure of whatever application you are invoking with the webservice.

look at your JDBC driver logs
and your JAVA logs.
reason for lack of connection is there,
as well as the invoked application.

without knowing what you are doing, no one can help.
Back to top
View user's profile Send private message
venkatm2012

New User


Joined: 14 Aug 2012
Posts: 8
Location: india

PostPosted: Mon Aug 27, 2012 8:17 pm    Post subject:
Reply with quote

Hi,

Yes, DB2 is on z/OS machine. Error is occuring while trying to get current timestamp from DB2 ( Query was in JAVA frontend, not in db2).

Error log:

30 Jul 2012 11:13:53,308:[[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)']
[ERROR] com.db.ct.core.dblegicodemap.impl.DbLegiCodeMapDAOImpl - insertion failed userid is----
=====org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [HY000]; error code [0];
--- The error occurred in sqlmap/core/config/sql-map-core-config-genericdata.xml.
--- The error occurred while applying a parameter map.
--- Check the GenericData.getCurrTimeStamp-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: [BEA][DB2 JDBC Driver]Exception generated during deferred local transaction handling.
See next exception via SQLException.getNextException for details.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in sqlmap/core/config/sql-map-core-config-genericdata.xml.
--- The error occurred while applying a parameter map.
--- Check the GenericData.getCurrTimeStamp-InlineParameterMap.
--- Check the statement (query failed).

Thanks a lot in advance.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 27, 2012 8:39 pm    Post subject:
Reply with quote

what you have provided us indicates
that your mapping from the java module to the JBDC driver was wrong
and the JBDC driver declined the request.
it was never even sent to the host for processing.

so, all the problems so far are on your server.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Aug 27, 2012 8:40 pm    Post subject: Reply to: How to know when DB2 instance was last Stopped/Sta
Reply with quote

and how will knowing when the DB2 subsystem was stopped help to debug Your problem ?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Aug 27, 2012 8:58 pm    Post subject:
Reply with quote

It is also worth noting that in most shops stopping a DB2 subsystem is a pretty rare event, even in a development environment.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 27, 2012 9:08 pm    Post subject:
Reply with quote

often the two civilizations (pc/server and mainframe) collide
and the first thing everybody does is blame the other.

since there was no timeout message, we know that the connection to the mainframe was not even attempted.

The TS will have to debug and insure his side at least attempts the communications.
then the accusations will start again,
but i imagine that will not be today.

and yes, Don,
the experiences of the pc/server side,
where everything is hit-and-miss, maybe it is running, maybe not,
tend to color the perception of the mainframe.

the boys with the little toys,
have no experience with 24/7 reliability.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 27, 2012 9:15 pm    Post subject: Reply to: How to know when DB2 instance was last Stopped/Sta
Reply with quote

Quote:
and how will knowing when the DB2 subsystem was stopped help to debug Your problem ?
Oh, Please, Please, Please, let the service be down so we don't have to deal with this . . . icon_wink.gif
Back to top
View user's profile Send private message
venkatm2012

New User


Joined: 14 Aug 2012
Posts: 8
Location: india

PostPosted: Tue Aug 28, 2012 9:23 am    Post subject:
Reply with quote

Hi,

Thanks for your responses.

Issue is happening once or twice in a week. We will be restarting application server to resolve this issue, kind of workaround. Once the application server is restarted, we are able to access the application. We are thinking of different possibilities which might cause this issue and one thing we thought is DB2 database restart. I think now that possibility is ruledout. Other area we are analyzing is memory leakage on java application.

Hope we will find the rootcause soon...keep you updated.

Once again thanks a lot for your time.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 28, 2012 11:16 am    Post subject:
Reply with quote

the are an uncountable number of monitors and utilities to find the cause of memory leakage.
it should not be a problem and should be an intrinsic part of the development process.

i would insure that all the mapping between any exchange
is double checked.

i would also assign an individual to insure that all update/fixpacks
have been applied
and to scour the documentation for any known inconsistencies
between packages.

you have a basic problem of one part saying it is A
and the receiving part interpreting it as B.
even the error log says that there is a mapping problem.
until that error disappears,
you will be left with solving your server problems like we had to
with windows 3x.
CTL-ALT-DEL.
not really a solution.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Tue Aug 28, 2012 11:51 am    Post subject:
Reply with quote

Hi Venkat,

You have said,
Quote:
connection to DB2 is lost sometimes

Check in the DB2MSTR logs and DB2DIAG.log exactly for the time you got error, you might find more information there.

Do you know when this connection blips started ? Any change in the network structure anything like that?

Thanks,
Sushanth
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Tue Aug 28, 2012 12:44 pm    Post subject: Reply to: How to know when DB2 instance was last Stopped/Sta
Reply with quote

Hi Venkat,

You can check it in DB2MSTR logs or BMCDB2 - APPTUNE ( If have this tool in your shop ) it will display complete information.

Thanks,
Sandip Walsinge
Walsinge Technologies Pvt Ltd Pune.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Aug 28, 2012 1:02 pm    Post subject: Reply to: How to know when DB2 instance was last Stopped/Sta
Reply with quote

the connection is lost, not the DB2 itself
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts finding the taskid for a started tran... deepa12 CICS 2 Thu Aug 07, 2014 9:06 pm
No new posts Started Tasks. gylbharat JCL & VSAM 4 Thu Jul 31, 2014 8:33 pm
No new posts Can Started Task be assigned message ... mjadwani2785 JCL & VSAM 3 Tue Nov 26, 2013 2:10 pm
No new posts How to determine if a transaction has... dejunzhu CICS 1 Thu Apr 25, 2013 3:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us