Every 5 minutes, i saw a process executing that SQL command : select serverproperty('instancename') and select serverproperty('ErrorLogfilename')

  • Try to find why it is running . It's not a s It seems running on all version since 2008  ( the oldest that we have). The process owner is "Microsoft SQL Server", so it's the core system

    Thanks a lot.

  • "Microsoft SQL Server" can be a number of things, including replication, linked servers and others. Have you run a trace to verify where the call is originating from and any other code it may be running?

  • It's running in each local server itself. Not from a remote server at all. No agent job running at the same time. I found that execution via the profiler and i have not found other information. It seems an automatic execution run by sql server itself.

  • andre.bilodeau - Thursday, March 14, 2019 8:37 AM

    It's running in each local server itself. Not from a remote server at all. No agent job running at the same time. I found that execution via the profiler and i have not found other information. It seems an automatic execution run by sql server itself.

    SQL Server does not randomly execute code.
    Please add the Host Name column in profiler, and tell us what the Application Name column and NT username says (including whether it is blank).  It is likely a SSMS session where someone has left open a special tab like the Monitor tab.

  • There is the stuff from the Profiler.

    Event_Class

    TextDataApplicationNameNTUserNameCPUReadsWritesDurationClientProcessIDSPIDDatabaseIDDatabaseNameErrorEbventSequenceGroupIDHostNameRequestIDRowCountsServerNameXactSequence
    SQL:BatchStartingselect serverproperty(N'instancename')Microsoft SQL ServergMSA-SQL$2980601master6005882CPW1-SQL-PDB410cpw1-sql-pdb410
    SQL:BatchCompletedselect serverproperty(N'instancename')Microsoft SQL ServergMSA-SQL$00002980601master0 - OK6005892CPW1-SQL-PDB4101cpw1-sql-pdb410
    SQL:BatchStartingselect ServerProperty('ErrorLogFileName')Microsoft SQL ServergMSA-SQL$2980601master6005902CPW1-SQL-PDB410cpw1-sql-pdb410
    SQL:BatchCompletedselect ServerProperty('ErrorLogFileName')Microsoft SQL ServergMSA-SQL$00002980601master0 - OK6005912CPW1-SQL-PDB4101cpw1-sql-pdb410
  • andre.bilodeau - Thursday, March 14, 2019 12:24 PM

    There is the stuff from the Profiler.

    Event_Class

    TextDataApplicationNameNTUserNameCPUReadsWritesDurationClientProcessIDSPIDDatabaseIDDatabaseNameErrorEbventSequenceGroupIDHostNameRequestIDRowCountsServerNameXactSequence
    SQL:BatchStartingselect serverproperty(N'instancename')Microsoft SQL ServergMSA-SQL$2980601master6005882CPW1-SQL-PDB410cpw1-sql-pdb410
    SQL:BatchCompletedselect serverproperty(N'instancename')Microsoft SQL ServergMSA-SQL$00002980601master0 - OK6005892CPW1-SQL-PDB4101cpw1-sql-pdb410
    SQL:BatchStartingselect ServerProperty('ErrorLogFileName')Microsoft SQL ServergMSA-SQL$2980601master6005902CPW1-SQL-PDB410cpw1-sql-pdb410
    SQL:BatchCompletedselect ServerProperty('ErrorLogFileName')Microsoft SQL ServergMSA-SQL$00002980601master0 - OK6005912CPW1-SQL-PDB4101cpw1-sql-pdb410

    Do you have an agent job failing every 5 minutes?  Or running every 5 minutes?  Use the job activity monitor.

  • I ran a test in my lab and the cause of this is something (or someone) running EXEC xp_enumerrorlogs. This extended stored procedure is used by SQL Server when a user expands the list of error logs in SSMS. It is also frequently used by monitoring tools to get the list of SQL Server error logs for parsing and error checking.

    It looks like when the proc is called it also triggers these two statements in the background. There shouldn't be any concern with this process running, but if you want to find out what is triggering it, run a profiler trace capturing xp_enumerrorlog and that will give you the information you need.

  • Thanks to all of you. You help me to found it. We have Spotlight to monitor most of the sql server we have and it's that program that call the stored proc.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply