 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Multifunctioning DBA &#187; Database Administration</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/dba/tag/database-administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/dba</link>
	<description></description>
	<lastBuildDate>Wed, 06 Feb 2013 01:01:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Database Virtulization</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/database-virtulization/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/database-virtulization/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 15:45:39 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Virtualization]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[MS SQL Admin]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[Sql server]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/?p=711</guid>
		<description><![CDATA[Some of you may see the name of this post and think that I am going to talk about running SQL Server on VMWare or HyperV. Well that is sort of correct but not really. I am involved in the very early beta testing of a new product that will let you provision VDB&#8217;s. I [...]]]></description>
				<content:encoded><![CDATA[<p>Some of you may see the name of this post and think that I am going to talk about running SQL Server on VMWare or HyperV. Well that is sort of correct but not really. I am involved in the very early beta testing of a new product that will let you provision VDB&#8217;s. I am not going to mention names just yet but so far the product is very nice. No GUI yet so I have to interact and do pretty much everything via the command line. But, let me share this with you.</p>
<p>I picked a database that is about 180Gigs, not very big, as my virtualizaton candidate. After doing the pre-work that is needed I was able to provision my VDB to a SQL Server. If you look at it on SQL Server you will see that the database is 180Gigs and you are able to do anything, so far, that you would with a real database. I am also running all this on VMWare guests. So now if you look at the size of the VDB via the virtualization stack, you see that the database is only about 3MB. That is a very big savings. Now that comes with one pretty big caveate, but it is worth it. You do have to have a separate SQL Server instance running where the virtualization software is housing a compressed copy of the database that is in a restoring state at all times. This is what the VDB is actually provisioned from. So how big is that database, well I am getting about 3:1 compression ratio, so that restoring copy that is the VDB source is about 40GB. So 180 to just over 40GB and now I have a second copy of that database. Now the really cool thing, Say I need a third copy or more, well all of those can be taken off the same source and they actually only take a few MB to start. That is a huge savings on disk. Think about if I was working with a database that was 1T or more.</p>
<p>Now another really great thing about this, to provision the VDB, it takes a couple minutes. So even for my 180Gig database, for me to do a restore to another instance for developers, I am talking over an hour, now that is literally less than 5 minutes, after the initial backup of the actual source is taken and compressed and presented as a restoring database. But that is a one time process and now I can provision as many VDB&#8217;s as I want and it will only take me about 5 minutes or less per copy that I need. Plus I am only going to be taking up Megabytes and not Gigabytes or Terra bytes. The possibilities of this are just awesome.</p>
<p>There is a lot more to talk about around this and I am just scratching the surface here. But keep an eye out as I will be posting more and more about this as I do more testing with the product. I am working with this companies engineers and providing feedback on features that would be nice to have as well as letting them know about bugs that I run into.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/database-virtulization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy way to find bytes per cluster on your disk</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/easy-way-to-find-bytes-per-cluster-on-your-disk/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/easy-way-to-find-bytes-per-cluster-on-your-disk/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 15:08:23 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Data Files]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Disk Performance]]></category>
		<category><![CDATA[block size]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[Sql server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/?p=708</guid>
		<description><![CDATA[I recently learned a new windows command that is not the most intuitive, but it is nice.  I know that when I get a server and I am told that all my volumes are ready to go for SQL Server, I want to make sure that I have a 64K block. This command makes it [...]]]></description>
				<content:encoded><![CDATA[<p>I recently learned a new windows command that is not the most intuitive, but it is nice.  I know that when I get a server and I am told that all my volumes are ready to go for SQL Server, I want to make sure that I have a 64K block. This command makes it easy to verify.</p>
<p>&nbsp;</p>
<p>fsutil fsinfo ntfsinfo &lt;path&gt;</p>
<p>&nbsp;</p>
<p>That is it. Really simple but not the most intuitive. Here are the results.</p>
<p>&nbsp;</p>
<div id="attachment_709" class="wp-caption alignleft" style="width: 310px"><a href="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/83/files/2012/08/fsutil.jpg"><img class="size-medium wp-image-709" src="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/83/files/2012/08/fsutil-300x189.jpg" alt="FSUTIL" width="300" height="189" /></a><p class="wp-caption-text">fsutil example. Only 4k blocks on my c: drive</p></div>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/easy-way-to-find-bytes-per-cluster-on-your-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recent SQL Disaster</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/recent-sql-disaster/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/recent-sql-disaster/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 17:48:34 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[MSSQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/recent-sql-disaster/</guid>
		<description><![CDATA[In my last post about the disabled sa account I mentioned that I would have more on why I could not use windows authentication to get to my SQL Server instance. Here is the short of it and I know many of you will be screaming at the screen as you read this. Again this [...]]]></description>
				<content:encoded><![CDATA[<p>In my last post about the disabled sa account I mentioned that I would have more on why I could not use windows authentication to get to my SQL Server instance. Here is the short of it and I know many of you will be screaming at the screen as you read this. Again this is a server that I have walked into and I did not configure it but I think that now I will be able to resolve all the issues that we have. So my server stopped accepting logins from all domain accounts including mine. We did have one sql account that could connect to the instance but that account was limited in what it could see. Only a member of public on the server. This server is very critical and could not be brought down because after some application configuration changes users were able to work using sql authentication.</p>
<p>In our troubleshooting the error logs lead us down the path of Kerb auth failures. MS agreed with this assessment after looking at the logs and the behavior of the instance. We finally came to a point where the server had to be rebooted in order to continue troubleshooting. I thought I would take this time to also enable the sa account and see if we could get in with an elevated account and just check out some sql server configuration.  Unfortunatley I was not able to get the account up during our small window. I brought the server up in single user mode using the -m switch in the startup parameters but when attempting to connect via sqlcmd I got errors saying only one admin was allowed to log in. My time ran out and we had to start back up in multi user mode. The reboot did not resolve the issue and I still have no sa account. After another day of troubleshooting we decide to backup the database after hours and restore to another server that is not having the authentication errors.</p>
<p>After we get that done I can now play with the srever in question and attempt to fix it. I still want to get sa up so I restart in single user mode but still get the connection error using sqlcmd. I disconnect the network and try again and I am in. I enable the account and start up in multi user mode. What I say next was shocking and something that NEVER should have happend. I open up Logins and I show that all of the domain acounts are gone. Some one must have removed them. I added my account back and I can now connect. OUCH talk about a lesson in security. Time to make some changes. More on that later.</p>
<p>But please do not let something like this happen to you. Follow the security best practices so you can prevent this from happening to you. To it from the start and do not back down. I have found that if someone tells you to just let them have sysadmin now and we will lock it down later, IT NEVER HAPPENS!! Be strong. As a DBA you are in charge of making sure that the data is safe, recoverable, and accessible. In order to do this job well, you must set up security accordingly.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/recent-sql-disaster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random Password Script Powershell</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/random-password-script-powershell/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/random-password-script-powershell/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 20:56:53 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Windows Administration]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/random-password-script-powershell/</guid>
		<description><![CDATA[I was recently asked if I could write a script that would create a random password based on a word list. The password needs to have a capital letter, a special character, and a number. The password also has to be made up of two seperate words that are in the word list. my words.csv [...]]]></description>
				<content:encoded><![CDATA[<p>I was recently asked if I could write a script that would create a random password based on a word list. The password needs to have a capital letter, a special character, and a number. The password also has to be made up of two seperate words that are in the word list.</p>
<p>my words.csv file is formatted as so</p>
<p>Number, Word</p>
<p>Here is what I did.</p>
<p>$symbols = &#8220;(&#8220;, &#8220;!&#8221;, &#8220;@&#8221;, &#8220;#&#8221;, &#8220;$&#8221;, &#8220;%&#8221;, &#8220;^&#8221;, &#8220;&amp;&#8221;, &#8220;*&#8221;, &#8220;_&#8221;, &#8220;+&#8221;, &#8220;=&#8221;, &#8220;?&#8221;, &#8220;/&#8221;, &#8220;~&#8221;, &#8220;;&#8221;, &#8220;:&#8221;, &#8220;,&#8221;, &#8220;&lt;&#8221;, &#8220;&gt;&#8221;, &#8220;\&#8221;, &#8220;)&#8221;, &#8220;.&#8221;<br />
$words = Import-Csv &#8220;\\path to word list\words.csv&#8221;<br />
$max = $words.Count</p>
<p>$first = New-Object system.Random<br />
$1value = $first.next(0, $max)<br />
$firstword = $words[$1value].word<br />
$firstword = $firstword.toupper()</p>
<p>Start-Sleep -milliseconds 20<br />
$second = New-Object system.Random<br />
$2value = $second.next(1, 23)<br />
$special = $symbols[$2value]</p>
<p>Start-Sleep -milliseconds 300<br />
$third = New-Object system.Random<br />
$3value = $third.next(0, $max)<br />
$secondword = $words[$3value].word</p>
<p>Start-Sleep -milliseconds 230<br />
$num = New-Object system.Random<br />
$4value = $num.next(0, $max)<br />
$4value = $words[$4value].number</p>
<p>$newpass = &#8220;$firstword$special$secondword$4value&#8221;</p>
<p>Echo &#8220;`n&#8221;<br />
$newpass<br />
Echo &#8220;`n&#8221;</p>
<p>So as you can see I am using the word list to pull the two words as well as the number value. In order to get my capital I am using the toupper() function on the first word, and for the special character I create an array of characters and then pick one to use.</p>
<p>Any comments or questions please let me know.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/random-password-script-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a AD Group to MSSQL Server and add to a role using Powershell</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/add-a-ad-group-to-mssql-server-and-add-to-a-role-using-powershell/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/add-a-ad-group-to-mssql-server-and-add-to-a-role-using-powershell/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 15:17:23 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Groups]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Roles]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/?p=232</guid>
		<description><![CDATA[In SQL Server 2005 the Builtin Administrators group is a login, by default, to your MSSQL Server Instance and is also a member of the sysadmin role. Well this has been changed in SQL Server 2008 with good reason. I decided that I would like to add a group for my DBA Group to every [...]]]></description>
				<content:encoded><![CDATA[<p>In SQL Server 2005 the Builtin Administrators group is a login, by default, to your MSSQL Server Instance and is also a member of the sysadmin role. Well this has been changed in SQL Server 2008 with good reason. I decided that I would like to add a group for my DBA Group to every SQL Server in the company and also add this group to the sysadmin role. This way I do not need to have the builtin administrators group be a member of the sysadmin group or even a login to the server. Here is how I did it. </p>
<p></p>
<p>$servers = Import-Csv &#8220;csv listing of all servers&#8221;<br />#########################################################<br />foreach ($entry in $servers)<br />{<br />&nbsp;&nbsp;&nbsp; $torp = $entry.TorP<br />&nbsp;&nbsp;&nbsp; $mon = $entry.monitor<br />&nbsp;&nbsp;&nbsp; $machine = $entry.server<br />&nbsp;&nbsp;&nbsp; $errorlog = $entry.errorlog<br />&nbsp;&nbsp;&nbsp; $os = $entry.os2000<br />&nbsp;&nbsp;&nbsp; $iname = $entry.Instance<br />&nbsp;&nbsp;&nbsp; if ($iname -eq &#8220;Null&#8221;)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $instance = &#8220;$machine&#8221;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else <br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $instance = &#8220;$machine\$iname&#8221;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; if ($torp -eq &#8220;Prod&#8221;)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ServerType = &#8220;Production&#8221;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ServerType = &#8220;Test&#8221;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; $instance = $instance.toupper()<br />#########################################################</p>
<p>[System.Reflection.Assembly]::LoadWithPartialName(&#8216;Microsoft.SqlServer.SMO&#8217;) | out-null&nbsp;&nbsp;&nbsp; <br /># Create an SMO connection to the instance<br />$s = New-Object (&#8216;Microsoft.SqlServer.Management.Smo.Server&#8217;) $instance</p>
<p>$logins = $s.Logins<br />$query = &#8220;CREATE LOGIN $sqladmin FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]&#8220;<br />$dba = $logins | where{$_.Name -eq $sqladmin}<br />#$dba<br />if ($dba -eq $null)<br />{<br />Echo &#8220;DBA Group does not exist.`n Adding Group&#8221;<br />Invoke-Sqlcmd -ServerInstance $instance -Query $query<br />$logins = $s.Logins<br />$dba = $logins | where{$_.Name -eq $sqladmin}<br />if ($dba -ne $null)<br />{<br />Echo &#8220;`n Group Created&#8221;<br />$dba.name<br />}<br />}<br />else<br />{<br />Echo &#8220;Group already exists.&#8221;<br />$dba.name<br />}<br />if ($dba -ne $null)<br />{<br />$sroles = $s.Roles<br />foreach ($srole in $sroles | where{$_.name -eq &#8220;sysadmin&#8221;})<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; $srole.AddMember($sqladmin)</p>
<p>}</p>
<p></p>
<p>This script walks through the list of all my instances and adds the login using sqlcmd and then also adds that new group to the sysadmin role. Let me know if you have any questions or need anything at all.</p>
<p>&nbsp; </p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/add-a-ad-group-to-mssql-server-and-add-to-a-role-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating SQL 2005 Reporting Services</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/migrating-sql-2005-reporting-services/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/migrating-sql-2005-reporting-services/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 22:18:46 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[MSSQL Administration]]></category>
		<category><![CDATA[MSSQL Server]]></category>
		<category><![CDATA[Reporting Services]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/migrating-sql-2005-reporting-services/</guid>
		<description><![CDATA[I have been asked to help with Migrating a SQL Server 2005 Reporting Services server from one host to another. I set up a couple VM&#8217;s and away I went. I found that it is pretty straight forward though. I did run into a couple little hickups along the way but nothing to dificult. I [...]]]></description>
				<content:encoded><![CDATA[<p>I have been asked to help with Migrating a SQL Server 2005 Reporting Services server from one host to another. I set up a couple VM&#8217;s and away I went. I found that it is pretty straight forward though. I did run into a couple little hickups along the way but nothing to dificult. I did have a problem though, after I attached the database on the new server and brought up the reporting services configuration manager. I could not get the server to initialize. To resolve the issue I had t delete the encryption keys. Then I was able to initialize the server but I could not get any of my reports to run. Kept getting error about connection string not being initialized. I then changed the encryption keys in the configuration manager and all started working again. One other thing is to make sure that you have the RSExecRole setup. Here is a link on migrating a reporting services server.</p>
<p>http://msdn.microsoft.com/en-us/library/ms156421.aspx</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/migrating-sql-2005-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another New Language</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/another-new-language/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/another-new-language/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 15:47:09 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/another-new-language/</guid>
		<description><![CDATA[My team is going to be developing a new application that will handle all of our monitoring. Currently that includes the monitoring of Sybase Servers, Oracle Instances, and MSSQL Servers. We will also be adding another Database Type that will house all of the Monitoring data. We will be using a MYSQL backend for this [...]]]></description>
				<content:encoded><![CDATA[<p>My team is going to be developing a new application that will handle all of our monitoring. Currently that includes the monitoring of Sybase Servers, Oracle Instances, and MSSQL Servers. We will also be adding another Database Type that will house all of the Monitoring data. We will be using a MYSQL backend for this application. This application will be developed to run on a unix host so I need to be able to connect to my MSSQL servers from the unix host and insert rows of data back into the MYSQL database. To do this I think that we have decided on Perl for the language of choice. So I now get to go learn Perl. I am excited to learn another language as I am of the befleif that the more tools I have in my box the better off I will be. I will be starting my educational journey of Perl at</p>
<p>http://www.perl.com/pub/a/2000/10/begperl1.html</p>
<p>I am looking forward to this project and I will keep you up to date on the progress and features.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/another-new-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2008 Learning</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/sql-server-2008-learning/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/sql-server-2008-learning/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 15:29:01 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[MSSQL Administration]]></category>
		<category><![CDATA[MSSQL Server]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/sql-server-2008-learning/</guid>
		<description><![CDATA[I found this nice article that I thought I should pass on regarding Learning SQL Server 2008. http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1361184,00.html?track=sy41 The article talks about key features and enhancments from SQL Server 2005, BI, Security, and more good stuff. Check it out and enjoy.]]></description>
				<content:encoded><![CDATA[<p>I found this nice article that I thought I should pass on regarding Learning SQL Server 2008.</p>
<p>http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1361184,00.html?track=sy41</p>
<p>The article talks about key features and enhancments from SQL Server 2005, BI, Security, and more good stuff. Check it out and enjoy.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/sql-server-2008-learning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell Add a Login to SQL Server</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/powershell-add-a-login-to-sql-server/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/powershell-add-a-login-to-sql-server/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 20:19:58 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[MSSQL Server]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/powershell-add-a-login-to-sql-server/</guid>
		<description><![CDATA[I have a need to write a script that will check to see if a Windows Group exists on a server instance and if not then add it. I was attempting to do this using Powershell and SMO, but I was not really having any luck with that. I changed modes and I have decided [...]]]></description>
				<content:encoded><![CDATA[<p>I have a need to write a script that will check to see if a Windows Group exists on a server instance and if not then add it. I was attempting to do this using Powershell and SMO, but I was not really having any luck with that. I changed modes and I have decided to use the invoke-sqlcmd commandlet to get the task done. I use SMO to determine if the group that I want is on the server. If not then I create it. Like so:</p>
<p>$instance = &#8220;server\instance&#8221;</p>
<p>[System.Reflection.Assembly]::LoadWithPartialName(&#8216;Microsoft.SqlServer.SMO&#8217;) | out-null<br />
# Create an SMO connection to the instance<br />
$s = New-Object (&#8216;Microsoft.SqlServer.Management.Smo.Server&#8217;) $instance<br />
#$s | Get-Member -memberType Property<br />
#$s.logins | Get-Member<br />
$logins = $s.Logins<br />
$query = &#8220;CREATE LOGIN [domain\group name] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]&#8221;<br />
$dba = $logins | where{$_.Name -eq &#8220;domain\group name&#8221;}<br />
if ($dba -eq $null)<br />
{<br />
Echo &#8220;DBA Group does not exist.`n Adding Group&#8221;<br />
Invoke-Sqlcmd -ServerInstance $instance -Query $query<br />
$logins = $s.Logins<br />
$dba = $logins | where{$_.Name -eq &#8220;PNI\PNI SQL SYSTEMS DBAS&#8221;}<br />
if ($dba -ne $null)<br />
{<br />
Echo &#8220;`n Group Created&#8221;<br />
$dba.name<br />
}<br />
}<br />
else<br />
{<br />
Echo &#8220;Group already exists.&#8221;<br />
$dba.name<br />
}</p>
<p>Not to hard and it is nice to be able to use SMO to check for the login and then Powershell to create it.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/powershell-add-a-login-to-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update sysindexes table in Sybase 12.5.4</title>
		<link>http://itknowledgeexchange.techtarget.com/dba/update-sysindexes-table-in-sybase-1254/</link>
		<comments>http://itknowledgeexchange.techtarget.com/dba/update-sysindexes-table-in-sybase-1254/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 15:59:25 +0000</pubDate>
		<dc:creator>Colin Smith</dc:creator>
				<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Update System Tables]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/dba/update-sysindexes-table-in-sybase-1254/</guid>
		<description><![CDATA[I am moving a Sybase instance from one host to another. I have done all the installation and patching and I have loaded all the databases with little to no issues. I ran into a big issue when attempting to change to indexes in sysservers to allow duplicate rows. I had to go and find [...]]]></description>
				<content:encoded><![CDATA[<p>I am moving a Sybase instance from one host to another. I have done all the installation and patching and I have loaded all the databases with little to no issues. I ran into a big issue when attempting to change to indexes in sysservers to allow duplicate rows. I had to go and find out what the binary value for the setting that I wanted was and then find out what column held that value. I determined, from looking at my current instance, that I needed the Status colunm to be changed to 64. I then verified this by looking here at the definitions for the table.</p>
<p>http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.tables/html/tables/tables34.htm</p>
<p>I attempted droping the indexes so that I could just recreate them but you are not able to use Drop Index when working with system tables. That is when I decided to find the value and the column to update. So then I ran a query:</p>
<p>Select name, status from sysindexes</p>
<p>where name = &#8216;csysservers&#8217;</p>
<p>and status = 146</p>
<p>go</p>
<p>This returned on row for me and I thought now I can run the update</p>
<p>update sysindexes</p>
<p>set status = 40</p>
<p>where name = &#8216;csysservers&#8217;</p>
<p>and status = 146</p>
<p>go</p>
<p>Now I get the following error:</p>
<p>Cannot update more than 1 sysindexes row at a time.</p>
<p>Well this did not make sense at all. When I run the select I only get one row returned. But I took the advice of the error and modified my where clause to include more columns and then I was able to make the updates that I needed.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/dba/update-sysindexes-table-in-sybase-1254/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
