none
Failed to start a new trace

    Question

  • Hi Experts
                        I am using sql server 2005 enter. edition with SP2, i am getting an error message 'Failed to start new trace' in sql profiler. Following are steps when i got the above
                       error:-

                        1)  First time i started the trace, i choosen TSQL_SPs template and filerted few columns like database and logins.
                        2)  It started successfully, anyhow i have stopped the trace and again start it after that i closed the profiler.
                        3)  Now when i am going to start profiler again and changing parameter in filter option, its showing me 'Failed to start a new trace'.

                       Pls help now i am not able to start similar trace.


    RAj
    Monday, May 18, 2009 8:40 AM

Answers

  • Hi,

    SQL Server Profiler allocates temporary storage files into the directory specified in the TMP environment variable. If the TMP environment variable point to a nonexistent directory, SQL Server Profiler may fail to run a new trace. What Paul suggested above is to make sure the directory exists. Based on your TMP value, please check "C:\ Documents and Settings\ raj.kumar\Local Settings\Temp\1" exists. If the directory doesn’t exist, you could use the following steps to change the TMP value.

    1. Right-click My Computer and click Properties.
    2. On the Advanced tab, click Environment Variables.
    3. Select TMP in User variables list and edit the value.

    If the value of TMP is correct, you could create a new simple trace to test SQL Server Profiler.  If the error still occurs, I suggest you contact Microsoft Customer Service and Support (CSS) (http://connect.microsoft.com) to submit your cause, so that we can further investigate this issue.


    If you have any more questions, please let me know.

    Thanks.


    ***Xiao Min Tan***Microsoft Online Community***
    • Marked as answer by Bobby_79 Wednesday, May 20, 2009 10:29 AM
    Wednesday, May 20, 2009 7:10 AM
    Moderator

All replies

  • There are many possible causes of this.
    Try connecting to the server using alternative credentials, or even using 'sa'.
    Check that the system folder pointed to by the TMP environment variable exists and is not rammed with files.

    Paul
    Monday, May 18, 2009 9:02 AM
  • Thanks Paul,

                             I have tried to run the profiler through sa but still getting same error message.
                             Could u just explain me following line i am not getting what to do:-
                              Check that the system folder pointed to by the TMP environment variable exists and is not rammed with files.

                            
    Raj
                         



                             
    Monday, May 18, 2009 9:23 AM
  • Open a command window (start/run/cmd.exe) and type SET TMP and press enter.  This will show you the directory Profiler uses for temporary files.

    Paul
    Monday, May 18, 2009 9:34 AM
  • Its showing me

    TEMP=C:\DOCUME~1\raj.kumar\Local Settings\Temp\1
    Monday, May 18, 2009 9:42 AM
  • That that is the directory to check, yes?

    Note that DOCUME~1 is the MS_DOS short name for Documents and Settings.

    Paul
    Monday, May 18, 2009 2:06 PM
  • Pls tell me that should i change this tmp value on production.
    Still i am not able to put the trace..

    I think it is a bug of sql profiler.

    Tuesday, May 19, 2009 4:28 AM
  • I sincerely doubt it is a Profiler bug.  It is far more likely to be something specific to your environment.
    With the limited details you provide, and the lack of clear feedback from previous suggestions, it is difficult to know what to say.
    Tuesday, May 19, 2009 6:39 AM
  • Hi,

    SQL Server Profiler allocates temporary storage files into the directory specified in the TMP environment variable. If the TMP environment variable point to a nonexistent directory, SQL Server Profiler may fail to run a new trace. What Paul suggested above is to make sure the directory exists. Based on your TMP value, please check "C:\ Documents and Settings\ raj.kumar\Local Settings\Temp\1" exists. If the directory doesn’t exist, you could use the following steps to change the TMP value.

    1. Right-click My Computer and click Properties.
    2. On the Advanced tab, click Environment Variables.
    3. Select TMP in User variables list and edit the value.

    If the value of TMP is correct, you could create a new simple trace to test SQL Server Profiler.  If the error still occurs, I suggest you contact Microsoft Customer Service and Support (CSS) (http://connect.microsoft.com) to submit your cause, so that we can further investigate this issue.


    If you have any more questions, please let me know.

    Thanks.


    ***Xiao Min Tan***Microsoft Online Community***
    • Marked as answer by Bobby_79 Wednesday, May 20, 2009 10:29 AM
    Wednesday, May 20, 2009 7:10 AM
    Moderator
  • Thanks a lot Xiao Min Tan  & Paul, 
         
                     I made changes as u suggested, its working now.



    Raj
    Wednesday, May 20, 2009 10:32 AM