Welcome to Port3101.org : Your BES Connection Mark forums read | View Forum Leaders
Port3101.org : Your BES Connection



Reply
LinkBack (12) Thread Tools Display Modes
Start|Stop|Disable BES Services (Scripted) - DR and Migration Purposes
 
  12 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-28-2008, 09:23 AM
Otto's Avatar
Proprietor
 
Join Date: Nov 2008
Location: Atlanta, GA
Posts: 2,033
Blog Entries: 14
Default Start|Stop|Disable BES Services (Scripted) - DR and Migration Purposes

There are a few of these scripts floating around for batch scripting around starting and stopping the BES services, but I haven't seen one that also including changing the service startup type from automatic to disabled and vice versa. This one can be used for DR or migration purposes.

Notes:
- Based on BlackBerry Enterprise Server 4.1 SP4 for Microsoft Exchange
- 'sc.exe' included natively in Windows Server 2003 (and Windows XP and Windows Vista for those of you wanting to alter these to run remotely); can be installed Windows 2000 Server using the Resource Kit
- Uses the Service Name not Display Name of service

Set to Disabled and Stop Services:
Code:
sc config "BlackBerry Router" start= disabled | sc stop "BlackBerry Router"
sc config "BlackBerry Dispatcher" start= disabled | sc stop "BlackBerry Dispatcher"
sc config "BlackBerry Controller" start= disabled | sc stop "BlackBerry Controller"
sc config "BlackBerry MDS Connection Service" start= disabled | sc stop "BlackBerry MDS Connection Service"
sc config "BlackBerry Policy Service" start= disabled | sc stop "BlackBerry Policy Service"
sc config BBAttachServer start= disabled | sc stop BBAttachServer
sc config "BlackBerry SyncServer" start= disabled | sc stop "BlackBerry SyncServer"
sc config "BlackBerry Server Alert" start= disabled | sc stop "BlackBerry Server Alert"

Set to Automatic and Start Services:
Code:
sc config "BlackBerry Router" start= auto | sc start "BlackBerry Router"
sc config "BlackBerry Dispatcher" start= auto | sc start "BlackBerry Dispatcher"
sc config "BlackBerry Controller" start= auto | sc start "BlackBerry Controller"
sc config "BlackBerry MDS Connection Service" start= auto | sc start "BlackBerry MDS Connection Service"
sc config "BlackBerry Policy Service" start= auto | sc start "BlackBerry Policy Service"
sc config BBAttachServer start= auto | sc start BBAttachServer
sc config "BlackBerry SyncServer" start= auto | sc start "BlackBerry SyncServer"
sc config "BlackBerry Server Alert" start= auto | sc start "BlackBerry Server Alert"
Other Services:
BlackBerry Collaboration Service
Service Name: "BlackBerry Collaboration Service"

BlackBerry Database Consistency Service
Service Name: "BlackBerry Database Consistency Service"

BlackBerry Instant Messaging Connector
Service Name: "BlackBerry Instant Messaging Connector"

BlackBerry MDS Services - Apache Tomcat Service
Service Name: MdsTomcat

BlackBerry User Administration Service
Service Name: BESUserAdminService

BlackBerry Administration Service - AS
Service Name: BAS-AS

BlackBerry Administration Service - NCC
Service Name: BAS-NCC

These may differ from platform to platform (Domino, Groupwise, Exchange), although I don't think they do. The others are optional installations for Collaboration and Instant Messaging, MDS Services (MDSS), BlackBerry User Admin Service (from BRK) and BAS (Web Desktop/future web-based platform for RIM apps). Let me know if there are any more services to add.

The above scripts are in batch format already, so just save as a .bat file. They can be altered to be a replacement for the 'net stop' batch files we've had posted on here before. Maybe someone will be able to use this. (:
__________________
BCSA (4.1, 5.0) | BCSD (4.1, 5.0)

The views expressed by me on Port3101.org are my own and do not necessarily reflect the views of my employer.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-01-2008, 02:43 PM
Abe Abe is offline
Super Moderator
 
Join Date: Dec 2008
Location: Germany
Posts: 598
Default

You saved me some work Thanks. I wanted to create exactly these scripts
Reply With Quote
  #3 (permalink)  
Old 01-13-2009, 01:05 PM
BES Administrator
 
Join Date: Jan 2009
Posts: 29
Default

Quote:
Originally Posted by Otto View Post
... I haven't seen one that also including changing the service startup type from automatic to disabled and vice versa. This one can be used for DR or migration purposes.
Nice. Me either.
I've added those options to my rudimentary DOS menu.
I've been moving to perl scripts since I have to maintain linux servers too and perl is much more powerful than dos or bash (and i can use on both win and nix) but this will get the job done in this purpose.

For stuff like this I prefer to save 1 script on the C drive and create a shortcut to it on the desktop with a different icon and just double click it and chose the menu option I want. So typically I would double-click then chose 4, r, 3 to effectively restart all services.

oh and this is for my BES services so edit for whichever you need:
Code:
@echo off
:Reset
cls
echo. ****************************************************
echo. *  Please choose one of the following actions      *
echo. *       for all BES Services                       *
echo. *  1. Set Startup Type to DISABLED                 *
echo. *  2. Set Startup Type to MANUAL                   *
echo. *  3. Set Startup Type to AUTOMATIC                *
echo. *  4. Start all BES Services                       *
echo. *  5. Stop all BES Services                        *
echo. *     [q] will quit at any time                    *
echo. ****************************************************
echo.
:_com1
    set /p ask_="Press the number of your choice to select an option. _>"
        for %%a in (1 2 3 4 5 q) do if /i "%ask_%"=="%%a" goto _%%a
	goto _com1   
	::
	:_1
	    goto :Opt1
	:_2
	    goto :Opt2
	:_3
	    goto :Opt3
        :_4
	    goto :Opt4
        :_5
	    goto :Opt5
	:_q
	    goto :EOF

:Opt1
echo.
echo. Setting Startup Type to DISABLED...
echo.
sc config "BlackBerry Router" start= disabled
sc config "BlackBerry Dispatcher" start= disabled
sc config "BlackBerry Controller" start= disabled
sc config "BlackBerry MDS Connection Service" start= disabled
sc config MDSIS start= disabled
sc config "BlackBerry Policy Service" start= disabled
sc config "Blackberry Collaboration Service" start= disabled
sc config BBAttachServer start= disabled
sc config "BlackBerry SyncServer" start= disabled
sc config "BlackBerry Server Alert" start= disabled
echo.
echo.
    set /p ask_="Press [r] to return to the menu or any key to quit."
	for %%a in (r q) do if /i "%ask_%"=="%%a" goto _%%a
	goto :EOF   
	::
	:_r
	    goto :Reset
	:_q
	    goto :EOF

:Opt2
echo.
echo. Setting startup type to MANUAL...
echo.
sc config "BlackBerry Router" start= demand
sc config "BlackBerry Dispatcher" start= demand
sc config "BlackBerry Controller" start= demand
sc config "BlackBerry MDS Connection Service" start= demand
sc config MDSIS start= demand
sc config "BlackBerry Policy Service" start= demand
sc config "Blackberry Collaboration Service" start= demand
sc config BBAttachServer start= demand
sc config "BlackBerry SyncServer" start= demand
sc config "BlackBerry Server Alert" start= demand
echo.
    set /p ask_="Press [r] to return to the menu or any key to quit."
	for %%a in (r q) do if /i "%ask_%"=="%%a" goto _%%a
	goto :EOF   
	::
	:_r
	    goto :Reset
	:_q
	    goto :EOF

:Opt3
echo.
echo. Setting startup type to AUTOMATIC...
echo.
sc config "BlackBerry Router" start= auto
sc config "BlackBerry Dispatcher" start= auto
sc config "BlackBerry Controller" start= auto
sc config "BlackBerry MDS Connection Service" start= auto
sc config MDSIS start= auto
sc config "BlackBerry Policy Service" start= auto
sc config "Blackberry Collaboration Service" start= auto
sc config BBAttachServer start= auto
sc config "BlackBerry SyncServer" start= auto
sc config "BlackBerry Server Alert" start= auto
echo.
    set /p ask_="Press [r] to return to the menu or any key to quit."
	for %%a in (r q) do if /i "%ask_%"=="%%a" goto _%%a
	goto :EOF   
	::
	:_r
	    goto :Reset
	:_q
	    goto :EOF

:Opt4
echo.
echo. Starting all BES services...
echo.
sc start "BlackBerry Router"
sc start "BlackBerry Dispatcher"
sc start "BlackBerry Controller"
sc start "BlackBerry MDS Connection Service"
sc start MDSIS
sc start "BlackBerry Policy Service"
sc start "Blackberry Collaboration Service"
sc start BBAttachServer
sc start "BlackBerry SyncServer"
sc start "BlackBerry Server Alert"
echo.
    set /p ask_="Press [r] to return to the menu or any key to quit."
	for %%a in (r q) do if /i "%ask_%"=="%%a" goto _%%a
	goto :EOF   
	::
	:_r
	    goto :Reset
	:_q
	    goto :EOF

:Opt5
echo.
echo. Starting all BES services...
echo.
sc stop "BlackBerry Router"
sc stop "BlackBerry Dispatcher"
sc stop "BlackBerry Controller"
sc stop "BlackBerry MDS Connection Service"
sc stop MDSIS
sc stop "BlackBerry Policy Service"
sc stop "Blackberry Collaboration Service"
sc stop BBAttachServer
sc stop "BlackBerry SyncServer"
sc stop "BlackBerry Server Alert"
echo.
    set /p ask_="Press [r] to return to the menu or any key to quit."
	for %%a in (r q) do if /i "%ask_%"=="%%a" goto _%%a
	goto :EOF   
	::
	:_r
	    goto :Reset
	:_q
	    goto :EOF

Last edited by inphektion; 01-13-2009 at 04:56 PM. Reason: removed (2) 3's. :)
Reply With Quote
  #4 (permalink)  
Old 01-13-2009, 03:09 PM
knottyrope's Avatar
The knotty A D M I N
 
Join Date: Jan 2009
Location: Mass
Posts: 103
Default

inphektion i see 2 3's on the menu.
__________________
------------------------------------------------------

Torch 9800 on BES 4.1.6 MR7, Exchange 2003, SQL 2005.
WES 2009-2010 Survivor
Reply With Quote
  #5 (permalink)  
Old 01-13-2009, 04:56 PM
BES Administrator
 
Join Date: Jan 2009
Posts: 29
Default

Quote:
Originally Posted by knottyrope View Post
inphektion i see 2 3's on the menu.
You passed the test...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.port3101.org/scripts-tools-hints-tricks/25-start-stop-disable-bes-services-scripted-dr-migration-purposes.html
Posted By For Type Date
Untitled document This thread Refback 04-04-2011 04:26 AM
Untitled document This thread Refback 08-30-2010 08:38 AM
Untitled document This thread Refback 07-27-2010 10:40 AM
Untitled document This thread Refback 05-16-2010 06:57 AM
Untitled document This thread Refback 03-20-2010 04:45 PM
Untitled document This thread Refback 12-04-2009 11:41 AM
Untitled document This thread Refback 05-18-2009 05:31 AM
Untitled document This thread Refback 03-10-2009 02:23 PM
Untitled document This thread Refback 01-21-2009 02:55 PM
Untitled document This thread Refback 01-21-2009 10:15 AM
Untitled document This thread Refback 01-15-2009 03:58 PM
Untitled document This thread Refback 01-15-2009 01:48 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
BES - BES migration millardus Port 3101: The BES Admin Bar & Grill 2 11-27-2009 06:53 AM
KB13718 - Correct order to start and stop BlackBerry services Si Featured BlackBerry KB Articles 1 06-19-2009 07:22 PM
BES Migration IT135 Port 3101: The BES Admin Bar & Grill 2 05-30-2009 05:10 PM
KB13871 - How to perform a migration using the BES Migration Kit hdawg Featured BlackBerry KB Articles 0 05-26-2009 11:55 AM
KB02439 - Hibernation mode causes mail redirection to stop Si Featured BlackBerry KB Articles 0 01-19-2009 09:58 AM


All times are GMT -4. The time now is 12:54 AM.
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.


 

SEO by vBSEO 3.3.2 PL2