Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Debugging stored procs - viewing data in #temp tables

9 posts in General Discussion Last posting was on 2008-02-22 07:16:24.0Z
mpeppler Posted on 2008-02-12 13:41:12.0Z
Sender: 66fa.47b19a03.1804289383@sybase.com
From: mpeppler@peppler.org
Newsgroups: sybase.public.workspace.general
Subject: Debugging stored procs - viewing data in #temp tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47b1a1f8.67c2.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Feb 2008 05:41:12 -0800
X-Trace: forums-1-dub 1202823672 10.22.241.41 (12 Feb 2008 05:41:12 -0800)
X-Original-Trace: 12 Feb 2008 05:41:12 -0800, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:579
Article PK: 1088335

Hi,

I've just started using WorkSpace 2.0 and it's looking
pretty nice so far.

One thing that I haven't (yet) figured out is how to view
data in #temp tables when I debug a stored proc. The
Referenced Tables view shows all the permanent tables, and
makes it quite easy to view data in those tables, but it
doesn't include any information of the #temp tables.

I also have access to another tool (SQL Browser -
www.sqlbrowser.com) that also includes a SQL debugger, and
it provides a scratch pad that is editable and where you can
run queries in the context of your debug session, a very
nice feature. Is there something similar in Workspace that I
haven't yet discovered?

Thanks,

Michael


Mike Crocker Posted on 2008-02-12 17:57:22.0Z
From: "Mike Crocker" <crocker@sybase.com>
Newsgroups: sybase.public.workspace.general
References: <47b1a1f8.67c2.1681692777@sybase.com>
Subject: Re: Debugging stored procs - viewing data in #temp tables
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47b1de02@forums-1-dub>
Date: 12 Feb 2008 09:57:22 -0800
X-Trace: forums-1-dub 1202839042 10.22.241.152 (12 Feb 2008 09:57:22 -0800)
X-Original-Trace: 12 Feb 2008 09:57:22 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:580
Article PK: 1088262

Michael,

If you are using ASE then the #temp tables should be visible in your
Referenced Tables view.

You can alter data in any of the tables in the Referenced Tables view by
right-clicking the table and selecting Edit Data.

Mike

<mpeppler@peppler.org> wrote in message
news:47b1a1f8.67c2.1681692777@sybase.com...
> Hi,
>
> I've just started using WorkSpace 2.0 and it's looking
> pretty nice so far.
>
> One thing that I haven't (yet) figured out is how to view
> data in #temp tables when I debug a stored proc. The
> Referenced Tables view shows all the permanent tables, and
> makes it quite easy to view data in those tables, but it
> doesn't include any information of the #temp tables.
>
> I also have access to another tool (SQL Browser -
> www.sqlbrowser.com) that also includes a SQL debugger, and
> it provides a scratch pad that is editable and where you can
> run queries in the context of your debug session, a very
> nice feature. Is there something similar in Workspace that I
> haven't yet discovered?
>
> Thanks,
>
> Michael


Michael Peppler Posted on 2008-02-12 19:26:52.0Z
From: Michael Peppler <mpeppler@peppler.org>
Organization: Peppler Consulting SARL
Subject: Re: Debugging stored procs - viewing data in #temp tables
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2008.02.12.19.27.00.591491@peppler.org>
Newsgroups: sybase.public.workspace.general
References: <47b1a1f8.67c2.1681692777@sybase.com> <47b1de02@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 12 Feb 2008 11:26:52 -0800
X-Trace: forums-1-dub 1202844412 10.22.241.152 (12 Feb 2008 11:26:52 -0800)
X-Original-Trace: 12 Feb 2008 11:26:52 -0800, vip152.sybase.com
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:581
Article PK: 1088342


On Tue, 12 Feb 2008 09:57:22 -0800, Mike Crocker wrote:

> Michael,
>
> If you are using ASE then the #temp tables should be visible in your
> Referenced Tables view.

Hmmm - I am using ASE (12.5.4 ESD 7), but I most definitely do not see any
of the temp tables in the Referenced Tables view.

These temp tables are either created in the proc, or created in the
calling proc and used in the current proc.

Is there something that needs to be done to view this information?
Does it matter if I'm logged in with sa_role or not?

Thanks!

Michael
--
Michael Peppler - Peppler Consulting SaRL
mpeppler@peppler.org - http://www.peppler.org
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html


Hung Hsi Posted on 2008-02-14 21:38:15.0Z
From: "Hung Hsi" <hhsi@sybase.com>
Newsgroups: sybase.public.workspace.general
References: <47b1a1f8.67c2.1681692777@sybase.com> <47b1de02@forums-1-dub> <pan.2008.02.12.19.27.00.591491@peppler.org>
Subject: Re: Debugging stored procs - viewing data in #temp tables
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47b4b4c7$1@forums-1-dub>
Date: 14 Feb 2008 13:38:15 -0800
X-Trace: forums-1-dub 1203025095 10.22.241.152 (14 Feb 2008 13:38:15 -0800)
X-Original-Trace: 14 Feb 2008 13:38:15 -0800, vip152.sybase.com
X-Authenticated-User: wsctp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:587
Article PK: 1088286

Hi Mike,

I was not able to reproduce the problem using WorkSpace2.0. The ASE
non-sharable temp table should show up in the Referenced table view.

Did you see any temp table related comments (annotation) at the beginning of
the SP you were debugging? Can you try running (not debug) SP and see if you
see a temp table wizard come up?

As for the feature (be able to execute sql in the context/session of the
debugger, that's a nice feature and we'll consider that in the future. We do
have SQL Scrap book to let the user execute ad hoc SQL statements, but not
in the context of the debugged session.

Thanks and regards,
Hung

"Michael Peppler" <mpeppler@peppler.org> wrote in message
news:pan.2008.02.12.19.27.00.591491@peppler.org...
> On Tue, 12 Feb 2008 09:57:22 -0800, Mike Crocker wrote:
>
>> Michael,
>>
>> If you are using ASE then the #temp tables should be visible in your
>> Referenced Tables view.
>
> Hmmm - I am using ASE (12.5.4 ESD 7), but I most definitely do not see any
> of the temp tables in the Referenced Tables view.
>
> These temp tables are either created in the proc, or created in the
> calling proc and used in the current proc.
>
> Is there something that needs to be done to view this information?
> Does it matter if I'm logged in with sa_role or not?
>
> Thanks!
>
> Michael
> --
> Michael Peppler - Peppler Consulting SaRL
> mpeppler@peppler.org - http://www.peppler.org
> Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
> Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html
>


Pieter Coene Posted on 2008-02-15 08:41:36.0Z
Sender: 3a29.47b54156.1804289383@sybase.com
From: Pieter Coene
Newsgroups: sybase.public.workspace.general
Subject: Re: Debugging stored procs - viewing data in #temp tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47b55040.3b9b.1681692777@sybase.com>
References: <47b4b4c7$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 Feb 2008 00:41:36 -0800
X-Trace: forums-1-dub 1203064896 10.22.241.41 (15 Feb 2008 00:41:36 -0800)
X-Original-Trace: 15 Feb 2008 00:41:36 -0800, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:588
Article PK: 1088289

Hi,

My behaviour in WS 2.0 is as followed:

in a stored procedure, when you put a breakpoint BEFORE the
creation of the #temp table, the #temp table is not shown in
'referenced tables' (because WS calcalates the referenced
tables at the first breakpoint). When you put your first
breakpoint AFTER the creation of the temptable, it is shown
in 'referenced tables'.

Because our temptables could sometimes be very large, it
would be a great help to execute our own queries during
debug on them (in stead of just viewing the whole table,
which results of course in too many records)

Greetz
Pieter


mpeppler Posted on 2008-02-21 11:10:24.0Z
Sender: 4e83.47bc2c11.1804289383@sybase.com
From: mpeppler@peppler.org
Newsgroups: sybase.public.workspace.general
Subject: Re: Debugging stored procs - viewing data in #temp tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47bd5c20.6508.1681692777@sybase.com>
References: <47b4b4c7$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Feb 2008 03:10:24 -0800
X-Trace: forums-1-dub 1203592224 10.22.241.41 (21 Feb 2008 03:10:24 -0800)
X-Original-Trace: 21 Feb 2008 03:10:24 -0800, 10.22.241.41
Lines: 66
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:596
Article PK: 1088297

I just tried this again to get a better idea of what is
going on.

I tried a proc that creates several temp tables via SELECT
INTO and then calls lots of other procs.

Upon entering the proc you get the "computing referenced
tables" pop-up, and one of the temp tables does show up in
the Referenced Tables view (interestingly this is the second
table created in the proc, not the first)

I don't see any particular annotations, other than the
normal "Adaptive server has expanded all *..." comment right
before each SELECT ... INTO.

Michael

> Hi Mike,
>
> I was not able to reproduce the problem using
> WorkSpace2.0. The ASE non-sharable temp table should show
> up in the Referenced table view.
>
> Did you see any temp table related comments (annotation)
> at the beginning of the SP you were debugging? Can you
> try running (not debug) SP and see if you see a temp
> table wizard come up?
>
> As for the feature (be able to execute sql in the
> context/session of the debugger, that's a nice feature
> and we'll consider that in the future. We do have SQL
> Scrap book to let the user execute ad hoc SQL statements,
> but not in the context of the debugged session.
>
> Thanks and regards,
> Hung
> "Michael Peppler" <mpeppler@peppler.org> wrote in message
> news:pan.2008.02.12.19.27.00.591491@peppler.org...
> > On Tue, 12 Feb 2008 09:57:22 -0800, Mike Crocker wrote:
> >
> >> Michael,
> >>
> >> If you are using ASE then the #temp tables should be
> visible in your >> Referenced Tables view.
> >
> > Hmmm - I am using ASE (12.5.4 ESD 7), but I most
> > definitely do not see any of the temp tables in the
> Referenced Tables view. >
> > These temp tables are either created in the proc, or
> > created in the calling proc and used in the current
> proc. >
> > Is there something that needs to be done to view this
> > information? Does it matter if I'm logged in with
> sa_role or not? >
> > Thanks!
> >
> > Michael
> > --
> > Michael Peppler - Peppler
> > Consulting SaRL mpeppler@peppler.org -
> > http://www.peppler.org Sybase DBA/Developer -
> > TeamSybase: http://www.teamsybase.com Sybase on Linux
> > FAQ - http://www.peppler.org/FAQ/linux.html
>
>


Hung Hsi Posted on 2008-02-22 07:16:24.0Z
From: "Hung Hsi" <hhsi@sybase.com>
Newsgroups: sybase.public.workspace.general
References: <47b4b4c7$1@forums-1-dub> <47bd5c20.6508.1681692777@sybase.com>
Subject: Re: Debugging stored procs - viewing data in #temp tables
Lines: 87
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47be76c8$1@forums-1-dub>
Date: 21 Feb 2008 23:16:24 -0800
X-Trace: forums-1-dub 1203664584 10.22.241.152 (21 Feb 2008 23:16:24 -0800)
X-Original-Trace: 21 Feb 2008 23:16:24 -0800, vip152.sybase.com
X-Authenticated-User: wsctp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:598
Article PK: 1088298

Michael,

Can you try setting break point at each of the Select into statement? Only
when the temp table creation statement (in this case, Select into), you will
see the temp table in the Referenced table view.

If you have a stored procedure that just references a #temp table, e.g.,
'select * from #myTempTable', then when you RUN it the first time, you
should see a temp table wizard pop up to help define the temp table
definition, and it will add annotations that contains the temp table 'create
table' statement. Once the annotation is created, you can run or debug the
SP (that references the #temptable) , and should see the temp table in
Referenced Table view. And you should be able to open Table Data Editor in
Referenced Table view to insert rows to the temp table.

Thanks and regards,
Hung

<mpeppler@peppler.org> wrote in message
news:47bd5c20.6508.1681692777@sybase.com...
>I just tried this again to get a better idea of what is
> going on.
>
> I tried a proc that creates several temp tables via SELECT
> INTO and then calls lots of other procs.
>
> Upon entering the proc you get the "computing referenced
> tables" pop-up, and one of the temp tables does show up in
> the Referenced Tables view (interestingly this is the second
> table created in the proc, not the first)
>
> I don't see any particular annotations, other than the
> normal "Adaptive server has expanded all *..." comment right
> before each SELECT ... INTO.
>
> Michael
>
>
>> Hi Mike,
>>
>> I was not able to reproduce the problem using
>> WorkSpace2.0. The ASE non-sharable temp table should show
>> up in the Referenced table view.
>>
>> Did you see any temp table related comments (annotation)
>> at the beginning of the SP you were debugging? Can you
>> try running (not debug) SP and see if you see a temp
>> table wizard come up?
>>
>> As for the feature (be able to execute sql in the
>> context/session of the debugger, that's a nice feature
>> and we'll consider that in the future. We do have SQL
>> Scrap book to let the user execute ad hoc SQL statements,
>> but not in the context of the debugged session.
>>
>> Thanks and regards,
>> Hung
>> "Michael Peppler" <mpeppler@peppler.org> wrote in message
>> news:pan.2008.02.12.19.27.00.591491@peppler.org...
>> > On Tue, 12 Feb 2008 09:57:22 -0800, Mike Crocker wrote:
>> >
>> >> Michael,
>> >>
>> >> If you are using ASE then the #temp tables should be
>> visible in your >> Referenced Tables view.
>> >
>> > Hmmm - I am using ASE (12.5.4 ESD 7), but I most
>> > definitely do not see any of the temp tables in the
>> Referenced Tables view. >
>> > These temp tables are either created in the proc, or
>> > created in the calling proc and used in the current
>> proc. >
>> > Is there something that needs to be done to view this
>> > information? Does it matter if I'm logged in with
>> sa_role or not? >
>> > Thanks!
>> >
>> > Michael
>> > --
>> > Michael Peppler - Peppler
>> > Consulting SaRL mpeppler@peppler.org -
>> > http://www.peppler.org Sybase DBA/Developer -
>> > TeamSybase: http://www.teamsybase.com Sybase on Linux
>> > FAQ - http://www.peppler.org/FAQ/linux.html
>>
>>


Mike Crocker Posted on 2008-02-14 20:02:22.0Z
From: "Mike Crocker" <crocker@sybase.com>
Newsgroups: sybase.public.workspace.general
References: <47b1a1f8.67c2.1681692777@sybase.com> <47b1de02@forums-1-dub> <pan.2008.02.12.19.27.00.591491@peppler.org>
Subject: Re: Debugging stored procs - viewing data in #temp tables
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47b49e4e@forums-1-dub>
Date: 14 Feb 2008 12:02:22 -0800
X-Trace: forums-1-dub 1203019342 10.22.241.152 (14 Feb 2008 12:02:22 -0800)
X-Original-Trace: 14 Feb 2008 12:02:22 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:585
Article PK: 1088287

Michael,

Hmmmmm.... this works great for me so I'm asking the engineering team for
any ideas on issues you may be hitting.

I'll get back to you soon.

mike

"Michael Peppler" <mpeppler@peppler.org> wrote in message
news:pan.2008.02.12.19.27.00.591491@peppler.org...
> On Tue, 12 Feb 2008 09:57:22 -0800, Mike Crocker wrote:
>
>> Michael,
>>
>> If you are using ASE then the #temp tables should be visible in your
>> Referenced Tables view.
>
> Hmmm - I am using ASE (12.5.4 ESD 7), but I most definitely do not see any
> of the temp tables in the Referenced Tables view.
>
> These temp tables are either created in the proc, or created in the
> calling proc and used in the current proc.
>
> Is there something that needs to be done to view this information?
> Does it matter if I'm logged in with sa_role or not?
>
> Thanks!
>
> Michael
> --
> Michael Peppler - Peppler Consulting SaRL
> mpeppler@peppler.org - http://www.peppler.org
> Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
> Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html
>


Pieter Coene Posted on 2008-02-13 07:46:48.0Z
Sender: 5165.47b06926.1804289383@sybase.com
From: Pieter Coene
Newsgroups: sybase.public.workspace.general
Subject: Re: Debugging stored procs - viewing data in #temp tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47b2a068.16a.1681692777@sybase.com>
References: <47b1a1f8.67c2.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Feb 2008 23:46:48 -0800
X-Trace: forums-1-dub 1202888808 10.22.241.41 (12 Feb 2008 23:46:48 -0800)
X-Original-Trace: 12 Feb 2008 23:46:48 -0800, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:583
Article PK: 1088268

Hi Michael,

i've been asking this feature since Workspace 1.0. This
would be very handy and frankly, sometimes debugging is not
very useful if you can't query your temp tables on the
fly...

Greetz
Pieter