Find the last time a database was accessed

select, x1 =
(select X1= max(bb.xx)
from (
select xx = max(last_user_seek)
where max(last_user_seek) is not null
union all
select xx = max(last_user_scan)
where max(last_user_scan) is not null
union all
select xx = max(last_user_lookup)
where max(last_user_lookup) is not null
union all
select xx = max(last_user_update)
where max(last_user_update) is not null) bb)
FROM master.dbo.sysdatabases d
left outer join
sys.dm_db_index_usage_stats s
on d.dbid= s.database_id
group by

How to Reset Your Lost Joomla Password in a few Easy Steps

Before we begin, you must have access to your database. If you don’t, pass these instructions on to someone that does. It’s also a good idea to backup your database before making changes, just in case something goes awry.
Finding the Password

Log in to your Joomla database (via phpMyAdmin for example)
Click to edit the _users database (will be preceded by your account name, for example: example_users)
Edit the entry for where usertype = “Super Administrator” (should be the first record)

Resetting the Password

In the password field you’ll notice a string of characters. Joomla uses a one-way encoding method, which means you won’t be able to retrieve your old password. However, you will be able to reset the password to a new one using mySQL’s built in MD5 function:

UPDATE example_users SET password=MD5(‘new password’) WHERE usertype = “Super Administrator”;

Voila – you just successfully reset your Joomla password Smiling Go to your joomla domain at and try logging in with the new password. You should be logged in as Super Administrator.
Copying the Password from Another User

An alternate method to reset your password, if you’re not comfortable with SQL commands, is to simply copy and paste the password hash from another user (to which you know the password) over to your admin user. You’ll then be able to login as the admin user using that password. If you don’t have another user, you should be able to register as one, and then copy the password over.
Applying the Email From Another User

Yet another alternate method to retrieving your lost Joomla admin password is to change your admin user’s email address to one you are familiar with. Then use the lost password retrieval function (the “forgot password” link in the login section) to have your Joomla password emailed to you.

Microsoft SQL Server Management Studio 2005 is to slow

In a corporate environment it is not uncommon for Microsoft SQL Server Management Studio (SSMS) for SQL Server 2005 to take over 45 seconds to start as well as lags and delays when opening various windows and dialog boxes from within the application. If you are experiencing this issue, then a quick fix is to add an entry in your HOSTS. file that points to

  1. Exit SSMS
  2. Press the keys [Win] + [R]
  3. Enter the following..
    notepad %systemroot%\system32\drivers\etc\hosts.
  4. Append the following..
  5. Save the file.
  6. Start SSMS (ah! much better)

The reason why it is slow is because .Net Runtime tries to contact to ensure that the certificate in various .Net packages that were shipped with SSMS is valid.
If you are behind a firewall/proxy as is the usual case then there is no direct route out to the internet to to validate the certificate(s) and it eventually times out. The wait for the time out causes the delay for each and every package it checks.

With the change to the HOSTS. file, you are forcing the certificate checks to to route to the local host which immediately fails and the certificate checks are ignored.

SQL Server Management Studio may also be configured to use online help recourses, while the host computer may not have access to the online resources.

First Step:

  1. Go to “Start” -> “Programs” -> “Microsoft SQL Server 2005”.
  2. Open “SQL Server Management Studio”.
  3. Navigate to “Tools”  -> “Options” -> “Help” -> “Online”.
  4. Mark the checkbox “Try local first, not online”
  5. Press on “Ok” button.
  6. Restart SQL Server Management Studio”.

Tip: In some cases you may need to disable “Check for publishers certificate revocation” option under the Internet Explorer -> “Internet Options” -> Advanced”.

Second Step:

  1. Go to “Start” -> “Programs” -> “Microsoft SQL Server 2005”.
  2. Open “SQL Server Error and Usage Reporting”
  3. Uncheck the following checkboxes:
    a.”Send error reports for all components and instances of SQL 2005 to Microsoft or your corporate error reporting server.”
    Note: Using local “corporate error reporting server”, may require to enable this feather.
    b. “Send feather usage reports for all components and instances of SQL 2005 to Microsoft.”
  4. 4. Press on “Ok” button.

Troubleshooting SQL Server 2005 “No global profile is configured…”

1. Open Management Studio
2. Expand Management
3. Right click on Database Mail
4. Select Configure Database Mail
5. In the Welcome to Database Mail Configuration Wizard, click Next6. In Select Configuration Task window, select Manage Profile Security
7. In Manage Profile Security window, make sure you have a profile that is selected as default.
8. Click Finish
9. Retest

ASP.NET 2.0 not registered in IIS

When ASP.NET is installed on your computer but not registered in your IIS you probably installed .Net before IIS.
This is easily repaired with the following command

“%windir%\Microsoft.NET\Framework\version\aspnet_regiis.exe” -i

Manually uninstall Windows Internal Database

When you deploy Windows SharePoint Services 3.0 in a single-server configuration by using the Basic installation option, the Setup program automatically installs and configures Windows Internal Database. However, an entry for Windows Internal Database is not created in the Add or Remove Programs tool. If you remove Windows SharePoint Services 3.0, the Setup program does not automatically remove Windows Internal Database from the computer.

  • If you are running an x86-based edition of Microsoft Windows Server 2003, use the following command line to remove Windows Internal Database from the computer:
    msiexec /x {CEB5780F-1A70-44A9-850F-DE6C4F6AA8FB} CALLERID=ocsetup.exe
  • If you are running an x64-based edition of Windows Server 2003, use the following command line to remove Windows Internal Database from the computer:
    msiexec /x {BDD79957-5801-4A2D-B09E-852E7FA64D01} CALLERID=ocsetup.exe

Source :

After restart Virtual Center Server does not start automatically

In my case the SQL server and the Virtual Center server are on the same server.
So I need to make the Virtual Center Server service dependent of the SQL server.
To make this happen type the following in a DOS box.

sc config vpxd depend= MSSQLSERVER