<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4496842446504515815</id><updated>2012-01-17T14:06:49.974+01:00</updated><title type='text'>Zelis SQL and windows blog</title><subtitle type='html'>My SQL and windows tips and tricks blog where I collect things that I use in my regular work as domain admin and dba and things that can be useful some day.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-777074363513749573</id><published>2011-11-17T21:14:00.000+01:00</published><updated>2011-11-17T21:14:27.990+01:00</updated><title type='text'>SQL Server 2008 R2 Evalutation has expired</title><content type='html'>&lt;script type="text/javascript"&gt;iiiiiiiiiiiiH&lt;span style=""&gt;&lt;span style="background-color: rgb(0, 0, 0);"&gt;I I&lt;/span&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;HHI&lt;/span&gt; &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;had&lt;/span&gt; an &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;interehhhHHIHahhaHHHHHvar&lt;/span&gt; &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;gaJsHost&lt;/span&gt; = (("https:" == &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;document&lt;/span&gt;.&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;location&lt;/span&gt;.&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;protocol&lt;/span&gt;) ? "https://&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;ssl&lt;/span&gt;." : "http://www.");&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;document&lt;/span&gt;.&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;write&lt;/span&gt;(&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;unescape&lt;/span&gt;("%3Cscript &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;src&lt;/span&gt;='" + &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;gaJsHost&lt;/span&gt; + "google-&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;analytics&lt;/span&gt;.&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;com&lt;/span&gt;/&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;ga&lt;/span&gt;.&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;js'&lt;/span&gt; &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;type&lt;/span&gt;='text/javascript'%3E%3C/&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;script&lt;/span&gt;%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var &lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;pageTracker&lt;/span&gt; = _gat._&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;getTracker&lt;/span&gt;("&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;UA&lt;/span&gt;-3614867-1");&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;pageTracker&lt;/span&gt;._&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;initData&lt;/span&gt;();&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;pageTracker&lt;/span&gt;._&lt;span style="background: none repeat scroll 0% 0% yellow;" class="goog-spellcheck-word"&gt;trackPageview&lt;/span&gt;();&lt;/script&gt;I had an interresting case today. Someone had installed SQL Server 2008 R2 evalutation edition and then the server had gone into production after the installer had left the building. Nobody knew that it was evaluation version that were used. Today the evalutation period expired and the server stopped!!!!&lt;br /&gt;&lt;br /&gt;After some troubleshooting we found what happened and started to think about what to do. Luckily there were an easy way out without using the backups and reeinstalling.&lt;br /&gt;&lt;br /&gt;The link below explains what to do.&lt;br /&gt;&lt;a href="http://blogs.technet.com/b/sqlman/archive/2010/03/16/sql-server-2008-upgrading-to-standard-enterprise-edition-from-evaluation-edition.aspx"&gt;http://blogs.technet.com/b/sqlman/archive/2010/03/16/sql-server-2008-upgrading-to-standard-enterprise-edition-from-evaluation-edition.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After doing the necessary steps the SQL Service started fine but the SQL Agent didn´t. I got an wmi error when i tried to change the agent service back to automatic. Apparently this is a bug in SQL Server which appears after the service have been set disabled and you can read about it &lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/386929/sql-server-configuration-manager-cannot-change-the-start-mode-for-a-service-that-is-disabled"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Maybee this can be of any help to somebody in the future.&lt;br /&gt;&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-777074363513749573?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/777074363513749573/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=777074363513749573' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/777074363513749573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/777074363513749573'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2011/11/sql-server-2008-r2-evalutation-has.html' title='SQL Server 2008 R2 Evalutation has expired'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7704149565734899462</id><published>2011-10-25T11:20:00.000+02:00</published><updated>2011-10-25T11:20:51.972+02:00</updated><title type='text'>Msg 952, Level 16, State 1, Database 'Databasename' is in transition.</title><content type='html'>Today I got an interesting error from one of our db servers. The index maintenance job had failed and in the log I got the following error: Msg 952, Level 16, State 1, Database 'Databasename' is in transition.&lt;br /&gt;When I tried to access the database in SSMS it was not available.&lt;br /&gt;&lt;br /&gt;When I ran sp_who2 I saw that there were one session blocking an alter database command from one user. The user blocking had a session open to the database that were unavailable.&lt;br /&gt;I also saw in the sql server logs that the same user had set the database offline the day before. Now it were stuck in between online and offline.&lt;br /&gt;&lt;br /&gt;To solve the problem I just killed the blocking session and then the database went offline without any problems.&lt;br /&gt;&lt;script type="text/javascript"&gt;TTodttttTottttoasöldfjasdölfjsöaldfsdf&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt; &lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt; &lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt; &lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7704149565734899462?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7704149565734899462/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7704149565734899462' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7704149565734899462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7704149565734899462'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2011/10/msg-952-level-16-state-1-database.html' title='Msg 952, Level 16, State 1, Database &apos;Databasename&apos; is in transition.'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3631481054831945620</id><published>2011-04-16T21:36:00.001+02:00</published><updated>2011-04-18T22:59:09.228+02:00</updated><title type='text'>SQL Powershell scripts</title><content type='html'>I found some interresting powershell scripts that I wanted to run against some sql servers. However I haven´t worked with powershell before so I ran into a couple of problems. When the script want to use sqlcmd I got this error:&lt;br /&gt;&lt;br /&gt;The term 'invoke-sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Temp\wasted_server_memory.ps1:10 char:14&lt;br /&gt;+ invoke-sqlcmd &amp;lt;&amp;lt;&amp;lt;&amp;lt; -Server $srv -Database master -Query $SQLQuery&lt;br /&gt;+ CategoryInfo : ObjectNotFound: (invoke-sqlcmd:String) [], CommandNotFoundException&lt;br /&gt;+ FullyQualifiedErrorId : CommandNotFoundException&lt;br /&gt;&lt;br /&gt;After some googling I found that Invoke-sqlcmd isn't included with PowerShell, but rather it's part of the SQL Server 2008 PowerShell Host (sqlps). You can get it if you download The Microsoft® SQL Server® 2008 R2 Feature Pack. After&amp;nbsp;installing it didn´t work anyway and after some more googling I found that you&amp;nbsp;must load it into powershell before it works. You can find a script to do it &lt;a href="http://blogs.msdn.com/b/mwories/archive/2008/06/14/sql2008_5f00_powershell.aspx"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3631481054831945620?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3631481054831945620/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3631481054831945620' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3631481054831945620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3631481054831945620'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2011/04/sql-powershell-scripts.html' title='SQL Powershell scripts'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-2973176741004135776</id><published>2010-09-21T23:07:00.001+02:00</published><updated>2010-09-21T23:13:03.086+02:00</updated><title type='text'>Recreate ctx_cpsuser</title><content type='html'>Recently we have virtualized a lot of our machines and because of the overhead the virtualization creates we needed more citrix servers to handle the same amount of users we had. We cloned a couple of the citrix servers to get them up quickly and exact the same.&lt;br /&gt;&lt;br /&gt;One problem we got was that the printers wouldn´t create and that was because we needed to recreate the ctx_cpsuser account that runs the citrix print manager service.&lt;br /&gt;&lt;br /&gt;Here´s an &lt;a href="http://support.citrix.com/article/CTX113554"&gt;article&lt;/a&gt; on how to handle it.&lt;br /&gt;&lt;br /&gt;Stefan&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-2973176741004135776?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/2973176741004135776/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=2973176741004135776' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2973176741004135776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2973176741004135776'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/09/recreate-ctxspsuser.html' title='Recreate ctx_cpsuser'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3527302679326022475</id><published>2010-07-10T18:29:00.000+02:00</published><updated>2010-07-10T18:29:19.419+02:00</updated><title type='text'>SQL Server benchmarking series Introducing SSDs (Part 2: sequential inserts)</title><content type='html'>Paul S. Randall has published the second part in benchmarking SSD disks with SQL Server. Great fun reading and these tests are real useful for us who don´t have the equipment our selves for testing.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;Pvar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;br /&gt;Read the full blogpost &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Benchmarking-Introducing-SSDs-%28Part-2-sequential-inserts%29.aspx"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;Pvar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3527302679326022475?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3527302679326022475/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3527302679326022475' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3527302679326022475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3527302679326022475'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/07/sql-server-benchmarking-series.html' title='SQL Server benchmarking series Introducing SSDs (Part 2: sequential inserts)'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-5040680667837746276</id><published>2010-06-16T14:09:00.000+02:00</published><updated>2010-06-16T14:09:19.149+02:00</updated><title type='text'>How to uninstall a hotfix or Service Pack via the Recovery Console</title><content type='html'>I had a problem with a computer after installing Windows XP servicepack 3 and the computer restarted and I couldn´t even log into safemode. Looked around and found this article, which can be useful sometime.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;Ivar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;br /&gt;&lt;a href="http://windowsxp.mvps.org/spuninst.htm"&gt;How to uninstall a hotfix or Service Pack via the Recovery Console&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;Ivar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;Ivar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-5040680667837746276?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/5040680667837746276/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=5040680667837746276' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5040680667837746276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5040680667837746276'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/06/how-to-uninstall-hotfix-or-service-pack.html' title='How to uninstall a hotfix or Service Pack via the Recovery Console'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-1038927260905608591</id><published>2010-05-18T23:56:00.002+02:00</published><updated>2010-05-19T00:01:48.679+02:00</updated><title type='text'>SQL Server benchmarking series part 5 and introducing SSD</title><content type='html'>You can read the 5th part in the Benchmarking series &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Benchmarking-1-TB-table-population-%28part-5-network-optimization-again%29.aspx"&gt;here.&lt;/a&gt;&lt;br /&gt;The first post about the introduction to &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Benchmarking-Introducing-SSDs-%28Part-1-not-overloaded-log-file-array%29.aspx"&gt;SSD&lt;/a&gt; disks.&lt;br /&gt;The second post about &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Benchmarking-Introducing-SSDs-%28Part-1b-not-overloaded-log-file-array%29.aspx"&gt;SSD&lt;/a&gt; disks.&lt;br /&gt;&lt;br /&gt;I recently bought a SSD to my stationary computer and the result were amazing, even the incredibly slow outlook were fast. I will increase the memory in the computer with 2gb and see what the result will be on the performance tests that I did.&lt;br /&gt;&lt;br /&gt;Enjoy the reading I do.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-1038927260905608591?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/1038927260905608591/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=1038927260905608591' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1038927260905608591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1038927260905608591'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/05/sql-server-benchmarkin-series-part-5.html' title='SQL Server benchmarking series part 5 and introducing SSD'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-877620372828091772</id><published>2010-05-18T23:51:00.000+02:00</published><updated>2010-05-18T23:51:52.752+02:00</updated><title type='text'>Top 5 things to get rid of in SQL Server?!</title><content type='html'>Paul Randall wrote a blogpost about the top 5 things that he want to get rid of in sql server, and not surpisingly auto shrink was the top one.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;http://www.sqlskills.com/BLOGS/PAUL/post/What-5-things-should-SQL-Server-get-rid-of.aspx#commentvar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;br /&gt;You can read the full post and comments &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/What-5-things-should-SQL-Server-get-rid-of.aspx"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;http://www.sqlskills.com/BLOGS/PAUL/post/What-5-things-should-SQL-Server-get-rid-of.aspx#commentvar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;http://www.sqlskills.com/BLOGS/PAUL/post/What-5-things-should-SQL-Server-get-rid-of.aspx#commentvar gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt; &lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-877620372828091772?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/877620372828091772/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=877620372828091772' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/877620372828091772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/877620372828091772'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/05/top-5-things-to-get-rid-of-in-sql.html' title='Top 5 things to get rid of in SQL Server?!'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-936293220340172593</id><published>2010-03-15T15:09:00.001+01:00</published><updated>2010-03-15T15:09:27.089+01:00</updated><title type='text'>SQL Server Benchmarking series part 4</title><content type='html'>Paul S. Randall have published the 4 part in the benchmarking series. You can find the blogpost &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Benchmarking-1-TB-table-population-%28part-4-network-optimization%29.aspx"&gt;Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy reading&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-936293220340172593?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/936293220340172593/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=936293220340172593' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/936293220340172593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/936293220340172593'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/03/benchmarking-series-part-4.html' title='SQL Server Benchmarking series part 4'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-9026872204037213681</id><published>2010-02-19T12:39:00.000+01:00</published><updated>2010-02-19T12:39:34.499+01:00</updated><title type='text'>3 ways to recover a corrupted Excel workbook</title><content type='html'>&lt;script type="text/javascript"&gt;It’s your worst Excel® nightmare: a damaged or corrupted workbook. This can happen for a variety of reasons – and the good news is that there is a variety of ways to retrieve your damaged file. &lt;/script&gt;Found this tip on HP´s website. Could be useful some day.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;If a file is  corrupted, Excel should normally perform an automated recovery. However,  if that doesn’t work, there are a few other options you can try:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1.  Recover or repair the file manually with Excel&lt;/b&gt;&lt;br /&gt;The steps for  manually recovering a workbook are quite simple:&lt;br /&gt;&lt;br /&gt;1. Select  “Open” from the File menu. In Excel 2007, click the Office icon button  and select “Open”. &lt;br /&gt;2. In the “Open” window, locate and specify the  corrupted workbook. &lt;br /&gt;3. From the Open button’s dropdown list, select  “Open and Repair”. &lt;br /&gt;4. If this is your first attempt to manually  recover the workbook, click &lt;b&gt;Repair&lt;/b&gt; in the dialogue box that  appears.&lt;br /&gt;&lt;br /&gt;Usually Excel will be able to recover the entire file,  but it doesn’t always work. If you’ve tried this process and you can’t  recover the entire file, you can still at least recover your data. To do  so, click &lt;b&gt;Extract Data&lt;/b&gt; in step 4.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Use the last  saved version&lt;/b&gt;&lt;br /&gt;If the file becomes corrupted while you’re working  in the workbook, DON’T save the file. Instead, revert to the last saved  version of the file. Doing so without saving first should get rid of  whatever was corrupting the file. Be forewarned – you could possibly  lose some data, but if you’ve been regularly saving your work (as you  should be!) this is a lot better than losing the entire file.&lt;br /&gt;&lt;br /&gt;To  revert to the last saved version:&lt;br /&gt;&lt;br /&gt;1. Choose&lt;b&gt; &lt;/b&gt;“Open”from the  File menu. In Excel 2007, click the Office icon button and select  “Open.”&lt;br /&gt;2. In the “Open” window, locate and specify the corrupted  workbook. &lt;br /&gt;3. Click &lt;b&gt;Open.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Try opening the file  in another program&lt;/b&gt;&lt;br /&gt;If Excel can’t open the corrupted workbook,  there are several other programs you can use to try to open it.  Microsoft Tools is one option:&lt;br /&gt;&lt;br /&gt;1. From the Microsoft® Windows® XP  Start menu, choose “All Programs.”&lt;br /&gt;2. Select &lt;b&gt;Microsoft Office &lt;/b&gt;&amp;gt;  &lt;b&gt;Microsoft Office Tools&lt;/b&gt; &amp;gt; &lt;b&gt;Microsoft Office Application  Recovery&lt;/b&gt;. &lt;br /&gt;3. In the dialogue box that appears, click &lt;b&gt;Microsoft  Office Excel&lt;/b&gt;. &lt;br /&gt;4. Click &lt;b&gt;Recover Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You  can also try opening the workbook in Microsoft WordPad. The only caveat:  WordPad will convert all the data into text, and it won’t recover  formulas. However, it will at least restore your important data. It will  also recover your VBA procedures (macros) – just search recovered text  for “Sub” and “Function” to find them.&lt;br /&gt;&lt;br /&gt;You may also be able to  open the corrupted .xls file in Word, but again, the data is the only  thing you’ll be able to recover − and even that may give you mixed  results. So only try this as a last resort!&lt;br /&gt;&lt;br /&gt;For more Excel  troubleshooting tips and tricks, visit the &lt;u&gt;&lt;a class="udrline" href="http://office.microsoft.com/en-gb/excel/FX100487621033.aspx"&gt;&lt;u&gt;Microsoft  Excel home page&lt;/u&gt;&lt;/a&gt;&lt;/u&gt;.&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-9026872204037213681?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/9026872204037213681/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=9026872204037213681' title='1 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/9026872204037213681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/9026872204037213681'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/02/3-ways-to-recover-corrupted-excel.html' title='3 ways to recover a corrupted Excel workbook'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7162631409679851859</id><published>2010-02-16T21:45:00.000+01:00</published><updated>2010-02-16T21:45:53.200+01:00</updated><title type='text'>SQL Server benchmarking series</title><content type='html'>Paul S. Randall has&amp;nbsp; published his 3:rd article in the benchmarking series. I really recommend it to you all.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Benchmarking-1-TB-table-population-%28part-3-separating-data-and-log-files%29.aspx"&gt;SQL Server benchmarking series&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy reading&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7162631409679851859?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7162631409679851859/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7162631409679851859' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7162631409679851859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7162631409679851859'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/02/sql-server-benchmarking-series.html' title='SQL Server benchmarking series'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-293981659437124353</id><published>2010-02-01T23:09:00.005+01:00</published><updated>2010-02-04T18:34:34.380+01:00</updated><title type='text'>SQL Server agent alerts</title><content type='html'>&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;I reread an article by &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/A-little-known-sign-of-impending-doom-error-825.aspx"&gt;Paul S. Randall&lt;/a&gt; tonight about sql agent alerts and the error 825 which points to problems with the hardware, and started browsing around for other good articles about alerting.&lt;br /&gt;&lt;br /&gt;I also found a great article by &lt;a href="http://www.karaszi.com/SQLServer/util_agent_alerts.asp"&gt;Tibor Karaszi&lt;/a&gt;&amp;nbsp;(former teacher of mine :-)) , he have created a&amp;nbsp;utility for creating Alerts on different severity levels.&lt;br /&gt;&lt;br /&gt;As the sql server pro´s, say at least configure 823, 824 and as Paul suggest in the article above 825 so you catch the errors before they reach 823 and 824.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-293981659437124353?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/293981659437124353/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=293981659437124353' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/293981659437124353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/293981659437124353'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/02/sql-server-agent-alerts.html' title='SQL Server agent alerts'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-5371833662348018074</id><published>2010-01-29T19:21:00.000+01:00</published><updated>2010-01-29T19:21:39.277+01:00</updated><title type='text'>SQL Server benchmarking series</title><content type='html'>&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;Paul S. Randall is making a benchmarking series of SQL Server performance. I can highly recommend it, very interesting and educating.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlskills.com/blogs/paul/default.aspx"&gt;http://www.sqlskills.com/blogs/paul/default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-5371833662348018074?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/5371833662348018074/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=5371833662348018074' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5371833662348018074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5371833662348018074'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/01/sql-server-benchmarking-series.html' title='SQL Server benchmarking series'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3688539157917741309</id><published>2010-01-26T11:02:00.002+01:00</published><updated>2010-01-26T12:36:48.737+01:00</updated><title type='text'>SQL Server Maintenance schedule</title><content type='html'>A&amp;nbsp;script to get the SQL Server agent scheduled jobs. Don´t know where I found it but the credit goes to the creator.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;DECLARE @weekDay TABLE (&lt;br /&gt;mask INT&lt;br /&gt;, maskValue VARCHAR(32)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;INSERT INTO @weekDay&lt;br /&gt;SELECT 1, 'Sunday' UNION All&lt;br /&gt;SELECT 2, 'Monday' UNION All&lt;br /&gt;SELECT 4, 'Tuesday' UNION All&lt;br /&gt;SELECT 8, 'Wednesday' UNION All&lt;br /&gt;SELECT 16, 'Thursday' UNION All&lt;br /&gt;SELECT 32, 'Friday' UNION All&lt;br /&gt;SELECT 64, 'Saturday';&lt;br /&gt;WITH myCTE&lt;br /&gt;AS(&lt;br /&gt;&lt;br /&gt;SELECT sched.name AS 'scheduleName'&lt;br /&gt;, sched.schedule_id&lt;br /&gt;, jobsched.job_id&lt;br /&gt;, CASE WHEN sched.freq_type = 1 THEN 'Once' &lt;br /&gt;WHEN sched.freq_type = 4 &lt;br /&gt;And sched.freq_interval = 1 &lt;br /&gt;THEN 'Daily'&lt;br /&gt;WHEN sched.freq_type = 4 &lt;br /&gt;THEN 'Every ' + CAST(sched.freq_interval AS VARCHAR(5)) + ' days'&lt;br /&gt;WHEN sched.freq_type = 8 THEN &lt;br /&gt;REPLACE( REPLACE( REPLACE(( &lt;br /&gt;SELECT maskValue &lt;br /&gt;FROM @weekDay AS x &lt;br /&gt;WHERE sched.freq_interval &amp;amp; x.mask &amp;lt;&amp;gt; 0 &lt;br /&gt;ORDER BY mask FOR XML Raw)&lt;br /&gt;, '"/&amp;gt;&lt;row ?,="" ??),="" ??="" maskvalue="', ', '), '&amp;lt;row maskValue="&gt; &lt;br /&gt;+ CASE WHEN sched.freq_recurrence_factor &amp;lt;&amp;gt; 0 &lt;br /&gt;And sched.freq_recurrence_factor = 1 &lt;br /&gt;THEN '; weekly' &lt;br /&gt;WHEN sched.freq_recurrence_factor &amp;lt;&amp;gt; 0 THEN '; every ' &lt;br /&gt;+ CAST(sched.freq_recurrence_factor AS VARCHAR(10)) + ' weeks' END&lt;br /&gt;WHEN sched.freq_type = 16 THEN 'On day ' &lt;br /&gt;+ CAST(sched.freq_interval AS VARCHAR(10)) + ' of every '&lt;br /&gt;+ CAST(sched.freq_recurrence_factor AS VARCHAR(10)) + ' months' &lt;br /&gt;WHEN sched.freq_type = 32 THEN &lt;br /&gt;CASE WHEN sched.freq_relative_interval = 1 THEN 'First'&lt;br /&gt;WHEN sched.freq_relative_interval = 2 THEN 'Second'&lt;br /&gt;WHEN sched.freq_relative_interval = 4 THEN 'Third'&lt;br /&gt;WHEN sched.freq_relative_interval = 8 THEN 'Fourth'&lt;br /&gt;WHEN sched.freq_relative_interval = 16 THEN 'Last'&lt;br /&gt;END + &lt;br /&gt;&lt;br /&gt;CASE WHEN sched.freq_interval = 1 THEN ' Sunday'&lt;br /&gt;WHEN sched.freq_interval = 2 THEN ' Monday'&lt;br /&gt;WHEN sched.freq_interval = 3 THEN ' Tuesday'&lt;br /&gt;WHEN sched.freq_interval = 4 THEN ' Wednesday'&lt;br /&gt;WHEN sched.freq_interval = 5 THEN ' Thursday'&lt;br /&gt;WHEN sched.freq_interval = 6 THEN ' Friday'&lt;br /&gt;WHEN sched.freq_interval = 7 THEN ' Saturday'&lt;br /&gt;WHEN sched.freq_interval = 8 THEN ' Day'&lt;br /&gt;WHEN sched.freq_interval = 9 THEN ' Weekday'&lt;br /&gt;WHEN sched.freq_interval = 10 THEN ' Weekend'&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;+ CASE WHEN sched.freq_recurrence_factor &amp;lt;&amp;gt; 0 &lt;br /&gt;And sched.freq_recurrence_factor = 1 THEN '; monthly'&lt;br /&gt;WHEN sched.freq_recurrence_factor &amp;lt;&amp;gt; 0 THEN '; every ' &lt;br /&gt;+ CAST(sched.freq_recurrence_factor AS VARCHAR(10)) + ' months' END&lt;br /&gt;WHEN sched.freq_type = 64 THEN 'StartUp'&lt;br /&gt;WHEN sched.freq_type = 128 THEN 'Idle'&lt;br /&gt;END AS 'frequency'&lt;br /&gt;, ISNULL('Every ' + CAST(sched.freq_subday_interval AS VARCHAR(10)) + &lt;br /&gt;CASE WHEN sched.freq_subday_type = 2 THEN ' seconds'&lt;br /&gt;WHEN sched.freq_subday_type = 4 THEN ' minutes'&lt;br /&gt;WHEN sched.freq_subday_type = 8 THEN ' hours'&lt;br /&gt;END, 'Once') AS 'subFrequency'&lt;br /&gt;, REPLICATE('0', 6 - LEN(sched.active_start_time)) &lt;br /&gt;+ CAST(sched.active_start_time AS VARCHAR(6)) AS 'startTime'&lt;br /&gt;, REPLICATE('0', 6 - LEN(sched.active_end_time)) &lt;br /&gt;+ CAST(sched.active_end_time AS VARCHAR(6)) AS 'endTime'&lt;br /&gt;, REPLICATE('0', 6 - LEN(jobsched.next_run_time)) &lt;br /&gt;+ CAST(jobsched.next_run_time AS VARCHAR(6)) AS 'nextRunTime'&lt;br /&gt;, CAST(jobsched.next_run_date AS CHAR(8)) AS 'nextRunDate'&lt;br /&gt;FROM msdb.dbo.sysschedules AS sched&lt;br /&gt;JOIN msdb.dbo.sysjobschedules AS jobsched&lt;br /&gt;ON sched.schedule_id = jobsched.schedule_id&lt;br /&gt;WHERE sched.enabled = 1&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;SELECT job.name AS 'jobName'&lt;br /&gt;, sched.scheduleName&lt;br /&gt;, sched.frequency&lt;br /&gt;, sched.subFrequency&lt;br /&gt;, SUBSTRING(sched.startTime, 1, 2) + ':' &lt;br /&gt;+ SUBSTRING(sched.startTime, 3, 2) + ' - ' &lt;br /&gt;+ SUBSTRING(sched.endTime, 1, 2) + ':' &lt;br /&gt;+ SUBSTRING(sched.endTime, 3, 2) &lt;br /&gt;&lt;br /&gt;AS 'scheduleTime' -- HH:MM&lt;br /&gt;, SUBSTRING(sched.nextRunDate, 1, 4) + '/' &lt;br /&gt;+ SUBSTRING(sched.nextRunDate, 5, 2) + '/' &lt;br /&gt;+ SUBSTRING(sched.nextRunDate, 7, 2) + ' ' &lt;br /&gt;+ SUBSTRING(sched.nextRunTime, 1, 2) + ':' &lt;br /&gt;+ SUBSTRING(sched.nextRunTime, 3, 2) AS 'nextRunDate'&lt;br /&gt;&lt;br /&gt;/* Note: the sysjobschedules table refreshes every 20 min, &lt;br /&gt;so nextRunDate may be out of date */&lt;br /&gt;, 'Execute msdb.dbo.sp_update_job @job_id = ''' &lt;br /&gt;+ CAST(job.job_id AS CHAR(36)) + ''', @enabled = 0;' AS 'disableScript'&lt;br /&gt;FROM msdb.dbo.sysjobs AS job&lt;br /&gt;JOIN myCTE AS sched&lt;br /&gt;ON job.job_id = sched.job_id&lt;br /&gt;WHERE job.enabled = 1 -- do not display disabled jobs&lt;br /&gt;ORDER BY nextRunDate;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3688539157917741309?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3688539157917741309/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3688539157917741309' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3688539157917741309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3688539157917741309'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/01/sql-server-maintenance-schedule.html' title='SQL Server Maintenance schedule'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-5874954709240985358</id><published>2010-01-18T12:19:00.000+01:00</published><updated>2010-01-18T12:19:00.426+01:00</updated><title type='text'>Backup sql express database</title><content type='html'>&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;How do you backup a SQL 2005 express database? Since it doesn´t come with sql server agent you need to script it if you want to schedule the backup. When I researched how to do it&amp;nbsp;I found the following excellent article: &lt;a href="http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=ExpressBackups&amp;amp;referringTitle=Home"&gt;Express backup&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-5874954709240985358?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/5874954709240985358/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=5874954709240985358' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5874954709240985358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5874954709240985358'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/01/backup-sql-express-database.html' title='Backup sql express database'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-5021504340718425757</id><published>2010-01-15T10:47:00.000+01:00</published><updated>2010-01-15T10:47:08.832+01:00</updated><title type='text'>Job Owner Reverts to Previous Owner when Scheduled Maintenance Plan is Edited</title><content type='html'>&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;Recently I inherited a Database from a retired DBA and after a while the maintenance jobs started to fail. When i excamined the&amp;nbsp;log I got the following error:&lt;br /&gt;&lt;br /&gt;The job failed. Unable to determine if the owner (domain\username) of job Log Backup Databasename.Subplan_1 has server access (reason: Could not obtain information about Windows NT group/user 'domain\username', error code 0x2. [SQLSTATE 42000] (Error 15404)).&lt;br /&gt;&lt;br /&gt;Ok fine with that because I knew the account was disabled. I think no problem so I&amp;nbsp;change the owner of the job, but no no. I ran the job with success after changing the owner of the job to sa, but when the schedule ran the job later at night it failed!&lt;br /&gt;&lt;br /&gt;Why did it fail again? After examining the log I saw the error above was there again, how could that be I changed it the day before?&lt;br /&gt;&lt;br /&gt;After some thinking it came back to me, after running the job successfully I edited the job and made a modification. When I saved the job it reverted back to the owner who created it from start.....&lt;br /&gt;&lt;br /&gt;To fix the problem use the script below on sql 2005 if you set the&amp;nbsp;dbo as&amp;nbsp;owner&amp;nbsp;you won´t have any problems with DBA´s leaving the company.&lt;br /&gt;&lt;br /&gt;/*Here's how to change the owner of a maintenance plan to dbo in SQL Server 2005*/&lt;br /&gt;--to find the name and owner of the maintenance plan&lt;br /&gt;select * from msdb.dbo.sysdtspackages90&lt;br /&gt;--to find the sid you want to use for the new owner&lt;br /&gt;select * from sysusers&lt;br /&gt;&lt;br /&gt;/*To update the owner to dbo use the script below&lt;br /&gt;UPDATE&lt;br /&gt;[msdb].[dbo].[sysdtspackages90]&lt;br /&gt;SET&lt;br /&gt;[ownersid] = 0x01&lt;br /&gt;WHERE&lt;br /&gt;[name] = 'MaintenancePlan'&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-5021504340718425757?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/5021504340718425757/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=5021504340718425757' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5021504340718425757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5021504340718425757'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/01/job-owner-reverts-to-previous-owner.html' title='Job Owner Reverts to Previous Owner when Scheduled Maintenance Plan is Edited'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-2743722403786554479</id><published>2010-01-15T10:33:00.001+01:00</published><updated>2010-01-15T10:48:01.115+01:00</updated><title type='text'>Check database recovery model</title><content type='html'>&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;A small script to check the database recovery model. Can be handy sometime.&lt;br /&gt;&lt;br /&gt;SELECT name, databasepropertyex (name,'Recovery') FROM master..sysdatabases&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-2743722403786554479?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/2743722403786554479/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=2743722403786554479' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2743722403786554479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2743722403786554479'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2010/01/check-database-recovery-model.html' title='Check database recovery model'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-1233147516391741570</id><published>2009-11-26T10:02:00.000+01:00</published><updated>2009-11-26T10:02:51.890+01:00</updated><title type='text'>How to identify your SQL Server version and edition</title><content type='html'>&lt;script type="text/javascript"&gt;var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));&lt;/script&gt;&lt;br /&gt;A useful sqlquery to determine which SQL version is installed on the server.&lt;br /&gt;&lt;br /&gt;SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-1233147516391741570?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/1233147516391741570/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=1233147516391741570' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1233147516391741570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1233147516391741570'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/11/how-to-identify-your-sql-server-version.html' title='How to identify your SQL Server version and edition'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-2850999336852149552</id><published>2009-09-18T10:35:00.003+02:00</published><updated>2009-09-18T10:47:17.637+02:00</updated><title type='text'>Rename Database</title><content type='html'>I had to rename a database in our testenvironment and the procedure to do it is like this:&lt;br /&gt;&lt;br /&gt;Use the following T-SQL: command to make the database name change.&lt;br /&gt;EXEC sp_renamedb 'oldName', 'newName'&lt;br /&gt;This command works for both SQL Server 2000 and SQL Server 2005, but this feature will not be supported in future versions of SQL Server.&lt;br /&gt;&lt;br /&gt;The new command that should be used for SQL Server 2005 and beyond is:&lt;br /&gt;ALTER DATABASE oldName MODIFY NAME = newName&lt;br /&gt;&lt;br /&gt;The full article can be read at &lt;a href="http://www.mssqltips.com/tip.asp?tip=1122"&gt;http://www.mssqltips.com/tip.asp?tip=1122&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-2850999336852149552?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/2850999336852149552/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=2850999336852149552' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2850999336852149552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2850999336852149552'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/09/rename-database.html' title='Rename Database'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6766785328015053872</id><published>2009-09-05T00:45:00.002+02:00</published><updated>2009-09-05T00:54:04.771+02:00</updated><title type='text'>SQL Jobs monitoring</title><content type='html'>We are montioring our sql servers for failed jobs and get notice of it in to our helpdesk system, however if you don´t have a monitoring system this article can be a good help for you.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlservercentral.com/articles/SQL+Server+2005/61887/"&gt;http://www.sqlservercentral.com/articles/SQL+Server+2005/61887/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6766785328015053872?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6766785328015053872/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6766785328015053872' title='1 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6766785328015053872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6766785328015053872'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/09/sql-jobs-monitoring.html' title='SQL Jobs monitoring'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7443208612213178620</id><published>2009-08-17T22:23:00.002+02:00</published><updated>2009-08-17T22:30:26.115+02:00</updated><title type='text'>windows 7</title><content type='html'>There are a lot of news nowadays on the MS OS front. Windows 7 is made available a week ago on technet/msdn and for enterprise customers. A couple of days ago windows 2008 R2 was made available on the same channels.&lt;br /&gt;&lt;br /&gt;I installed windows 7 when it was available on technet and started to discover it. Here are some goodies on the aero interface that Jason Zandri wrote about in an article on petri.co.il.&lt;br /&gt;&lt;a href="http://www.petri.co.il/new-aero-features-in-windows-7.htm"&gt;http://www.petri.co.il/new-aero-features-in-windows-7.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I can add the excellent show off feature windows key + tab.&lt;br /&gt;&lt;br /&gt;Enjoy&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7443208612213178620?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7443208612213178620/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7443208612213178620' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7443208612213178620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7443208612213178620'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/08/windows-7.html' title='windows 7'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-401397202279854296</id><published>2009-08-06T12:55:00.003+02:00</published><updated>2009-08-06T17:27:56.002+02:00</updated><title type='text'></title><content type='html'>A user lost the password to a database login and when i changed the password I got the following message in the face.&lt;br /&gt;&lt;br /&gt;Msg 15128, Level 16, State 1, Line 1The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON.&lt;br /&gt;&lt;br /&gt;The solution is to change the password using the following query and then remove the flag.&lt;br /&gt;&lt;br /&gt;ALTER LOGIN MyLoginName WITH PASSWORD='yourpassword'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-401397202279854296?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/401397202279854296/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=401397202279854296' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/401397202279854296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/401397202279854296'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/08/user-lost-password-to-database-login.html' title=''/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-1045539845187651296</id><published>2009-06-04T23:19:00.003+02:00</published><updated>2009-06-04T23:23:27.817+02:00</updated><title type='text'>SQL Backup Monitoring and Reporting</title><content type='html'>A task that all DBA´s has is backup and restore and to ensure they works. I found an excellent article by Chad Miller on Sqlservercentral that provides great scripts and a good explanation how it works. Enjoy and make use of it in your environment.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;a href="http://www.sqlservercentral.com/articles/Backup/66564"&gt;http://www.sqlservercentral.com/articles/Backup/66564&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-1045539845187651296?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/1045539845187651296/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=1045539845187651296' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1045539845187651296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1045539845187651296'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/06/sql-backup-monitoring-and-reporting.html' title='SQL Backup Monitoring and Reporting'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6323115965533902182</id><published>2009-04-18T01:20:00.003+02:00</published><updated>2009-04-18T01:43:31.402+02:00</updated><title type='text'>Database restore last time</title><content type='html'>Ever wanted to know when your database was last restored and from where? I found the script to do it on &lt;a href="http://www.mssqltips.com/tip.asp?tip=1724"&gt;mssqltips.com&lt;/a&gt;&lt;br /&gt;The information you will get is the following:&lt;br /&gt;Restored database, restored by, restore type, restore start, restored from and restored to.&lt;br /&gt;You never know when your boss gets really crazy and wants to know everything and then this can get useful and sometime it will get useful to you as well.&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6323115965533902182?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6323115965533902182/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6323115965533902182' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6323115965533902182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6323115965533902182'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/04/database-restore-last-time.html' title='Database restore last time'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-444488482785506680</id><published>2009-04-18T00:19:00.002+02:00</published><updated>2009-04-18T00:28:01.199+02:00</updated><title type='text'>Linked Oracle servers on x64</title><content type='html'>A couple of weeks ago i installed a server with windows 2003 x64 and SQL 2005 for one of our production servers that will be migrated to a new domain. In the old domain it was installed on a x86 system but now it had grown so much so we needed the extra memory usage of x64.&lt;br /&gt;The system is running fine on x64 but we have a linked server to a oracle database and that wouldn´t work when we set it up in the same way as on the x86 system. After some googling I found a excellent article on &lt;a href="http://www.mssqltips.com/tipprint.asp?tip=1433"&gt;mssqltips.com&lt;/a&gt; which explains every steps on the way and it works perfectly.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-444488482785506680?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/444488482785506680/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=444488482785506680' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/444488482785506680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/444488482785506680'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/04/linked-oracle-servers-on-x64.html' title='Linked Oracle servers on x64'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-2340192093014196205</id><published>2009-03-14T16:45:00.004+01:00</published><updated>2010-09-22T23:22:06.323+02:00</updated><title type='text'>Maintenance script</title><content type='html'>I found a great maintenance script for backup, integrity check and index optimization in SQL Server 2005 and SQL Server 2008. The solution is based on stored procedures, functions, sqlcmd and SQL Server Agent jobs.&lt;br /&gt;&lt;br /&gt;You can read about it and download it &lt;a href="http://ola.hallengren.com/"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Paul S Randall has an interesting article &lt;a href="http://www.sqlskills.com/BLOGS/PAUL/post/Importance-of-validating-backups.aspx"&gt;here&lt;/a&gt; about validating backups. It´s good to have a reminder about that sometimes, even if we know how important it is.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-2340192093014196205?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/2340192093014196205/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=2340192093014196205' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2340192093014196205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2340192093014196205'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/03/maintenance-script.html' title='Maintenance script'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7299902699094787193</id><published>2009-03-09T23:08:00.003+01:00</published><updated>2009-03-09T23:22:29.775+01:00</updated><title type='text'>Default trace in SQL Server 2005</title><content type='html'>Have you ever had a problem with your sql server and the boss wanted to know who or what was responsible?&lt;br /&gt;Of course you didn´t have a trace running, because you haven´t had any problems with the DB before.&lt;br /&gt;You are not completely lost if you haven´t disabled the default trace which is on by default. The following query will tell you if it´s enabled or not.&lt;br /&gt;select * from sys.configurations where configuration_id = 1568&lt;br /&gt;&lt;br /&gt;In the following articles you will find a good beginners guide and which events are captured in the default trace.&lt;br /&gt;&lt;a href="http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/"&gt;http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/&lt;/a&gt;#&lt;br /&gt;&lt;a href="http://blogs.technet.com/vipulshah/archive/2007/04/16/default-trace-in-sql-server-2005.aspx"&gt;http://blogs.technet.com/vipulshah/archive/2007/04/16/default-trace-in-sql-server-2005.aspx&lt;/a&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7299902699094787193?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7299902699094787193/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7299902699094787193' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7299902699094787193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7299902699094787193'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/03/default-trace-in-sql-server-2005.html' title='Default trace in SQL Server 2005'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6692948345292694357</id><published>2009-02-11T19:53:00.003+01:00</published><updated>2009-02-11T21:18:44.614+01:00</updated><title type='text'>Too many VLF:s or to few?</title><content type='html'>I found an excellent blog post by Kimberly L. Tripp yesterday about transaction log performance and VLF:s. I later investigated a couple of our own databases that I have taken over and they are clearly in need of a little bit more maintenance then I have done so far.&lt;br /&gt;The recommendations are maybe around 50 or a little bit more depending on the size of the db/log. I found out that we had over 3000 VLF:s in one medium sized database. This is however quite easy to fix. The secret is capacity planning to avoid this problem.&lt;br /&gt;&lt;br /&gt;Here are the full article from Kimberly.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlskills.com/BLOGS/KIMBERLY/post/Transaction-Log-VLFs-too-many-or-too-few.aspx"&gt;http://www.sqlskills.com/BLOGS/KIMBERLY/post/Transaction-Log-VLFs-too-many-or-too-few.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.sqlskills.com/blogs/kimberly/post/8-Steps-to-better-Transaction-Log-throughput.aspx"&gt;http://www.sqlskills.com/blogs/kimberly/post/8-Steps-to-better-Transaction-Log-throughput.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy reading&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6692948345292694357?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6692948345292694357/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6692948345292694357' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6692948345292694357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6692948345292694357'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/02/too-many-vlfs-or-to-few.html' title='Too many VLF:s or to few?'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-8608535687697310313</id><published>2009-01-26T23:51:00.002+01:00</published><updated>2009-06-28T19:32:04.520+02:00</updated><title type='text'>Moving tempdb Error</title><content type='html'>Here´s a good article about when you fuck up with the move of tempdb, forgetting the file extension and the Sqlserver won´t start.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jmkehayias.blogspot.com/2009/01/error-5123-severity-16-state-1-when.html"&gt;http://jmkehayias.blogspot.com/2009/01/error-5123-severity-16-state-1-when.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-8608535687697310313?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/8608535687697310313/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=8608535687697310313' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8608535687697310313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8608535687697310313'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2009/01/moving-tempdb-error.html' title='Moving tempdb Error'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7346255758509861362</id><published>2008-10-21T16:19:00.004+02:00</published><updated>2008-10-21T22:24:18.992+02:00</updated><title type='text'>Extending partitions on vmware server with diskpart</title><content type='html'>I had to extend a virtual disk on a vmware server and this is the procedure to do it.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Shut down the virtual machine.&lt;/li&gt;&lt;li&gt;Navigate to the VMware application's installation directory and open a commandprompt.&lt;/li&gt;&lt;li&gt;Locate the full path to a hosted (non-ESX Server host) virtual machine's virtual disk (.vmdk) file.&lt;/li&gt;&lt;li&gt;Type vmware-vdiskmanager -x 100Gb vm.vmdk and press Enter (replace vm.vmdk with the actual filename and path. If you have multiple .vmdk files with the same base name, use the file that does not include "-flat" or "-s0" in its file name). If you want a different size on the disk, just change the GB to your needs.&lt;/li&gt;&lt;li&gt;&lt;a href="http://support.microsoft.com/kb/325590"&gt;http://support.microsoft.com/kb/325590&lt;/a&gt; describes how to use diskpart.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Enjoy the extra space you have on the virtual machine. Of course diskpart works with physical disks as well.&lt;/p&gt;&lt;p&gt;Stefan&lt;br /&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7346255758509861362?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7346255758509861362/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7346255758509861362' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7346255758509861362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7346255758509861362'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/10/extending-partitions-on-vmware-server.html' title='Extending partitions on vmware server with diskpart'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7205098817849343529</id><published>2008-10-05T14:21:00.001+02:00</published><updated>2008-10-05T14:22:58.644+02:00</updated><title type='text'>What to do when the SA account password is lost in SQL Server 2005</title><content type='html'>I found this article on &lt;a href="http://blogs.msdn.com/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx"&gt;Raul Garcia's &lt;/a&gt;blog and it could really be useful some time.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;You may have faced the issue of losing the SQL Server SA password. Perhaps you followed the security best-practice of removing the  builtin\Administrators from the sysadmin server role,  and no one  you can find is in the sysadmin role.   At this point you may think that your only options are to reinstall SQL Server and attach the databases, or to  directly access the master database files, which may potentially damage the data.&lt;br /&gt;&lt;br /&gt;SQL Server 2005 provides a better disaster recovery option for this scenario that is non-intrusive for master DB and that will help you preserve any objects and data stored in master DB (such as logins, certificates, Service Master Key, etc.) intact. Members of the Windows Administrators group now have access to SQL Server when SQL Server is in started in single-user mode, also known as “maintenance mode “.&lt;br /&gt;&lt;br /&gt;Using the single-user mode, SQL Server 2005 prevents a  Windows Administrator to abuse this privilege to act on behalf of the sysadmin without being noticed. This allows Windows Administrator accounts to perform certain maintenance tasks, such as installing patches.&lt;br /&gt;&lt;br /&gt;In order to start SQL Server in single-user mode, you can add the parameter “-m” at the command line. You can also use the SQL Server Configuration Manager tool, which provides proper controls for the file access and other privileges. To use the Configuration Manager tool to recover your system, use the following steps:&lt;br /&gt;&lt;br /&gt;1. Open the Configuration Manager tool from the "SQL Server 2005 Configuration" menu&lt;br /&gt;2. Stop the SQL Server Instance you need to recover&lt;br /&gt;3. Navigate to the “Advanced” tab, and in the Properties text box add “;–m” to the end of the list in the “Startup parameters” option&lt;br /&gt;4. Click the “OK” button and restart the SQL Server Instance&lt;br /&gt;&lt;br /&gt;NOTE: make sure there is no space between “;” and “-m”, the registry parameter parser is sensitive to such typos. You should see an entry in the SQL Server ERRORLOG file that says “SQL Server started in single-user mode.”&lt;br /&gt;&lt;br /&gt;5. After the SQL Server Instance starts in single-user mode, the Windows Administrator account is able to connect to SQL Server using the sqlcmd utility using Windows authentication. You can use Transact-SQL commands such as "sp_addsrvrolemember" to add an existing login (or a newly created one) to the sysadmin server role.&lt;br /&gt;The following example adds the account "Buck" in the "CONTOSO" domain to the SQL Server "sysadmin" role:&lt;br /&gt;&lt;br /&gt;EXEC sp_addsrvrolemember 'CONTOSO\Buck', 'sysadmin';&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;6. Once the sysadmin access has been recovered, remove the “;-m” from the startup parameters using the Configuration Manager and restart the SQL Server Instance&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Important Security Notes:&lt;br /&gt;This process should only be used for disaster recovery when no other method to access the system with a privileged (i.e. sysadmin or equivalent) is available.&lt;br /&gt;&lt;br /&gt;This process allows a Windows Administrator account to override their privileges within SQL Server. It requires explicit and intrusive actions that can be monitored and detected, including:&lt;br /&gt;·         Stop SQL Server and restart it in single use mode&lt;br /&gt;·         Connecting to SQL Server using Windows credentials&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7205098817849343529?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7205098817849343529/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7205098817849343529' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7205098817849343529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7205098817849343529'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/10/what-to-do-when-sa-account-password-is.html' title='What to do when the SA account password is lost in SQL Server 2005'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-842967737982599858</id><published>2008-09-28T23:21:00.002+02:00</published><updated>2008-09-28T23:36:51.035+02:00</updated><title type='text'>Upgrading to 2005 and stuff to do afterwards</title><content type='html'>This is just a couple of stuff you should do after upgrading to sql 2005 from sql 2000.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Register your servers - Upgrade removes registry settings for the previous SQL Server instance. After upgrading, you must reregister your servers.&lt;/li&gt;&lt;li&gt;Repopulate full-text catalogs - The upgrade process marks your databases as full-text disabled. Catalogs must be repopulated, but this operation is not run automatically by Setup because it can be time-consuming. As this operation enhances the performance of your SQL Server 2005 installation, administrators should plan to repopulate full-text catalogs at a convenient time.&lt;/li&gt;&lt;li&gt;Update statistics - To help optimize query performance, we recommend that you update statistics on all databases following upgrade. Use the sp_updatestats stored procedure to update statistics&lt;br /&gt;in user-defined tables in SQL Server 2005 databases.&lt;/li&gt;&lt;li&gt;Update usage counters - In earlier versions of SQL Server, the values for the table and index row counts and page counts can become incorrect. To correct any invalid row or page counts, we recommend that you run DBCC UPDATEUSAGE on all databases following upgrade.&lt;/li&gt;&lt;li&gt;Configure your new SQL Server installation - To reduce the attackable surface area of a system, SQL Server 2005 selectively installs and activates key services and features. For more information on how to activate SQL Server 2005 features, see SQL Server Surface Area Configuration [ http://technet.microsoft.com/en-us/library/ms173748(printer).aspx ] .&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Just use the sql books online to get examples that u can follow.&lt;/p&gt;&lt;p&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-842967737982599858?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/842967737982599858/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=842967737982599858' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/842967737982599858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/842967737982599858'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/09/upgrading-to-2005-and-stuff-to-do.html' title='Upgrading to 2005 and stuff to do afterwards'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-5580377286392873426</id><published>2008-08-15T00:27:00.002+02:00</published><updated>2008-08-15T00:36:34.811+02:00</updated><title type='text'>Top 10 hottest IT jobs in Sweden</title><content type='html'>This is the &lt;a href="http://www.idg.se/2.1085/1.174262"&gt;top 10 list&lt;/a&gt; from IDG in Sweden.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;.Net Developer&lt;/li&gt;&lt;li&gt;SAP Consultant&lt;/li&gt;&lt;li&gt;Java Developer&lt;/li&gt;&lt;li&gt;Testing engineer&lt;/li&gt;&lt;li&gt;Database specialist (my current/future track;-)&lt;/li&gt;&lt;li&gt;System architect&lt;/li&gt;&lt;li&gt;IT Manager (my boss current position ;-))&lt;/li&gt;&lt;li&gt;Exchange Server consultant&lt;/li&gt;&lt;li&gt;Security expert&lt;/li&gt;&lt;li&gt;System engineer? (don´t know if the translation is correct)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;If you´re looking for other work you know what to look for.&lt;/p&gt;&lt;p&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-5580377286392873426?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/5580377286392873426/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=5580377286392873426' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5580377286392873426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5580377286392873426'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/08/top-10-hottest-it-jobs-in-sweden.html' title='Top 10 hottest IT jobs in Sweden'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3601308361437867592</id><published>2008-07-21T15:24:00.002+02:00</published><updated>2008-07-21T15:27:21.716+02:00</updated><title type='text'>Circumventing Group Policy Settings</title><content type='html'>Sometimes it can good to be able to circumvent group policy settings, and if you are a local admin on your computer it is no problem. Read the article on Mark Russinovich´s blog.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.technet.com/markrussinovich/archive/2005/04/30/circumventing-group-policy-settings.aspx"&gt;Circumventing Group Policy Settings&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3601308361437867592?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3601308361437867592/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3601308361437867592' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3601308361437867592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3601308361437867592'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/07/circumventing-group-policy-settings.html' title='Circumventing Group Policy Settings'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-1816631832606733579</id><published>2008-07-04T13:27:00.008+02:00</published><updated>2008-07-04T13:36:28.021+02:00</updated><title type='text'>Rename logical file names</title><content type='html'>When we changed a db server I wanted to clean up the file names that wasn´t consistent so here is the procedure in a MS Support article for changing the logical file names on sql databasefiles.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/814576"&gt;Rename Logical File Name&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-1816631832606733579?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/1816631832606733579/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=1816631832606733579' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1816631832606733579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1816631832606733579'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/07/rename-logical-file-names.html' title='Rename logical file names'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-2020137554552867820</id><published>2008-06-30T20:22:00.002+02:00</published><updated>2008-06-30T20:34:02.102+02:00</updated><title type='text'>How to transfer logins and passwords between instances of SQL Server</title><content type='html'>This is a must know procedure if you are DBA or try to become one.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/246133"&gt;How to transfer logins and passwords between instances of SQL Server&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-2020137554552867820?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/2020137554552867820/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=2020137554552867820' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2020137554552867820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2020137554552867820'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/06/how-to-transfer-logins-and-passwords.html' title='How to transfer logins and passwords between instances of SQL Server'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6359160406818051116</id><published>2008-06-30T17:28:00.008+02:00</published><updated>2012-01-17T14:06:49.982+01:00</updated><title type='text'>Rename a SQL Server or MS failover cluster.</title><content type='html'>Here are a couple of good articles about renaming a SQL Server or cluster&lt;br /&gt;&lt;script type="text/javascript"&gt;var pageTracker = _gat._getTracker("UA-3614867-1");pageTracker._initData();pageTracker._trackPageview();&lt;/script&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms143799.aspx"&gt;Rename a Computer that Hosts a Stand-Alone Instance of SQL Server 2005&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Summary about renaming a computer that hosts a stand-Alone instance of sql server 2005:&lt;/b&gt;&lt;br /&gt;When you change the name of the computer that is running Microsoft SQL Server 2005, the new name is recognized during SQL Server startup. You do not have to run Setup again to reset the computer name. The following steps cannot be used to rename an instance of SQL Server 2005. These steps can be used only to rename the part of the instance name that corresponds to the computer name. For example, you can change a computer named MB1 that hosts an instance of SQL Server named Instance1 to another name, such as MB2. However, the instance portion of the name, Instance1, will remain unchanged. In this example, the \\ComputerName\InstanceName would be changed from \\MB1\Instance1 to \\MB2\Instance1.&lt;br /&gt;&lt;br /&gt;You can connect to SQL Server using the new computer name after you have restarted SQL Server. However, to ensure that @@servername returns the updated name of the local server instance, you should manually run one of the following procedures, depending on whether you are updating a default or named instance&lt;br /&gt;&lt;br /&gt;For a renamed default instance, run the following procedures:&lt;br /&gt;sp_dropserver &lt;old_name&gt;&lt;br /&gt;GO&lt;br /&gt;sp_addserver &lt;new_name&gt;, local&lt;br /&gt;GO&lt;br /&gt;Restart the SQL Server instance.&lt;br /&gt;&lt;br /&gt;For a renamed named instance, run the following procedures:&lt;br /&gt;&lt;/new_name&gt;&lt;/old_name&gt;&lt;br /&gt;&lt;pre&gt;sp_dropserver 'old_name\instancename'&lt;br /&gt;GO&lt;br /&gt;sp_addserver 'new_name\instancename', local&lt;br /&gt;GO&lt;/pre&gt;&lt;old_name&gt;&lt;new_name&gt;&lt;old_name\instancename&gt;&lt;new_name\instancename&gt;&lt;br /&gt;Restart the SQL Server instance.&lt;br /&gt;&lt;br /&gt;To verify that the renaming operation has completed successfully:&lt;br /&gt;Select information from either @@servername or sys.servers. The @@servername function will return the new name, and the sys.servers table will show the new name.&lt;br /&gt;&lt;br /&gt;select @@servername&lt;br /&gt;&lt;br /&gt;If the computer has any remote logins, running sp_dropserver may generate an error similar to this:&lt;br /&gt;Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44There are still remote logins for the server 'SERVER1'.&lt;br /&gt;&lt;br /&gt;To drop remote logins for a default instance, run the following procedure:&lt;br /&gt;sp_dropremotelogin old_name&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;To drop remote logins for a named instance, run the following procedure:&lt;br /&gt;sp_dropremotelogin old_name\instancename&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/302389"&gt;&lt;b&gt;Renaming a cluster&lt;/b&gt;&lt;/a&gt; (virtual server) is really quite easy, just do the following:&lt;br /&gt;&lt;/new_name\instancename&gt;&lt;/old_name\instancename&gt;&lt;/new_name&gt;&lt;/old_name&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Start Cluster Administrator, right-click the Network Name resource, and then click Take Offline.Note Access to the VirtualServer by clients cannot now occur because the Network Name resource is offline.&lt;/li&gt;&lt;li&gt;Double-click the Network Name resource where you want to enable the DNS Registration Must Succeed option, and then click the Parameters tab.&lt;/li&gt;&lt;li&gt;Click the DNS Registration Must Succeed option, click OK, right-click the Network Name resource, and then click Bring Online. When the Network Name resource comes online, it will verify that it can register the VirtualServer with the DNS server.&lt;/li&gt;&lt;/ol&gt;Note: The Network Name is registered in DNS under the Cluster service account. Make sure that the Cluster service account has correct permissions to register records in DNS or the registration will not work.&lt;br /&gt;However renaming a SQL Server 20000 Virtual Server is not supported by &lt;a href="http://support.microsoft.com/kb/307336"&gt;Microsoft&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms178083.aspx"&gt;Rename a SQL Server 2005 Virtual Server&lt;/a&gt; seems to be a little bit easier&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6359160406818051116?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6359160406818051116/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6359160406818051116' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6359160406818051116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6359160406818051116'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/06/rename-sql-server-or-ms-failover.html' title='Rename a SQL Server or MS failover cluster.'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3919615350544621283</id><published>2008-06-26T07:46:00.005+02:00</published><updated>2008-06-26T09:06:02.516+02:00</updated><title type='text'>Getting more memory for SQL server</title><content type='html'>If you´re stuck on a 32Bit system and need more memory recources for your database there´s the option to use either the /3GB switch in boot.ini or /PAE together with AWE. Here´s the procedure to make this work.&lt;br /&gt;&lt;br /&gt;First, here are the memory limitations for a 32Bit windows server 2003:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Windows Server 2003, Standard Edition supports physical memory up to 4 GB.&lt;/li&gt;&lt;li&gt;Windows Server 2003, Enterprise Edition supports physical memory up to 32 GB.&lt;/li&gt;&lt;li&gt;Windows Server 2003, Datacenter Edition supports physical memory up to 64 GB.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If you use windows server 2003 standard edition and have 4GB in your box you can use the /3GB switch to get 1GB extra for sqlserver.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Edit the boot.ini file and add /3GB to the following string: multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Standard" /fastdetect /3GB /NoExecute=OptOut&lt;/li&gt;&lt;li&gt;Open up sqlserver enterprise manager and rightclick the server and click properties.&lt;/li&gt;&lt;li&gt;Go to the memory tab and tick the checkbox "lock pages in memory" and then click ok.&lt;/li&gt;&lt;li&gt;After this you need to allow the user that is running sqlserver.exe to lock pages into the memory. To do it do the following:&lt;/li&gt;&lt;li&gt;On the Start menu, click Run. In the Open box, type gpedit.msc.&lt;br /&gt;The Group Policy dialog box opens.&lt;br /&gt;On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.&lt;br /&gt;Expand Security Settings, and then expand Local Policies.&lt;br /&gt;Select the User Rights Assignment folder.&lt;br /&gt;The policies will be displayed in the details pane.&lt;br /&gt;In the pane, double-click Lock pages in memory.&lt;br /&gt;In the Local Security Policy Setting dialog box, click Add.&lt;br /&gt;In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe.&lt;/li&gt;&lt;li&gt;When you have done this reboot the server and enjoy the extra 1Gb you got for sqlserver.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;If you´re using Windows Server 2003, Enterprise Edition or Datacenter Edition you can take advantage of AWE, and for activating on a box with 8GB memory you do the following:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Instead of adding the /3GB switch you add /PAE to boot.ini&lt;/li&gt;&lt;li&gt;Open up sqlserver enterprise manager and rightclick the server and click properties.&lt;br /&gt;Go to the memory tab and tick the checkbox "lock pages in memory" and then click ok.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;After this you need to allow the user that is running sqlserver.exe to lock pages into the memory. To do it do the following:&lt;br /&gt;On the Start menu, click Run. In the Open box, type gpedit.msc. The Group Policy dialog box opens. On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.Expand Security Settings, and then expand Local Policies.Select the User Rights Assignment folder. The policies will be displayed in the details pane. In the pane, double-click Lock pages in memory.In the Local Security Policy Setting dialog box, click Add.In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe.&lt;/li&gt;&lt;li&gt;Now we will configure the AWE with the following code which you run from a query window in enterprise manager:&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;First we show the advanced options&lt;/p&gt;&lt;p&gt;sp_configure 'show advanced options', 1&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;/p&gt;&lt;p&gt;Then we enable AWE&lt;/p&gt;&lt;p&gt;sp_configure 'awe enabled', 1&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;/p&gt;&lt;p&gt;Then we set the min and max values so we leave some memory for the operating system.&lt;/p&gt;&lt;p&gt;sp_configure 'min server memory', 1024&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;sp_configure 'max server memory', 7168&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;/p&gt;After this you reboot the server and enjoy the extra memory and hopefully your sqlserver will run a lot smoother with the extra memory available.&lt;br /&gt;&lt;br /&gt;Note. you should read the following articles before making any changes to your production environment and not take my word for it. Be careful!&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms175581.aspx"&gt;Using AWE&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms190673.aspx"&gt;Enabling AWE Memory for SQL Server&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms190730.aspx"&gt;How to: Enable the Lock Pages in Memory Option (Windows)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms179301.aspx"&gt;Enabling Memory Support for Over 4 GB of Physical Memory&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3919615350544621283?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3919615350544621283/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3919615350544621283' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3919615350544621283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3919615350544621283'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/06/getting-more-memory-for-sql-server.html' title='Getting more memory for SQL server'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-2896214088493017963</id><published>2008-06-25T18:31:00.003+02:00</published><updated>2008-06-25T18:37:19.194+02:00</updated><title type='text'>Best Practices for Recovering a Database to a Specific Recovery Point</title><content type='html'>I read in an article about how to become a DBA and what tasks are important to be able to perform and of course a solid backup plan of the db is the main thing. Everything else than that is bonuses for the company.&lt;br /&gt;&lt;br /&gt;If you have a backup that works you also need to know how to restore it and here´s a good article from &lt;a href="http://technet.microsoft.com/en-us/library/ms191468.aspx"&gt;books online &lt;/a&gt;about this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"Best Practices for Recovering a Database to a Specific Recovery Point&lt;br /&gt;This topic is relevant only for databases that use the full or bulk-logged recovery models.&lt;br /&gt;This topic presents some best practices for restoring a database to a specific recovery point.&lt;br /&gt;Use STANDBY to Find Unknown Point in Time&lt;br /&gt;&lt;a name="sectionToggle0"&gt;&lt;/a&gt;&lt;br /&gt;Sometimes, you want to restore a database to a specific recovery point, but you do not know the target time, LSN, or marked transaction, if any. One solution is to incrementally roll forward the primary data file and, optionally, other data files by specifying WITH STANDBY = standby_file_name instead of WITH RECOVERY. Using the STANDBY option recovers the database for read-only access. This lets you read the database and look for the point-in-time information that you want. The standby file lets you undo the effects the recovery process, in case the database is rolled forward beyond the target point-in-time. If the database has not yet reached your target point in time, you can restore successive log backups using WITH STANDBY, specifying the same standby file in each restore statement.&lt;br /&gt;After you have identified the target recovery point, you can roll forward again to that point in time. On reaching the target point in time, restore the partial database using the RECOVERY option. The remaining files, if any, can then be restored and recovered to be consistent with the database. After you restore the last full log restore, restore the first log backup taken after the target recovery point.&lt;br /&gt;For more information about the STANDBY option, see &lt;a id="ctl00_rs1_mainContentContainer_ctl04" onclick="javascript:Track('ctl00_rs1_mainContentContainer_cpe123175_cctl00_rs1_mainContentContainer_ctl04',this);" href="http://technet.microsoft.com/en-us/library/ms178615.aspx"&gt;RESTORE Arguments (Transact-SQL)&lt;/a&gt;.&lt;br /&gt;Specify the Point in Time Early in a Restore Sequence&lt;br /&gt;&lt;a name="sectionToggle1"&gt;&lt;/a&gt;&lt;br /&gt;A restore sequence consists of one or more restore operations that move data through one or more of the phases of restore. The more information that you supply about the intent of the sequence, the less likely you are to experience errors that could require that you start over. For point-in-time restore, the SQL Server Database Engine uses information specified at the start of (and during) a restore sequence to identify the point-in-time goal of the restore. If you wait too long in the sequence, the sequence fails. You must provide the stop-at information early enough in the restore sequence to make sure that restore does not go beyond your point-in-time goal.&lt;br /&gt;If you intend to stop at a particular recovery point, you should communicate this intention on every RESTORE LOG statement (by using STOPAT, STOPBEFOREMARK, or STOPATMARK), together with the RECOVERY option. When the RECOVERY and STOPAT options are used together, if the transaction log backup does not contain the requested time (for example, if the time specified is beyond the end of the time covered by the transaction log), a warning is generated and the database remains unrecovered. When the recovery point is reached, the database is recovered, and an attempt to restore another log backup fails. Using the RECOVERY and STOPAT options together when restoring a log backup ensures that no log restore ever goes beyond the stop-at time.&lt;br /&gt;Example: Point-in-Time Restore&lt;br /&gt;In the following example, the restore sequence starts to declare the intention to stop at a particular time when applying the first log backup. In this example, the stop-at time occurs in the first log backup after the differential backup.&lt;br /&gt;&lt;a class="copyCode" href="javascript:CopyCode("&gt;Copy Code&lt;/a&gt;RESTORE DATABASE database_name FROM full_backup&lt;br /&gt;WITH NORECOVERY;&lt;br /&gt;RESTORE DATABASE database_name FROM full_differential_backup&lt;br /&gt;WITH NORECOVERY;&lt;br /&gt;RESTORE LOG database_name FROM log_backup&lt;br /&gt;WITH STOPAT = time, RECOVERY;&lt;br /&gt;RESTORE LOG database_name FROM log_backup&lt;br /&gt;WITH STOPAT = time, RECOVERY;&lt;br /&gt;Whether a specified log restore succeeds depends on whether time is in the interval captured by a log backup, as described in the following table.&lt;br /&gt;Relationship of time to the interval captured by the log backup:&lt;br /&gt;Effect&lt;br /&gt;time is before the interval.&lt;br /&gt;The restore fails, and no roll forward occurs.&lt;br /&gt;time is during the interval.&lt;br /&gt;The last restore succeeds, and the database is recovered.&lt;br /&gt;time is after the interval.&lt;br /&gt;Roll forward succeeds, but the database is not recovered, because time has not yet been reached.&lt;br /&gt;Declare the Stopping Point on Every Subsequent RESTORE Statement&lt;br /&gt;&lt;a name="sectionToggle2"&gt;&lt;/a&gt;&lt;br /&gt;A stopping point is specific to the statement that specifies the STOPAT, STOPBEFOREMARK, or STOPATMARK option. If you omit that option from a RESTORE statement, the complete backup is restored.&lt;br /&gt;As a point-in-time restore sequence progresses, you can change the recovery point by specifying a new value for time, assuming that the database has not yet gone beyond the new time.&lt;br /&gt;Note:&lt;br /&gt;The STOPBEFOREMARK and STOPATMARK options have two parameters, mark_name and lsn_number. The mark_name parameter, which identifies a transaction mark in a log backup, is supported only in RESTORE LOG statements. The lsn_number parameter, which specifies a log sequence number, is supported in both RESTORE DATABASE statements and RESTORE LOG statements. "&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-2896214088493017963?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/2896214088493017963/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=2896214088493017963' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2896214088493017963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/2896214088493017963'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/06/best-practices-for-recovering-database.html' title='Best Practices for Recovering a Database to a Specific Recovery Point'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3767702164001075357</id><published>2008-06-02T22:42:00.003+02:00</published><updated>2008-06-02T22:49:45.305+02:00</updated><title type='text'>Regedit from Internet Explorer?</title><content type='html'>Here comes a tip on a small ie add-on for reaching a registry key in regedit directly from internet explorer via a right click.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.petri.co.il/open_in_regedit_in_ie.htm"&gt;http://www.petri.co.il/open_in_regedit_in_ie.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3767702164001075357?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3767702164001075357/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3767702164001075357' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3767702164001075357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3767702164001075357'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/06/regedit-from-internet-explorer.html' title='Regedit from Internet Explorer?'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-331058809065742009</id><published>2008-05-31T17:48:00.002+02:00</published><updated>2008-05-31T17:51:35.023+02:00</updated><title type='text'>How can I transfer some or all of the FSMO Roles from one DC to another?</title><content type='html'>This article I found on &lt;a href="http://www.petri.co.il/transferring_fsmo_roles.htm"&gt;Petri´s website&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The transfer of an FSMO role is the suggested form of moving a FSMO role between domain controllers and can be initiated by the administrator or by demoting a domain controller. However, the transfer process is not initiated automatically by the operating system, for example a server in a shut-down state. FSMO roles are not automatically relocated during the shutdown process - this must be considered when shutting down a domain controller that has an FSMO role for maintenance, for example.&lt;br /&gt;In a graceful transfer of an FSMO role between two domain controllers, a synchronization of the data that is maintained by the FSMO role owner to the server receiving the FSMO role is performed prior to transferring the role to ensure that any changes have been recorded before the role change.&lt;br /&gt;However, when the original FSMO role holder went offline or became non operational for a long period of time, the administrator might consider moving the FSMO role from the original, non-operational holder, to a different DC. The process of moving the FSMO role from a non-operational role holder to a different DC is called Seizing, and is described in the &lt;a href="http://www.petri.co.il/seizing_fsmo_roles.htm"&gt;Seizing FSMO Roles&lt;/a&gt; article.&lt;br /&gt;You can transfer FSMO roles by using the Ntdsutil.exe command-line utility or by using an MMC snap-in tool. Depending on the FSMO role that you want to transfer, you can use one of the following three MMC snap-in tools:&lt;br /&gt;Active Directory Schema snap-in&lt;br /&gt;Active Directory Domains and Trusts snap-in&lt;br /&gt;Active Directory Users and Computers snap-in&lt;br /&gt;To transfer the FSMO role the administrator must be a member of the following group:&lt;br /&gt;FSMO Role&lt;br /&gt;Administrator must be a member of&lt;br /&gt;Schema&lt;br /&gt;Schema Admins&lt;br /&gt;Domain Naming&lt;br /&gt;Enterprise Admins&lt;br /&gt;RID&lt;br /&gt;Domain Admins&lt;br /&gt;PDC Emulator&lt;br /&gt;Infrastructure&lt;br /&gt;Transferring the RID Master, PDC Emulator, and Infrastructure Masters via GUI&lt;br /&gt;To Transfer the Domain-Specific RID Master, PDC Emulator, and Infrastructure Master FSMO Roles:&lt;br /&gt;Open the Active Directory Users and Computers snap-in from the Administrative Tools folder.&lt;br /&gt;If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to Active Directory Users and Computers and press Connect to Domain Controller.&lt;br /&gt;Select the domain controller that will be the new role holder, the target, and press OK.&lt;br /&gt;Right-click the Active Directory Users and Computers icon again and press Operation Masters.&lt;br /&gt;Select the appropriate tab for the role you wish to transfer and press the Change button.&lt;br /&gt;Press OK to confirm the change.&lt;br /&gt;Press OK all the way out.&lt;br /&gt;Transferring the Domain Naming Master via GUI&lt;br /&gt;To Transfer the Domain Naming Master Role:&lt;br /&gt;Open the Active Directory Domains and Trusts snap-in from the Administrative Tools folder.&lt;br /&gt;If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to Active Directory Domains and Trusts and press Connect to Domain Controller.&lt;br /&gt;Select the domain controller that will be the new role holder and press OK.&lt;br /&gt;Right-click the Active Directory Domains and Trusts icon again and press Operation Masters.&lt;br /&gt;Press the Change button.&lt;br /&gt;Press OK to confirm the change.&lt;br /&gt;Press OK all the way out.&lt;br /&gt;Transferring the Schema Master via GUI&lt;br /&gt;To Transfer the Schema Master Role:&lt;br /&gt;Register the Schmmgmt.dll library by pressing Start &gt; RUN and typing:&lt;br /&gt;regsvr32 schmmgmt.dll&lt;br /&gt;Press OK. You should receive a success confirmation.&lt;br /&gt;From the Run command open an MMC Console by typing MMC.&lt;br /&gt;On the Console menu, press Add/Remove Snap-in.&lt;br /&gt;Press Add. Select Active Directory Schema.&lt;br /&gt;Press Add and press Close. Press OK.&lt;br /&gt;If you are NOT logged onto the target domain controller, in the snap-in, right-click the Active Directory Schema icon in the Console Root and press Change Domain Controller.&lt;br /&gt;Press Specify .... and type the name of the new role holder. Press OK.&lt;br /&gt;Right-click right-click the Active Directory Schema icon again and press Operation Masters.&lt;br /&gt;Press the Change button.&lt;br /&gt;Press OK all the way out.&lt;br /&gt;Transferring the FSMO Roles via Ntdsutil&lt;br /&gt;To transfer the FSMO roles from the Ntdsutil command:&lt;br /&gt;Caution: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.&lt;br /&gt;On any domain controller, click Start, click Run, type Ntdsutil in the Open box, and then click OK.&lt;br /&gt;Microsoft Windows [Version 5.2.3790]&lt;br /&gt;(C) Copyright 1985-2003 Microsoft Corp.&lt;br /&gt;C:\WINDOWS&gt;ntdsutil&lt;br /&gt;ntdsutil:&lt;br /&gt;Type roles, and then press ENTER.&lt;br /&gt;ntdsutil: roles&lt;br /&gt;fsmo maintenance:&lt;br /&gt;Note: To see a list of available commands at any of the prompts in the Ntdsutil tool, type ?, and then press ENTER.&lt;br /&gt;Type connections, and then press ENTER.&lt;br /&gt;fsmo maintenance: connections&lt;br /&gt;server connections:&lt;br /&gt;Type connect to server &lt;servername&gt;, where &lt;servername&gt;is the name of the server you want to use, and then press ENTER.&lt;br /&gt;server connections: connect to server server100&lt;br /&gt;Binding to server100 ...&lt;br /&gt;Connected to server100 using credentials of locally logged on user.&lt;br /&gt;server connections:&lt;br /&gt;At the server connections: prompt, type q, and then press ENTER again.&lt;br /&gt;server connections: q&lt;br /&gt;fsmo maintenance:&lt;br /&gt;Type transfer &lt;role&gt;. where &lt;role&gt;is the role you want to transfer.&lt;br /&gt;For example, to transfer the RID Master role, you would type transfer rid master:&lt;br /&gt;Options are:&lt;br /&gt;Transfer domain naming master&lt;br /&gt;Transfer infrastructure master&lt;br /&gt;Transfer PDC&lt;br /&gt;Transfer RID master&lt;br /&gt;Transfer schema master&lt;br /&gt;You will receive a warning window asking if you want to perform the transfer. Click on Yes.&lt;br /&gt;After you transfer the roles, type q and press ENTER until you quit Ntdsutil.exe.&lt;br /&gt;Restart the server and make sure you update your backup.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-331058809065742009?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/331058809065742009/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=331058809065742009' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/331058809065742009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/331058809065742009'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/05/how-can-i-transfer-some-or-all-of-fsmo.html' title='How can I transfer some or all of the FSMO Roles from one DC to another?'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-47163306326754825</id><published>2008-05-27T12:41:00.002+02:00</published><updated>2008-05-27T12:47:16.876+02:00</updated><title type='text'>Database stuck in a restoring state</title><content type='html'>During our scheduled restore of a database to a test server there were some kind of network maintenance which caused the restoring server to loose network connection and contact with the .bak-files. This caused the restore to be hanging in a restore state which I couldn´t break even if I restarted the SQL service. I tried to run "restore database dbname with recovery" but that didn´t work either.&lt;br /&gt;&lt;br /&gt;The solution was to drop the database ("drop database dbname") and then restore from a fresh copy with the regular script.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-47163306326754825?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/47163306326754825/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=47163306326754825' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/47163306326754825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/47163306326754825'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/05/database-stuck-in-restoring-state.html' title='Database stuck in a restoring state'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6901586511021759317</id><published>2008-05-25T23:45:00.002+02:00</published><updated>2008-05-25T23:50:47.716+02:00</updated><title type='text'>The Case of the Missing AutoPlay and Circumventing Group Policy Settings</title><content type='html'>Two great articles by Mark Russinovich about using the sysinternals process explorer and filemon/regmon.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.technet.com/markrussinovich/archive/2008/01/02/2696753.aspx"&gt;The Case of the Missing AutoPlay&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.technet.com/markrussinovich/archive/2005/04/30/circumventing-group-policy-settings.aspx"&gt;Circumventing Group Policy Settings&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I can also really recommend his &lt;a href="http://blogs.technet.com/markrussinovich/"&gt;blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6901586511021759317?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6901586511021759317/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6901586511021759317' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6901586511021759317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6901586511021759317'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/05/case-of-missing-autoplay-and.html' title='The Case of the Missing AutoPlay and Circumventing Group Policy Settings'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6443322941145110945</id><published>2008-04-28T22:00:00.002+02:00</published><updated>2008-04-28T22:03:59.232+02:00</updated><title type='text'>Installing Remote Server Administrative Tools on Windows Vista</title><content type='html'>Finally the RSAT is released for Vista SP1 for remote server administration. In this article from Daniel Petri he explains how to install it. Read the full article &lt;a href="http://www.petri.co.il/installing-remote-server-administration-tools-rsat-windows-vista.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Zelis&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6443322941145110945?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6443322941145110945/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6443322941145110945' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6443322941145110945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6443322941145110945'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/04/installing-remote-server-administrative.html' title='Installing Remote Server Administrative Tools on Windows Vista'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-8154366468888793169</id><published>2008-03-29T17:38:00.003+01:00</published><updated>2008-03-29T17:43:44.004+01:00</updated><title type='text'>Solving a pesky resource problem in Vista</title><content type='html'>I found this tip on &lt;a href="http://blogs.zdnet.com/Bott/?p=269"&gt;Ed Botts blog&lt;/a&gt; on zdnet, and it can be useful some time for people who has a large numbers of windows open on Windows Vista.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Have you experienced any of these problems with Windows Vista? After opening a large number of programs and windows, you try to launch a new program or open a new browser tab or even switch back to an already running program and instead:&lt;br /&gt;You get a strange “out of memory” message, despite the fact that you’re using only a fraction of the RAM installed on your system.&lt;br /&gt;The window opens but its contents refuse to load.&lt;br /&gt;The window opens, but menus are missing, dialog boxes are empty, or buttons don’t work.&lt;br /&gt;In my case, I experienced this problem regularly on multiple Vista systems when I opened Outlook 2007, Forte Agent, Adobe Acrobat (editing three or four large documents), BlogJet, Windows Live Writer, Word (working with several large documents), and IE7 with more than 30 tabs. The problem vanished for me, as it does for most people, when I closed a few windows, but that’s obviously not the ideal solution. After all, what’s the point of having all that RAM if you can’t use it?&lt;br /&gt;The problem, as it turns out, is as old as the Windows NT family. I’ve found references to this issue that date back to the mid-1990s and Windows NT 3.1 and 3.5. The fix for Vista, just as for those much older versions of Windows, involves editing a key in the Windows Registry.&lt;br /&gt;First the problem: Windows sets aside a blob of system memory called the desktop heap, which it uses to store user interface objects such as windows, menus, and hooks. The Microsoft Advanced Windows Debugging and Troubleshooting Blog offers a dense, but still readable explication of the problem and why it occurs (it’s a two-part series: read the &lt;a href="http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx"&gt;Desktop Heap Overview&lt;/a&gt; first and if your eyes haven’t glazed over read the shorter &lt;a href="http://blogs.msdn.com/ntdebugging/archive/2007/07/05/desktop-heap-part-2.aspx"&gt;Desktop Heap Part 2&lt;/a&gt; for details that are specific to 64–bit Windows, systems with 3GB of RAM, and Windows Vista).&lt;br /&gt;The fix for 32–bit Windows Vista is simple: The interactive desktop heap size needs to be bumped up to a value greater than its default setting of 3072KB. I recommend a conservative approach: increase the value to 4096 and try that for a while. If you continue to bump into the problem, try a higher value. On one system here, I’ve been running without issues using a value of 8192KB.&lt;br /&gt;Before I explain how to make the change, I offer the following disclaimers: Editing the Registry is not a trivial task. If you make a mistake, or if your system doesn’t work the way mine does, you could end up causing damage to data or render your system unbootable. You do this at your own risk.&lt;br /&gt;OK, with that out of the way, here are the step-by-step instructions:&lt;br /&gt;Click Start, type regedit in the Search box, and click the Regedit icon that appears at the top of the Start menu.&lt;br /&gt;Click OK in response to the UAC prompt.&lt;br /&gt;In Registry Editor, navigate to the following key:HKEY_LOCAL_MACHINE_SYSTEM_ CurrentControlSet_Control_Session Manager_SubSystems&lt;br /&gt;In the contents pane to the right, double-click the Windows value from the bottom of the list. This opens an Edit String dialog box containing a very long text string.&lt;br /&gt;Scroll through this text value until you find the section that begins with SharedSection. Change the second value from its default of 3072 to a higher number. Do not change any other values.&lt;br /&gt;&lt;a title="desktop_heap_regedit.png" href="http://blogs.zdnet.com/Bott/images/desktop_heap_regedit.png"&gt;&lt;/a&gt;&lt;br /&gt;Restart the computer. If your experience is like mine, you’ll find that those odd error messages are gone and that you’re able to open many more windows without any display issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-8154366468888793169?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/8154366468888793169/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=8154366468888793169' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8154366468888793169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8154366468888793169'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/solving-pesky-resource-problem-in-vista.html' title='Solving a pesky resource problem in Vista'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-647676003599065275</id><published>2008-03-27T21:15:00.002+01:00</published><updated>2008-03-27T21:37:22.574+01:00</updated><title type='text'>Automatically Create an Outlook Profile on Logon</title><content type='html'>You do need to take care of the clients sometime and then this tip can become handy.&lt;br /&gt;&lt;a href="http://www.markmmanning.com/blog/2007/11/automatically-create-outlook-profile-on.html"&gt;Automatically Create an Outlook Profile on Logon&lt;/a&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-647676003599065275?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/647676003599065275/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=647676003599065275' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/647676003599065275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/647676003599065275'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/automatically-create-outlook-profile-on.html' title='Automatically Create an Outlook Profile on Logon'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-8473945927962525052</id><published>2008-03-19T10:15:00.001+01:00</published><updated>2008-03-19T10:16:49.546+01:00</updated><title type='text'>The SQL configuration for SQL is inaccessible or invalid</title><content type='html'>Event id: 1 Source: SQLBrowser&lt;br /&gt;&lt;br /&gt;In my case, this event occurred after the SQL Server 2000 databases had been deleted from the same box where SQL Server 2005 was installed as well. The SQL Browser service is part of the SQL Server 2005 and it was still looking for them. After a restart of the sql browser service, the error was gone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-8473945927962525052?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/8473945927962525052/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=8473945927962525052' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8473945927962525052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8473945927962525052'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/sql-configuration-for-sql-is.html' title='The SQL configuration for SQL is inaccessible or invalid'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6991310725249820632</id><published>2008-03-17T23:39:00.003+01:00</published><updated>2008-03-17T23:58:25.573+01:00</updated><title type='text'>SQL Server Alias</title><content type='html'>If you need to install a named instance and point your client to that one you can do in the following way. The full article can be read below on MS, I have only supplied the 2005 way.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://support.microsoft.com/kb/265808"&gt;How to connect to a named instance of SQL Server 2005 or SQL Server 2000 by using the client tools in the earlier version of SQL Server&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Configure a server alias to use TCP/IP sockets&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Note To configure a server alias to use TCP/IP sockets, you must provide the server name and the TCP/IP port number.&lt;br /&gt;1.&lt;br /&gt;Determine the TCP/IP port number of the instance of SQL Server. SQL Server 2005&lt;br /&gt;a.&lt;br /&gt;Open SQL Server Configuration Manager, and then expand SQL Server 2005 Network Configuration.&lt;br /&gt;b.&lt;br /&gt;Click Protocols for InstanceName, and then double-click TCP/IP in the right panel.Note InstanceName is a placeholder for the named instance of SQL Server 2005.&lt;br /&gt;c.&lt;br /&gt;On the Protocol tab, notice the value of the Listen All item.&lt;br /&gt;d.&lt;br /&gt;Click the IP Addresses tab:&lt;br /&gt;•&lt;br /&gt;If the value of Listen All is yes, the TCP/IP port number for this instance of SQL Server 2005 is the value of the TCP Dynamic Ports item under IPAll.&lt;br /&gt;•&lt;br /&gt;If the value of Listen All is no, the TCP/IP port number for this instance of SQL Server 2005 is the value of the TCP Dynamic Ports item for a specific IP address.Note If the value of the TCP Dynamic Ports item is not set, you must set it yourself. For more information about how to configure a server to listen on a specific TCP port, visit the following Microsoft Developer Network (MSDN) Web site: &lt;a href="http://msdn2.microsoft.com/en-us/library/ms177440.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms177440.aspx&lt;/a&gt; (http://msdn2.microsoft.com/en-us/library/ms177440.aspx)&lt;br /&gt;e.&lt;br /&gt;Click OK.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6991310725249820632?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6991310725249820632/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6991310725249820632' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6991310725249820632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6991310725249820632'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/sql-server-alias.html' title='SQL Server Alias'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-8953166593247374027</id><published>2008-03-11T23:16:00.003+01:00</published><updated>2008-03-11T23:33:16.965+01:00</updated><title type='text'>Audit account management</title><content type='html'>We had a small incident when a technician added a user to the wrong distribution group and therefore I looked through the helpfile for Auditing account management on DC´s and found some useful codes that we can use through our monitoring software.&lt;br /&gt;&lt;br /&gt;Account Management Events&lt;br /&gt;624 A user account was created.&lt;br /&gt;627 A user password was changed.&lt;br /&gt;628 A user password was set.&lt;br /&gt;630 A user account was deleted.&lt;br /&gt;631 A global group was created.&lt;br /&gt;632 A member was added to a global group.&lt;br /&gt;633 A member was removed from a global group.&lt;br /&gt;634 A global group was deleted.&lt;br /&gt;635 A new local group was created.&lt;br /&gt;636 A member was added to a local group.&lt;br /&gt;637 A member was removed from a local group.&lt;br /&gt;638 A local group was deleted.&lt;br /&gt;639 A local group account was changed.&lt;br /&gt;641 A global group account was changed.&lt;br /&gt;642 A user account was changed.&lt;br /&gt;643 A domain policy was modified.&lt;br /&gt;644 A user account was auto locked.&lt;br /&gt;645 A computer account was created.&lt;br /&gt;646 A computer account was changed.&lt;br /&gt;647 A computer account was deleted.&lt;br /&gt;648 A local security group with security disabled was created. Note: SECURITY_DISABLED in the formal name means that this group cannot be used to grant permissions in access checks.&lt;br /&gt;649 A local security group with security disabled was changed.&lt;br /&gt;650 A member was added to a security-disabled local security group.&lt;br /&gt;651 A member was removed from a security-disabled local security group.&lt;br /&gt;652 A security-disabled local group was deleted.&lt;br /&gt;653 A security-disabled global group was created.&lt;br /&gt;654 A security-disabled global group was changed.&lt;br /&gt;655 A member was added to a security-disabled global group.&lt;br /&gt;656 A member was removed from a security-disabled global group.&lt;br /&gt;657 A security-disabled global group was deleted.&lt;br /&gt;658 A security-enabled universal group was created.&lt;br /&gt;659 A security-enabled universal group was changed.&lt;br /&gt;660 A member was added to a security-enabled universal group.&lt;br /&gt;661 A member was removed from a security-enabled universal group.&lt;br /&gt;662 A security-enabled universal group was deleted.&lt;br /&gt;663 A security-disabled universal group was created.&lt;br /&gt;664 A security-disabled universal group was changed.&lt;br /&gt;665 A member was added to a security-disabled universal group.&lt;br /&gt;666 A member was removed from a security-disabled universal group.&lt;br /&gt;667 A security-disabled universal group was deleted.&lt;br /&gt;668 A group type was changed.&lt;br /&gt;684 Set the security descriptor of members of administrative groups.Note: Every 60 minutes on a domain controller a background thread searches all members of administrative groups (such as domain, enterprise, and schema administrators) and applies a fixed security descriptor on them. This event is logged.&lt;br /&gt;685 Name of an account was changed.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-8953166593247374027?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/8953166593247374027/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=8953166593247374027' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8953166593247374027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8953166593247374027'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/audit-account-management.html' title='Audit account management'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7033113899104797931</id><published>2008-03-10T23:23:00.002+01:00</published><updated>2008-03-10T23:29:28.571+01:00</updated><title type='text'>Event ID number 2003 is logged in the Application log after you install Windows Server 2003 Service Pack 2</title><content type='html'>The solution was found in the following article: &lt;a href="http://support.microsoft.com/kb/932813"&gt;http://support.microsoft.com/kb/932813&lt;/a&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;After installing server 2003 sp2 I got the following warning in the eventlog on a citrix server:&lt;br /&gt;&lt;br /&gt;ERROR&lt;br /&gt;Event Source: PerflibEvent Type: WarningEvent ID: 2003Description: The configuration information of the performance library "C:\WINDOWS\system32\perfts.dll" for the "TermService" service does not match the trusted performance library information stored in the registry. The functions in this library will not be treated as trusted.&lt;br /&gt;&lt;br /&gt;CAUSE&lt;br /&gt;This problem occurs because the size and the date of the Perfts.dll file in Windows Server 2003 SP2 do not match the size and the date that were stored earlier in the registry for the Perfts.dll file .&lt;br /&gt;&lt;br /&gt;RESOLUTION&lt;br /&gt;To resolve this problem, follow these steps after you install Windows Server 2003 SP2:&lt;br /&gt;1. Click Start, click Run, type cmd, and then click OK.&lt;br /&gt;2. At the command prompt, type the following command, and then press ENTER.&lt;br /&gt;lodctr /T:TermServiceNote&lt;br /&gt;This command will modify the size and the date that are stored in the registry for the Perfts.dll file.&lt;br /&gt;&lt;br /&gt;MORE INFORMATION&lt;br /&gt;You can safely ignore event 2003. However, when this event is logged, the performance collection of Terminal Services performance counters is slightly slower than before Windows Server 2003 SP2 was installed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7033113899104797931?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7033113899104797931/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7033113899104797931' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7033113899104797931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7033113899104797931'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/event-id-number-2003-is-logged-in.html' title='Event ID number 2003 is logged in the Application log after you install Windows Server 2003 Service Pack 2'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7943215927546187588</id><published>2008-03-07T13:29:00.001+01:00</published><updated>2008-03-07T13:32:24.287+01:00</updated><title type='text'>31 SQL Server Tips That Can Save Your Butt</title><content type='html'>The text is from InformIT and the full article can be read &lt;a href="http://www.informit.com/articles/article.aspx?p=368159"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Want to get the most out of SQL Server 2000? We've collected more than two dozen tips and techniques that can make any DBA's life easier.&lt;br /&gt;Want to get the most out of SQL Server 2000? Here are 31 short-and-sweet tips to make your life just a little bit easier.&lt;br /&gt;Tips 1-10&lt;br /&gt;Full Text Search Needs a Single Unique Index&lt;br /&gt;You can set up a full-text index using system-stored procedures (including sp_fulltext_database, sp_fulltext_table, and so on), or through the SQL Enterprise Manager. To create a full-text index on a table using Enterprise Manager, you select Full-Text Indexing from the Tools menu. This loads the Full-Text Wizard. The wizard leads you through the steps for enabling a full-text index on the table.&lt;br /&gt;It is important to note that full-text search needs a single unique index on a table to work. A composite primary key consisting of two or more columns will not work. If you have tables that do not have a single column unique index, you need to add a new, unique column to the table. Identity columns work well for this. If the table has more than one unique index, use the smallest, most narrow available index to get the best performance. For example, if you had a table with a unique GUID column and a unique integer 4 bytes each, instead of the GUID at 16 bytes each.&lt;br /&gt;Handling Special Tags Used Inside XML Templates&lt;br /&gt;XML templates are handy. You don't want to use URL queries when you have many lines of T-SQL code to execute. However, you do need to be smart about handling the special tags used inside these templates. Enclose your sql:query statements and sql:param values between &lt;![CDATA[ and ]]&gt; (known as a CDATA section) to avoid having to manually encode any special characters.&lt;br /&gt;This makes things much easier because it instructs the parser to treat comparison characters such as &lt;&gt;, &amp;amp;, ', and ". Convert them to the strings (known as entities) &amp;lt;, &amp;gt;, &amp;amp;, &amp;apos;, and &amp;quot; when you need to use them as element or attribute values.&lt;br /&gt;XML Parsers Are Case Sensitive&lt;br /&gt;One of SQL Server 2000's major enhancements is the inclusion of native XML support, enabling developers to execute queries that return results as XML-formatted data, rather than standard rowsets. One importamt rule to keep in mind before delving into this much-awaited feature is that XML parsers are case sensitive with respect to element and attribute names. When running your XML data through a parser after you get it back from a SQL Server 2000 query, be sure to remember that in the mind of the parser, &lt;myelement&gt; is not the same as &lt;myelement&gt;, nor is Myattribute the same as myattribute.&lt;br /&gt;Viewing Locking Activity with SQL Enterprise Manager&lt;br /&gt;Although locking provides isolation for transactions and helps ensure their integrity, it can also have a significant impact on system performance. Keep transactions as short, concise, and non-interfering as possible. One of your goals should be to define transactions to minimize locking performance problems.&lt;br /&gt;As you view and monitor locking behavior, sometimes you need to see output more directly, or you don't like the way the information is presented. Use SQL Server Enterprise Manager to display locking information. To see the output from the Enterprise Manager, expand the server items, expand the Management folder, expand the Current Activity item, and click on either Locks/Process ID or Locks/Object to display the locking information in SQL Server.&lt;br /&gt;To see more information when viewing the lock activity in Enterprise Manager, be sure to go to the EM View menu and choose the Detail option. EM will then display detailed information about the locks, beyond just the process ID or object name. The information displayed includes the lock type, lock mode, lock status, and index involved.&lt;br /&gt;Choosing the Optimal Method to Defragment Data and Indexes&lt;br /&gt;There several methods you can use when you need to defragment your data and indexes. One method available is the DBCC INDEXDEFRAG command. DBCC INDEXDEFRAG eliminates the internal defragmentation in an index, but does not hold locks long term while it runs and doesn't lock the entire table. As a result, it can be run online and will not block concurrently-running queries or updates.&lt;br /&gt;Alternatively, you can rebuild indexes by manually running a series of DROP INDEX and CREATE INDEX commands. However, this can be a tedious process that runs the risk of an index not getting rebuilt if it's missing from the SQL script. Also, if you run out of space while rebuilding an index, the CREATE INDEX command fails leaving you without that index on the table.&lt;br /&gt;A better way of rebuilding all indexes is to use the DBCC DBREINDEX command. Using DBCC DBREINDEX keeps you from having to specify all the indexes to drop and re-create on a table (if you specify just the table name, it automatically rebuilds all indexes). In addition, if DBCC DBREINDEX fails while processing for some reason (out of space, out of locks, and so on), the rebuild is rolled back and the original indexes are left in place.&lt;br /&gt;CAUTION&lt;br /&gt;Caution! Unlike DBCC INDEXDEFRAG, DBCC DBREINDEX applies table-level locks while rebuilding indexes. It should not be run online, as it would block other queries and other updates on the table. This should only be run during off-peak hours or during the normal maintenace window.&lt;br /&gt;Using AWE with SQL Server 2000 to Allocate More Memory&lt;br /&gt;When running the Enterprise Edition of SQL Server 2000 on either the Windows 2000 Advanced Server or Windows 2000 Datacenter Server platforms, you can allocate more than the default maximum of 4GB of memory by enabling the Windows 2000 Address Windowing Extensions (AWE) API. When this option is enabled, a SQL Server instance can then access up to 8GB of physical memory on Advanced Server and up to 64GB on Datacenter Servers.&lt;br /&gt;Although standard 32-bit addressing supports up to only 4GB of physical memory, the AWE API allows the additional memory to be acquired as nonpaged memory. The memory manager can then dynamically map views of the nonpaged memory into the 32-bit address space.&lt;br /&gt;You must be careful when using this extension because nonpaged memory cannot be swapped out. SQL Server allocates the entire chunk requested and does not release it back to the operating system until SQL Server is shut down. Other applications or other instances of SQL Server running on the same machine might not be able to get the memory they need.&lt;br /&gt;Also keep in mind that when using AWE with SQL Server 2000, SQL Server can no longer dynamically allocate RAM. By default, it grabs all available memory, leaving only 128MB available for Windows and other applications. You also need to configure the max server memory option to limit the amount of memory that SQL Server allocates. Be sure to leave enough memory for Windows and any other applications running on the server, usually at least 500MB.&lt;br /&gt;Cascading Referential Integrity: A New Feature&lt;br /&gt;SQL Server 2000 added a new feature that allows you to define cascading actions on your foreign key constraint. When defining the constraints on a table, you can use the ON UPDATE CASCADE or the ON DELETE CASCADE clauses, which cause changes to the primary key of a table to cascade to the related foreign key tables.&lt;br /&gt;To illustrate the usefulness of this, consider a pair of related tables: employee and department. The employee table has a foreign key on the dept column that references the dept column of the department table. If it was created with ON UPDATE CASCADE, any changes to the dept column in the department table would cascade to the employee table. Therefore, if dept 20 has 5,000 employees, and you change the dept number to 200 to comply with a business rule, all 5,000 employee records are automatically updated as well. If ON DELETE CASCADE were specified for the table, then deleting dept 20 would result in the deletion of all 5,000 employees!&lt;br /&gt;This is a powerful and dangerous feature. If you plan to utilize the cascade feature,you should work closely with the application developers to ensure that checks and balances are in place to prevent accidental deletion of data. It is also important to note the potential overhead generated by Cascading Referential Integrity.&lt;br /&gt;Using the inserted and deleted Tables For Testing Purposes&lt;br /&gt;In most trigger situations, you need to know what changes were made as part of the data modification. You can find this information in the inserted and deleted tables. For the AFTER trigger, these tables are actually views of the rows in the transaction log that were modified by the statement. With the new INSTEAD OF trigger, the inserted and deleted tables are actually temporary tables that are created on-the-fly. The tables have identical column structures and names to the tables that were modified.&lt;br /&gt;To be able to see the contents of these tables for testing purposes, create a copy of the table, and then create a trigger on that copy. You can perform data modification statements and view the contents of these tables without the modification actually taking place. Use the following listing to create a copy of the tables and then create a trigger on the copy.--Create a copy of the titles table in the Pubs database&lt;br /&gt;SELECT *&lt;br /&gt;INTO titles_copy&lt;br /&gt;FROM titles&lt;br /&gt;GO&lt;br /&gt;--add an AFTER trigger to this table for testing purposes&lt;br /&gt;CREATE TRIGGER tc_tr ON titles_copy&lt;br /&gt;FOR INSERT, UPDATE, DELETE&lt;br /&gt;AS&lt;br /&gt;PRINT 'Inserted:'&lt;br /&gt;SELECT title_id, type, price FROM inserted&lt;br /&gt;PRINT 'Deleted:'&lt;br /&gt;SELECT title_id, type, price FROM deleted&lt;br /&gt;ROLLBACK TRANSACTION&lt;br /&gt;Clearing the syscacheobjects Table&lt;br /&gt;Because query plans in SQL Server 2000 are re-entrant, it's typical that no more than one copy of an execution plan for a stored procedure is in cache memory. However, sometimes multiple query plans can be created and exist in procedure cache at the same time. One of the more likely causes is when users run the same procedure with different settings for specific session options.&lt;br /&gt;How does SQL Server know what plans are currently in memory and what settings were in effect when they were created? This information is contained in the syscacheobjects table in the master database. syscacheobjects keeps track of all the currently compiled plans in the procedure cache.&lt;br /&gt;A large number of entries can exist in the syscacheobjects table. To clear the procedure cache buffers, and subsequently, the syscacheobjects table, you can issue the DBCC FREEPROCCACHE procedure, which removes all cached plans from memory.&lt;br /&gt;Alternatively, you can use the undocumented command, DBCC FLUSHPROCINDB(dbid), to flush all procedure query plans for the specified database from memory. Needless to say, you shouldn't execute these commands in a production environment because they can impact the performance of the production applications running at the time.&lt;br /&gt;Protect Source Code of Stored Procedures Using the WITH ENCRYPTION Option&lt;br /&gt;To protect the source code of your stored procedures and keep its contents from prying eyes, you can create a procedure using the WITH ENCRYPTION option. When this option is specified, the source code stored in the syscomments table is encrypted. If you use encryption when creating your stored procedures, be aware that while SQL Server can internally decrypt the source code, no mechanisms exist for the user or for any of the end user tools to decrypt the stored procedure text for display or editing.&lt;br /&gt;With this in mind, make sure that you store a copy of the source code for those procedures in a file in case you need to edit or re-create them. Also, if you use the WITH ENCRYPTION option, you can no longer use the Transact-SQL Debugger on the encrypted stored procedure. Don't use the WITH ENCRYPTION option unless you have a good reason to hide the stored procedure code.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Tips 11-20&lt;br /&gt;Choose the Correct Outlook 2000 Configuration&lt;br /&gt;If you use Outlook 2000, when you set up your initial mail profile you have the option to set it up for Internet Only or for Corporate or Workgroup. Even though you might be setting up Outlook to connect only to an Internet Mail server, choose the Corporate or Workgroup mode. You don't have to add an Exchange Server mail account. However, your mail profile will behave differently.&lt;br /&gt;In Corporate or Workgroup mode, SQL Mail will send e-mail messages immediately when they are generated, whether or not the Outlook client is running. For some reason, when configured for Internet Only mode, the mail messages go into limbo and are not sent unless the Outlook 2000 client is running, is online to the mail server, and is configured to automatically send and receive mail on a schedule (for example, every 2 minutes). You may find similar behavior using the Outlook XP mail client when it is configured with only Internet mail accounts.&lt;br /&gt;Back Up Your Transaction Log Before You Do a Recovery&lt;br /&gt;Any time you think you might have to do a recovery, the first thing you should do is back up the transaction log. If you skip this step and restore the database, you will have unnecessarily lost all the transactions since the last log backup.&lt;br /&gt;There was a bug in SQL 7.0 that prevented the NO_TRUNCATE option from working if the primary data file for the database was damaged. Those of you who found this out the hard way will be happy to know it is fixed in SQL Server 2000.&lt;br /&gt;Good Things Come to Those that Wait&lt;br /&gt;After you run the sp_addumpdevice stored procedure, don't panic when you go looking for the physical files on disk and can't find them. The files aren't created until the first time you actually use the backup device.&lt;br /&gt;Also, the physical pathname to the dump file is not validated until the first time you use the backup device. If a bad pathname is entered when creating the dump device, you receive an error message similar to the following when attempting to back up to it:Server: Msg 3201, Level 16, State 1, Line 1&lt;br /&gt;Cannot open backup device 'mydump'. Device error or device off-line.&lt;br /&gt;See the SQL Server error log for more details.&lt;br /&gt;Constraints Are The Key to Integrity&lt;br /&gt;Constraints are the primary method used to enforce integrity. Constraints can be created in the CREATE TABLE statement or after the table has been created using ALTER TABLE.&lt;br /&gt;Create your tables first, and then use ALTER TABLE to create the constraints. This has the twofold effect of keeping your CREATE TABLE syntax simpler and providing ALTER TABLE scripts that can be rerun or modified as the need arises.&lt;br /&gt;Changing Datatypes Can Affect Your Data&lt;br /&gt;Changing some datatypes can result in changing the data. For example, changing from nchar to char could result in any extended characters being converted.&lt;br /&gt;Similarly, changing precision and scale could result in data truncation. Other modifications (such as changing from char to int) might fail if the data doesn't match the restrictions of the new datatype. When changing datatypes, always validate that the data conforms to the new datatype.&lt;br /&gt;Don't Shrink If You Don't Have To&lt;br /&gt;Unless there is a definite need for the space that would be made available by shrinking a database, you shouldn't shrink the database files if the space will be used again in the future.&lt;br /&gt;For one thing, having free space available in the database files avoids the overhead of having to autogrow the database files when they become full. Also, if a database file is repeatedly shrunk and expanded, the database file itself can become fragmented within the file system, which can degrade IO performance for the file.&lt;br /&gt;Spread It Around&lt;br /&gt;If too many outstanding I/Os are causing bottlenecks in the disk I/O subsystem, you might want to consider spreading the files across more disk drives. Performance Monitor can identify these by monitoring the PhysicalDisk object and Disk Queue Length counter. Consider spreading the files across multiple disk drives if the Disk Queue Length counter is greater than three.&lt;br /&gt;Avoid Direct System Table References&lt;br /&gt;Avoid writing queries that reference the system tables directly. Microsoft tries to provide backward compatibility whenever possible, but it is not guaranteed. What this means is that Microsoft reserves the right to change the names of the system tables at any time.&lt;br /&gt;If you have applications that call these tables, they might not migrate to the next release. The information schema views, on the other hand, will remain consistent.&lt;br /&gt;There's Good Info in the Error Logs&lt;br /&gt;The SQL Server error log is a good place to look to determine the protocols that SQL Server on which listening. You can view the error logs via the Management node in Enterprise Manager, or you can open the error log file using any text editor. The latest error log file is found by default in Program Files\Microsoft SQL Server\Mssql\Log\Errorlog.&lt;br /&gt;Open the error log file with a text editor and search for the word Listening in the error log text to find the relevant messages. The Server Network utility shows you what has been enabled, but there are instances when the server is unable to listen on the enabled protocol at startup.&lt;br /&gt;Choosing the Best Trace Save Operation in SQL Profiler&lt;br /&gt;Two distinct Save operations are available in the SQL Profiler. You can save trace events to a file or table, or you can save a trace definition in a template file. The Save As Trace Table and Save As Trace File options are for saving trace events to a file. The Save As Trace Template option saves the trace definition. Saving a trace template saves you the trouble of having to go through all the properties each time to set up the events, data columns, and filters for your favorite traces.&lt;br /&gt;However, if you are executing a long-running trace, you should save to a file or table, as the trace runs to be sure that you capture the entire trace. Saving to a file allows you to clear the current contents of the trace window and not lose the trace information. Also, if you save the trace to a file or a table, you can open it later and specify whatever grouping you want to reorganize output. This flexibility gives you almost endless possibilities for analyzing the trace data.&lt;br /&gt;If you are saving to a trace file as the trace runs, and the trace is expected to be large, then you can use the Enable File Rollover option, which creates a new event file when the file reaches the size that you specify. This allows you to have smaller, more manageable trace files for your review.&lt;br /&gt;&lt;br /&gt;Tips 21-31&lt;br /&gt;SQL Server 2000 Allows You to Schedule when a Trace Stops&lt;br /&gt;Basic properties of a trace are defined in the General tab of the Trace Properties window. While these are straight-forward, there is a new feature. The General Properties screen contains a new option, Enable Trace Stop Time. This is a scheduling-oriented feature that allows you to specify a date and time at which you want to stop tracing. This is handy if you want to start a trace in the evening before you go home. You can set the stop time so that the trace will run for a few hours but won't affect any nightly processing that might occur later in the evening.&lt;br /&gt;Save Trace Definitions as a Template File&lt;br /&gt;SQL Server 2000's trace templates contain predefined trace settings that address some common auditing needs. These are not actual traces; they simply provide a foundation for you when creating your own traces.&lt;br /&gt;When using these templates, it is important to note that the Trace Name is a relatively unimportant trace property for future traces. When you create a new trace, you can specify a name for the trace; however, this trace name will not be used again. You will not be selecting the trace to run based on the Trace Name that you entered originally. Trace Name is useful only if you are running multiple traces simultaneously and need to distinguish between them more easily. The Trace Name is used as the window title.&lt;br /&gt;If you have a trace definition that you like, you can save it as a template file. If you want to run the trace again in the future, you can create a new trace and select the template file that you saved. This saves you the trouble of having to go through all the properties each time you set up the events, data columns, and filters for your favorite traces.&lt;br /&gt;Create Your Own Custom Shortcuts in Query Analyzer&lt;br /&gt;Query Analyzer provides up to 12 keyboard shortcuts for quickly executing stored procedures in Query Analyzer. SQL Server provides three predefined shortcuts:&lt;br /&gt;Alt+F1—sp_help&lt;br /&gt;Ctrl+1—sp_who&lt;br /&gt;Ctrl+2—sp_lock&lt;br /&gt;You can view or modify these shortcuts, or even add your own by selecting the Customize option from the Tools menu. On the Custom tab, you can enter the name of the stored procedure in the Stored Procedure column next to the desired keyboard shortcut you want to use to execute that stored procedure. You might want to add your frequently executed procedures to the Custom menu to save you the trouble of having to type them every time you want to run them.&lt;br /&gt;Here's a bonus tip: if you have a word, data value, or comma-separated list of values highlighted when you invoke a keyboard shortcut, Query Analyzer passes the highlighted value(s) as parameters to the associated stored procedure.&lt;br /&gt;Use a Batch File to Save Time when Executing Command-Line Utilities&lt;br /&gt;SQL Server command-line utilities provide administrators with a set of powerful tools for tasks such as automating routine maintenance procedures and verifying client connectivity. A batch file, typically a text file with the .bat extension, can be a real timesaver when executing the command-line utilities. You can create the batch file in the same directory as your executable file and specify the appropriate parameters.&lt;br /&gt;One helpful technique: A PAUSE command at the end of the batch file allows you to view the results in the command prompt window before the window disappears.&lt;br /&gt;Connecting with ISQL Utility Using Named Instances&lt;br /&gt;According to the Books Online documentation, the ISQL utility (which is based on Db-Library) does not support named instances. Contrary to the documentation,you can connect with ISQLusing named instance, but you might encounter problems.&lt;br /&gt;If you do experience problems, one workaround is to set up an alias for the named instance using the Client Network utility. After this alias has been created, then the alias name can be used with the \S parameter in ISQL. Another alternative is to use OSQL, which does support named instances and all other SQL Server 2000 features.&lt;br /&gt;Windows 2000 Clients Can Use PathPing to Troubleshoot TCP/IP Connectivity Problems&lt;br /&gt;One way to verify that a client's ODBC connectivity is properly configured is to use the obdcping utility. However, there is another option for Windows 2000 clients. A new utility named PathPing is also available for troubleshooting TCP/IP connectivity problems. Given a target server name, this utility displays the computer name and IP address for each router as it moves toward its destination. If successfully connected to the destination server, the utility echoes reply packets (messages) to the client machine to indicate that TCP/IP connectivity exists.&lt;br /&gt;For Windows 9.x and NT clients, the Ping utility, which has less functionality, is available instead.&lt;br /&gt;Using the rebuildm Utility to Rebuild System Databases Requires Caution&lt;br /&gt;The rebuildm lets you rebuild system databases, including the master, msdb, and model databases that are shipped with SQL Server 2000. The rebuildm utility is typically used if the following situations exist:&lt;br /&gt;A current backup of the master database is unavailable. If the backup were available, the server would need to be started in single user mode first.&lt;br /&gt;Microsoft SQL Server 2000 cannot start because the master database is severely damaged.&lt;br /&gt;However, rebuildm needs to be used with extreme caution because it essentially copies the original versions of these databases over the copies that you have in your database. After rebuildm has been run, all of the information that you had in these databases prior to running rebuildm (including user database information, scheduled tasks, and default database settings) will be gone.&lt;br /&gt;Alternative Methods for Starting and Stopping Services&lt;br /&gt;Usually, SQL Server can be stopped and started easily from the EM console by right-clicking a server, which displays a pop-up window. The available options are to stop the server, which stops the SQL Server service and any dependent services, to pause the server, in which case the server remains running but no new connections are allowed, and to start the server in the case that the server has been stopped. If the server has been paused, then a Continue option appears in the pop-up menu to resume SQL server in a normal connection state.&lt;br /&gt;However, occasionally, Enterprise Manager and the taskbar Service Manager get confused as to what state the server is in and won't allow services to be stopped or started. In this case, go to the Services applet in the Control Panel, or use the net stop/net start commands to stop and restart the appropriate services.&lt;br /&gt;Change Server-Level Settings Cautiously&lt;br /&gt;Changing server-level settings affects all databases on the server and can adversely affect performance. When changing configuration options, consider the effect the change might have and carefully document your changes so they can be undone if required.&lt;br /&gt;Free Text Searches: CONTAINSsbm vs. FREETEXTsbm&lt;br /&gt;While the SQL engine does support basic text searches against specific columns, you may find this method too slow and inflexible. The Microsoft Full Text Search Services provides full text searching capabilities, which is useful for searching large text fields, such as movie reviews, book descriptions, or case notes. You can specify tables or entire databases that you want to index. When you use full text indexing to perform a search for text, your query will use either the CONTAINSsbm or FREETEXTsbm function.&lt;br /&gt;On the flip side, CONTAINS is a better performing function and returns more exact results. FREETEXT returns looser results based on the meaning of the search phrase you enter. It does this by finding alternate word forms in your queries. For example, FREE TEXT (*,'work independently') would match 'work independently",'Independent work preferred', and 'Independence in my work'.&lt;br /&gt;Run SQL Profiler to Trap SQL-EM Commands&lt;br /&gt;SQL Enterprise Manager interacts with SQL Server using standard Transact-SQL commands. For example, when you create a new database through the SQL-EM interface, behind the scenes it generates a CREATE DATABASE SQL command. Whatever you can do through SQL-EM, you can do with the Query Analyzer or even the command line ISQL or OSQL programs.&lt;br /&gt;If you're curious how EM is accomplishing something, you can run SQL Profiler to trap the commands that SQL-EM is sending to the server. You can use this technique to discover some interesting internals information. You can also use this tactic to capture SQL scripts, and then repeat tasks using the script instead of a few dozen interface clicks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7943215927546187588?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7943215927546187588/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7943215927546187588' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7943215927546187588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7943215927546187588'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/03/31-sql-server-tips-that-can-save-your.html' title='31 SQL Server Tips That Can Save Your Butt'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-3654788235586848994</id><published>2008-02-28T00:10:00.002+01:00</published><updated>2008-02-28T00:14:49.299+01:00</updated><title type='text'>Advantages of a 64-bit Environment</title><content type='html'>What are the performance advantages of migrating to a x64 plattform? This is of course a should know for a DBA! When should you do it? Why should you do it?&lt;br /&gt;&lt;br /&gt;Here is an article that explains the differences between x86 and x64.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/sql/techinfo/whitepapers/advantages-64bit-environment.mspx"&gt;http://www.microsoft.com/sql/techinfo/whitepapers/advantages-64bit-environment.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stefan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-3654788235586848994?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/3654788235586848994/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=3654788235586848994' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3654788235586848994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/3654788235586848994'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/advantages-of-64-bit-environment.html' title='Advantages of a 64-bit Environment'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-8951025961824702780</id><published>2008-02-26T23:27:00.003+01:00</published><updated>2008-02-27T00:20:31.286+01:00</updated><title type='text'>Event Id 10016 Source DCOM</title><content type='html'>After changing the account for running the sqlserveragent service I got the following error:&lt;br /&gt;&lt;br /&gt;The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID&lt;br /&gt;{ABF05265-635E-44B0-A28F-AEA45247ACA0}&lt;br /&gt;to the user domain\sqlserveragent SID (S-1-5-21-3925573443-80846547-1646150170-2122). This security permission can be modified using the Component Services administrative tool.&lt;br /&gt;&lt;br /&gt;The key {ABF05265-635E-44B0-A28F-AEA45247ACA0} is a little difficult to read in my eyes, however search for it in the registry and you will get a readable name of the dcom service that you need to change.&lt;br /&gt;&lt;br /&gt;The solution was the following:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Click start and run and write dcomcnfg and hit enter&lt;/li&gt;&lt;li&gt;Open component services/computers/my computer/dcom config&lt;/li&gt;&lt;li&gt;Right click MsDtsServer and choose properties&lt;/li&gt;&lt;li&gt;On the security tab click the button edit under launch and activation permissions&lt;/li&gt;&lt;li&gt;Add the user that runs sqlserveragent or the SQL server service. You should choose the one that leaves the error in the system log.&lt;/li&gt;&lt;li&gt;Give the user local launch permission and then you shouldn´t have the error in the logs.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I guess there are other scenarious where this could be applicable.&lt;/p&gt;&lt;p&gt;Stefan&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-8951025961824702780?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/8951025961824702780/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=8951025961824702780' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8951025961824702780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/8951025961824702780'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/event-id-10016-source-dcom.html' title='Event Id 10016 Source DCOM'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-629979403689729502</id><published>2008-02-25T23:26:00.003+01:00</published><updated>2008-02-26T00:02:19.636+01:00</updated><title type='text'>Good article series about AD</title><content type='html'>I love the articles on &lt;a href="http://www.petri.co.il/"&gt;http://www.petri.co.il/&lt;/a&gt; You can find this on MS but they aren´t at all as easy to understand as Daniels articles.&lt;br /&gt;&lt;br /&gt;These one are a must know, that a domain admin will have use for some day.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.petri.co.il/manually-undeleting-objects-windows-active-directory-ad.htm"&gt;Manually Undeleting Objects in Active Directory&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.petri.co.il/recovering-deleted-items-active-directory.htm"&gt;Recovering Deleted Items in Active Directory&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.petri.co.il/restore-windows-server-2003-active-directory.htm"&gt;How to Restore Windows Server 2003 Active Directory&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The following tips I have practised myself after a hardware failure on a DC and everything worked very well following the guide.&lt;br /&gt;&lt;a href="http://www.petri.co.il/delete_failed_dcs_from_ad.htm"&gt;How can I delete a failed Domain Controller object from Active Directory?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.petri.co.il/fix_unsuccessful_demotion.htm"&gt;How can I manually delete a server object from the Active Directory database in case of a bad DCPROMO procedure?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is really an easy one but I put some thought and consideration before I tried it. One example when this could be on the agenda is when you make a merge with another company and you have to follow some naming policy on the servers and workstations.&lt;br /&gt;&lt;a href="http://www.petri.co.il/windows_2003_domain_controller_rename.htm"&gt;How can I rename my Windows 2003 Domain Controllers?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is it for now.&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-629979403689729502?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/629979403689729502/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=629979403689729502' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/629979403689729502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/629979403689729502'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/good-article-series-about-ad.html' title='Good article series about AD'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-4071893462318322132</id><published>2008-02-21T21:54:00.004+01:00</published><updated>2008-02-21T22:08:54.427+01:00</updated><title type='text'>Storage Top 10 Best Practices</title><content type='html'>I was looking for some best practices for setting up and optimising SQL server and found this from MS.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspx"&gt;Storage Top 10 Best Practices&lt;br /&gt;&lt;/a&gt;Published: October 17, 2006&lt;br /&gt;Proper configuration of IO subsystems is critical to the optimal performance and operation of SQL Server systems. Below are some of the most common best practices that the SQL Server team recommends with respect to storage configuration for SQL Server.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Understand the IO characteristics of SQL Server and the specific IO requirements / characteristics of your application.&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;In order to be successful in designing and deploying storage for your SQL Server application, you need to have an understanding of your application’s IO characteristics and a basic understanding of SQL Server IO patterns. Performance monitor is the best place to capture this information for an existing application. Some of the questions you should ask yourself here are:&lt;/p&gt;&lt;p&gt;What is the read vs. write ratio of the application?&lt;br /&gt;&lt;br /&gt;What are the typical IO rates (IO per second, MB/s &amp;amp; size of the IOs)? Monitor the perfmon counters:&lt;br /&gt;1. Average read bytes/sec, average write bytes/sec&lt;br /&gt;2. Reads/sec, writes/sec&lt;br /&gt;3. Disk read bytes/sec, disk write bytes/sec&lt;br /&gt;4. Average disk sec/read, average disk sec/write&lt;br /&gt;5. Average disk queue length&lt;br /&gt;How much IO is sequential in nature, and how much IO is random in nature? Is this primarily an OLTP application or a Relational Data Warehouse application?&lt;br /&gt;To understand the core characteristics of SQL Server IO, refer to &lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqliobasics.mspx"&gt;SQL Server 2000 I/O Basics&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;More / faster spindles are better for performance&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Ensure that you have an adequate number of spindles to support your IO requirements with an acceptable latency.&lt;br /&gt;Use filegroups for administration requirements such as backup / restore, partial database availability, etc.&lt;br /&gt;Use data files to “stripe” the database across your specific IO configuration (physical disks, LUNs, etc.).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Try not to “over” optimize the design of the storage; simpler designs generally offer good performance and more flexibility.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Unless you understand the application very well avoid trying to over optimize the IO by selectively placing objects on separate spindles.&lt;br /&gt;Make sure to give thought to the growth strategy up front. As your data size grows, how will you manage growth of data files / LUNs / RAID groups? It is much better to design for this up front than to rebalance data files or LUN(s) later in a production deployment. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Validate configurations prior to deployment&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Do basic throughput testing of the IO subsystem prior to deploying SQL Server. Make sure these tests are able to achieve your IO requirements with an acceptable latency. SQLIO is one such tool which can be used for this. A document is included with the tool with basics of testing an IO subsystem. Download the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=9a8b005b-84e4-4f24-8d65-cb53442d9e19&amp;amp;displaylang=en"&gt;SQLIO Disk Subsystem Benchmark Tool&lt;/a&gt;.&lt;br /&gt;Understand that the of purpose running the SQLIO tests is not to simulate SQL Server’s exact IO characteristics but rather to test maximum throughput achievable by the IO subsystem for common SQL Server IO types.&lt;br /&gt;IOMETER can be used as an alternative to SQLIO. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Always place log files on RAID 1+0 (or RAID 1) disks. This provides:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;better protection from hardware failure, and better write performance. Note: In general RAID 1+0 will provide better throughput for write-intensive applications. The amount of performance gained will vary based on the HW vendor’s RAID implementations. Most common alternative to RAID 1+0 is RAID 5. Generally, RAID 1+0 provides better write performance than any other RAID level providing data protection, including RAID 5. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Isolate log from data at the physical disk level&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;When this is not possible (e.g., consolidated SQL environments) consider I/O characteristics and group similar I/O characteristics (i.e. all logs) on common spindles.&lt;br /&gt;Combining heterogeneous workloads (workloads with very different IO and latency characteristics) can have negative effects on overall performance (e.g., placing Exchange and SQL data on the same physical spindles). &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Consider configuration of TEMPDB database&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Make sure to move TEMPDB to adequate storage and pre-size after installing SQL Server.&lt;br /&gt;Performance may benefit if TEMPDB is placed on RAID 1+0 (dependent on TEMPDB usage).&lt;br /&gt;For the TEMPDB database, create 1 data file per CPU, as described in #8 below. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Lining up the number of data files with CPU’s has scalability advantages for allocation intensive workloads.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;It is recommended to have .25 to 1 data files (per filegroup) for each CPU on the host server.&lt;br /&gt;This is especially true for TEMPDB where the recommendation is 1 data file per CPU.&lt;br /&gt;Dual core counts as 2 CPUs; logical procs (hyperthreading) do not. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Don’t overlook some of SQL Server basics&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Data files should be of equal size – SQL Server uses a proportional fill algorithm that favors allocations in files with more free space.&lt;br /&gt;Pre-size data and log files.&lt;br /&gt;Do not rely on AUTOGROW, instead manage the growth of these files manually. You may leave AUTOGROW ON for safety reasons, but you should proactively manage the growth of the data files. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Don’t overlook storage configuration bases&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Use up-to-date HBA drivers recommended by the storage vendor&lt;br /&gt;Utilize storage vendor specific drivers from the HBA manufactures website&lt;br /&gt;Tune HBA driver settings as needed for your IO volumes. In general driver specific settings should come from the storage vendor. However we have found that Queue Depth defaults are usually not deep enough to support SQL Server IO volumes.&lt;br /&gt;Ensure that the storage array firmware is up to the latest recommended level.&lt;br /&gt;Use multipath software to achieve balancing across HBA’s and LUN’s and ensure this is functioning properly&lt;br /&gt;Simplifies configuration &amp;amp; offers advantages for availability&lt;br /&gt;Microsoft Multipath I/O (MPIO): Vendors build Device Specific Modules (DSM) on top of Driver Development Kit provided by Microsoft.&lt;br /&gt;&lt;/p&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-4071893462318322132?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/4071893462318322132/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=4071893462318322132' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4071893462318322132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4071893462318322132'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/storage-top-10-best-practices.html' title='Storage Top 10 Best Practices'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-1256074503672599235</id><published>2008-02-18T22:13:00.003+01:00</published><updated>2008-02-18T22:32:53.148+01:00</updated><title type='text'>Shrink the database or the databasefiles?</title><content type='html'>&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Shrinking the database or the database files is one thought that will struck any dba at some time. The reasons can vary but some time the available disk space will come as an variable.&lt;br /&gt;&lt;br /&gt;Tibor Karaszi has a good article why you should be restrictive with shrinking the database. His thoughts are logical and he should know what he´s talking about as he became the the 7th SQL Server MVP in the world 1999. Here´s the &lt;a href="http://www.karaszi.com/SQLServer/info_dont_shrink.asp"&gt;link&lt;/a&gt; to the article.&lt;br /&gt;&lt;br /&gt;However in certain situations it´s ok to shrink the db files, for example when you have made an bulk insert or some kind of upgrade of the database that uses the logfile more than the daily work does.&lt;br /&gt;&lt;br /&gt;We have just made an upgrade to the newest version of our software and that included a lot of conversion of the historic database, and therefore the logfile grew to 17Gb instead of 100Mb. In this case it is not only OK to shrink the file, it is in my opinion recommended.&lt;br /&gt;&lt;br /&gt;As you see you can newer say that shrinking the database is wrong, you must always take other actions in consideration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-1256074503672599235?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/1256074503672599235/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=1256074503672599235' title='1 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1256074503672599235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1256074503672599235'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/shrink-database-or-databasefiles.html' title='Shrink the database or the databasefiles?'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6322297584159779924</id><published>2008-02-18T00:22:00.001+01:00</published><updated>2008-02-18T00:26:03.029+01:00</updated><title type='text'>Optimize disk configuration in SQL Server</title><content type='html'>This article was found on &lt;a href="http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1287710,00.html"&gt;http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1287710,00.html&lt;/a&gt;#&lt;br /&gt;&lt;br /&gt;Optimize disk configuration in SQL Server&lt;br /&gt;&lt;a name="goTOC"&gt;&lt;/a&gt;&lt;br /&gt;One of the easiest ways to improve the lifetime performance of a SQL Server database is proper setup of the physical and logical drives. While it's an easy technique, proper disk subsystem configuration is often overlooked or handled by a member of the IT staff other than a SQL Server DBA. All too often the disk subsystem, including the disk array, is configured based only on storage capacity, with no question of drive performance. Let's go beyond storage capacity requirements and design for drive performance.&lt;br /&gt;Tips for optimizing disk configuration in SQL Server&lt;br /&gt;&lt;a href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#grow"&gt;Storage specific terms that everyone should know&lt;/a&gt; &lt;a href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#database"&gt;What's the best RAID level for your system?&lt;/a&gt; &lt;a href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#trace"&gt;Best practices for drive and physical file layout configuration&lt;/a&gt; &lt;a href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#monitoring"&gt;Drive layout examples for SQL Server systems &lt;/a&gt;&lt;br /&gt;&lt;a name="grow"&gt;&lt;/a&gt;&lt;br /&gt;Storage specific terms that everyone should know&lt;br /&gt;&lt;a class="nav" href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#goTOC"&gt;Return to Table of Contents&lt;/a&gt;&lt;br /&gt;Before you sit down with a storage administrator or engineer to map out your plans for disk configuration, here are basic preparation steps to take. Start by getting familiar with the terms below and communicate your requirements much easier.&lt;br /&gt;RAID – Redundant Array of Inexpensive Disks, also known as Redundant Array of Independent Disks.&lt;br /&gt;Disk subsystem – A general term that refers to the disks on the server.&lt;br /&gt;Spindle – Spindles are another way to refer to the physical disk drives that make up the RAID array.&lt;br /&gt;I/O Ops – Input/Output operations, usually measured per second.&lt;br /&gt;Queuing – Number of I/O Ops that are pending completion by the disk subsystem.&lt;br /&gt;SAN – Storage area networks are collections of storage devices and fibre switches connected together along with the servers that access the storage on the device. SAN has also become a generic term, which refers to the physical storage drives such as EMC, 3PAR and Hitachi.&lt;br /&gt;LUN – Logical Unit Number – This is the identification number assigned to a volume when created on a SAN device.&lt;br /&gt;Physical drive – How Windows sees any RAID array, single drive or LUN that is attached to the server.&lt;br /&gt;Logical drive – How Windows presents drives to the user (C:, D:, E:, etc.).&lt;br /&gt;Block size – The amount of data read from the spindles in a single read operation. This size varies per vendor from 8 KB to 256 MB.&lt;br /&gt;Hardware array – A RAID array created using a physical RAID controller.&lt;br /&gt;Software array – A RAID array created within Windows using the computer management snap-in.&lt;br /&gt;Hot spare – A spindle that sits in the drive cage and is added to the array automatically in the event of a drive failure. While this does not increase capacity, it does reduce the amount of time that the array is susceptible to data loss because of a second failed drive.&lt;br /&gt;Recovery time – Amount of time needed for the RAID array to become fully redundant after a failed drive has been replaced, either manually or automatically via a hot spare.&lt;br /&gt;&lt;a name="database"&gt;&lt;/a&gt;&lt;br /&gt;What's the best RAID level for your system?&lt;br /&gt;&lt;a class="nav" href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#goTOC"&gt;Return to Table of Contents&lt;/a&gt;&lt;br /&gt;There are many RAID levels available on modern RAID controllers. Only a subset of these is most useful when configuring a Microsoft SQL Server. Each RAID level has a specific use and benefit. Using the wrong type of RAID level can not only hurt system performance, but also add more cost to your server configuration. Experts recommend that you never use software arrays on a database server. Use of software arrays requires additional CPU power from Windows in order to calculate which physical disk the data is written to. In hardware arrays, this overhead is offloaded to a physical PCI, PCIe or PCIx card within the computer (or within the SAN device), which has its own processor and software dedicated to this task.&lt;br /&gt;RAID 1 – Mirror. A RAID 1 array is most useful for high write files, such as the page file, transaction logs and tempdb database. A RAID 1 array takes two physical disks and creates an exact duplicate of the primary drive on the backup drive. There is no performance gain or loss when using a RAID 1 array. This array can survive a single drive failure without incurring any data loss.&lt;br /&gt;RAID 5 – Redundant Stripe Set. A RAID 5 array is most useful for high read files such as the database files (mdf and ndf files) and file shares. It is the most cost-effective, high-speed RAID configuration. With a RAID 5 array, there is a performance impact while writing data to the array because a parity bit must be calculated for each write operation performed. For read performance, the basic formula is (n-1)*o where n is the number of disks in the RAID 5 array and o is the number of I/O operations each disk can perform. Note: While this calculation is not perfectly accurate, it is generally considered close enough for most uses. A RAID 5 array can survive a single drive failure without incurring any data loss.&lt;br /&gt;RAID 6 – Double Redundant Stripe Set. Like a RAID 5 array, a RAID 6 array is most useful for high read files such as the database and file shares. With RAID 6, there is also a performance impact while writing data to the array because two parity bits must be calculated for each write operation performed. The same basic formula is used to calculate the potential performance of the drives (n-2)*o. A RAID 6 array can survive two drive failures without incurring any data loss.&lt;br /&gt;Because of the dual parity bits with RAID 6, it is more expensive to purchase than a RAID 5 array. However, RAID 6 offers a higher level of protection than RAID 5. When choosing between RAID 5 and RAID 6, consider the length of time to rebuild your array, potential loss of a second drive during that rebuild time, and cost.&lt;br /&gt;RAID 10 – Mirrored Strip Sets. A RAID 10 array is most useful for high read or high write operations. RAID 10 is extremely fast; however, it is also extremely expensive (compared to the other RAID levels available). In basic terms, a RAID 10 array is several RAID 1 arrays stripped together for performance. As with a RAID 1 array, as data is written to the active drive in the pair, it is also written to the secondary drive in the pair. A RAID 10 array can survive several drive failures so long as no two drives in a single pair are lost.&lt;br /&gt;RAID 50 – Stripped RAID 5 Arrays. A RAID 50 array is an extremely high-performing RAID array useful for very high-load databases. This type of array can typically only be done in a SAN environment. Two or more RAID 5 arrays are taken and stripped together and data is then written to the various RAID 5 arrays. While there is no redundancy between RAID 5 arrays, it's unnecessary because the redundancy is handled within the RAID 5 arrays. A RAID 50 array can survive several drive failures so long as only a single drive per RAID 5 array fails.&lt;br /&gt;&lt;a name="trace"&gt;&lt;/a&gt;&lt;br /&gt;Best practices for drive and physical file layout configuration&lt;br /&gt;&lt;a class="nav" href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#goTOC"&gt;Return to Table of Contents&lt;/a&gt;&lt;br /&gt;With the introduction of larger and larger hard drives, storage administrators have been presented with a new issue: increased recovery times. In the past, 172 GB drives were the standard size deployed. Even if you had five drives in a RAID 5 array, the total storage of the array was only ~688 Gigs. At that size, recovery from a failed drive would take only hours. With those five drives now closing in on the 1TB mark per drive, they now create a 4 TB array. This larger array could take up to a day to recover (depending on system load, disk speed and so on).&lt;br /&gt;Because of increased recovery time and, therefore, increased risk of data loss, it is recommended that smaller disks be used in greater numbers. Instead of a single 2 TB array, use smaller drives and make several 500 GB arrays. Not only will this improve your recovery time, but your system performance will increase, too, as you now have many more disks in your arrays. Whenever possible, connect each RAID array to its own RAID controller. That will minimize the possibility of overloading the RAID controller with I/O operations.&lt;br /&gt;When setting up your disk subsystems, there are five basic groups of files to keep in mind. These are the data files (mdf and ndf files), log files (ldf files), tempdb database, the SQL Server binaries (files that are the actual SQL Server software) and Windows. Windows and&lt;br /&gt;More on storage and disk arrays topics in SQL Server:&lt;br /&gt;&lt;a href="http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1192794,00.html"&gt;Configure RAID for maximum SQL Server I/O throughput&lt;/a&gt;&lt;br /&gt;&lt;a href="http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1213487,00.html"&gt;SAN considerations for your SQL Server environment&lt;/a&gt;&lt;br /&gt;the SQL binaries will perform nicely on a single RAID 1 array, which should include the Windows page file. Note: Although it can be moved to another RAID 1 array, it's not necessary and will not provide any additional performance benefit.&lt;br /&gt;Data files should be placed on one or more RAID 5 or RAID 6 arrays (based on system needs). In certain systems, you should place the data files on RAID 1 or RAID 10 arrays, but those systems are in the minority. Place the transaction log files on one or more RAID 1 or RAID 10 arrays (again, based on size and performance needs). The tempdb database should be placed on its own RAID 1 or RAID 10 array. None of these file groups (other than Windows and the SQL binaries) should share physical drives. By separating your files into these groups, you will see a definite improvement in performance.&lt;br /&gt;To determine the number of spindles, you need to first know a few things about your hardware and your database and application. For the hardware, find out the number of IOPs each physical drive can handle. For the application, you need to know the typical high watermark that your database will need to function. The number of spindles you have times the number of IOPs that each drive can handle must be higher than the high watermark number of IOPs that your database requires.&lt;br /&gt;&lt;a name="monitoring"&gt;&lt;/a&gt;&lt;br /&gt;Drive layout examples for SQL Server systems&lt;br /&gt;&lt;a class="nav" href="http://searchsqlserver.techtarget.com/tip/0,,sid87_gci1262122,00.html?track=top10_tips_2007#goTOC"&gt;Return to Table of Contents&lt;/a&gt;&lt;br /&gt;Now that we have covered the basics, let's put all this information together and look at some server drive layouts. These systems all have a RAID 1 drive holding the Operating System, page file and SQL Server binaries:&lt;br /&gt;The small database server. This would be a database system having a small number of users and a low number of transactions per second. For a system of this type, putting the data files, transaction logs and tempdb database on a single RAID 5 array will be fine. With a load this low, there should be minimal to no performance loss because of having the files on the same array.&lt;br /&gt;The medium database server. This would be a system that has a larger number of users and no more than 100 transactions per second. At this system size, you will begin to separate parts of the database. Start by separating the database files and log files onto different RAID arrays. The tempdb database can probably remain on the same array as the database files. But, if the tempdb database is heavily used for things like lots of temporary table usage, it should be moved to its own drive array.&lt;br /&gt;The large database server. This system is for hundreds of users and hundreds or thousands of transactions per second. When designing systems of this size, break apart not only the database files, log files and tempdb database files, but also want database into smaller data files on multiple drives. This includes moving the indexes to separate files on RAID 1 or RAID 5 arrays, moving blob data (data stored in TEXT, NTEXT, IMAGE, VARCHAR(MAX) and NVARCHAR(MAX) data types) to a separate RAID 5 array. You can also place different types of tables on different drives by assigning them to different file groups.&lt;br /&gt;It is recommended that for larger systems, each file group of the database should have between .25 to one physical file per physical CPU core in the server. The tempdb database should have one data file per physical CPU core in the server.&lt;br /&gt;It is highly recommended that all partitions are configured by using the DISKPAR (Windows 2000) or DISKPART (Windows 2003) commands. When using DISKPAR, adjust the alignment by 512 bytes, and when using DISKPART, the disk should be aligned to 64. The reason for this is due to the original master boot record design of WinTel based systems. The master boot record for all drives is 63 blocks (1 block = 512 bytes).&lt;br /&gt;The physical disks want to read and write data in 64 block chunks. Because the master boot record is only 63 blocks, this puts the first block of actual data in block location 64, where it should be in block location 65. That forces the disk to read 128 blocks for each 64 blocks read to the disk, thereby increasing the work needed to be done and decreasing performance.&lt;br /&gt;&lt;br /&gt;It is so highly recommended that volumes be created with this 64 block offset that Microsoft is including this procedure as the standard when creating partitions starting in Microsoft Windows 2008 Server. There are no published figures on what sort of performance improvement will be seen by creating your disks using this method. It's because any numbers would be relevant to only the system they were taken against, as all databases are different. Unfortunately, once a partition has been created without the alignment offset, there is no easy way to change the offset. The only method for doing that is to create a new volume and partition with the offset, take down the SQL Server and manually migrate the files to the new drive in an offline manor.&lt;br /&gt;When designing larger database servers, it is important to pay careful attention to the disk configuration. An improperly laid out disk configuration can easily have an adverse impact on your database performance.&lt;br /&gt;Even though laying out the disk subsystem of a SQL Server appears to be a simple task, take great care to get the maximum amount of performance from your drive subsystem. A poorly configured array can and will have a detrimental effect on the performance of your database system. When planning and purchasing your storage hardware, think not only of the capacity, but also about the amount of I/O operations that the disks will need to handle -- not only today, but far into the future. Proper planning will give you a high-performing SQL Server today and years from now. When designing a system, your goal should be that it performs well beyond the expected lifetime of the hardware it resides on.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6322297584159779924?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6322297584159779924/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6322297584159779924' title='1 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6322297584159779924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6322297584159779924'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/optimize-disk-configuration-in-sql.html' title='Optimize disk configuration in SQL Server'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-4979691426670297700</id><published>2008-02-17T10:06:00.004+01:00</published><updated>2008-02-17T12:27:07.840+01:00</updated><title type='text'>How can I add the Internet Explorer icon back to the Windows Vista desktop?</title><content type='html'>&lt;p&gt;To add the Internet Explorer icon back to the Windows Vista desktop follow these steps:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Open Registry Editor.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In Registry Editor, navigate to the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel&lt;/li&gt;&lt;li&gt;Create the following key (DWORD 32-bit): &lt;/li&gt;&lt;li&gt;{871C5380-42A0-1069-A2EA-08002B30309D} (just copy/paste, including the brackets)&lt;/li&gt;&lt;li&gt;Close Registry Editor. There is no need to reboot. Just wait a few seconds and see how the icon appears. Maybee you have to press F5 to update the desktop.&lt;/li&gt;&lt;li&gt;Done!&lt;/li&gt;&lt;/ol&gt;Note: As always, before making changes to your registry you should always make sure you have a valid backup. In cases where you're supposed to delete or modify keys or values from the registry it is possible to first export that key or value(s) to a .REG file before performing the changes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-4979691426670297700?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/4979691426670297700/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=4979691426670297700' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4979691426670297700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4979691426670297700'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/how-can-i-add-internet-explorer-icon.html' title='How can I add the Internet Explorer icon back to the Windows Vista desktop?'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-4018946850658179518</id><published>2008-02-15T22:11:00.003+01:00</published><updated>2008-02-16T00:14:25.350+01:00</updated><title type='text'>Windows server sp2 on cluster</title><content type='html'>I need to upgrade a w2k3 cluster to sp2 and researched any potential problems. I found a potential problem with the ms dtc service. I have read a lot of postings and kb´s but no one is 100% clear. The supported solution seems to make the ms dts service a clustered resource even if you don´t need it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Steps to enable network DTC access&lt;br /&gt;1. Click Start, point to Control Panel, and then click Add or Remove Programs.&lt;br /&gt;2. Click Add/Remove Windows Components.&lt;br /&gt;3. Select Application Server, and then click Details.&lt;br /&gt;4. Select Enable network DTC access, and then click OK.&lt;br /&gt;5. Click Next.&lt;br /&gt;6. Click Finish.&lt;br /&gt;7. Restart the computer.&lt;br /&gt;&lt;br /&gt;If you are running Windows Server 2003 Service Pack 1 (SP1), you must follow these additional steps:&lt;br /&gt;1. In Control Panel, open "Component services".&lt;br /&gt;2. Expand Component Services, expand Computers, right-click My Computer, and then click Properties.&lt;br /&gt;3. On the MSDTC tab, click Secuity Configuration under Transaction Configuration, click to select the Network DTC Access check box under Secuity Settings, and then click to select the following check boxes under Transaction Manager Communication: . Allow Inbound . Allow Outbound&lt;br /&gt;4. You cannot select Mutual Authentication Required. Therefore, click to select one of the following check boxes: . Incoming Caller Authentication Required . No Authentication Required Note For more information about these options, click the following article number to view the article in the Microsoft Knowledge Base: 899191 (&lt;a class="WNAnc" href="http://support.microsoft.com/kb/899191/" target="winout"&gt;http://support.microsoft.com/kb/899191/&lt;/a&gt;) New functionality in the Distributed Transaction Coordinator service in Windows Server 2003 Service Pack 1 and in Windows XP Service Pack 2 5. Make sure that the Logon Account is set to NTAUTHORITY\NetworkService.&lt;br /&gt;6. Click OK. A message box explains that the MS DTC Service will be stopped and restarted, and that all dependent services will also be stopped and restarted. Click Yes. Note If this is a Majority Node Set (MNS) cluster, do not use the MNS resource as the storage device for MS DTC. MS DTC requires a storage resource such as a physical disk.&lt;br /&gt;7. Restart the computer.This section documents how to install MS DTC through Cluster Administrator on all nodes in a cluster. You only have to install the MS DTC once in Cluster Administrator and MSDTC will be configured on all nodes in the cluster. You do not have to install MS DTC manually on each node.&lt;br /&gt;&lt;br /&gt;1. Start Cluster Administrator. To do so: a. Click Start, and then point to All Programs b. In Administrative Tools, click Cluster Administrator.&lt;br /&gt;2. Create a Group Named "MSDTC Group" that contains a Physical Disk, Network Name, and an IP Address. To do so: a. In the File Menu select New, and then click Group. The New Group Wizard is available. b. Follow the instructions that the New Group Wizard provides to create the MSDTC Group. Note When creating the MS DTC, moving the resource group into a group other than SQL Server or Exchange Server group is highly recommended. Creating the MS DTC resource in its own resource group and assigning it to a separate cluster group keeps the resource highly available. Note If you create the resource in the same cluster group, and if Resource A has failed over, Resource B will also failover. When you create the resouce in a different cluster group, even when Resource A has failed over, the resource B does not failover. Creating Cluster Resouces in the different cluster groups decreases unnecessary failovers of the Cluster Resouces. Important After the new group for MS DTC is created you must create the Network Name, IP address and Physical Disk for Msdtc. You may already have the physical disk resource that can be moved into the new group. After the MS DTC Group is created you must create the IP address resource, Network Name resource and the Physical disk resources. You may already have a physical disk resource that must be moved into the new MS DTC group. 3. Create an IP address resource: a. Right-click the MS DTC group, and then click New\Resource. b. Type a descriptive name such as MSDTC IP Address. c. In Resource Type, click IP Address, click to select the MSDTC Group check box, and then click Next. d. In Possible Owners, click Next unless you do not want MS DTC to run on a particular node. e. In Dependencies, do not add any dependencies, and then click Next. f. In TCP/IP Address Parameters, select the public network, type the unique static IP address for MS DTC, and then click Next. g. Click Finish, and then click OK to confirm that the resource has been created.&lt;br /&gt;4. Create a Network Name resource: a. Right-click the MS DTC group, and then click New\Resource. b. Type a descriptive name such as MSDTC Network name. c. In Resource Type, click Network name, click to select the MSDTC Group check box, and then click Next. d. In Possible Owners, click Next unless you do not want MS DTC to run on a particular node. e. In Dependencies, add the MS DTC IP address as a resource dependency, and then click Next. f. In Name, type the network name for the MS DTC resource, and then click Next. g. Click Finish, and then click OK to confirm that the resource has been created.&lt;br /&gt;5. Create a "Physical disk" resource. Note You may already have a physical disk resource created. If so, you will have to move this physical disk resource into the MS DTC group and go to the next step. a. Right-click the MS DTC group, and then click New\Resource. b. Type a descriptive name such as MSDTC Physical disk. c. In Resource Type, click Physical disk, click to select the MSDTC Group check box, and then click Next. d. In Possible Owners, click Next unless you do not want MS DTC to run on a particular node. e. In Dependencies, do not add any dependencies, and then click Next. f. In Disk Parameters, click the physical disk that you will use for MS DTC. g. Click Finish, and then click OK to confirm that the resource has been created.&lt;br /&gt;6. Right-click the MS DTC Group, and then click New\Resource.&lt;br /&gt;7. Type a name, such as MSDTC Resource.&lt;br /&gt;8. In Resource Type, click to select Distributed Transaction Coordinator, verify that the MSDTC Group is selected, and then click Next.&lt;br /&gt;9. In Possible Owners, click Next unless you do not want MS DTC to run on a particular node. 10. In Dependencies, press and hold the CTRL key on the keyboard, select both the Physical Disk and Network Name that you created in step 2, and then click the Add button.&lt;br /&gt;11. Click Finish, and then click OK to confirm that the resource has been created. Note You should not put the MS DTC resource online before you follow the instructions in Microsoft Knowledge Base article 817064 to enable Network DTC Access.&lt;br /&gt;12. Complete the steps that are documented in Knowledge Base article 817064. 13. Right-click the MSDTC Resource, and then click Bring Online.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-4018946850658179518?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/4018946850658179518/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=4018946850658179518' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4018946850658179518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4018946850658179518'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/windows-server-sp2-on-cluster.html' title='Windows server sp2 on cluster'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-1419027906729935810</id><published>2008-02-15T13:49:00.003+01:00</published><updated>2008-02-15T13:52:08.735+01:00</updated><title type='text'>Failed SQL 2005 installation</title><content type='html'>When trying to install SQL 2005 from disk you can get the following error: “There was an unexpected failure during the setup wizard” - Error 1603&lt;br /&gt;&lt;br /&gt;A workaround for this is attached below.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Solution:To work around this problem, set the folders in the correct layout for the SQL Server 2005 installation. The SQL Server 2005 installation uses the following two folders:&lt;br /&gt;Servers&lt;br /&gt;Tools&lt;br /&gt;These two folders must be under the same level of a folder or the root folder of a drive. The names of these folders must be exactly Servers and Tools. The Servers folder contains all the files that are required to install major SQL Server 2005 components, such as database engine. The Tools folder contains tools components and Books Online for SQL Server 2005.Then try installing sql from the path\servers\setup.exeSP2 fails to install database services - MSP Error: 29512 “Unable to install Windows Installer MSP file”Error Snippet : MSP Error: 29512 SQL Server Setup was unable add user Clusteruser@FQDN (where FQDN is the actual fully qualified domain name - abbreviated here for security) to local group DOMAIN\SQL2005SQLAgents (where DOMAIN is the actual name of the domain). MSP returned 1603: A fatal error occurred during installation.&lt;br /&gt;Solution: &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;926622"&gt;KB 926622 &lt;/a&gt;– This article is for SP1 and also applicable to SP2 also.To install SP2, try creating the following path, and restart SP2 setup:DRIVE:\Microsoft SQL Server\MSSQL.2\MSSQL\FTData&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-1419027906729935810?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/1419027906729935810/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=1419027906729935810' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1419027906729935810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/1419027906729935810'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/failed-sql-2005-installation.html' title='Failed SQL 2005 installation'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-7646990860002953506</id><published>2008-02-14T10:02:00.003+01:00</published><updated>2008-02-14T11:43:47.526+01:00</updated><title type='text'>Optimizing SQL Server CPU Performance</title><content type='html'>&lt;a href="http://www.microsoft.com/technet/technetmag/issues/2007/10/SQLCPU/default.aspx"&gt;Optimizing SQL Server CPU Performance&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An interesting article when you have cpu problems on SQL server. Will test this in our environment as soon as possible and see if it gives any effect. For the moment we have peaks on the Context Switches/sec up to 4.5 millions on one system.&lt;br /&gt;&lt;br /&gt;Hyper-Threading&lt;br /&gt;Hyper-threading is a topic that is worth discussing a bit more because of the way that it affects SQL Server. Hyper-threading actually presents two logical processors to the OS for each physical processor. Hyper-threading essentially leases time on the physical processors so that each processor ends up more fully utilized. The Intel Web site (intel.com/technology/platform-technology/hyper-threading/index.htm) gives a far fuller description of how hyper-threading works.&lt;br /&gt;&lt;br /&gt;On SQL Server systems, the DBMS actually handles its own extremely efficient queuing and threading to the OS, so hyper-threading only serves to overload the physical CPUs on systems with already high CPU utilization. When SQL Server queues multiple requests to perform work on multiple schedulers, the OS has to actually switch the context of the threads back and forth on the physical processors to satisfy the requests that are being made even if the two logical processors are sitting on top of the same physical processor. If you are seeing Context Switches/sec higher than 5000 per physical processor you should strongly consider turning off hyper-threading on your system and retesting performance.&lt;br /&gt;&lt;br /&gt;In rare cases, applications that experience high CPU utilization on SQL Server can effectively use hyper-threading. Always test your applications against SQL Server with hyper-threading both turned on and off before implementing changes on your production systems.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-7646990860002953506?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/7646990860002953506/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=7646990860002953506' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7646990860002953506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/7646990860002953506'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/hyper-threading-and-sql.html' title='Optimizing SQL Server CPU Performance'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6411789767659481980</id><published>2008-02-12T20:59:00.000+01:00</published><updated>2008-02-12T21:39:49.474+01:00</updated><title type='text'>Boost SQL server</title><content type='html'>We had some performance problems with a SQL server for a while ago, and was looking for a way to tweak it a little bit. I found a couple of ways and will share it here.&lt;br /&gt;&lt;br /&gt;The data had grown from 10GB a couple of years ago up to 35Gb at present. It shouldn´t be a problem to handle this by the hardware used, but the querys used by the application were poorly written and generated extremely big reads and that caused the cpu to go on 100% most of the time. The only explanation we have found is that the db crossed some magical size and started to cause the problems. The vendor were of course contacted and was aware of some of the problems and worked on getting the querys optimised.&lt;br /&gt;&lt;br /&gt;The first one was to give SQL server access to more memory and using the /3GB switch in boot.ini. That means that windows release 1GB extra for applications, so in that way SQL server can gain access to 1GB extra. For this to work you must have at least 4GB RAM in the server. A guide about the boot.ini options you can find &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb963892.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One other thing we did was reserving physical memory for the SQL server. This is done by right clicking the SQL server and choose properties. Click on the memory tab and tick the box "reserve physical memory for SQL server". Both these tips will need a reboot.&lt;br /&gt;&lt;br /&gt;Defragmenting the disks whiped out the problem with a little to high "average disk queue length" that we also had. Defragmenting and reindex of the database is also strongly suggested.&lt;br /&gt;&lt;br /&gt;The root problem were to much data in the db and a poorly written application that were to much for the hardware used. When we installed a new cpu the problem is under control, so we can plan and purchase a new hardware configuration.&lt;br /&gt;&lt;br /&gt;This were a couple of nervous and intense days.&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6411789767659481980?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6411789767659481980/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6411789767659481980' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6411789767659481980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6411789767659481980'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/boost-sql-server.html' title='Boost SQL server'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6703572020928043963</id><published>2008-02-12T20:50:00.000+01:00</published><updated>2008-02-12T20:59:18.689+01:00</updated><title type='text'>Temporarily Bypass Windows Server 2008 and Windows Vista Activation</title><content type='html'>I was playing around with Vista on a virtual machine for a couple of weeks ago, but I didn´t have the time to get really serious. The VM was shut down and the next time I wanted to use it the grace period for activation was over. The only thing that worked was activating it on the internet.&lt;br /&gt;I needed to change the network settings to gain access to the internet for activation. Searching around the internet to find a way to bypass the activation I found &lt;a href="http://blogs.microsoft.co.il/blogs/danielp/archive/2008/01/29/temporarily-bypass-windows-server-2008-and-windows-vista-activation.aspx"&gt;this&lt;/a&gt;. Of course you should activate and use a legally bought license, but this is a way to have it working so you can activate it on the internet.&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6703572020928043963?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6703572020928043963/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6703572020928043963' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6703572020928043963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6703572020928043963'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/temporarily-bypass-windows-server-2008.html' title='Temporarily Bypass Windows Server 2008 and Windows Vista Activation'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-4063237260949784695</id><published>2008-02-12T10:06:00.000+01:00</published><updated>2008-02-12T10:09:42.676+01:00</updated><title type='text'>How to remove data in Active Directory after an unsuccessful domain controller demotion</title><content type='html'>This is a very good article when the accident has already happened and one of the dc´s have gone south. &lt;a href="http://support.microsoft.com/kb/216498"&gt;How to remove data in Active Directory after an unsuccessful domain controller demotion&lt;/a&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;Have done it myself one time and it did work perfectly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-4063237260949784695?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/4063237260949784695/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=4063237260949784695' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4063237260949784695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/4063237260949784695'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/how-to-remove-data-in-active-directory.html' title='How to remove data in Active Directory after an unsuccessful domain controller demotion'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-6350854449273157713</id><published>2008-02-11T23:56:00.001+01:00</published><updated>2008-02-12T00:00:30.525+01:00</updated><title type='text'>Change ipaddress on domain controller</title><content type='html'>I don´t know where I found this one but it can become handy some day when the boss gets the idea of changing the internal ip-plan.&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;Changing your IP address on an Active Directory domain controller can cause many issues with the DNS server on that machine. To&lt;br /&gt;change the IP address, complete the following steps:&lt;br /&gt;Select: Start -&gt; Settings -&gt; Network and Dial Up Connections&lt;br /&gt;Select: Your Local Area Connection&lt;br /&gt;Select: Internet Connections (TCP/IP) Properties&lt;br /&gt;Change: Your IP Address and Subnet Mask and Gateway&lt;br /&gt;Change: Preferred DNS server's address to the new server address&lt;br /&gt;Select: OK -&gt; OK -&gt; Close&lt;br /&gt;Your server's address is now changed.&lt;br /&gt;Select: Start -&gt; Programs -&gt; Administrative Tools -&gt; DNS&lt;br /&gt;Double click Forward Look Up Zones. Then double click your server name.&lt;br /&gt;Delete: Your type A records&lt;br /&gt;Reset your information in your SOA and NS records and exit DNS. Now drop down to an MS-DOS&lt;br /&gt;prompt and type the following:&lt;br /&gt;ipconfig /flushdns Enter&lt;br /&gt;Net Stop DNS Enter&lt;br /&gt;Net Start DNS Enter&lt;br /&gt;Net Stop Netlogon Enter&lt;br /&gt;Net Start Netlogon Enter&lt;br /&gt;ipconfig /registerdns Enter&lt;br /&gt;You can now go back to DNS and make sure the records were all created and they should have changed the address to the correct address&lt;br /&gt;on their own.&lt;br /&gt;Now run NSLookup from an MS-DOS prompt and see if all is resolved OK or not. It the names and IP addresses all resolve correctly,&lt;br /&gt;you're all set. If not, then go back to NSLookup and type set root=servername (the name of your DNS domain) and hit Enter. When the&lt;br /&gt;prompt returns, type exit to exit out of NSLookup. When you type NSLookup, it should resolve the name correctly.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var pageTracker = _gat._getTracker("UA-3614867-1");&lt;br /&gt;pageTracker._initData();&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-6350854449273157713?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/6350854449273157713/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=6350854449273157713' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6350854449273157713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/6350854449273157713'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/change-ipaddress-on-domain-controller.html' title='Change ipaddress on domain controller'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496842446504515815.post-5246728782200823145</id><published>2008-02-11T22:23:00.000+01:00</published><updated>2008-02-11T23:26:42.498+01:00</updated><title type='text'>Redirect Favorites special folder</title><content type='html'>I was looking for how you could redirect the Favorites folder along with "My Documents" via a gpo and found a very good explanation on &lt;a href="http://blogs.microsoft.co.il/blogs/guyt/archive/2006/11/18/Redirecting-IE-Favorites-via-GPO.aspx"&gt;Windowmaker's blog&lt;/a&gt; and also a dowloadable custom gpo. The full explanation can be found on the windowmaker´s blog.&lt;br /&gt;&lt;br /&gt;Remember that it will not redirect current favorites in the local profile, rather create a new favorites folder where you must copy your current ones.&lt;br /&gt;&lt;br /&gt;Stefan&lt;br /&gt;&lt;br /&gt;"Redirecting IE Favorites via GPO&lt;br /&gt;I have seen this question multiple times at different web forums and newsgroups. Sometimes you want to redirect user's favorites to a network share, letting user access his favorites when he logs on from different workstations (or just for the sakes of backups).&lt;br /&gt;&lt;br /&gt;The location of the user's favorites is determined by the following registry value:&lt;br /&gt;Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell FoldersValue: FavoritesType: REG_EXPAND_SZDefault: %USERPROFILE%\Favorites&lt;br /&gt;&lt;br /&gt;The fact that the registry value has a type of REG_EXPAND_SZ is actually very convenient - you can use environment variables when pointing to the location of the Favorites.&lt;br /&gt;&lt;br /&gt;Now you can solve the issue of redirecting the folder using either logon script or something similar, but being GPO addict I decided to create an administrative template to handle the task.&lt;br /&gt;Here is what I came up with: (you can download the ADM from &lt;a href="http://blogs.microsoft.co.il/files/folders/4648/download.aspx"&gt;here&lt;/a&gt;. No need to cut&amp;amp;paste)&lt;br /&gt;&lt;br /&gt;CLASS USER CATEGORY !!WindowsComponentsCATEGORY !!InternetExplorerCATEGORY !!IE_Favorites KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" POLICY !!IE_Favorites #if version &gt;= 4 SUPPORTED !!SUPPORTED_IE5 #endif EXPLAIN !!IE_Favorites_Location_Explain PART !!IE_Favorites_Location_Tip1 TEXT END PART PART !!IE_Favorites_Location EDITTEXT EXPANDABLETEXT VALUENAME Favorites DEFAULT "%USERPROFILE%\Favorites" REQUIRED END PART END POLICY END CATEGORY ;; IE_FavoritesEND CATEGORY ;; Internet ExplorerEND CATEGORY ;; WindowsComponents[strings]WindowsComponents="Windows Components"IE_Favorites="Favorites"IE_Favorites_Location="The path to the favorites folder"IE_Favorites_Location_Explain="Specify the path to the location of favorites. You can use variables like %USERPROFILE%, %USERNAME%, etc... Both local and UNC paths are valid."IE_Favorites_Location_Tip1="Specify the UNC path to the favorites location"InternetExplorer="Internet Explorer"SUPPORTED_IE5="at least Internet Explorer v5.01"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496842446504515815-5246728782200823145?l=khunlaw.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://khunlaw.blogspot.com/feeds/5246728782200823145/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496842446504515815&amp;postID=5246728782200823145' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5246728782200823145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496842446504515815/posts/default/5246728782200823145'/><link rel='alternate' type='text/html' href='http://khunlaw.blogspot.com/2008/02/redirect-favorites-special-folder.html' title='Redirect Favorites special folder'/><author><name>Zelis</name><uri>http://www.blogger.com/profile/04168225996923283604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
