How to connect direct to LMS3.2 database

Answered Question
Aug 31st, 2009

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

Correct Answer by Joe Clarke about 7 years 1 month ago

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (2 ratings)
Loading.
Marvin Rhoads Mon, 08/31/2009 - 03:49

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.

albatli1977 Tue, 11/17/2009 - 00:27

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.

Martin Ermel Tue, 11/17/2009 - 05:18

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

Joe Clarke Sat, 11/21/2009 - 08:17

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.

albatli1977 Mon, 01/04/2010 - 23:40



/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

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

Attachment: 
Joe Clarke Mon, 01/04/2010 - 23:51

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.

albatli1977 Tue, 01/05/2010 - 00:09
/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

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?

Correct Answer
Joe Clarke Tue, 01/05/2010 - 09:06

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.

Michel Hegeraat Wed, 01/06/2010 - 06:07

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

Actions

This Discussion