How to reset MSSQL admin password

(1) Open command prompt with the administrator

(2) This command will list all the MSSQL in your server

 osql -L

(3) By this command you’ll connect to MSSQL server using administrator account

osql -S servername -E

(4)To change sa password you should execute the following query

sp_password NULL,'new_password','sa'

SQL Server Management Studio 2008, ERROR: 916

For the SQL Server Management Studio 2008, accessing data in restricted databases causing a failure to populate Object Explorer and Object Explroer Details, you will receive error as below

Well it was a bug for the SQL Server Management Studio 2008, as show here

The solution as below: 

(1) Open SQL Server Management Studio 2008

(2) Connect to the database server as normal

(3) Press F7 to open the “Object Explorer Details” window or click “View” >> “Object Explorer Details”

(4) In the object explorer details window expand by double click on “Databases”

(5) Right click on the header bar (“Name”, “Policy health state”, “Recovery Model”, etc)

(6) Deselect “Collation” from the menu that will pop up

(7) From the object explorer, refresh the “Databases”

Now you can see all the database.

Note: The  bug has been fixed for new release SQL Server 2008R2