This document explains how to run an SQL Query to find the devices that are associated with a location up until Cisco CallManager version 3.3. Devices are endpoints, such as IP phones and gateways. As of Cisco CallManager version 3.3, there is a new feature called Dependency Records.
Readers of this document should have knowledge of Cisco CallManager Administration.
The information in this document is based on Cisco CallManager versions 3.x and 4.x.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
These sections explain how to find a device that is associated with a location. Use SQL Query in Cisco CallManager versions earlier than 3.3, and use Dependency Records in Cisco CallManager 3.3 and later.
Follow the steps in this section to use SQL Query to find devices that are associated with a location.
Note: If a value of None appears in the Location field in the Cisco CallManager Configuration window, then the device has not been assigned to a specific location. Such devices that are not assigned to a location are not returned by this query.
Select Start > Programs > Microsoft SQL Server > Query Analyzer on the Windows 2000 server console of the Cisco CallManager server, to run the SQL Server Query Analyzer application.
The Connect to SQL Server window appears. (The SQL Query Analyzer window is dimmed in the background.)
In the SQL Server field, type a period (.).
Uncheck the Start SQL Server if it is Stopped check box.
Click the Windows Authentication radio button.
The Query - (local) window appears. (The SQL Query Analyzer window is dimmed in the background.)
In the DB field, click the drop-down arrow and choose the highest numbered Cisco CallManager database.
Cisco CallManager databases are labeled with the format CCM03xx (where xx is the number of the database).
Enter this SQL query in the body of the Query - (local) window:
SELECT Device.name, Device.description FROM Device, Location WHERE Device.fkLocation=Location.pkid AND Location.name="enter the location name between these quotes"
In the main Query Analyzer window, select Query > Execute to run the query.
You can also click the green arrow on the toolbar or press F5, to run the query.
When the results are done, close the SQL Server Query Analyzer window.
In Cisco CallManager 3.3 and later, there is a new feature called Dependency Records. This feature allows you to see who is associated with a Location without the need to run a query.
In the Cisco CallManager Administration window Location Configuration page, click Dependency Records.
This window appears, which tells you that there is 1 phone and 1 directory number associated with it.
If you click the Phone Record Type, you will see that there is currently an Analog Telephone Adaptor (ATA) that is configured with that location.
The Cisco Support Community is a forum for you to ask and answer questions, share suggestions, and collaborate with your peers.
Refer to Cisco Technical Tips Conventions for information on conventions used in this document.