NSS or Namesis Service Suit is the latest servicing tool for Nokia BB5 phones. You need a USB cable to connect your phone to the PC and u need to install NSS which can be downloaded from the link given in this post. NSS can be used to update firmware of the phone and many other services can be done by NSS. You can reset the security code which you forgot by the following steps.
Install NSS by selecting USB virtual drive
After installing open the software and click on scan
Then click on the TOOLS icon after that click on the Factory settings tab
Select "user code" (5) and click "reset" (6) button
*Note: If you have a Symbian phone check Symbian box above the reset button