Solved

what is this query mean

Posted on 2013-05-23
3
627 Views
Last Modified: 2013-05-23
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
Comment
Question by:rafaelrgl
3 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 250 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
0
 
LVL 11

Accepted Solution

by:
Guru Ji earned 250 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.
0
 
LVL 1

Author Closing Comment

by:rafaelrgl
ID: 39191950
THANKKSS
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now