Ciscoworks LMS database deletion

Unanswered Question
Jul 3rd, 2007
User Badges:

im in the process of upgrading a CiscoWorks LMS server to the latest software(years of neglect by the now fired tech) There used to be a way to delete the database from a command prompt via a perl script if I remember correctly. Init.db or init_db I believe the command was. I cant seem to find that command in any of the documentation.


Does anyone know if that stiil exists.


Or maybe a better question is How do I wipe out the database and start with a clean slate without veing to uninstall Ciscoworks and reinstall all the applications?


Thank You

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
David Stanford Tue, 07/03/2007 - 06:15
User Badges:
  • Cisco Employee,

You can do the following to wipe out the LMS 2.5/2.6 databases


Stop the daemon manager


perl dbRestoreOrig.pl dsn=rmeng dmprefix=RME


perl dbRestoreOrig.pl dsn=ani dmprefix=ANI



If you have DFM installed:


NMSROOT\bin\dbRestoreOrig.pl dsn=dfmEpm dmprefix=EPM


NMSROOT\bin\dbRestoreOrig.pl dsn=dfmInv dmprefix=INV


NMSROOT\bin\dbRestoreOrig.pl dsn=dfmFh dmprefix=FH


Clear CMF DB last:

(If on Windows use the perl option to run the command for all of the above and below)


perl dbRestoreOrig.pl dsn=cmf dmprefix=Cmf



Start the daemon manager


cpopour Tue, 07/03/2007 - 06:33
User Badges:

I am running this on Windows server. Is the syntax the same? Which directory to I need to run them from


Thank You



David Stanford Tue, 07/03/2007 - 06:39
User Badges:
  • Cisco Employee,

Here's the syntax for Windows:


net stop crmdmgtd


NMSROOT\bin\perl dbRestoreOrig.pl dsn=rmeng dmprefix=RME


NMSROOT\bin\perl dbRestoreOrig.pl dsn=ani dmprefix=ANI



If you have DFM installed:


NMSROOT\bin\perl dbRestoreOrig.pl dsn=dfmEpm dmprefix=EPM


NMSROOT\bin\perl dbRestoreOrig.pl dsn=dfmInv dmprefix=INV


NMSROOT\bin\perl dbRestoreOrig.pl dsn=dfmFh dmprefix=FH


Clear CMF DB last:


NMSROOT\bin\perl dbRestoreOrig.pl dsn=cmf dmprefix=Cmf



NOTE -- NMSROOT refers to the install directory of LMS (default on Windows is c:\progra~1\CSCOpx

uhsethornhill Tue, 07/03/2007 - 06:42
User Badges:

cd\Program Files\CSCOpx\bin

echo y|perl dbRestoreOrig.pl dsn=cmf dmprefix=Cmf

#I didn't know about the ANI line mentioned by the previous post so I added it just now in the post. Not sure what it will do. Currently it is commented out, so run at your perril

#echo y|perl dbRestoreOrig.pl dsn=ani dmprefix=ANI

echo y|perl dbRestoreOrig.pl dsn=rmeng dmprefix=RME

echo y|perl dbRestoreOrig.pl dsn=dfmInv dmprefix=INV

echo y|perl dbRestoreOrig.pl dsn=dfmFh dmprefix=FH

echo y|perl dbRestoreOrig.pl dsn=dfmEpm dmprefix=EPM

cd\Program Files\Internetwork Performance Monitor\Server\bin

echo y|ipm dbclean

cd\program files\cscopx\bin

echo you need to run the following to complete:

echo perl ..\campus\bin\reinitdb.pl -restore

echo have a nice day



above is from a batch file I wrote to do this when I was deleting things out and trying different ways to get the data in. Stop the deamon manager first then run this from the drive that CiscoWorks is installed. In my case I have all modules on the same server. This will restore the original databases or create new ones for all modules starting with Common Services. Then RME. Then 3 lines for DFM. Followed by IPM and then Campus Manager. However the batch does not do campus manager. You must past what the patch shows you on your own as for some reason the echo y| before the command causes something funny to happen.


good luck

Edwin Thornhill

David Stanford Tue, 07/03/2007 - 07:30
User Badges:
  • Cisco Employee,

The only thing I see wrong with your batch is that you are wiping out CMF first, this should be done last.

Actions

This Discussion