• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 848
  • Last Modified:

what is this query mean

hi, i got worry when i saw this query on the active monitor executed 2 times:

SELECT
dtb.name AS [Name],
dtb.database_id AS [ID],
CAST(case when dtb.name in ('master','model','msdb','tempdb') then 1 else dtb.is_distributor end AS bit) AS [IsSystemObject],
CAST(has_dbaccess(dtb.name) AS bit) AS [IsAccessible]
FROM
master.sys.databases AS dtb
ORDER BY
[Name] ASC

Open in new window


now, i ask you guys, is this query normal procedure for the sql server sometimes or this is injected?
i only use sql store procedure, so it can't be injected.
0
rafaelrgl
Asked:
rafaelrgl
2 Solutions
 
Aneesh RetnakaranDatabase AdministratorCommented:
That one seems to be from SQL Server agent or some internal process, you can run the SQL profiler to see exactly which process is calling it
0
 
Guru JiCommented:
Nothing to worry about as this is not SQL injection. This query above is  from SQL Server Policy Based Management or metadata from SSMS.
0
 
rafaelrglAuthor Commented:
THANKKSS
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now