Showing posts with label trace. Show all posts
Showing posts with label trace. Show all posts

Friday, March 9, 2012

How can the Profiler textdata field be enlarged?

When running Profiler to save a trace to a table the field 'TextData' gets
trunciated. The datatype for that field is as shown:

Column name | Data Type | Length | Allow Null

TextData ntext 16 yes

I can not find a way to set the trace up to create a tablewith TextData of
length greater than 16. This really causes a problem when trying to capture
long running queries for tuning as the query itself maybe truncated. Is
there a way around this?"Robert" <stop.spam@.boeing.com> wrote in message
news:HtAJF7.7yM@.news.boeing.com...
> When running Profiler to save a trace to a table the field 'TextData' gets
> trunciated. The datatype for that field is as shown:
> Column name | Data Type | Length | Allow Null
> TextData ntext 16 yes
>
> I can not find a way to set the trace up to create a tablewith TextData of
> length greater than 16. This really causes a problem when trying to
capture
> long running queries for tuning as the query itself maybe truncated. Is
> there a way around this?
>
ntext can store up to 1GB of Unicode text, so you should be able to see the
full query text. If not, perhaps you can clarify how you are viewing the
data? Using Query Analyzer, or another tool? QA displays only 256 characters
by default, so you may need to check your settings (Tools - Options -
Results).

By default, MSSQL stores a pointer to ntext data in the table, not the data
itself, which is where the 16 bytes comes from - that is the size of the
pointer only, not the data.

Simon|||"Simon Hayes" <sql@.hayes.ch> wrote in message
news:4033b59f$1_3@.news.bluewin.ch...
> "Robert" <stop.spam@.boeing.com> wrote in message
> news:HtAJF7.7yM@.news.boeing.com...
> > When running Profiler to save a trace to a table the field 'TextData'
gets
> > trunciated. The datatype for that field is as shown:
> > Column name | Data Type | Length | Allow Null
> > TextData ntext 16 yes
> > I can not find a way to set the trace up to create a tablewith TextData
of
> > length greater than 16. This really causes a problem when trying to
> capture
> > long running queries for tuning as the query itself maybe truncated. Is
> > there a way around this?
> ntext can store up to 1GB of Unicode text, so you should be able to see
the
> full query text. If not, perhaps you can clarify how you are viewing the
> data? Using Query Analyzer, or another tool? QA displays only 256
characters
> by default, so you may need to check your settings (Tools - Options -
> Results).
> By default, MSSQL stores a pointer to ntext data in the table, not the
data
> itself, which is where the 16 bytes comes from - that is the size of the
> pointer only, not the data.
> Simon

Thanx Simon

You nailed it! I am not worthy.

Sunday, February 19, 2012

How can I trace all Stored Procedure calls?

Hi. I was wondering if there would be any way to activate a spy or a log
that would list all the SQL calls adressed towards a specific SQL Server 2005
database.
Any idea?
Thanks in advance
SH1
Have you looked at SQL Server Profiler? You could create a server-side
trace...
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1
|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and that
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:

> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>
>
|||I haven't worked with Express, but perhaps it is only the Profiler tool which is missing. You might
be able to still do server-side traces. These aren't as easy to work with, but for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the end, what you are
missing is the ability to use the Profiler tool to configure a trace, and then have that tool to
script out the procedure calls to kick off this trace as a server-side trace.
Having said above, if it is possible to log from inside the relevant procedures, I'd probably go for
that instead of a server-side trace.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...[vbcol=seagreen]
> Never heard about this. Looks like it would do the job. I searched how to
> lauch it, but the "performance tools" menu is not available in my SQL Server
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and that
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to add
> an insert statement along with a date on a new table to trace what has been
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:

How can I trace all Stored Procedure calls?

Hi. I was wondering if there would be any way to activate a spy or a log
that would list all the SQL calls adressed towards a specific SQL Server 2005
database.
Any idea?
Thanks in advance
--
SH1Have you looked at SQL Server Profiler? You could create a server-side
trace...
--
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and that
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
--
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:
> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> > Hi. I was wondering if there would be any way to activate a spy or a log
> > that would list all the SQL calls adressed towards a specific SQL Server
> > 2005
> > database.
> >
> > Any idea?
> >
> > Thanks in advance
> > --
> > SH1
>
>|||I haven't worked with Express, but perhaps it is only the Profiler tool which is missing. You might
be able to still do server-side traces. These aren't as easy to work with, but for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the end, what you are
missing is the ability to use the Profiler tool to configure a trace, and then have that tool to
script out the procedure calls to kick off this trace as a server-side trace.
Having said above, if it is possible to log from inside the relevant procedures, I'd probably go for
that instead of a server-side trace.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...
> Never heard about this. Looks like it would do the job. I searched how to
> lauch it, but the "performance tools" menu is not available in my SQL Server
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and that
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to add
> an insert statement along with a date on a new table to trace what has been
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>> Have you looked at SQL Server Profiler? You could create a server-side
>> trace...
>> --
>> Aaron Bertrand
>> SQL Server MVP
>>
>>
>> "SH1" <SH1@.discussions.microsoft.com> wrote in message
>> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>> > Hi. I was wondering if there would be any way to activate a spy or a log
>> > that would list all the SQL calls adressed towards a specific SQL Server
>> > 2005
>> > database.
>> >
>> > Any idea?
>> >
>> > Thanks in advance
>> > --
>> > SH1
>>

How can I trace all Stored Procedure calls?

Hi. I was wondering if there would be any way to activate a spy or a log
that would list all the SQL calls adressed towards a specific SQL Server 200
5
database.
Any idea?
Thanks in advance
--
SH1Have you looked at SQL Server Profiler? You could create a server-side
trace...
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and tha
t
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
--
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:

> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>
>|||I haven't worked with Express, but perhaps it is only the Profiler tool whic
h is missing. You might
be able to still do server-side traces. These aren't as easy to work with, b
ut for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the
end, what you are
missing is the ability to use the Profiler tool to configure a trace, and th
en have that tool to
script out the procedure calls to kick off this trace as a server-side trace
.
Having said above, if it is possible to log from inside the relevant procedu
res, I'd probably go for
that instead of a server-side trace.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...[vbcol=seagreen]
> Never heard about this. Looks like it would do the job. I searched how t
o
> lauch it, but the "performance tools" menu is not available in my SQL Serv
er
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and t
hat
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to ad
d
> an insert statement along with a date on a new table to trace what has bee
n
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>