<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Paul McCaskie's Blog</title>
        <link>http://blogs.imeta.co.uk/PMcCaskie/Default.aspx</link>
        <description>A New iMeta Blog</description>
        <language>en-GB</language>
        <copyright>Paul McCaskie</copyright>
        <generator>Subtext Version 2.1.1.1</generator>
        <image>
            <title>Paul McCaskie's Blog</title>
            <url>http://blogs.imeta.co.uk/images/RSS2Image.gif</url>
            <link>http://blogs.imeta.co.uk/PMcCaskie/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Transaction Log Backups Across a Network</title>
            <link>http://blogs.imeta.co.uk/PMcCaskie/archive/2009/04/08/674.aspx</link>
            <description>&lt;p&gt;Today I encountered a problem with a SQL server which was very low on disk space. After some investigation I found that the transaction log had grown massively; the database itself was about 125 MB whereas the transaction log was over 66 GB. I did some research and found this is quite a common problem with SQL Server, the reason being that by default SQL Server is installed in full recovery mode. This requires transaction log backups to be run regularly whereas the server that I was looking at had a backup plan but not one for the transaction logs. &lt;a href="http://msdn.microsoft.com/en-us/library/ms189085(SQL.90).aspx"&gt;This link from MSDN&lt;/a&gt; describes more about truncating the transaction log and &lt;a href="http://www.sqlskills.com/BLOGS/KIMBERLY/post/Database-Maintenance-Best-Practices-Part-III-Transaction-Log-Maintenance.aspx"&gt;this link from Kimberly Tripp&lt;/a&gt; explains more about the kind of problems that can occur with transaction logs.&lt;/p&gt;  &lt;p&gt;On this particular server there was no free space available to backup the transaction log so we needed to find another way to shrink it. Occasionally in the past we have done this by changing the SQL Server to &lt;a href="http://www.nigelrivett.net/SQLAdmin/TransactionLogFileGrows_1.html"&gt;simple recovery mode, which allows us to truncate the transaction log&lt;/a&gt;, but this particular database was a mirrored instance which cannot be run in simple recovery mode.&lt;/p&gt;  &lt;p&gt;The solution was a simple one, we had another sever on the network with plenty of space available, we just needed to backup the transaction log to that machine. Unfortunately this was not as easy as expected because SQL Server was running as a local service account, so had no permissions on the other machine, which meant we had to either change the account to one with network access, or alternatively create a &lt;a href="http://support.bigfix.com/bes/misc/null_session_share.html"&gt;null session share&lt;/a&gt; on the target server for the duration of the backup. As we did not want to change the account running the SQL Server instance as this could have had undesirable side effects, for example failing over the mirror principle to the other machine when the SQL service was restarted, the null session share method was chosen and it worked great, allowing us the backup the whole transaction log across the network. &lt;/p&gt;  &lt;p&gt;The “Back up Database” window in SQL Server Management Studio does not allow you to browse to a network drive, unless it has been &lt;a href="http://blogs.msdn.com/sqlserverfaq/archive/2009/02/27/how-to-backup-sql-server-databases-to-a-mapped-drive.aspx"&gt;mapped to a drive letter in SQL Server&lt;/a&gt;, but you can still type in the UNC path, for example:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.imeta.co.uk/images/blogs_imeta_co_uk/PMcCaskie/WindowsLiveWriter/TransactionLogBackups_137B2/image_2.png" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.imeta.co.uk/images/blogs_imeta_co_uk/PMcCaskie/WindowsLiveWriter/TransactionLogBackups_137B2/image_thumb.png" width="354" height="210" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;In my case I actually ran the command from SQL Server Management Studio, which looked something like this:&lt;/p&gt;  &lt;p&gt;BACKUP LOG [DATABASE] TO  DISK = N'\\ServerName\sharedbackupdirectory\logfile' WITH NOFORMAT, INIT,  NAME = N'DATABASE-Transaction Log  Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10&lt;/p&gt;  &lt;p&gt;Obviously using the null session share would not be advisable on a regular basis due to the security risk, which is why the registry entry was removed after the backup, but I thought I would post this tip in case anyone else encounters this problem.&lt;/p&gt;  &lt;p&gt;In future it would be advisable to make sure if running in full recovery mode that there is always a backup scheduled for the transaction log to prevent it getting too large, the earlier link from Kimberly Tripp has some information about maintenance plans that is worth reading.&lt;/p&gt;&lt;img src="http://blogs.imeta.co.uk/PMcCaskie/aggbug/674.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul McCaskie</dc:creator>
            <guid>http://blogs.imeta.co.uk/PMcCaskie/archive/2009/04/08/674.aspx</guid>
            <pubDate>Wed, 08 Apr 2009 22:13:30 GMT</pubDate>
            <wfw:comment>http://blogs.imeta.co.uk/PMcCaskie/comments/674.aspx</wfw:comment>
            <comments>http://blogs.imeta.co.uk/PMcCaskie/archive/2009/04/08/674.aspx#feedback</comments>
            <slash:comments>20</slash:comments>
            <wfw:commentRss>http://blogs.imeta.co.uk/PMcCaskie/comments/commentRss/674.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.imeta.co.uk/PMcCaskie/services/trackbacks/674.aspx</trackback:ping>
        </item>
        <item>
            <title>OutOfMemoryException in ReSharper</title>
            <link>http://blogs.imeta.co.uk/PMcCaskie/archive/2009/03/25/654.aspx</link>
            <description>&lt;p&gt;Last week I attended the local Southampton &lt;a href="http://www.nxtgenug.net/"&gt;NxtGenUG&lt;/a&gt; meeting, which was an interesting talk by &lt;a href="http://codebetter.com/blogs/ian_cooper/"&gt;Ian Cooper&lt;/a&gt; about NHibernate as well as a &lt;a href="http://jenniphillips.co.uk/2009/03/20/refactoring-in-net-using-refactorpro-nugget/"&gt;nugget from Jenni Phillips&lt;/a&gt; about refactoring code using &lt;a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/Refactoring/"&gt;Refactor&lt;/a&gt;. I enjoy going to the user group as it gives me an insight to various technologies that I might not have time to look into otherwise as well as giving me a chance to catch up with like minded people. One of the other benefits of the user group is the swag which you can win, mostly T-shirts and the odd book, but this week I won I licence to &lt;a href="http://www.jetbrains.com/resharper/"&gt;ReSharper&lt;/a&gt; which I was pleased about as i have heard colleagues in the office rave about it.&lt;/p&gt;  &lt;p&gt;I decided to install the trial of ReSharper on my machine to see how I got on with it but unfortunately I ran into a problem. The solution i am currently working on contains over 100 projects and when I opened it with Visual Studio ReSharper tried to analyse the solution I started getting a constant OutOfMemoryException which looked like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.imeta.co.uk/images/blogs_imeta_co_uk/PMcCaskie/WindowsLiveWriter/OutOfMemoryExceptioninReSharper_AC07/clip_image002_2.jpg" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.imeta.co.uk/images/blogs_imeta_co_uk/PMcCaskie/WindowsLiveWriter/OutOfMemoryExceptioninReSharper_AC07/clip_image002_thumb.jpg" width="494" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I opened another solution I work on with just over 30 projects and didn’t get the error, so i decided to look into possible solutions. Fortunately I found a blog post by Steven Harmen on &lt;a href="http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx"&gt;Hacking Visual Studio to Use More Than 2Gigabytes of Memory&lt;/a&gt; which seems to have resolved my issue. Now I need to spend some time getting used to ReSharper, I like what I have seen so far, especially the navigation of code. If I find any useful tips I'll post them here.&lt;/p&gt;&lt;img src="http://blogs.imeta.co.uk/PMcCaskie/aggbug/654.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul McCaskie</dc:creator>
            <guid>http://blogs.imeta.co.uk/PMcCaskie/archive/2009/03/25/654.aspx</guid>
            <pubDate>Wed, 25 Mar 2009 13:55:59 GMT</pubDate>
            <wfw:comment>http://blogs.imeta.co.uk/PMcCaskie/comments/654.aspx</wfw:comment>
            <comments>http://blogs.imeta.co.uk/PMcCaskie/archive/2009/03/25/654.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://blogs.imeta.co.uk/PMcCaskie/comments/commentRss/654.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.imeta.co.uk/PMcCaskie/services/trackbacks/654.aspx</trackback:ping>
        </item>
    </channel>
</rss>