what is this query mean

Posted on 2013-05-23
Medium Priority
Last Modified: 2013-05-23
hi, i got worry when i saw this query on the active monitor executed 2 times:

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]
master.sys.databases AS dtb
[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.
Question by:rafaelrgl
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 1000 total points
ID: 39191364
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
LVL 11

Accepted Solution

Guru Ji earned 1000 total points
ID: 39191371
Nothing to worry about as this is not SQL injection. This query above is  from SQL Server Policy Based Management or metadata from SSMS.

Author Closing Comment

ID: 39191950

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this article, we will see two different methods to recover deleted data. The first option will be using the transaction log to identify the operation and restore it in a specified section of the transaction log. The second option is simpler and c…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question