Random Findings as a Developer

July 21, 2011

SQL Server – View Status of Long Running Tasks

Filed under: SQL Server — Andrew @ 1:06 pm

With databases sometimes you need to run tasks that take a while in order to complete. In the past I have found it hard to judge the status of a request. For example, we do backups and restores of a 40 GB database.

Normally this doesn’t take very long to accomplish (30-40 minutes) but there is no sort of progress bar on the query to judge complete a specific task is. Luckily after hunting through Google for a while I found a query that you are able to run to find how complete system tasks are. The query is as follows:

SELECT session_id, command, percent_complete FROM sys.dm_exec_requests

This query will return a list of the commands currently running as well as the percentage complete.

Status of Long Running Tasks

session_id command percent_complete
## BACKUP DATABASE 25.6985%

July 18, 2011

Visual Studio – Toolbox Missing Selections

Filed under: Visual Studio — Andrew @ 10:08 am

Yesterday I noticed that my list of tools to use in Visual Studio was more or less reduced to none. ┬áThis concerned me since SSIS packages are all tools based and well, I can’t really do much if I can only run a backup database task.

Visual Studio - Broken Toolbox

After googling it for a bit, I found the post that explained exactly what to do. The cached toolbox files were screwed up and needed to be regenerated. I started by right clicking and saying “Reset Toolbox” but no luck.

In the end I had to kill all of the tbd files that were created automatically by Visual Studio (more information).

The paths in that post are for Vista and XP, so I found another one that actually defined where to find them in Windows 7 (Visual Studio Application Data Folder).

Make sure to close Visual Studio before trying this or who knows what will happen …

Hope this helps!

Powered by WordPress