Thursday, June 26, 2014

Joomla: plugin for enhancing security rule on login and password

If you are using Joomla, you may want to protect your administrator area from eyes of bad guys, and you may also want to lock an user after some times of failed login. This help your users and website more secure under attacks of hackers in order to stolen your users' information or serve their ploys.

You can read this my article for hiding your Joomla back-end or use my plugin called V4 Security (support Joomla 3.x, 2.x). You can download it here. Below are its features and illustrate images.

1. Backend Protection

If you key Login Token here (e.g. hung123, you must access your back-end via a URL like: your_site/administrator/?hung123).
You also can set a Redirect URL if someones go to the URL your_site/administrator (without token). I think you should set an URL of a 404 page here.

2. Login Attempts



If you enable this function and specify Max attempts number here (e.g. 3), any user will be locked after 3 times of failed login.

3. Password Complexity

In this function, you will config for the password rule in your web site. You can select to apply on Frontend, Backend or both. This function may be useful if you use Joomla to build a social network or an intranet for your company.

Hope this plugin can help you have well sleep when running Joomla -:)

Do you have any things else? Any comment is welcome.


Monday, June 2, 2014

How to find the biggest table in MS SQL

If you need to find out the biggest table in MS SQL, you can use below command:

SELECT
    t.NAME AS TableName,
    i.name as indexName,
    sum(p.rows) as RowCounts,
    sum(a.total_pages) as TotalPages,
    sum(a.used_pages) as UsedPages,
    sum(a.data_pages) as DataPages,
    (sum(a.total_pages) * 8) / 1024 as TotalSpaceMB,
    (sum(a.used_pages) * 8) / 1024 as UsedSpaceMB,
    (sum(a.data_pages) * 8) / 1024 as DataSpaceMB
FROM
    sys.tables t
INNER JOIN    
    sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
    sys.allocation_units a ON p.partition_id = a.container_id
WHERE
    t.NAME NOT LIKE 'dt%' AND
    i.OBJECT_ID > 255 AND  
    i.index_id <= 1
GROUP BY
    t.NAME, i.object_id, i.index_id, i.name
ORDER BY
    --object_name(i.object_id) -- sort by id
    --SUM(p.rows) DESC -- sort by number of rows
    SUM(a.total_pages) DESC -- sort by TotalSpaceMB

Thanks for the instruction from marc_s guy here.
Subscribe to RSS Feed Follow me on Twitter!