I have had AT&T U-Verse at home for almost two years and the service has worked exceptionally. A few weeks ago, my modem started randomly disconnecting from the broadband network every few minutes. Nothing had changed in my configuration ever since it was first setup. It was baffling and frustrating because it also impacted the IPTV connection.
First, we called AT&T and they performed some line checks. They identified issues with the external wiring and dispatched a team to fix. This improved the HDTV service tremendously.
However, this didn’t resolve the broadband disconnects. I tried reconnecting every one of my computers and wireless devices but that didn’t help. I rebooted the modem and reset the wireless settings and the firewall settings to factory defaults – didn’t help. My modem was already sitting above ground and away from any blocking or interfering sources.
Finally, in desperation, I was ready to reset the modem to factory defaults and start from scratch. That’s when I noticed the RJ-11 cord and the power adapter were touching. I figured that maybe the power adapter was interfering with the RJ-11 data line. I moved apart the two cords so that they were not touching and rebooted the modem without resetting to defaults.
No more disconnects!

My Windows 2008 R2 Hyper-V server has 2 dynamic disks setup in a mirrored configuration that I wanted to split into the separate disks.

You can accomplish this from the command line using the diskpart tool. However, since this was my first time, I decided to play it safe and use the Disk Management Console.
First, I backed up all data on the mirrored volume. All information and advice I got suggested that I would not lose data but why take chances? It took approximately 4 hours to backup 400 GB.
Next, right click the mirrored volume. Remove Mirror lets you remove a disk from the mirror. Break Mirrored Volume destroys the mirroring and you lose redundancy. Data is retained on both disks that made up the mirror.
Select Break Mirrored Volume….

Say Yes.

Windows processes away for a few seconds and then I get my two separate disks. All data that existed in the mirror is available on both disks.

Links from MSDN for the Windows Workflow Foundation.
Vendors publish services with a guaranteed or defined uptime SLA. This chart translates the uptime % into the actual seconds, minutes or hours of permitted downtime.
This chart is provided as a reference only. Please check with the vendor for the definition of the SLA, the metrics used to calculate the uptime and the exclusions.
Total Seconds in a Year = 60 x 60 x 24 x 365 = 31536000
| Uptime % |
Downtime (Seconds) |
Downtime (Minutes) |
Notes |
| 99.9 |
31536 |
525.6 |
9 hours/year |
| 99.91 |
28382.4 |
473.04 |
8 hours/year |
| 99.92 |
25228.8 |
420.48 |
7 hours/year |
| 99.93 |
22075.2 |
367.92 |
6 hours/year |
| 99.94 |
18921.6 |
315.36 |
5 hours/year |
| 99.95 |
15768 |
262.8 |
4.5 hours/year |
| 99.96 |
12614.4 |
210.24 |
3.5 hours/year |
| 99.97 |
9460.8 |
157.68 |
2.5 hours/year |
| 99.98 |
6307.2 |
105.12 |
Almost 2 hours/year |
| 99.99 |
3153.6 |
52.56 |
Less than an hour/year |
| 99.999 |
315.36 |
5.256 |
5 minutes/year |
| 99.9999 |
31.536 |
0.5256 |
Less than a minute/year |
| 99.99999 |
3.1536 |
0.05256 |
Always up |
The equivalent of the SQL Server TRUNCATE clause for DB2 v8 is
ALTER TABLE {TABLE-NAME} ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE
Here’s a succinct way of generating SELECT COUNT(*) against all tables in a DB2 database.
SELECT 'SELECT COUNT(*) AS COUNT_' || TABLE_NAME ||
' FROM ' || TABLE_SCHEMA || '.' || TABLE_NAME
FROM sysibm.TABLES
ORDER BY TABLE_NAME
This returns output like the following:
SELECT COUNT(*) AS COUNT_ADVISE_INDEX FROM DB2INST.ADVISE_INDEX
SELECT COUNT(*) AS COUNT_ADVISE_WORKLOAD FROM DB2INST.ADVISE_WORKLOAD
This function will let you resize an image in C#.
public static Bitmap Resize(Bitmap original,
int width, int height)
{
Bitmap bitmap = new Bitmap(width, height);
using (Graphics gfx = Graphics.FromImage(bitmap))
{
gfx.InterpolationMode
= Drawing2D.InterpolationMode.HighQualityBicubic;
gfx.SmoothingMode
= Drawing2D.SmoothingMode.HighQuality;
gfx.PixelOffsetMode
= Drawing2D.PixelOffsetMode.HighQuality;
gfx.CompositingQuality
= Drawing2D.CompositingQuality.HighQuality;
gfx.DrawImage(original, 0, 0, width, height);
return bitmap;
}
}
After weeks of putting up with significant disk activity and system slowness, I finally noticed that the McAfee anti-virus On Access Scanner process – mcshield.exe – was running as a High Priority process in Task Manager.
The fix was simple:
- Open Task Manager
- Switch to the Processes tab
- Find mcshield.exe
- Right-click → Set Priority → Normal
Happy system. Happy me.
I needed to get a list of all stored procedures that accessed a specific column in a table. Some stored procedures generated dynamic SQL statements so the View Dependencies feature was not guaranteed to get me the full list.
This query lets me retrieve the name and body of all stored procedures in a database. Adding the filter to look for the specific column is relatively simple.
SELECT o.Name AS SpName, c.Text AS SpBody
FROM syscomments c WITH (NOLOCK)
JOIN sysobjects o WITH (NOLOCK)
ON c.ID = o.ID
AND o.Type = 'P' -- Only stored procedures
ORDER BY o.Name
This query is for SQL Server 2005 but should work across all versions.
To find all rows that are in dbo.TABLE1 but not in dbo.TABLE2 using the SQL JOIN operator:
SELECT COUNT(*)
FROM dbo.TABLE1 t1 WITH (NOLOCK)
LEFT OUTER JOIN dbo.TABLE2 t2 WITH (NOLOCK)
ON t1.PrimaryKey = t2.PrimaryKey
WHERE t2.PrimaryKey IS NULL
I installed the SQL Server 2008 Feature Pack to get the DTS components for SQL Server Management Studio 2008. However, the IDE continued to error until I copied the following files from the SQL Server 2000 manager to the SQL 2008 Manager folders.
You need to have SQL 2000 Enterprise Manager installed on the same machine.
Copy Components into SQL Server 2005
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\semsfc.dll" "%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\semsfc.dll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\sqlgui.dll" "%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlgui.dll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\sqlsvc.dll" "%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlsvc.dll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033\semsfc.rll" "%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\Resources\1033\semsfc.rll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033\sqlgui.rll" "%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\Resources\1033\sqlgui.rll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033\sqlsvc.rll" "%ProgramFiles%\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\Resources\1033\sqlsvc.rll"
Copy Components into SQL Server 2008
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\semsfc.dll" "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\semsfc.dll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\sqlgui.dll" "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\sqlgui.dll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\sqlsvc.dll" "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\sqlsvc.dll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033\semsfc.rll" "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Resources\1033\semsfc.rll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033\sqlgui.rll" "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Resources\1033\sqlgui.rll"
copy /y "%ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033\sqlsvc.rll" "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Resources\1033\sqlsvc.rll"
Do not do this:
if ("A,B,C,D,E".IndexOf(key) > -1)
{
// CODE REDACTED
}
If key is an empty string, the result is 0 and the code in the IF block is executed. This is probably not what you expected.
I have an application concept in my head and wanted to build it for Google AppEngine.
The AppEngine SDK is offered in two flavors: Python and Java. I wasn’t really sure which SDK to pick. Python has been supported since Day One – it has the most examples and the best API support. In addition, it includes the webapp framework and Django support.
I’ve picked Python as the implementation framework.