BlackBerryFAQ.com  
   


Backup the BESMgmt database script

From BlackBerryFAQ

  1. Create a folder on the root of the C drive called backup
  2. Within that folder create a file called backupdb.bat
  3. Edit the file with notepad and add the following text
osql -E -Q "backup database besmgmt to disk='c:\backup\besmgmt.bak'"

Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP

DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j
Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k

RENAME c:\backup\besmgmt.bak besmgmt_%YYYYMMDD%%HHMM%.bak

Note: if the Database is not called BESMgmt then you will need to change the name of the database within the first line of the script.

  • If you want you can then create a Scheduled Tasks within Windows to run the bat file to backup the database.


Cheers, Ashworth

Personal tools