Monday, July 30, 2007

CallManager Syncronization

Occasionally you will need to check for synchronization between CallManager servers in a cluster.
http://www.cisco.com/en/US/customer/products/sw/voicesw/ps556/products_tech_note09186a0080557ba5.shtml

In order to remove the server from the database there is a script listed in Cisco documentation but its incorrect. Here's the correct remove batch script.


@echo off
@if "%3x" == "x" goto Usage
echo Install stored procedure in database %2
echo USE %2                                                                        
echo GO                                                                            
echo DROP PROCEDURE dblRemoveServerFromDB                                          
echo GO                                                                            
echo CREATE PROCEDURE [dblRemoveServerFromDB]                                      
echo (@servername NVARCHAR(50)) AS                                                 
echo BEGIN TRANSACTION                                                             
echo DECLARE @nodeid NVARCHAR(50), @deviceid NVARCHAR(50), @pnsid NVARCHAR(50)     
echo --                                                                            
echo PRINT 'Get the Node ID'                                                       
echo SELECT @nodeid=pkid from ProcessNode where name=@servername                   
echo --                                                                            
echo PRINT 'Delete associated Device and MediaMixer'                               
echo WHILE (SELECT COUNT(*) FROM Device WHERE fkProcessNode=@nodeid) ^> 0          
echo BEGIN                                                                         
echo SELECT @deviceid=pkid from Device where fkProcessNode=@nodeid                 
echo PRINT 'Delete MediaMixer'                                                     
echo DELETE FROM MediaMixer WHERE fkDevice=@deviceid                               
echo PRINT 'Delete MOHServer'                                                      
echo DELETE FROM MOHServer WHERE fkDevice=@deviceid                                
echo PRINT 'Delete Device'                                                         
echo DELETE FROM Device WHERE pkid=@deviceid                                       
echo END                                                                           
echo --                                                                            
echo PRINT 'Delete associated CallManager records'                                 
echo DELETE FROM CallManagerGroupMember FROM CallManagerGroupMember AS M           
echo JOIN CallManager AS C ON C.pkid=M.fkCallManager WHERE C.fkProcessNode=@nodeid 
echo DELETE FROM CallManager WHERE fkProcessNode=@nodeid                           
echo --                                                                            
echo PRINT 'Delete associated ProcessConfig records'                               
echo DELETE FROM ProcessConfig WHERE fkProcessNode=@nodeid                         
echo --                                                                            
echo PRINT 'Delete associated AlarmConfig records'                                 
echo DELETE FROM AlarmConfig FROM AlarmConfig AS A JOIN ProcessNodeService         
echo AS S ON A.fkProcessNodeService=S.pkid WHERE S.fkProcessNode=@nodeid           
echo PRINT 'Delete associated ProcessNodeService records'                          
echo DELETE FROM ProcessNodeService WHERE fkProcessNode=@nodeid                    
echo --                                                                            
echo PRINT 'Delete associated ComponentVersion records'                            
echo DELETE FROM ComponentVersion WHERE fkProcessNode=@nodeid                      
echo --                                                                            
echo PRINT 'Delete the node'                                                       
echo DELETE FROM ProcessNode WHERE pkid=@nodeid                                    
echo --                                                                            
echo COMMIT TRANSACTION                                                            
echo GO                                                                            
echo -- Execute procedure on server %1
echo exec dblRemoveServerFromDB '%3'                                               
osql -S %1 -d %2 -E -e -i temp.sql
del temp.sql
echo USE %2                                                                      
echo GO                                                                            
echo sp_dropsubscription @publication = '%2', @subscriber = '%3', @article='all'   
echo GO                                                                            
osql -S %1 -d %2 -E -e -i temp1.sql
del temp1.sql
goto endd
:Usage
@echo Usage:
RemoveServerFromDB "server" "database" "name_of_server_to_delete_from_ProcessNode.Name"
@echo Example: RemoveServerFromDB . CCM0300 fred.cisco.com
:endd

Friday, June 15, 2007

Missing command on ASA for dynamic VPN.

There seems to be an update on how ASA's handle dynamic IP VPN connections. You used to be able to use the command 'authentication-server-group none' on the DefaultRAGroup general attributes. In the 7.2.2 version, this command is considered deprecated and won't work! This goes for new installs or upgrades.

The key command to add under the DefaultRAGroup is now:
isakmp ikev1-user-authentication (outside) none
outside is the interface name of course. Take note that if you are in the DefaultRAGroup and do a ? after isakmp, you won't see this command, it's hidden. Trying to make it easy for people I suppose...

The guide to configure this can be found here:
http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00805733df.shtml
The 7.2.2 code should only need the updates listed here to work.

Wednesday, June 06, 2007

BBSM Database fix

I ran into an issue recently when working with a Cisco BBSM server. Apparently, the BBSM doesn't like large subnets. Making changes on the web interface would basically lock up the server. The database was stuck in an 'initializing' state. I'm not sure why but it seemed to be trying to validate each IP in the various DHCP pools one by one. There is a way to force the BBSM back in service though.

Commands to confirm the problem:
First execute the osql utility from the command line of the BBSM.

osql -d atdial -E

You will now see a numbered prompt. Enter the following command to check the Server State:
1> select * from server_configuration
2> go
You will now see a lot of output. Basically you are checking if the Server State is listed as Initializing.

Now to fix the problem:

1> update server_configuration set serverstate="running"
2> go

Confirm that its working:
1> select * from server_configuration
2> go

You will see that the Server State is now running