Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

how to setup alert for SQL server

how to setup an alert against SQL server query.

I have tired creating alert using "SAM Setting" - > application monitor

but getting error "TEST failed with "DOWN" status on "hostname".

A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or was not
accessible. Verify that the instance name is correct and that SQL Server is
configured to allow remote connections. (provider: SQL Network Interfaces,
error: 26 - Error Locating Server/Instance Specified)

SAME time I can able to connect SQL server through "AppInsight for SQL".

Can you guide me how to fix this ?

Is that SQL Servers can't be monitor without Database Performance Analyzer (DPA) ? we don't have DPA.

Appreciate your help.

Labels (1)
10 Replies
Level 16

You need to have an actual query here


Select something from something

0 Kudos
Level 13

I monitor several SQL instances with SAM and AppInsight for SQL.  There are a couple of possibilities.

  1. The instance may or may not be on the default SQL port of 1433.  If an SQL server holds multiple databases, then they will all be on different ports, even if one of the instances is on the default port. 
  2. To monitor with SAM, you need a username and password for the database instance, not just the node.

This can get a bit more complex if the SQL instance is in a cluster.  Then I usually monitor the database against the cluster VIP, which is usually different than the server IP.

John Handberg
0 Kudos
Level 12

"Error Locating Server/Instance Specified"

My money's on either the "SQL Server Instance" or "Initial Catalog" values on the template being wrong

Thanks Adam for taking time and looking into. and catalog master.

I have created new monitor under


Application Monitor Name: xxx



0 Kudos

USE [databasename] is not allowed there.

Just try a simple "select 1" instead as someone said, but the USE-command is not allowed.

0 Kudos

please try 'select 1' as query

Without knowing the database you're trying to connect to it's difficult to say more - Your DBAs should be able to see if the connection is making it to the DB and if there's an error on the other end.

I have a monitor very similar to the above, and I've had similar problems, for that error it's usually a targeting problem, and the DBAs have been able to assist.

Ultimately the error is saying "I cant find what you wanted me to find, where you sent me to find it"

0 Kudos

database is master ( on screen shot as well).

Appinsight working but why the newly created template not working.

0 Kudos
Level 11

May we have a little bit more details? When I see the error message you may double check the server or instance name which you are using I would compare what'S configured in Appinsight with the what you have configured for that test. BTW: which template are you using for that test?

0 Kudos

Thanks for taking time looking into.

I am using application monitor and using same host name as Appinsight.

In Appinsight, it was successfully able to test connection but newly created "monitor" under application monitor not able to connect.

0 Kudos