cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1865
Views
5
Helpful
15
Replies

How to connect direct to LMS3.2 database

albatli1977
Level 1
Level 1

How can I connect Ciscoworks server that hosted on sun solaris server and my client is windows Vista

1 Accepted Solution

Accepted Solutions

The Server name should be cmfEng, and the database name should be cmfDb.  You need to use the IP address which the client can reach.  Typically, this is the IP address configured on the server.  NAT has not been tested for database access, but should work provided your client can make a TCP connection to port 43441 on the LMS server.

View solution in original post

15 Replies 15

Marvin Rhoads
Hall of Fame
Hall of Fame

In general, the CiscoWorks server presents its information via the web interface on port 1741.

http://servername:1741 or https://servername:1741

There are some command line interface tools that allow you to extract certain data but in general, direct access of the db (e.g. via sql queries) is not supported.

Joe Clarke
Cisco Employee
Cisco Employee

Thanks for the update, Joe. That support was just added in 3.2, correct?

Yes.

We have LMS3.2 on solaris server and I need to access db form My PC windows Vista enterprise edition by ODBC.

I can't follow the instructions.

you need to follow the instructions "Prerequisites for Accessing Database Views on Windows Systems" (perhaps it would be better to say ".. for Accessing LMS Database Views FROM a Windows System ..).

To get the necessary files you can do one of the following:

- install Common Services on a supported Windows platform and copy the files to your system

- just start the installer and get the files after they are extracted to the TMP directory

these are the files needed:

NMSROOT\objects\db\win32\dbodbc10.dll

NMSROOT\objects\db\win32\dblgen10.dll

NMSROOT\objects\db\win32\dbcon10.dll

Could you please upload these files

These files cannot be posted as they are commercial DLLs.  However, you have the LMS 3.2 Windows DVD already.  If you follow mermel's instructions to either install Common Services on a Windows 2003 or 2008 server, or start the installer, then pull the DLLs from the server's TEMP directory, you can get what you need.  The latter could probably even be done on a Windows Vista machine.

I followed the instruction to connect cmf database bu failed, I attached the odbc snapshot, and network TCP/IP configuration

HOST=172.20.10.21;DOBROADCAST=NO;ServerPort=43441

and I put the cmf password that added to Csicoworks when installed it.

Ciscoworks server IP= 172.20.11.32

Nat IP address=172.20.10.21 on cisco router:

ip nat inside source static tcp 172.20.11.32 43441 172.20.10.21 43441 extendable

The password you need to provide is the one you specified when you ran the dbaccess.pl script.  This may not be the same as the password specified when you installed LMS.

I reset Password again but still and I have some questions:

1-What is the value should add in the ODBC-database-Server Name failed, When I left a blank I got connection error: TCP/IP requires a server name and when I put NAT IP i got:DataBase server not found.

2- What is the name of Common Services( cmf or cmfDB or cmfEng).

3- Should I use the NAT IP or server IP without NAT configuration?

The Server name should be cmfEng, and the database name should be cmfDb.  You need to use the IP address which the client can reach.  Typically, this is the IP address configured on the server.  NAT has not been tested for database access, but should work provided your client can make a TCP connection to port 43441 on the LMS server.

Thanks a lot,  it's solved now and I can see the views.

Are you actually using the ODBC DSN connections?

I created the DSN's and when I click test they says it OK

However if I use an application to connect to these DSN's it says generic:

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)

I reused the script for local connections to work on a remote via the ODBC but it says the same as other applications when they try to hook up to the DSN

use DBI;

my ($dbh, $cur, $sqlstr);
my $connString = "dsn=cmf;uid=lmsdatafeed";

$dbh = DBI->connect('DBI:ODBC:DSN', $connString, 'didata', {PrintError => 1});

if ($dbh) {

   my $sqlstr = "SELECT Device_Id, Device_Display_Name, Management_IPAddress FROM Network_Devices";
   my $cur = $dbh->prepare($sqlstr);

   $cur->execute if ($cur);

   while (my $rs = $cur->fetchrow_arrayref) {
      my ($devId, $dispName, $ip,) = @$rs;
      print "Device_Id: $devId\n";
      print "Device_Display_Name: $dispName\n";
      print "Management_IPAddress: $ip\n";
      print "--------------------------------------------\n";
   }

   $cur->finish;
   $dbh->disconnect();

}

Does anyone see what I miss here?

Cheers,

Michel

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: