Unix Technical Forum

Need to reconnect to ISQL

This is a discussion on Need to reconnect to ISQL within the Sybase forums, part of the Database Server Software category; --> Hi, all. I'm working with Sybase ASA ISQL 7.0.4.3423. Sometimes I launch time consuming process from ISQL. While it ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 07:16 PM
Cal
 
Posts: n/a
Default Need to reconnect to ISQL

Hi, all.

I'm working with Sybase ASA ISQL 7.0.4.3423.

Sometimes I launch time consuming process from ISQL. While it works, I
want to check the table, which this process is filling, to see the
progress. So, I launch another ISQL session, run count(*) against this
table and get a result. But, if I try to run count(*) again, I always
get the same result! Only thing that helps to get refreshed number is
to disconnect and connect again.

It's a small thing, but it is annoying. Why ISQL acts like this? How to
get current amount of rows from table without disconnecting/connecting?

Thanks!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 07:16 PM
krithika
 
Posts: n/a
Default Re: Need to reconnect to ISQL


Cal wrote:
> Hi, all.
>
> I'm working with Sybase ASA ISQL 7.0.4.3423.
>
> Sometimes I launch time consuming process from ISQL. While it works, I
> want to check the table, which this process is filling, to see the
> progress. So, I launch another ISQL session, run count(*) against this
> table and get a result. But, if I try to run count(*) again, I always
> get the same result! Only thing that helps to get refreshed number is
> to disconnect and connect again.
>
> It's a small thing, but it is annoying. Why ISQL acts like this? How to
> get current amount of rows from table without disconnecting/connecting?
>
> Thanks!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 07:16 PM
Cal
 
Posts: n/a
Default Re: Need to reconnect to ISQL

Sorry, I did not see any answer...


krithika wrote:
> Cal wrote:
> > Hi, all.
> >
> > I'm working with Sybase ASA ISQL 7.0.4.3423.
> >
> > Sometimes I launch time consuming process from ISQL. While it works, I
> > want to check the table, which this process is filling, to see the
> > progress. So, I launch another ISQL session, run count(*) against this
> > table and get a result. But, if I try to run count(*) again, I always
> > get the same result! Only thing that helps to get refreshed number is
> > to disconnect and connect again.
> >
> > It's a small thing, but it is annoying. Why ISQL acts like this? How to
> > get current amount of rows from table without disconnecting/connecting?
> >
> > Thanks!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 07:16 PM
Galen Boyer
 
Posts: n/a
Default Re: Need to reconnect to ISQL

On 25 Jan 2006, kasis_100@yahoo.com wrote:
> Hi, all.
>
> I'm working with Sybase ASA ISQL 7.0.4.3423.
>
> Sometimes I launch time consuming process from ISQL. While it works, I
> want to check the table, which this process is filling, to see the
> progress. So, I launch another ISQL session, run count(*) against this
> table and get a result. But, if I try to run count(*) again, I always
> get the same result! Only thing that helps to get refreshed number is
> to disconnect and connect again.
>
> It's a small thing, but it is annoying. Why ISQL acts like this?


It isn't ISQL, its the way databases work. Until a commit is issued,
others shouldn't see the uncommitted work. Your second ISQL session is
just another client that isn't allowed to see the uncommitted work of
some other session, ie the isql session doing the work.

> How to get current amount of rows from table without
> disconnecting/connecting?


Well, you could use the "isolation level read uncommitted" but that
takes understanding transactional handling before you can understand
what you are using it for.

You could instrument the code to select what you are looking for at
particular points in time.

You could commit at particular points in time of the executing process.

--
Galen Boyer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 07:16 PM
Dhannya
 
Posts: n/a
Default Re: Need to reconnect to ISQL

Just wondering if you had disconnected & then connected the first
(where INSERT is being executed) or second (where you are monitoring
the count) ISQL session. If it is first, I think the suggestion on
uncommitted transactions would be the perfect answer. Kindly clarify as
to which session you had reconnected.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-08-2008, 07:16 PM
Cal
 
Posts: n/a
Default Re: Need to reconnect to ISQL

Hello.

I am reconnecting second session you mentioned. One, which executes
INSERT, stays connected.

Also, I am not sure, if idea about commits is entirely right. Fact is,
that from first session I launch stored procedure, which, in turn calls
for other stored procedure, it performs designed actions, executes
commit and returns to "main" procedure, which I called from ISQL.

Idea is, that process performs many commits, while I do not see any
changes from second session as long as I do not reconnect it.


Cal

Dhannya wrote:
> Just wondering if you had disconnected & then connected the first
> (where INSERT is being executed) or second (where you are monitoring
> the count) ISQL session. If it is first, I think the suggestion on
> uncommitted transactions would be the perfect answer. Kindly clarify as
> to which session you had reconnected.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-08-2008, 07:16 PM
Dhannya
 
Posts: n/a
Default Re: Need to reconnect to ISQL

As you said, if it is the second session, we do not expect it to behave
the way it does, esp since there are so many commits in between. I am a
rather junior user and hence let us wait for the experts for an
answer...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-08-2008, 07:16 PM
Larry Coon
 
Posts: n/a
Default Re: Need to reconnect to ISQL

Cal wrote:

> How to
> get current amount of rows from table without disconnecting/connecting?


To supplement Galen's explanation, you're asking the wrong
question here. A transation is considered an atomic unit
of work, so "current" has no meaning to other users. To
others, the table is either in the "before" state or the
"after" state, and nothing in between.


Larry Coon
University of California
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-08-2008, 07:16 PM
Dhannya
 
Posts: n/a
Default Re: Need to reconnect to ISQL

But if there are intermediate commits in Cal's nested stored procedures
(as I understand), isn't it logical that the change in count should
reflect on re-execution of count(*) even when the stored procedure is
being executed?

Also, how would the changes reflect once he disconnects and re-connects
the second session even though the stored procedure has not finished
execution in the first isql session?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-08-2008, 07:16 PM
Galen Boyer
 
Posts: n/a
Default Re: Need to reconnect to ISQL

On 30 Jan 2006, kasis_100@yahoo.com wrote:
> Hello.
>
> I am reconnecting second session you mentioned. One, which executes
> INSERT, stays connected.
>
> Also, I am not sure, if idea about commits is entirely right.


What is incorrect?

> Fact is, that from first session I launch stored procedure, which, in
> turn calls for other stored procedure, it performs designed actions,
> executes commit and returns to "main" procedure, which I called from
> ISQL.
>
> Idea is, that process performs many commits, while I do not see any
> changes from second session as long as I do not reconnect it.


Okay,

In your original post, you didn't clearly state what was going on. And,
at this point, it still isn't clear, but at least I know commits are
going somewhere in the executing process, which was my third suggestion.

Any chance you could post the executing code and the testing "select
count(*)" you are executing? Without it, I and others will be grasping
at all sorts of straws.

--
Galen Boyer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com