SymptomsI need to have the ability to get information about the assignments of phone numbers.
ResolutionFirst, you need to obtain an application instance ID:
When you have all the required information, you can go to the provisioning host (the host where the Lync Phone Numbers application was installed).
1. On the provisioning host, go to: C:\Program Files (x86)\SWsoft\PEM\APS\instances\<Application Instance ID>\scripts\service.
2. Open the Web.config file.
3. Copy the connection string. For example: "Data Source ="C:\DBs\LPN\pnms_wc60386.sdf"; Password ="<Database password>";"
Note: <Database password> can be found on the Settings page of the Lync Phone Numbers application (Lync Phone Numbers -> Configuration -> Settings).
How to connect to the database file:
If you have SQL Server Management Studio installed, just create a new connection.
You may also download sqlcecmd (a command line tool) from http://sqlcecmd.codeplex.com.
Command line query:
sqlcecmd -d "Data Source =C:\DBs\LPN\pnms_wc60386.sdf; Password=<Database password>;" -q "SELECT owner_id from assigned_phone_number where number='<phone number>'"
SQL Server Management Studio query:
SELECT owner_id from assigned_phone_number where number='<phone number>'
<phone number> is the number without any additional characters. For example, if a phone number is +1(200)900-90-90, this value should be 12009009090.