Showing posts with label particular. Show all posts
Showing posts with label particular. Show all posts

Sunday, March 25, 2012

Case sensitive/insensitive

Hi, I configure the SQL Server as case-insensitive. Can I configure a particular table's column to be case-sensitive
Thank you.During the instalation you can choose the default collation for all
databases, for a particular database you can define this durin the database
creation process.
Look at bol for COLLATE clause.
HTH
Wandenkolk T. Neto
MCSE, MCDBA, MCP
"Keith" <anonymous@.discussions.microsoft.com> wrote in message
news:10435BC6-7691-4655-8D52-CAD92F45FBD0@.microsoft.com...
> Hi, I configure the SQL Server as case-insensitive. Can I configure a
particular table's column to be case-sensitive?
> Thank you.|||To add to Wandenkolk's response, in SQL Server 2000 you can specify
COLLATE at the column level to control case sensitivity.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Keith" <anonymous@.discussions.microsoft.com> wrote in message
news:10435BC6-7691-4655-8D52-CAD92F45FBD0@.microsoft.com...
> Hi, I configure the SQL Server as case-insensitive. Can I configure a
particular table's column to be case-sensitive?
> Thank you.|||I was also wondering about case senitivity on columns only.
Under EM on each table I found where I can change the collate... but
there is about 50 different ones listed. Where can I find out about
the differences. Mine is currently set to
"SQL_Latin1_General_CP1_CI_AI"
Whatever that is...
Al.
On Sun, 16 Nov 2003 21:47:25 -0600, "Dan Guzman"
<danguzman@.nospam-earthlink.net> wrote:
>To add to Wandenkolk's response, in SQL Server 2000 you can specify
>COLLATE at the column level to control case sensitivity.|||You can get a list of available collations with fn_helpcollations:
SELECT * FROM ::fn_helpcollations()
This is described in the COLLATE topic in the Books Online
<tsqlref.chm::/ts_ca-co_5z55.htm>.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Harag" <harag@.REMOVETHESECAPITALSsofthome.net> wrote in message
news:7m7hrv4toku4433mpmfqf343ultn44ntuu@.4ax.com...
> I was also wondering about case senitivity on columns only.
> Under EM on each table I found where I can change the collate... but
> there is about 50 different ones listed. Where can I find out about
> the differences. Mine is currently set to
> "SQL_Latin1_General_CP1_CI_AI"
> Whatever that is...
> Al.
> On Sun, 16 Nov 2003 21:47:25 -0600, "Dan Guzman"
> <danguzman@.nospam-earthlink.net> wrote:
> >To add to Wandenkolk's response, in SQL Server 2000 you can specify
> >COLLATE at the column level to control case sensitivity.
>sql

Tuesday, March 20, 2012

Case Function on a Cell

Hi all,
have a Matrix-based report that tracks project's %complete by period id for a
particular year, as follows:
- 2005
---
01 02 03 04 05 06 07 08 09 10 11 12
project1 10% 12% 18% 25% 38% 52%
project2 13% 29% 68% 89% 100%
project3 25% 68% 100%
:
:
:
I need to know how to change the header grop of Period_id "J F M A M J J A S
O N D" instead of "01 02 03 04 05 06 07 08 09 10 11 12" inside a statement
in the report, since i can not control the sql statement that feeds the
report.
Thank you in advance
Tony
--
Message posted via http://www.sqlmonster.comHave a look at my reply for "Proper syntax of CASE()" etc - in other words
write a little VB .net function in the Report's code box, then call the
funtion to return a string value
"Antony Altobelli via SQLMonster.com" wrote:
> Hi all,
> have a Matrix-based report that tracks project's %complete by period id for a
> particular year, as follows:
> - 2005
> ---
> 01 02 03 04 05 06 07 08 09 10 11 12
> project1 10% 12% 18% 25% 38% 52%
> project2 13% 29% 68% 89% 100%
> project3 25% 68% 100%
> :
> :
> :
> I need to know how to change the header grop of Period_id "J F M A M J J A S
> O N D" instead of "01 02 03 04 05 06 07 08 09 10 11 12" inside a statement
> in the report, since i can not control the sql statement that feeds the
> report.
> Thank you in advance
> Tony
> --
> Message posted via http://www.sqlmonster.com
>

Monday, March 19, 2012

CASE and INSERT statements

Hi,
I need to write a simple script which i am getting rather on how to
write. Basically, what i need to do is:
If no records exist for a particular condition i.e. TableID=3 and
TableTypeID=4, then insert a row into Tabel1.
I have tried all sorts but I think i have got the order mixed up and that’
s
why it is not working.
This is what I have tried so far:
select * ,
case
when not exists (select * from Table1 where TableID=3 and TableTypeID=14)
then insert into Table1 (TableID, TableTypeID) values (3,14)
end
from Table1
I have tried the above in various different formats but with no success.
Any help/advice much appreciated.
Thanks,
JJens
> If no records exist for a particular condition i.e. TableID=3 and
> TableTypeID=4, then insert a row into Tabel1.
IF NOT EXISTS (SELECT * FROM Table WHERE TableID=3 and TableTypeID=4)
INSERT INTO Table balblabala alaba
ELSE
Do it something else here
"JenC" <JenC@.discussions.microsoft.com> wrote in message
news:57ED03B3-B064-4793-B1AC-C5F4E891EA5E@.microsoft.com...
> Hi,
> I need to write a simple script which i am getting rather on how
> to
> write. Basically, what i need to do is:
> If no records exist for a particular condition i.e. TableID=3 and
> TableTypeID=4, then insert a row into Tabel1.
> I have tried all sorts but I think i have got the order mixed up and that
s
> why it is not working.
> This is what I have tried so far:
> select * ,
> case
> when not exists (select * from Table1 where TableID=3 and TableTypeID=14)
> then insert into Table1 (TableID, TableTypeID) values (3,14)
> end
> from Table1
> I have tried the above in various different formats but with no success.
> Any help/advice much appreciated.
> Thanks,
> J
>|||
This will never evaluate to true
-TableId can=B4t be 3 AND 14 at the same time
select * from Table1 where TableID=3D3 and TableTypeID=3D14
For an inline Query (with an OR rather than the AND which is causing
the above issue)
insert into Table1
(
TableID,
TableTypeID
)
SELECT 3,14
WHERE NOT EXISTS
(
select * from Table1 where TableID=3D3
OR TableTypeID=3D14
)=20
HTH, Jens SUessmeyer.

Cascading Referential Integrity Constraints

In a master-detail one-to-many relationship, I have the foreign key set to '
allow null'. I would like, in this particular case, to automatically have th
e foreign key set to null when the master/one record is deleted.
My understanding from the 'books on line' is that cascading a delete will al
ways delete the detail/many records when the master/one record is deleted. I
f the foreign key is nullable, would it not make sense to null it, and if it
is not nullable to delete
the detail/many records?
Is there any efficient way to set a table up so that foreign keys are automa
tically nulled when the primary key record is deleted?That functionality won't be available until the next release of SQL Server
(Yukon). Meanwhile, you will have to handle RI through triggers in that
case. This link may be useful:
http://msdn.microsoft.com/library/d...efintegrity.asp
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"John Austin" <John.Austin@.ManagedNewsgroups.com> wrote in message
news:025F9D33-F01D-43AA-BF12-09C50AAD4670@.microsoft.com...
In a master-detail one-to-many relationship, I have the foreign key set to
'allow null'. I would like, in this particular case, to automatically have
the foreign key set to null when the master/one record is deleted.
My understanding from the 'books on line' is that cascading a delete will
always delete the detail/many records when the master/one record is deleted.
If the foreign key is nullable, would it not make sense to null it, and if
it is not nullable to delete the detail/many records?
Is there any efficient way to set a table up so that foreign keys are
automatically nulled when the primary key record is deleted?

Saturday, February 25, 2012

capturing reportviewer parameters

Hi Guys
I have an application which consists of a navigation bar and a frame.
When a user selects a hyperlink on the navigation bar that particular
report is displayed in the frame. Now these reports contains links
through which the user can jump to some other report which is not
present in the navigation bar. Now when the user clicks any other link
on the navigation bar the new report is starting up using the default
parameters set for that report. But i dont want this to happen. The
report viewer should take the latest parameters set in the report
viewer and pass them to the new report that will be generated when the
user clicks on the navigation bar. Can any body help with this aspect.
it is blowing up my brains. dont even know that whether this is
possible.
Also can we somehow get the url of the report being displayed in the
report viewer." i know that report viewer is an iframe which uses url
access beneath it to access the reports." Only the first report server
url is encoded in the application. But when the user navigated to some
other report through the links in reports how do i get access to that
particular report url .
any help will really be great. I am wondering is it really possible to
do the stuff i just mentioned above. Any tips on this will really save
me a lot of time.
Thanks in advance.../......
Passxunlimitedyou have to add some code to save the parameters and reuse them when you
open a new report.
you have to intercept some events (from the reportviewer control) to
retrieve the parameters when the first report is refreshed with new
parameters, save the values into a the session, in the page load event if
you open a new report change the values of the parameters of these reports
regarding what you have saved before.
its not complicated, the API is easy to use to do this.
"Passx" <passxunlimited@.gmail.com> wrote in message
news:1167432103.071025.84650@.a3g2000cwd.googlegroups.com...
> Hi Guys
> I have an application which consists of a navigation bar and a frame.
> When a user selects a hyperlink on the navigation bar that particular
> report is displayed in the frame. Now these reports contains links
> through which the user can jump to some other report which is not
> present in the navigation bar. Now when the user clicks any other link
> on the navigation bar the new report is starting up using the default
> parameters set for that report. But i dont want this to happen. The
> report viewer should take the latest parameters set in the report
> viewer and pass them to the new report that will be generated when the
> user clicks on the navigation bar. Can any body help with this aspect.
> it is blowing up my brains. dont even know that whether this is
> possible.
> Also can we somehow get the url of the report being displayed in the
> report viewer." i know that report viewer is an iframe which uses url
> access beneath it to access the reports." Only the first report server
> url is encoded in the application. But when the user navigated to some
> other report through the links in reports how do i get access to that
> particular report url .
> any help will really be great. I am wondering is it really possible to
> do the stuff i just mentioned above. Any tips on this will really save
> me a lot of time.
> Thanks in advance.../......
> Passxunlimited
>|||i was trying to do exactly the same thing . But could not find any
events associated with report viewer wherein i can catch the parameter
values or session state. Any idea or resources regarding this.
thanks
passx
Jeje wrote:
> you have to add some code to save the parameters and reuse them when you
> open a new report.
> you have to intercept some events (from the reportviewer control) to
> retrieve the parameters when the first report is refreshed with new
> parameters, save the values into a the session, in the page load event if
> you open a new report change the values of the parameters of these reports
> regarding what you have saved before.
> its not complicated, the API is easy to use to do this.
>
> "Passx" <passxunlimited@.gmail.com> wrote in message
> news:1167432103.071025.84650@.a3g2000cwd.googlegroups.com...
> > Hi Guys
> >
> > I have an application which consists of a navigation bar and a frame.
> > When a user selects a hyperlink on the navigation bar that particular
> > report is displayed in the frame. Now these reports contains links
> > through which the user can jump to some other report which is not
> > present in the navigation bar. Now when the user clicks any other link
> > on the navigation bar the new report is starting up using the default
> > parameters set for that report. But i dont want this to happen. The
> > report viewer should take the latest parameters set in the report
> > viewer and pass them to the new report that will be generated when the
> > user clicks on the navigation bar. Can any body help with this aspect.
> > it is blowing up my brains. dont even know that whether this is
> > possible.
> >
> > Also can we somehow get the url of the report being displayed in the
> > report viewer." i know that report viewer is an iframe which uses url
> > access beneath it to access the reports." Only the first report server
> > url is encoded in the application. But when the user navigated to some
> > other report through the links in reports how do i get access to that
> > particular report url .
> >
> > any help will really be great. I am wondering is it really possible to
> > do the stuff i just mentioned above. Any tips on this will really save
> > me a lot of time.
> >
> > Thanks in advance.../......
> > Passxunlimited
> >|||try the onunload event or any event after the rendering step.
"Passx" <passxunlimited@.gmail.com> wrote in message
news:1167942475.840285.10930@.51g2000cwl.googlegroups.com...
>i was trying to do exactly the same thing . But could not find any
> events associated with report viewer wherein i can catch the parameter
> values or session state. Any idea or resources regarding this.
>
> thanks
> passx
> Jeje wrote:
>> you have to add some code to save the parameters and reuse them when you
>> open a new report.
>> you have to intercept some events (from the reportviewer control) to
>> retrieve the parameters when the first report is refreshed with new
>> parameters, save the values into a the session, in the page load event if
>> you open a new report change the values of the parameters of these
>> reports
>> regarding what you have saved before.
>> its not complicated, the API is easy to use to do this.
>>
>> "Passx" <passxunlimited@.gmail.com> wrote in message
>> news:1167432103.071025.84650@.a3g2000cwd.googlegroups.com...
>> > Hi Guys
>> >
>> > I have an application which consists of a navigation bar and a frame.
>> > When a user selects a hyperlink on the navigation bar that particular
>> > report is displayed in the frame. Now these reports contains links
>> > through which the user can jump to some other report which is not
>> > present in the navigation bar. Now when the user clicks any other link
>> > on the navigation bar the new report is starting up using the default
>> > parameters set for that report. But i dont want this to happen. The
>> > report viewer should take the latest parameters set in the report
>> > viewer and pass them to the new report that will be generated when the
>> > user clicks on the navigation bar. Can any body help with this aspect.
>> > it is blowing up my brains. dont even know that whether this is
>> > possible.
>> >
>> > Also can we somehow get the url of the report being displayed in the
>> > report viewer." i know that report viewer is an iframe which uses url
>> > access beneath it to access the reports." Only the first report server
>> > url is encoded in the application. But when the user navigated to some
>> > other report through the links in reports how do i get access to that
>> > particular report url .
>> >
>> > any help will really be great. I am wondering is it really possible to
>> > do the stuff i just mentioned above. Any tips on this will really save
>> > me a lot of time.
>> >
>> > Thanks in advance.../......
>> > Passxunlimited
>> >
>

Tuesday, February 14, 2012

Can't use Profiler to get execution plan for a particular query

I am trying to troubleshoot some performance problems and I am trying
to set up Profiler so that I can look at the execution plan of a
particular stored procedure. I am using the ExecutionPlan event class
in the Performance event category. I am also setting up a filter on
ObjectID so that only activity related to this particular store
procedure is returned.
However Profiler is capturing ALL the activity on the server. Filtering
by ObjectID doesn't seem to make any difference even though according
to BOL the ObjectID is a valid data column for the ExecutionPlan event.
Am I missing something or is this a bug in SQL Server/error in the BOL
documentation?
Thanks!Are you saying that you are also capturing System IDs , if you put ObjectID
greater than or equal to 100 - this will disclude System Objects.
This may not be complteley relevant to your problem , but you could also use
the DatabaseID / DatabaseName filter
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
<pshroads@.gmail.com> wrote in message
news:1150241832.487422.17030@.y43g2000cwc.googlegroups.com...
> I am trying to troubleshoot some performance problems and I am trying
> to set up Profiler so that I can look at the execution plan of a
> particular stored procedure. I am using the ExecutionPlan event class
> in the Performance event category. I am also setting up a filter on
> ObjectID so that only activity related to this particular store
> procedure is returned.
> However Profiler is capturing ALL the activity on the server. Filtering
> by ObjectID doesn't seem to make any difference even though according
> to BOL the ObjectID is a valid data column for the ExecutionPlan event.
> Am I missing something or is this a bug in SQL Server/error in the BOL
> documentation?
> Thanks!
>|||The ExecutionPlan event class doesn't populate the object id unfortunately.
So, we cannot filter on it in SQL Server 2000 Profiler. But it does populate
the database id, so you can filter on that to reduce the amount of data
being captured by Profiler. You can also filter on the hostname, if you know
from which machine the request is coming in.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<pshroads@.gmail.com> wrote in message
news:1150241832.487422.17030@.y43g2000cwc.googlegroups.com...
I am trying to troubleshoot some performance problems and I am trying
to set up Profiler so that I can look at the execution plan of a
particular stored procedure. I am using the ExecutionPlan event class
in the Performance event category. I am also setting up a filter on
ObjectID so that only activity related to this particular store
procedure is returned.
However Profiler is capturing ALL the activity on the server. Filtering
by ObjectID doesn't seem to make any difference even though according
to BOL the ObjectID is a valid data column for the ExecutionPlan event.
Am I missing something or is this a bug in SQL Server/error in the BOL
documentation?
Thanks!|||Are you saying that you are also capturing System IDs , if you put ObjectID
greater than or equal to 100 - this will disclude System Objects.
This may not be complteley relevant to your problem , but you could also use
the DatabaseID / DatabaseName filter
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
<pshroads@.gmail.com> wrote in message
news:1150241832.487422.17030@.y43g2000cwc.googlegroups.com...
> I am trying to troubleshoot some performance problems and I am trying
> to set up Profiler so that I can look at the execution plan of a
> particular stored procedure. I am using the ExecutionPlan event class
> in the Performance event category. I am also setting up a filter on
> ObjectID so that only activity related to this particular store
> procedure is returned.
> However Profiler is capturing ALL the activity on the server. Filtering
> by ObjectID doesn't seem to make any difference even though according
> to BOL the ObjectID is a valid data column for the ExecutionPlan event.
> Am I missing something or is this a bug in SQL Server/error in the BOL
> documentation?
> Thanks!
>|||The ExecutionPlan event class doesn't populate the object id unfortunately.
So, we cannot filter on it in SQL Server 2000 Profiler. But it does populate
the database id, so you can filter on that to reduce the amount of data
being captured by Profiler. You can also filter on the hostname, if you know
from which machine the request is coming in.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<pshroads@.gmail.com> wrote in message
news:1150241832.487422.17030@.y43g2000cwc.googlegroups.com...
I am trying to troubleshoot some performance problems and I am trying
to set up Profiler so that I can look at the execution plan of a
particular stored procedure. I am using the ExecutionPlan event class
in the Performance event category. I am also setting up a filter on
ObjectID so that only activity related to this particular store
procedure is returned.
However Profiler is capturing ALL the activity on the server. Filtering
by ObjectID doesn't seem to make any difference even though according
to BOL the ObjectID is a valid data column for the ExecutionPlan event.
Am I missing something or is this a bug in SQL Server/error in the BOL
documentation?
Thanks!|||Thanks for your reply. Do you know of any way to get the execution plan
for a query that is already running? Our database is too active to run
a profiler for an extended period of time to catch this intermittent
problem but when it's occuring I'd like to be able to see the query
plan that it's using.
Thanks|||Thanks for your reply. Do you know of any way to get the execution plan
for a query that is already running? Our database is too active to run
a profiler for an extended period of time to catch this intermittent
problem but when it's occuring I'd like to be able to see the query
plan that it's using.
Thanks|||I am not aware of a way of getting execution plan of a query while it is
running, without using Profiler.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<pshroads@.gmail.com> wrote in message
news:1150323592.065493.262700@.f6g2000cwb.googlegroups.com...
Thanks for your reply. Do you know of any way to get the execution plan
for a query that is already running? Our database is too active to run
a profiler for an extended period of time to catch this intermittent
problem but when it's occuring I'd like to be able to see the query
plan that it's using.
Thanks|||I am not aware of a way of getting execution plan of a query while it is
running, without using Profiler.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<pshroads@.gmail.com> wrote in message
news:1150323592.065493.262700@.f6g2000cwb.googlegroups.com...
Thanks for your reply. Do you know of any way to get the execution plan
for a query that is already running? Our database is too active to run
a profiler for an extended period of time to catch this intermittent
problem but when it's occuring I'd like to be able to see the query
plan that it's using.
Thanks|||Sorry I should have clarified - even Profiler won't give me the
execution plan for a query that is already running when I start the
trace, correct? I would have to already have the trace running first.

Can't use Profiler to get execution plan for a particular query

I am trying to troubleshoot some performance problems and I am trying
to set up Profiler so that I can look at the execution plan of a
particular stored procedure. I am using the ExecutionPlan event class
in the Performance event category. I am also setting up a filter on
ObjectID so that only activity related to this particular store
procedure is returned.
However Profiler is capturing ALL the activity on the server. Filtering
by ObjectID doesn't seem to make any difference even though according
to BOL the ObjectID is a valid data column for the ExecutionPlan event.
Am I missing something or is this a bug in SQL Server/error in the BOL
documentation?
Thanks!Are you saying that you are also capturing System IDs , if you put ObjectID
greater than or equal to 100 - this will disclude System Objects.
This may not be complteley relevant to your problem , but you could also use
the DatabaseID / DatabaseName filter
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
<pshroads@.gmail.com> wrote in message
news:1150241832.487422.17030@.y43g2000cwc.googlegroups.com...
> I am trying to troubleshoot some performance problems and I am trying
> to set up Profiler so that I can look at the execution plan of a
> particular stored procedure. I am using the ExecutionPlan event class
> in the Performance event category. I am also setting up a filter on
> ObjectID so that only activity related to this particular store
> procedure is returned.
> However Profiler is capturing ALL the activity on the server. Filtering
> by ObjectID doesn't seem to make any difference even though according
> to BOL the ObjectID is a valid data column for the ExecutionPlan event.
> Am I missing something or is this a bug in SQL Server/error in the BOL
> documentation?
> Thanks!
>|||The ExecutionPlan event class doesn't populate the object id unfortunately.
So, we cannot filter on it in SQL Server 2000 Profiler. But it does populate
the database id, so you can filter on that to reduce the amount of data
being captured by Profiler. You can also filter on the hostname, if you know
from which machine the request is coming in.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<pshroads@.gmail.com> wrote in message
news:1150241832.487422.17030@.y43g2000cwc.googlegroups.com...
I am trying to troubleshoot some performance problems and I am trying
to set up Profiler so that I can look at the execution plan of a
particular stored procedure. I am using the ExecutionPlan event class
in the Performance event category. I am also setting up a filter on
ObjectID so that only activity related to this particular store
procedure is returned.
However Profiler is capturing ALL the activity on the server. Filtering
by ObjectID doesn't seem to make any difference even though according
to BOL the ObjectID is a valid data column for the ExecutionPlan event.
Am I missing something or is this a bug in SQL Server/error in the BOL
documentation?
Thanks!|||Thanks for your reply. Do you know of any way to get the execution plan
for a query that is already running? Our database is too active to run
a profiler for an extended period of time to catch this intermittent
problem but when it's occuring I'd like to be able to see the query
plan that it's using.
Thanks|||I am not aware of a way of getting execution plan of a query while it is
running, without using Profiler.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<pshroads@.gmail.com> wrote in message
news:1150323592.065493.262700@.f6g2000cwb.googlegroups.com...
Thanks for your reply. Do you know of any way to get the execution plan
for a query that is already running? Our database is too active to run
a profiler for an extended period of time to catch this intermittent
problem but when it's occuring I'd like to be able to see the query
plan that it's using.
Thanks|||Sorry I should have clarified - even Profiler won't give me the
execution plan for a query that is already running when I start the
trace, correct? I would have to already have the trace running first.|||One way of doing this is to inject some sp_trace_create script into the
stored proc from which you want to capture exec plans, using @.@.spid as a
filter. Start the trace at the beginning of the proc & close it at the end.
If the proc is a high repitition proc, you might need some logic to limit
how many instances actually get traced, but this isn't too hard to work
out..
Regards,
Greg Linwood
SQL Server MVP
<pshroads@.gmail.com> wrote in message
news:1150387360.417932.118480@.h76g2000cwa.googlegroups.com...
> Sorry I should have clarified - even Profiler won't give me the
> execution plan for a query that is already running when I start the
> trace, correct? I would have to already have the trace running first.
>|||That's a great idea! I will try that.
Thanks.|||Remember to capture Showplan ALL, so you can pick apart the execution plan
subtree cost & focus your tuning work similarly to how you would if you were
using a graphical plan (based on node %). Post back if you have any
difficulty analysing the text output as that can also be tricky sometimes..
Regards,
Greg Linwood
SQL Server MVP
<pshroads@.gmail.com> wrote in message
news:1150465481.039455.258630@.u72g2000cwu.googlegroups.com...
> That's a great idea! I will try that.
> Thanks.
>