Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL 2005 - Server Trace Expand / Collapse
Author
Message
Posted Monday, July 12, 2010 6:31 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, April 22, 2014 4:40 AM
Points: 375, Visits: 924
trying Server side trace with standard template (with additional columns included), but the trace stops after 5MB. How to increase this default size to say 20MB and also enable rollover to next file in case, the max limit is reached?
Post #950704
Posted Monday, July 12, 2010 7:02 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:05 AM
Points: 41,572, Visits: 34,500
In the script that creates the trace, you can set the file size. If I recall, it's defined in a variable right at the beginning of the script.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #950718
Posted Monday, July 12, 2010 7:58 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, April 22, 2014 4:40 AM
Points: 375, Visits: 924
yes saw where to give that file size and rollover. thanks. But when observing the trace using the ::fn.... I see that a single SPID gets repeated more than 200 times with a millisecond difference in time. We are using an VB based front end in which there may be around 200 users using that. In Activity Monitor, I see only one task/SPID against that username whereas the trace contains more than 200 records with same SPDI? I dont understand it. Can u demystify this?
Post #950769
Posted Tuesday, July 27, 2010 12:26 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, September 21, 2012 1:52 PM
Points: 696, Visits: 743
Does your VB process use a single login to the database or pass the user's login credentials through to the database? You may need to capture this information inside the VB as part of the transactional processes, or require adding auditing to the VB application.

If the process is web-based, is there a web.config file that authenticates to the database? If so, then VB owns the problem, not the database.
Post #959618
Posted Monday, July 25, 2011 1:39 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, March 09, 2014 4:42 AM
Points: 169, Visits: 167
Try this:::

declare @maxfilesize bigint
exec @rc = sp_trace_create @TraceID output, 0, N'c:\InsertFileNameHere', @maxfilesize, NULL


-- Please replace the text InsertFileNameHere, with an appropriate
-- filename prefixed by a path, e.g., c:\MyFolder\MyTrace. The .trc extension
-- will be appended to the filename automatically. If you are writing from
-- remote server to local drive, please use UNC path and make sure server has
-- write access to your network share


--Ron

Post #1147856
Posted Monday, July 25, 2011 1:41 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, March 09, 2014 4:42 AM
Points: 169, Visits: 167
Oooppss.

Forgot one piece... AM I RED



set @maxfilesize = 20


--Ron

Post #1147859
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse