473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Viewing events as they happen?

Hi,

I am trying to debug some queries that are being generated by an
external program, and I have no way of finding out what the actual
syntax of the query is from within the program itself. This means that
when the query fails I am left with only a very unhelpful message.

So what I was wondering, was whether there is a way that I can view the
actual queries that are sent to SQL server as they happen, or if a
real-time solution doesn't exist, then some way I can look back after
the event and see the syntax of the queries?

Ideally, what I would like to do is see the queries in the form they
were sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", as
this would help me to figure out where the generated queries are going
wrong.

Cheers,

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.
Mar 5 '07 #1
5 1240
On 05.03.2007 11:31, Dylan Parry wrote:
I am trying to debug some queries that are being generated by an
external program, and I have no way of finding out what the actual
syntax of the query is from within the program itself. This means that
when the query fails I am left with only a very unhelpful message.

So what I was wondering, was whether there is a way that I can view the
actual queries that are sent to SQL server as they happen, or if a
real-time solution doesn't exist, then some way I can look back after
the event and see the syntax of the queries?

Ideally, what I would like to do is see the queries in the form they
were sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", as
this would help me to figure out where the generated queries are going
wrong.
SQL Profiler is your friend - for online as well as offline
investigation. You can even have it include execution plans and timings.

Kind regards

robert

F'Up comp.databases.ms-sqlserver
Mar 5 '07 #2
Dylan
Take a look at SQL Server Profiler to capture those events

"Dylan Parry" <us****@dylanparry.comwrote in message
news:45*********************@news.gradwell.net...
Hi,

I am trying to debug some queries that are being generated by an
external program, and I have no way of finding out what the actual
syntax of the query is from within the program itself. This means that
when the query fails I am left with only a very unhelpful message.

So what I was wondering, was whether there is a way that I can view the
actual queries that are sent to SQL server as they happen, or if a
real-time solution doesn't exist, then some way I can look back after
the event and see the syntax of the queries?

Ideally, what I would like to do is see the queries in the form they
were sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", as
this would help me to figure out where the generated queries are going
wrong.

Cheers,

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.

Mar 5 '07 #3
Dylan Parry wrote:
[...]

Thanks to both of you that replied. I'll take a look at Profiler :)

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.
Mar 5 '07 #4
If you have loads of activity on the server, use the filter function when
you set up a Trace to only view activity from the dab you are focusing on

--

Jack Vamvas
___________________________________
The latest IT jobs - www.ITjobfeed.com
<a href="http://www.itjobfeed.com">UK IT Jobs</a>
"Dylan Parry" <us****@dylanparry.comwrote in message
news:45*********************@news.gradwell.net...
Dylan Parry wrote:
[...]

Thanks to both of you that replied. I'll take a look at Profiler :)

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.

Mar 5 '07 #5
Jack Vamvas wrote:
If you have loads of activity on the server, use the filter function when
you set up a Trace to only view activity from the dab you are focusing on
Luckily the server is my desktop machine, on which I develop sites etc,
so the only activity was my own :)

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.
Mar 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: V | last post by:
I have found that when I have a composite control that uses the CreateChildControls method, on a regular page load, Page_Load executes before CreateChildControls, but on a postback it is the...
12
by: Scott Simonson | last post by:
Does anyone have any idea why Access's module editor doesn't scroll with the mouse. I noticed this behavor in Access 2k also. While viewing code in a module (or any thing for that matter) the wheel...
11
by: Steve Jorgensen | last post by:
I've recently been playing with some UI ideas that require the user of a timer to drive animation. The problem I'm having is that Access routinely stops firing timer events for long periods of...
2
by: Eric Newton | last post by:
VB's more declarative nature of handling events is golden. I'm hoping C# will acquire this type of deal, in addition to the anonymous delegates. could do same as vb (actually would be easier to...
5
by: JaD | last post by:
I am trying to understand events and delegates which is confusing me. Okay I have a user control that derives from a GroupBox called (MyPanel) I added this: public delegate void Collapsed();...
4
by: LP | last post by:
Hello! I am still transitioning from VB.NET to C#. I undertand the basic concepts of Delegates, more so of Events and somewhat understand AsyncCallback methods. But I need some clarification on...
1
by: LDD | last post by:
I have VB.Net project that I'm working on. This morning, when I loaded the project, and clicked on the main form for the project to view in designer mode. I get the following error Property...
7
by: Thorbjørn Jørgensen | last post by:
Hi I am currently creating a WLAN simulation problem and have encountered a problem... I have two classes (Channel and RadioLayer), and for instance create the following objects: Channel...
6
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.