Bulk import BES CAL (license keys)
Posted 05-11-2010 at 04:05 AM by hdawg
Tags besmgmt, import cal, licensekeys
I was recently working with a friend who was building a new BES 5 environment / migrating from 4.x and had more than 200 CAL's that needed to be added to the database.
Adding through the BAS is a "one at a time" approach with no easy way to do the import ... but as we all know the keys are all stored in the BlackBerry Configuration Database (BESMgmt) in the licensekeys table. So we'd just add the data to the table in question, right? Well ... kinda.
I was going open up my favorite SQL Query Analyzer to do a simple:
... but then I figured I bet there is a stored procedure that the BAS calls when it adds a key to the database ... and then I found insertkey. I don't know if the BAS uses it (I haven't bothered to look) but the insertkey SP does error handling and I guess is a little more "supportable".
So now, instead we have:
Do some copy / paste with Excel and you're good to go. Oh yeah, there's also deletekey ... guess what that does?
Adding through the BAS is a "one at a time" approach with no easy way to do the import ... but as we all know the keys are all stored in the BlackBerry Configuration Database (BESMgmt) in the licensekeys table. So we'd just add the data to the table in question, right? Well ... kinda.
I was going open up my favorite SQL Query Analyzer to do a simple:
Code:
INSERT INTO licensekeys VALUES ('besx35-XXXXX-XXXXX-XXXXX-XXXXX', '0')
So now, instead we have:
Code:
exec insertkey 'besx35-XXXXX-XXXXX-XXXXX-XXXXX', '0'
Total Comments 1
Comments
-
There is a RIM KB article about that. Search for BCP and CAL. Works with a SQL command line tools and uses a text file for all CAL for export and import.
Works like a charm.Posted 05-11-2010 at 06:41 AM by magikweis