Solved

what is this query mean

Posted on 2013-05-23
3
657 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

713 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