Load "BLOG", 8, 1

This is the best I could do on short notice.
posts - 10 , comments - 3 , trackbacks - 10

Monday, November 26, 2012

How do I programatically determine which port a SQL Server is running on?

How do I programatically determine which port a SQL Server is running on?

/*
Wrapper script for xp_readerrorlog
Author: Ralph Willgoss
Date: 2nd Oct 2012
This script cycles through all logs files, looking for the listening port.
Normally you have to specify the log file one by one, the script removes the need for that.

Param ref for: xp_readerrorlog
1. Value of error log file you want to read: 0 = current, 1 = Archive #1, 2 = Archive #2, etc...
2. Log file type: 1 or NULL = error log, 2 = SQL Agent log
3. Search string 1: String one you want to search for
4. Search string 2: String two you want to search for to further refine the results
5. Search from start time
6. Search to end time
7. Sort order for results: N'asc' = ascending, N'desc' = descending
*/

USE Master
GO
--  Get log count
DECLARE @logcount int
DROP TABLE #Result
CREATE TABLE #Result (ArchiveNo int, Date datetime, Size int)
INSERT INTO #Result
EXEC xp_enumerrorlogs
SET @logcount = (SELECT COUNT(*) FROM #Result)

-- Search the available logs
DECLARE @counter int
SET @counter = 0
WHILE @counter <= @logcount
BEGIN
   EXEC xp_readerrorlog @counter, 1, N'Server is listening on', 'any', NULL, NULL, N'asc'
   SET @counter = @counter + 1
END
GO

Posted On Monday, November 26, 2012 8:16 PM | Comments (0) | Filed Under [ SQL Server ]

Sunday, November 25, 2012

How do I recycle an IIS App pool with Powershell?

Reference implementation of a Powershell script to recycle app pools, in response to Rick's post:
http://www.west-wind.com/weblog/posts/2012/Oct/02/A-tiny-Utility-to-recycle-an-IIS-Application-Pool

Alternatives:

Windows 2003 & II6
C:\WINDOWS\system32>cscript.exe iisapp.vbs /a AppPoolName /r


Windows 2008 IIS7

C:\WINDOWS\system32\inetsrv\appcmd recycle apppool "MyAppPool"
Restart-WebAppPool cmdlet

#    File: RecycleAppPool.ps1
#    Author: Ralph Willgoss
#    Date: 2nd Oct 2012

#    Reference:
#    http://stackoverflow.com/questions/198623/how-do-i-recycle-an-iis-apppool-with-powershell
# =============================================================================
#    Iniatialise
=============================================================================
param ( )

=============================================================================
#   Main
=============================================================================

Write-OutPut ""
Write-OutPut "Starting Recycling App Pool"
Write-OutPut ""

$appPoolName = "AppPoolName" #$args[0]
$appPool = Get-WmiObject -namespace "root\MicrosoftIISv2" -class "IIsApplicationPool"
          | Where-Object { $_.Name -eq "W3SVC/APPPOOLS/$appPoolName" }
          
$appPool.Recycle()

Write-OutPut ""
Write-OutPut "Finished Recycling App Pool"
Write-OutPut ""

Posted On Sunday, November 25, 2012 10:36 AM | Comments (2) |

How do I programatically determine which port a SQL Server is running on?

How do I programatically determine which port a SQL Server is running on?
[The original post has been moved to here, due to issues with updating the original]

Posted On Sunday, November 25, 2012 10:20 AM | Comments (0) |

Tuesday, December 21, 2010

When debugging using Visual Studio 2010 the aspnet_wp.exe is greyed out

When debugging with Visual Studio 2010, you may find that you can't attach to the aspnet_wp.exe process as its greyed out.

One solution is to look at the Debug Diagnostic Services, it may be automatically starting and creating new instances of DbgHost.exe – leading VS to think a debugger was already attached.

Disabling this service should fix the problem of  aspnet_wp.exe being greyed out.

Posted On Tuesday, December 21, 2010 2:00 AM | Comments (0) |

Monday, June 9, 2008

Continuous Monitoring with CruiseControl.Net

I heard Owen Rogers on HanselMinutes and thought I would create a tutorial to show how easy it is to setup CruiseControl.Net as a continuous monitoring server.

My tutorial goes into how to schedule CruiseControl.Net to run at certain times and how to incorporate output from a monitoring program in the build report page for easy viewing for all.

You could find all these bits and pieces on the Internet but put together I thought might be a handy reference for people just getting started.

Continuous Monitoring using CruiseControl.Net

Comments, suggestions and feedback welcome!

Posted On Monday, June 9, 2008 6:26 PM | Comments (0) |

Sunday, August 12, 2007

Resharper 3.0.x not recognised under Visual Studio 2008 Beta 2

If you install Resharper 3.0.x and discover that Visual Studio 2008 Beta 2 hasn't recognised it, you need to run the install again with a few special command line arguments:

C:\WINDOWS\system32\msiexec.exe /i <full path to installer file>.msi VSVERSION=9.

Posted On Sunday, August 12, 2007 7:57 PM | Comments (0) |

Sunday, December 17, 2006

Error installing .Net 1.1 "Error: internal error 2709 feature GUID for use by Cartman"

I recently rebuilt a dev machine and was trying to install .Net 1.1 and got the following error:
Error: internal error 2709 feature GUID for use by Cartman

It apparently happens when something goes wrong or you have an aborted installation of .Net 1.1 framework.

The fix for this can be downloaded from this address: http://astebner.sts.winisp.net/Tools/dotnetfx_cleanup_tool.zip

Just run the tool and it cleans up everything, my install then proceded flawlessly.

I found this fix on this post originally: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=9409&SiteID=1

Posted On Sunday, December 17, 2006 1:43 PM | Comments (0) |

Thursday, October 20, 2005

Setting up an ASP.NET Website Development environment using Visual Studio .NET, Subversion and Windows XP

I've just completed a small ebook/tutorial titled Setting up an ASP.NET Website Development environment using Visual Studio .NET, Subversion and Windows XP [Link updated 23/08/2006] which you can find here [Link updated 23/08/2006].

It covers the following topics:
Setting up IIS 5.1 on Windows XP
Setting up Visual Studio .NET 2003 for debugging
Installing Apache 2.0 on Windows XP
Installing Subversion on Windows XP
Setting up Apache to recognise Subversion repositories
Setting up TortiseSVN
Creating Subversion repositories using TortiseSVN
Setting up for ASP.Net Website Development on Windows XP
Publishing a website from a Subversion Repository

The aim of this ebook is to give a developer a complete set of steps that will allow them to setup their own isolated development environment for developing websites with ASP.Net.  This environment includes the ability to debug web applications locally, source control integration and publishing to a development server.

Feedback, improvements and other suggestions are welcome.

 COMING SOON....

-> Running multiple concurrent websites on Windows XP

-> Setting up a Subversion repository viewer

-> Intergrating Subversion source control into Visual Studio.Net

 

Posted On Thursday, October 20, 2005 9:21 PM | Comments (11) |

Wednesday, August 23, 2006

Setting up an ASP.NET Website Development environment using Visual Studio .NET, Subversion and Windows XP

Hi,

I've now moved the Development environment HowTo to the Code Project. The old site will cease to exist in a few days.

You can access the new article here http://www.codeproject.com/aspnet/Subversion.asp

Unfortuneately the formatting hasn't ported over very well to the code project style, I will take some time to amend this so its easier to read and follow.

Posted On Wednesday, August 23, 2006 10:41 AM | Comments (0) |

Saturday, July 9, 2005

In the beginning....

“In the beginning was the Word, and the Word was with God, and the Word was God.”

John 1:1

Posted On Saturday, July 9, 2005 8:36 PM | Comments (0) |

Powered by: