Friday, 25 March 2011

Rebuilding indexes in SQL Server

DBCC SHOWCONTIG ("dbo.TableName") - Check your Scan Density...

DBCC SHOWCONTIG scanning TableName table...
Table: TableName (2099048); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned................................: 74056
- Extents Scanned..............................: 9259
- Extent Switches..............................: 9258
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.98% [9257:9259]
- Logical Scan Fragmentation ..................: 0.01%
- Extent Scan Fragmentation ...................: 1.57%
- Avg. Bytes Free per Page.....................: 45.7
- Avg. Page Density (full).....................: 99.44%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Then rebuld if you need

DBCC DBREINDEX ("dbo.TableName")

Tracing deadlocks in SQL Server

http://www.sqlservercentral.com/articles/Performance+Tuning/tracingdeadlocks/1324/
Found that these three dbcc traceon calls worked for us in SQL 2008
DBCC TRACEON (1222, -1)
DBCC TRACEON (3604)
DBCC TRACEON (1204)

Then check the SQL logs to see exactly what is causing the dead lock to occur

Wednesday, 23 March 2011

Yey - I'm now officially contracting

From 4th April I'll be stepping into the world of the contractor for the first time. How exciting is that!

HTML5 video player tutorial

Bypassing Word document password setting

If you ever have a Microsoft Word document that you want the merged version of, but are unable to do this as there is a password set on the document preventing you from accepting all changes, then simply email the document as an attachment to your Google mail (Gmail) account, and view it online. From there you will see Google does the merging for you and you are then able to export off a new version in word document format, with all the changes accepted.

Using Beyond compare with TFS

If you need to remember the settings to set your external tools in visual studio to use beyond compare then follow the steps here under the heading MICROSOFT TEAM FOUNDATION SERVER (TFS)

http://www.scootersoftware.com/support.php?zz=kb_vcs

image

image

image

Diff

  1. In Visual Studio Choose Options from the Tools menu.
  2. Expand Source Control in the treeview.
  3. Click Visual Studio Team Foundation Server in the treeview.
  4. Click the Configure User Tools button.
  5. Click the Add button.
  6. Enter ".*" in the Extension edit.
  7. Choose Compare in the Operation combobox.
  8. Enter the path to BComp.exe in the Command edit.
  9. In the Arguments edit, use:
    %1 %2 /title1=%6 /title2=%7

3-way Merge (v3 Pro)

  1. Follow steps 1-6 above.
  2. Choose Merge in the Operation combobox.
  3. Enter the path to BComp.exe in the Command edit.
  4. In the Arguments edit, use:
    %1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9

2-way Merge (v3 Std, v2)

Use the same steps as the 3-way merge above, but use the command line:
%1 %2 /savetarget=%4 /title1=%6 /title2=%7

My first blog post

Hi there. I’ve just been contemplating with the idea of moving my blog from my company to a more personalised blog engine, that’s supported by windows live writer. Looks as if this is the one for me.

How to by pass the Jaguary X-Type enter security pin screen after changing battery

How to bypass security code on Jaguar X-Type touchscreen Satellite Navigational units. Just hold the skip track, AMEM and PTY buttons ...