Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Unable to create sql trace

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-07-08 : 10:27:26
I am not able to execute the folloiwng code,
-------------------------------------------------------
declare @lv_size bigint , @path nvarchar(256), @opt int
select @lv_size = 5 , @path = N'c:\trace.trc', @opt=2

execute sp_trace_create @options = @opt ,@tracefile = @path ,@maxfilesize = @lv_size ,@filecount = 10
-------------------------------------------------------

I get the error,

Msg 214, Level 16, State 3, Procedure sp_trace_create, Line 1
Procedure expects parameter '@maxfilesize' of type 'bigint'.


I have a feeling, I am doing something silly. Can anyone steer me to right direction?


------------------------
I think, therefore I am - Rene Descartes

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-08 : 10:34:46
Take a look at my post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=105302
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-07-08 : 11:33:38
Thank you Sodeep. That worked.

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

maninder
Posting Yak Master

100 Posts

Posted - 2008-07-08 : 14:10:00
If you are using the MAXFilesize setthen you also need to set the option parameter in the sp_trace_create to something greater than 0, Or your Trace File will stop after it reaches the SET maxfilesize.

Maninder
SQL server Architect / Admin (DEV&PROD)
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-08 : 14:46:04
That has already been addressed in link.
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-07-08 : 14:57:30
Thank you Guys. I was getting an error while creating the trace. I was using the sp in a different manner.

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page
   

- Advertisement -