Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

what is this query mean

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
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.

829 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