How can I see Query source text

How can I see Query source text

Post by vd » Thu, 15 Jul 1999 04:00:00



When I do sp_what, I can see that particular query is doing an update or
insert (whatever...)
The question is : How can I see actual query text during runtime (it
should be some place in the memory!).
Example: someone starts:    insert <table_name>
                                                values (......). How can
I see that query during runtime?
Thanks.
 
 
 

How can I see Query source text

Post by Andriy Shlyko » Fri, 16 Jul 1999 04:00:00


You can see query plan (sp_showplan),
but query text is available only through system audit.

Andrew Shlykov


> When I do sp_what, I can see that particular query is doing an update or
> insert (whatever...)


 
 
 

How can I see Query source text

Post by weedwi.. » Fri, 16 Jul 1999 04:00:00


There are tools like Cyrano/Workbench that do this on the fly.

dowen



> You can see query plan (sp_showplan),
> but query text is available only through system audit.

> Andrew Shlykov


> > When I do sp_what, I can see that particular query is doing an
update or
> > insert (whatever...)

--
David Owen  7, Stradbrooke Rise SW, Calgary, AB, Canada

You needn't be well to wealthy, but you gotta be whole to be holy.
                                            Greg Lake, Works Vol 1

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

How can I see Query source text

Post by Randy Reite » Fri, 16 Jul 1999 04:00:00


Refer to the Zero Impact Sql and Service Level Monitor at www.sqlpower.com

>When I do sp_what, I can see that particular query is doing an update or
>insert (whatever...)
>The question is : How can I see actual query text during runtime (it
>should be some place in the memory!).
>Example: someone starts:    insert <table_name>
>                                                values (......). How can
>I see that query during runtime?
>Thanks.

 
 
 

How can I see Query source text

Post by Alexy Timoni » Sat, 17 Jul 1999 04:00:00


It depends on which version of Adaptive Server do you use. Starting with
11.5.1 you could see text of query which are currently processed  with aim
of Sybase Central and Monitor Server. Do the following.
1. Install and run Monitor Server on your server machine.
2. Install JavaSoft's Java Runtime Environment (you could find it on Sybase
CDs or at www.javasoft.com ). I use version 1.1.7.
3. Add information about Monitor Server  at sql.ini file on your client
computer.
4. Run Sybase Cental, log in your Adaptive Server Enterprise, click right
mouse button on server name - to 'properties'. Then go to Monitor Server tab
and add your Monitor Server.
5. You could see new element at tree called Monitors. There is monitor
window called 'Process current SQL Statement'. You could also see actual
query plan.

Hope this will help
Alexy


> When I do sp_what, I can see that particular query is doing an update or
> insert (whatever...)
> The question is : How can I see actual query text during runtime (it
> should be some place in the memory!).
> Example: someone starts:    insert <table_name>
>                                                 values (......). How can
> I see that query during runtime?
> Thanks.

 
 
 

How can I see Query source text

Post by Kevin Sherloc » Sat, 17 Jul 1999 04:00:00


Without buying any more products, having to install auditing, monitor
server, etc you have the option of doing the following as "sa" login:

exec sp_role 'grant','sybase_ts_role',sa
go
dbcc traceon(3604)
go
dbcc pss(<suid>,<spid>,<0,1>)
go

where <suid> is server login id, <spid> is server process id, and
0=print header info including SQL Text of last command sent, and
1=include among other things, the current query plan.

The usual caveats apply about "dbcc pss" being an "unsupported" feature,
and others have said it crashes their servers.  I've been doing this for
years without any troubles...


> When I do sp_what, I can see that particular query is doing an update or
> insert (whatever...)
> The question is : How can I see actual query text during runtime (it
> should be some place in the memory!).
> Example: someone starts:    insert <table_name>
>                                                 values (......). How can
> I see that query during runtime?
> Thanks.

 
 
 

How can I see Query source text

Post by vd » Sat, 17 Jul 1999 04:00:00


Kevin, that worked great! I could see query plan for particular stement that
is being executed. However, I wasn't able to see "actual query" (criteria that
is being used in the query, etc.) All I saw is table name, update mode, etc.
Thanks Kevin.

> Without buying any more products, having to install auditing, monitor
> server, etc you have the option of doing the following as "sa" login:

> exec sp_role 'grant','sybase_ts_role',sa
> go
> dbcc traceon(3604)
> go
> dbcc pss(<suid>,<spid>,<0,1>)
> go

> where <suid> is server login id, <spid> is server process id, and
> 0=print header info including SQL Text of last command sent, and
> 1=include among other things, the current query plan.

> The usual caveats apply about "dbcc pss" being an "unsupported" feature,
> and others have said it crashes their servers.  I've been doing this for
> years without any troubles...


> > When I do sp_what, I can see that particular query is doing an update or
> > insert (whatever...)
> > The question is : How can I see actual query text during runtime (it
> > should be some place in the memory!).
> > Example: someone starts:    insert <table_name>
> >                                                 values (......). How can
> > I see that query during runtime?
> > Thanks.

 
 
 

How can I see Query source text

Post by vd » Sat, 17 Jul 1999 04:00:00


Kevin, that worked great! I could see query plan for particular stement that
is being executed. However, I wasn't able to see "actual query" (criteria that
is being used in the query, etc.) All I saw is table name, update mode, etc.
Thanks Kevin.

> Without buying any more products, having to install auditing, monitor
> server, etc you have the option of doing the following as "sa" login:

> exec sp_role 'grant','sybase_ts_role',sa
> go
> dbcc traceon(3604)
> go
> dbcc pss(<suid>,<spid>,<0,1>)
> go

> where <suid> is server login id, <spid> is server process id, and
> 0=print header info including SQL Text of last command sent, and
> 1=include among other things, the current query plan.

> The usual caveats apply about "dbcc pss" being an "unsupported" feature,
> and others have said it crashes their servers.  I've been doing this for
> years without any troubles...


> > When I do sp_what, I can see that particular query is doing an update or
> > insert (whatever...)
> > The question is : How can I see actual query text during runtime (it
> > should be some place in the memory!).
> > Example: someone starts:    insert <table_name>
> >                                                 values (......). How can
> > I see that query during runtime?
> > Thanks.

 
 
 

How can I see Query source text

Post by vd » Sat, 17 Jul 1999 04:00:00


Kevin, that worked great! I could see query plan for particular stement that
is being executed. However, I wasn't able to see "actual query" (criteria that
is being used in the query, etc.) All I saw is table name, update mode, etc.
Thanks Kevin.

> Without buying any more products, having to install auditing, monitor
> server, etc you have the option of doing the following as "sa" login:

> exec sp_role 'grant','sybase_ts_role',sa
> go
> dbcc traceon(3604)
> go
> dbcc pss(<suid>,<spid>,<0,1>)
> go

> where <suid> is server login id, <spid> is server process id, and
> 0=print header info including SQL Text of last command sent, and
> 1=include among other things, the current query plan.

> The usual caveats apply about "dbcc pss" being an "unsupported" feature,
> and others have said it crashes their servers.  I've been doing this for
> years without any troubles...


> > When I do sp_what, I can see that particular query is doing an update or
> > insert (whatever...)
> > The question is : How can I see actual query text during runtime (it
> > should be some place in the memory!).
> > Example: someone starts:    insert <table_name>
> >                                                 values (......). How can
> > I see that query during runtime?
> > Thanks.

 
 
 

1. ? text file format i have seen?

VB5 program i have seen reads from text file that looks like this:

<Title>Database Design

   Some Paragraph would go here.

<End>

<Title>Then it repeats

Any ideas on how to write code that can read from a file in this manner?
I'm a newbie so examples would help. Please post response.

Thanks,

Enoemos

2. Creating a month by month report

3. Text box seen throghout the application

4. SQL Server Desktop Edition

5. Please help...INSERT INTO QUERY using a query def as the source

6. RPC question

7. Seeing saved queries in secured Access database

8. How do I capture the NT User ID

9. Update query using joined query as source

10. MDX : Canned Report or OLAP

11. Anyone know of some canned (cheap or free) DB performance testing software

12. canned code to get db on web quickly via perl or

13. Cans access2.0 engine access btrieve files?