Tuesday, June 7, 2011

Opensolaris: Firefox After Update


After update Firefox report this error:

“Could not initialize the application’s security component. The most likely cause is problems with files in your application’s profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features.”

To resolve this just delete file cert8.db in Firefox profile folder (/export/home/username/.mozilla/firefox/something.default, replace username with username and something with profile folder name)

MSSQL: Optimize Table(s) (Like in MySQL)

To optimize one table in database:

ALTER INDEX all ON [table name] REORGANIZE
exp.:
ALTER INDEX all ON people REORGANIZE

To optimize all tables in entire database:
USE [databaseName]
EXEC sp_MSforeachtable @command1="ALTER INDEX all ON ? REORGANIZE"

or

EXEC [databaseName].dbo.sp_MSforeachtable @command1="ALTER INDEX all ON ? REORGANIZE"

This works only in MSSQL 2005 and later.

It is not the same as MySQL optimize.