<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DBA Stuff</title>
	<atom:link href="http://dbastuff.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dbastuff.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 08 Jun 2011 14:40:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dbastuff.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>DBA Stuff</title>
		<link>http://dbastuff.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dbastuff.wordpress.com/osd.xml" title="DBA Stuff" />
	<atom:link rel='hub' href='http://dbastuff.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Check for latest sql backup date</title>
		<link>http://dbastuff.wordpress.com/2011/06/08/check-for-latest-sql-backup-date/</link>
		<comments>http://dbastuff.wordpress.com/2011/06/08/check-for-latest-sql-backup-date/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 14:40:21 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=170</guid>
		<description><![CDATA[#Create a new Excel object using COM $Excel = New-Object -ComObject Excel.Application $Excel.visible = $True $Excel = $Excel.Workbooks.Add() $Sheet = $Excel.Worksheets.Item(1) #Counter variable for rows $intRow = 1 #Read thru the contents of the SQL_Servers.txt file foreach ($instance in get-content "D:\SQL_Servers.txt") { #Create column headers $Sheet.Cells.Item($intRow,1) = "INSTANCE NAME:" $Sheet.Cells.Item($intRow,2) = $instance $Sheet.Cells.Item($intRow,1).Font.Bold = $True [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=170&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>#Create a new Excel object using COM<br />
$Excel = New-Object -ComObject Excel.Application<br />
$Excel.visible = $True</p>
<p>$Excel = $Excel.Workbooks.Add()<br />
$Sheet = $Excel.Worksheets.Item(1)</p>
<p>#Counter variable for rows<br />
$intRow = 1</p>
<p>#Read thru the contents of the SQL_Servers.txt file<br />
foreach ($instance in get-content "D:\SQL_Servers.txt")<br />
{</p>
<p>     #Create column headers<br />
     $Sheet.Cells.Item($intRow,1) = "INSTANCE NAME:"<br />
     $Sheet.Cells.Item($intRow,2) = $instance<br />
     $Sheet.Cells.Item($intRow,1).Font.Bold = $True<br />
     $Sheet.Cells.Item($intRow,2).Font.Bold = $True</p>
<p>     $intRow++</p>
<p>      $Sheet.Cells.Item($intRow,1) = "DATABASE NAME"<br />
      $Sheet.Cells.Item($intRow,2) = "LAST FULL BACKUP"<br />
      $Sheet.Cells.Item($intRow,3) = "LAST LOG BACKUP"<br />
      $Sheet.Cells.Item($intRow,4) = "FULL BACKUP AGE(DAYS)"<br />
      $Sheet.Cells.Item($intRow,5) = "LOG BACKUP AGE(HOURS)"</p>
<p>     #Format the column headers<br />
     for ($col = 1; $col –le 5; $col++)<br />
     {<br />
          $Sheet.Cells.Item($intRow,$col).Font.Bold = $True<br />
          $Sheet.Cells.Item($intRow,$col).Interior.ColorIndex = 48<br />
          $Sheet.Cells.Item($intRow,$col).Font.ColorIndex = 34<br />
     }</p>
<p>     $intRow++<br />
      #######################################################<br />
     #This script gets SQL Server database information using PowerShell</p>
<p>     [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null</p>
<p>     # Create an SMO connection to the instance<br />
     $s = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $instance</p>
<p>     $dbs = $s.Databases</p>
<p>     #Formatting using Excel </p>
<p>ForEach ($db in $dbs)<br />
{<br />
   if ($db.Name -ne "tempdb") #We do not need the backup information for the tempdb database<br />
   {<br />
       $NumDaysSinceLastFullBackup = ((Get-Date) - $db.LastBackupDate).Days #We use Date Math to extract the number of days since the last full backup<br />
       $NumDaysSinceLastLogBackup = ((Get-Date) - $db.LastLogBackupDate).TotalHours #Here we use TotalHours to extract the total number of hours </p>
<p>       if($db.LastBackupDate -eq "1/1/0001 12:00 AM") #This is the default dateTime value for databases that have not had any backups<br />
       {<br />
           $fullBackupDate="Never been backed up"<br />
           $fgColor3="red"<br />
       }<br />
       else<br />
       {<br />
           $fullBackupDate="{0:g}" -f  $db.LastBackupDate<br />
       } </p>
<p>       $Sheet.Cells.Item($intRow, 1) = $db.Name<br />
       $Sheet.Cells.Item($intRow, 2) = $fullBackupDate  </p>
<p>       #We use the .ToString() Method to convert the value of the Recovery model to string and ignore Log backups for databases with Simple recovery model<br />
       if ($db.RecoveryModel.Tostring() -eq "SIMPLE")<br />
       {<br />
           $logBackupDate="N/A"<br />
           $NumDaysSinceLastLogBackup="N/A"<br />
       }<br />
       else<br />
       {<br />
           if($db.LastLogBackupDate -eq "1/1/0001 12:00 AM")<br />
           {<br />
               $logBackupDate="Never been backed up"<br />
           }<br />
           else<br />
           {<br />
               $logBackupDate= "{0:g2}" -f $db.LastLogBackupDate<br />
           } </p>
<p>       } </p>
<p>       $Sheet.Cells.Item($intRow, 3) = $logBackupDate </p>
<p>       #Define your service-level agreement in terms of days here<br />
       if ($NumDaysSinceLastFullBackup -gt 1)<br />
       {<br />
           $fgColor = 3<br />
       }<br />
       else<br />
       {<br />
           $fgColor = 0<br />
       } </p>
<p>       $Sheet.Cells.Item($intRow, 4) = $NumDaysSinceLastFullBackup<br />
       $Sheet.Cells.item($intRow, 4).Interior.ColorIndex = $fgColor </p>
<p>       $Sheet.Cells.Item($intRow, 5) =  $NumDaysSinceLastLogBackup </p>
<p>       $intRow ++ </p>
<p>       }<br />
   }<br />
   $intRow ++ </p>
<p>}</p>
<p>$Sheet.UsedRange.EntireColumn.AutoFit()<br />
cls<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=170&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/06/08/check-for-latest-sql-backup-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>Check for disk space powershell script</title>
		<link>http://dbastuff.wordpress.com/2011/06/08/check-for-disk-space-powershell-script/</link>
		<comments>http://dbastuff.wordpress.com/2011/06/08/check-for-disk-space-powershell-script/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 14:36:25 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=168</guid>
		<description><![CDATA[Get-Content c:\serverlist.txt &#124; ForEach-Object {Get-WmiObject -Class Win32_LogicalDisk -ComputerName $_ -Filter "drivetype=3"} &#124; %{ Add-Member -InputObject $_ -MemberType noteproperty -Name freepercent -Value ($_.freespace/$_.size*100) -PassThru} &#124; ?{$_.freepercent -lt 15} &#124; ForEach-Object { $message = "Low disk space on server $($_.__server) on disk $($_.name), actual free size $([int] $_.freepercent)%" Send-MailMessage -Body $message -From PowerShellScript@yourdomain.com -To YourRecipient@yourdomain.com -SmtpServer mail.yourdomain.com [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=168&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>Get-Content c:\serverlist.txt | ForEach-Object {Get-WmiObject -Class Win32_LogicalDisk -ComputerName $_ -Filter "drivetype=3"} | %{ Add-Member -InputObject $_ -MemberType noteproperty -Name freepercent -Value ($_.freespace/$_.size*100) -PassThru} | ?{$_.freepercent -lt 15} | ForEach-Object { $message = "Low disk space on server $($_.__server) on disk $($_.name), actual free size $([int] $_.freepercent)%" Send-MailMessage -Body $message -From PowerShellScript@yourdomain.com -To YourRecipient@yourdomain.com -SmtpServer mail.yourdomain.com -Subject "Low disk space notification"}</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=168&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/06/08/check-for-disk-space-powershell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL: Database mirroring manual failover scenario</title>
		<link>http://dbastuff.wordpress.com/2011/03/12/sql-database-mirroring-manual-failover-scenario/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/12/sql-database-mirroring-manual-failover-scenario/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 11:35:21 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/2011/03/12/sql-database-mirroring-manual-failover-scenario/</guid>
		<description><![CDATA[If you have database mirorring configuration without a witness then failover is a manual process. There are many possible situations and scenarios that could lead to a manual failover, so if we should narrow it down to a couple of common scenarios it might be the following: 1) If the mirror is synchronized then it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=163&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have database mirorring configuration without a witness then failover is a manual process. There are many possible situations and scenarios that could lead to a manual failover, so if we should narrow it down to a couple of common scenarios it might be the following:</p>
<p>1) If the mirror is synchronized then it is possible to do a manual failover</p>
<p>· Right click the principal database -&gt; choose: Task – Mirror.</p>
<p>· In “Database properties” and “Mirroring” – click the button: “Failover”</p>
<p>2) If the mirror is “broken” aka not synchronized, disconnected and the principal database is not running – you can bring the mirror database online by using the following statement:</p>
<p>ALTER DATABASE &lt;database name&gt; SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS</p>
<p>If everything goes wrong and it  is not possible to bring the mirror database online &#8211; then it might be necessary to remove the mirror partnership og restore the mirror database to bring it online with the following statements. <strong>BUT BEWARE </strong>you have to setup the mirroring afterwards in order to make the mirroring functionalitet work again.</p>
<p>ALTER DATABASE &lt;database name&gt; SET PARTNER OFF</p>
<p>RESTORE DATABASE &lt;database name&gt; WITH RECOVERY</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=163&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/12/sql-database-mirroring-manual-failover-scenario/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server: Check database mirroring status</title>
		<link>http://dbastuff.wordpress.com/2011/03/12/sql-server-check-database-mirroring-status/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/12/sql-server-check-database-mirroring-status/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 10:00:22 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=161</guid>
		<description><![CDATA[Run the following query to get the status of database mirroring: SELECT DB_NAME(database_id) AS &#8216;&#60;DatabaseName&#62;&#8217; , mirroring_role_desc , mirroring_state_desc FROM sys.database_mirroring WHERE mirroring_guid IS NOT NULL; Below is the result from the principal database showing that it is synchronized:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=161&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Run the following query to get the status of database mirroring:</p>
<p>SELECT</p>
<p>DB_NAME(database_id) AS &#8216;&lt;DatabaseName&gt;&#8217;</p>
<p>, mirroring_role_desc</p>
<p>, mirroring_state_desc</p>
<p>FROM sys.database_mirroring</p>
<p>WHERE mirroring_guid IS NOT NULL;</p>
<p>Below is the result from the principal database showing that it is synchronized:</p>
<p><a href="http://dbastuff.files.wordpress.com/2011/03/image001.png"><img src="http://dbastuff.files.wordpress.com/2011/03/image001.png?w=600" alt="" title="image001"   class="alignnone size-full wp-image-162" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=161&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/12/sql-server-check-database-mirroring-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>

		<media:content url="http://dbastuff.files.wordpress.com/2011/03/image001.png" medium="image">
			<media:title type="html">image001</media:title>
		</media:content>
	</item>
		<item>
		<title>Email test</title>
		<link>http://dbastuff.wordpress.com/2011/03/12/email-test/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/12/email-test/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 09:53:09 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/2011/03/12/email-test/</guid>
		<description><![CDATA[Det er en blog email test<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=159&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Det er en blog email test</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=159&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/12/email-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL: Check the status of a mirrored database</title>
		<link>http://dbastuff.wordpress.com/2011/03/12/sql-check-the-status-of-a-mirrored-database/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/12/sql-check-the-status-of-a-mirrored-database/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 09:38:12 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=153</guid>
		<description><![CDATA[SELECT       DB_NAME(database_id) AS '&#60;DatabaseName&#62;'     , mirroring_role_desc     , mirroring_state_desc FROM sys.database_mirroring WHERE mirroring_guid IS NOT NULL;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=153&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>SELECT<br />
      DB_NAME(database_id) AS '&lt;DatabaseName&gt;'<br />
    , mirroring_role_desc<br />
    , mirroring_state_desc<br />
FROM sys.database_mirroring<br />
WHERE mirroring_guid IS NOT NULL;</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=153&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/12/sql-check-the-status-of-a-mirrored-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>Run SQL Server 2008 database mirroring with certificates:</title>
		<link>http://dbastuff.wordpress.com/2011/03/12/run-sql-server-2008-database-mirroring-with-certificates/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/12/run-sql-server-2008-database-mirroring-with-certificates/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 01:25:47 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=147</guid>
		<description><![CDATA[“Now why would we want to do that? – might someone think when they are running their servers in a domain.” Well – here’s the situation: I was asked to setup at database mirroring between 2 SQL 2008 server running in a DMZ zone where they would not be able to joined the company’s domain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=147&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>“Now why would we want to do that? – might someone think when they are running their servers in a domain.”</em></p>
<p>Well – here’s the situation:</p>
<p>I was asked to setup at database mirroring between 2 SQL 2008 server running in a DMZ zone where they would not be able to joined the company’s domain – so here they were all by themselves with no trustee between them. The problem here is when you configure database mirroring in sql server 2008 the sql service account (which in my case was local user accounts), should be granted the “CONNECT TO ENDPOINT” priviligies on the SQL server at the obesite side of the mirror and that’s a bit tricky when there is no trustee between the 2 servers.</p>
<p>One solutions to this problem (I am sure there are others throughout the www) is to use certificates and here is what I have done:</p>
<p><em>First of all I have done the initializing configuration: </em></p>
<ul>
<li><em>backup full and log af principal database (remember to set recovery model to full)</em></li>
<li><em>Copy backup to mirror server</em></li>
<li><em>restore database and logs to the mirror (remember: WITH NORECOVERY).</em></li>
</ul>
<p><strong><em>1.  </em></strong><strong>On the Principal server run the following:<em></em></strong></p>
<p>USE master;</p>
<p>CREATE MASTER KEY ENCRYPTION BY PASSWORD = &#8221;1Sample_Strong_Password!@#&#8217;;</p>
<p>GO</p>
<p>USE master;</p>
<p>CREATE CERTIFICATE Principal_cert</p>
<p>   WITH SUBJECT = &#8216;Principal certificate&#8217;,</p>
<p>   EXPIRY_DATE = &#8217;01/01/2100&#8242;;</p>
<p>GO</p>
<p>CREATE ENDPOINT Endpoint_Mirroring</p>
<p>   STATE = STARTED</p>
<p>   AS TCP (</p>
<p>      LISTENER_PORT=7024</p>
<p>      , LISTENER_IP = ALL</p>
<p>   )</p>
<p>   FOR DATABASE_MIRRORING (</p>
<p>      AUTHENTICATION = CERTIFICATE Principal_cert</p>
<p>      , ENCRYPTION = REQUIRED ALGORITHM AES</p>
<p>      , ROLE = ALL</p>
<p>   );</p>
<p>GO</p>
<p>BACKUP CERTIFICATE Principal_cert TO FILE = &#8216;e:\cert\Principal_cert.cer&#8217;;</p>
<p>GO</p>
<p><strong><em>2.  </em></strong><strong>On the Mirror server run the following:<em></em></strong></p>
<p>USE master;</p>
<p>CREATE MASTER KEY ENCRYPTION BY PASSWORD = &#8217;1Sample_Strong_Password!@#&#8217;;</p>
<p>GO</p>
<p>USE master;</p>
<p>CREATE CERTIFICATE Mirror_cert</p>
<p>   WITH SUBJECT = &#8216;Mirror certificate&#8217;,</p>
<p>   EXPIRY_DATE = &#8217;01/01/2100&#8242;;</p>
<p>GO</p>
<p>CREATE ENDPOINT Endpoint_Mirroring</p>
<p>   STATE = STARTED</p>
<p>   AS TCP (</p>
<p>      LISTENER_PORT=7024</p>
<p>      , LISTENER_IP = ALL</p>
<p>   )</p>
<p>   FOR DATABASE_MIRRORING (</p>
<p>      AUTHENTICATION = CERTIFICATE Mirror_cert</p>
<p>      , ENCRYPTION = REQUIRED ALGORITHM AES</p>
<p>      , ROLE = ALL</p>
<p>   );</p>
<p>GO</p>
<p>BACKUP CERTIFICATE Mirror_cert TO FILE = &#8216;e:\cert\Mirror_cert.cer&#8217;;</p>
<p>GO</p>
<p><strong><em>3.  </em></strong><strong>Now copy (exchange) the certificates between the two servers<em></em></strong></p>
<p><strong><em>4.  </em></strong><strong>On the Principal server run the following:<em></em></strong></p>
<p>USE master;</p>
<p>CREATE LOGIN Mirror_login WITH PASSWORD = &#8217;1Sample_Strong_Password!@#&#8217;;</p>
<p>go</p>
<p>CREATE USER Mirror_user FOR LOGIN Mirror_login;</p>
<p>go</p>
<p>CREATE CERTIFICATE Mirror_cert</p>
<p>   AUTHORIZATION Mirror_user</p>
<p>   FROM FILE = &#8216;e:\cert\Mirror_cert.cer&#8217;</p>
<p>GO</p>
<p>GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [Mirror_login];</p>
<p>GO</p>
<p><strong><em>5.  </em></strong><strong>On the Mirror server run the following:<em></em></strong></p>
<p>USE master;</p>
<p>CREATE LOGIN Principal_login WITH PASSWORD = &#8217;1Sample_Strong_Password!@#&#8217;;</p>
<p>go</p>
<p>CREATE USER Principal_user FOR LOGIN Principal_login;</p>
<p>go</p>
<p>CREATE CERTIFICATE Principal_cert</p>
<p>   AUTHORIZATION Principal_user</p>
<p>   FROM FILE = &#8216;e:\cert\Principal_cert.cer&#8217;</p>
<p>GO</p>
<p>GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [Principal_login];</p>
<p>GO</p>
<p><em>Now the certificates and endpoints are created and configured on both servers – you can start the mirroring by using the mirroring wizard:</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=147&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/12/run-sql-server-2008-database-mirroring-with-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>Show user locks and ORA-00054 errors</title>
		<link>http://dbastuff.wordpress.com/2011/03/01/show-user-locks-and-ora-00054-errors/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/01/show-user-locks-and-ora-00054-errors/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 06:16:19 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=133</guid>
		<description><![CDATA[select s.sid, s.serial#, p.spid,p. from v$session s, v$process p where s.paddr = p.addr and s.sid in (select SESSION_ID from v$locked_object);<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=133&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code><br />
select s.sid, s.serial#, p.spid,p.<br />
from<br />
   v$session s,<br />
   v$process p<br />
where<br />
   s.paddr = p.addr<br />
and<br />
   s.sid in (select SESSION_ID from v$locked_object);<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=133&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/01/show-user-locks-and-ora-00054-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>RMAN: show work inprogress</title>
		<link>http://dbastuff.wordpress.com/2011/03/01/rman-show-work-inprogress/</link>
		<comments>http://dbastuff.wordpress.com/2011/03/01/rman-show-work-inprogress/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 06:14:39 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[RMAN]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=131</guid>
		<description><![CDATA[alter session set nls_date_format='dd/mm/yy hh24:mi:ss' / select target,SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done, sysdate + TIME_REMAINING/3600/24 end_at from v$session_longops where totalwork &#62; sofar AND opname NOT LIKE '%aggregate%' AND opname like 'RMAN%' /<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=131&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>alter session set nls_date_format='dd/mm/yy hh24:mi:ss'<br />
/<br />
select target,SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done,<br />
sysdate + TIME_REMAINING/3600/24 end_at<br />
from v$session_longops<br />
where totalwork &gt; sofar<br />
AND opname NOT LIKE '%aggregate%'<br />
AND opname like 'RMAN%'<br />
/<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=131&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/03/01/rman-show-work-inprogress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle: Howto find which segments holds a certain db block</title>
		<link>http://dbastuff.wordpress.com/2011/02/07/oracle-howto-find-which-segments-holds-a-certain-db-block/</link>
		<comments>http://dbastuff.wordpress.com/2011/02/07/oracle-howto-find-which-segments-holds-a-certain-db-block/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 12:51:39 +0000</pubDate>
		<dc:creator>sequel</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://dbastuff.wordpress.com/?p=126</guid>
		<description><![CDATA[Find out file number using dba_data_files. &#8211;&#62; PX Not the page no. (block no.) where dbv failed. &#8211;&#62; BX Now user dba_extents view to query which object is effected. e.g. select segment_name from dba_extents where file_id = PX and BX between block_id and block_id+blocks-1;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=126&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Find out file number using dba_data_files. &#8211;&gt; PX</p>
<p>Not the page no. (block no.) where dbv failed. &#8211;&gt; BX</p>
<p>Now user dba_extents view to query which object is effected.</p>
<p>e.g.</p>
<p><code>select segment_name from dba_extents<br />
where file_id = PX<br />
and BX between block_id and block_id+blocks-1;</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dbastuff.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dbastuff.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dbastuff.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dbastuff.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dbastuff.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dbastuff.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dbastuff.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dbastuff.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dbastuff.wordpress.com&amp;blog=7436387&amp;post=126&amp;subd=dbastuff&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dbastuff.wordpress.com/2011/02/07/oracle-howto-find-which-segments-holds-a-certain-db-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec63f157126e8ccd93f00b60387af85c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sequel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
