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.
Author |
Topic |
nasali
Starting Member
4 Posts |
Posted - 2008-11-26 : 01:16:57
|
I get below message from my SQL scheduled job when i run Job Name :Manage Login Creation Trace============================================================job body:((EXEC usp_trace_login_creation 'OFF',@tracename='Login Creation on SQL-Server1 ' EXEC usp_trace_login_creation 'ON',@file_name ='F:\Microsoft SQL Server\MSSQL\Audit\', @TraceName = 'Login Creation on SQL-Server1 ', @Options = 2, @TraceType = 8, @MaxFileSize = 500, @StopTime = NULL, @Events = DEFAULT, @Cols = DEFAULT, @IncludeTextFilter = NULL, @IncludeObjIdFilter = 7274611, @ExcludeObjIdFilter = NULL))----------------------------------------------------------------------------------------Fail Message:Executed as user: SIDF\Administrator. Deleted trace queue 2. [SQLSTATE 01000] (Message 0) The trace output file name is: F:\Microsoft SQL Server\MSSQL\Audit\Login Creation on SQL-Server1 20081120233001280.trc. [SQLSTATE 01000] (Message 0) No active traces named Login Creation on SQL-Server1 . [SQLSTATE 01000] (Message 0) Filters with the same event column ID must be grouped together. [SQLSTATE 42000] (Error 19055) Trace started. [SQLSTATE 01000] (Error 0) The trace file name is : F:\Microsoft SQL Server\MSSQL\Audit\Login Creation on SQL-Server1 20081121233000543.trc [SQLSTATE 01000] (Error 0). The step failed.========================================Actually the login trace file created successfully but still getting job failed in job history, so what is the reason for thatI am not bothered about [SQLSTATE 01000] (Message 0) because I get it in another Job “Mange Trace” still job status success. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-26 : 02:24:38
|
How do you output the message "Trace started"? E 12°55'05.63"N 56°04'39.26" |
|
|
nasali
Starting Member
4 Posts |
Posted - 2008-11-29 : 00:38:02
|
Sorry for being late.From This script:......-- Create the trace queue EXEC @res=sp_trace_create @TraceId=@QueueHandle OUT, @options=@Options, @tracefile=@file_name, @maxfilesize=@MaxFileSize, @stoptime=@StopTimeIF @res<>0 BEGINIF @res=1 PRINT 'Trace not started. Reason: Unknown error.'ELSE IF @res=10 PRINT 'Trace not started. Reason: Invalid options. Returned when options specified are incompatible.'ELSE IF @res=12 PRINT 'Trace not started. Reason: Error creating file. Returned if the file already exists, drive is out of space, or path does not exist.'ELSE IF @res=13 PRINT 'Trace not started. Reason: Out of memory. Returned when there is not enough memory to perform the specified action.'ELSE IF @res=14 PRINT 'Trace not started. Reason: Invalid stop time. Returned when the stop time specified has already happened.'ELSE IF @res=15 PRINT 'Trace not started. Reason: Invalid parameters. Returned when the user supplied incompatible parameters.'RETURN @resEND PRINT 'Trace started.'PRINT 'The trace file name is : '+@file_name+'.'+'trc'....etc |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-29 : 03:50:26
|
This is an easier way to get number of days in a month:DATEDIFF(DAY, GETDATE(), DATEADD(MONTH, 1, GETDATE())) E 12°55'05.63"N 56°04'39.26" |
|
|
nasali
Starting Member
4 Posts |
Posted - 2008-11-29 : 06:29:54
|
Is this related to my post?sorry ,friend ,i don't know what do you mean? |
|
|
nasali
Starting Member
4 Posts |
Posted - 2008-12-21 : 06:11:58
|
I ran procedure code the i got those messages:Deleted trace queue 4.The trace output file name is: F:\Microsoft SQL Server\MSSQL\Audit\Login Creation on SQL-Server1 20081220233000503.trc.No active traces named Login Creation on SQL-Server1 .Trace started.The trace file name is : F:\Microsoft SQL Server\MSSQL\Audit\Login Creation on SQL-Server1 20081221105557597.trcMsg 19055, Level 16, State 1, Procedure sp_trace_setfilter, Line 1Filters with the same event column ID must be grouped together.Msg 19055, Level 16, State 1, Procedure sp_trace_setfilter, Line 1Filters with the same event column ID must be grouped together. |
|
|
|
|
|
|
|