none
Restore an inconsistent database RRS feed

  • Question

  • Is it possible to restore a database where the replica is inconsistent?   Possibly going back to an earlier recovery point?
    Monday, July 29, 2013 8:01 PM

Answers

All replies

  • Hi,

    You can always restore from a good recovery point regardless if the replica is inconsistent.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 30, 2013 12:00 AM
    Moderator
  • I've found in some situations that no recovery points are shown in the console.  This is currently happening on a secondary dpm server.  Is that an issue with the GUI?
    Tuesday, July 30, 2013 3:01 PM
  • Hi,

    I am not aware of any problems in that area, it would need to be investigated while in that condition.

    See if this powershell script lists them.

    # Shows all recovery points on selected data sources in a PG
    $version="V1.2" 
    $confirmpreference = "None"
    $MB=1024*1024
    $logfile="SHOW-RecoveryPoints-DS-disk.LOG"
    $wait=10	#seconds
    
    function Show_help
    {
    	cls
    #	$l="=" * 79
    #	write-host $l -foregroundcolor magenta
    #	write-host -nonewline "<<<" -foregroundcolor white
    #	write-host -nonewline "<<<" 
    #	write-host ">>>" -foregroundcolor white
    #	write-host $l -foregroundcolor magenta
    	write-host "Version: $version" -foregroundcolor cyan
            write-host "User Selects data source to Show DISK BASED recovery points for" -foregroundcolor green
    	write-host "Appending to log file $logfile`n" -foregroundcolor white
    	write-host "User Accepts all responsibilities by entering a data source or just pressing [Enter] " -foregroundcolor white -backgroundcolor blue
    
    }
    
    " ">> $logfile
    "****************** NEW RUN **********************" >> $logfile
    "Version $version" >> $logfile
    get-date >> $logfile
    show_help
    
    $DPMservername=&"hostname"
    "Selected DPM server = $DPMservername" >> $logfile
    write-host "`nConnnecting to DPM server retrieving data source list...`n" -foregroundcolor green
    $pglist = Get-ProtectionGroup $DPMservername
    $ds=$null
    foreach ($onepg in $pglist) {$ds += (get-datasource $onepg)}
    $ds =$ds + ( Get-Datasource $DPMservername -inactive)
    #$ds | format-table -autosize
    $i=0
    foreach ($l in $ds) {
    	"[{0}] {1} `t`t {2}" -f $i,$l.psinfo.netbiosname, $l.logicalpath
    	$i++
    	}
    $DSname=read-host "Enter a data source index from list above "
    if (!$DSname) 
    {
    	write-host "No datasource selected `n" -foregroundcolor yellow
    	"Aborted on Datasource name" >> $logfile
    	exit 0
    }
    $DSselected=$ds[$DSname]
    "Selected datasource = $DSselected" >> $logfile
    $DSselected
    #$DSselected=$ds | where {$_.name -eq $DSname}
    if (!$DSselected) 
    {
    	write-host "No datasource selected `n" -foregroundcolor yellow
    	"Aborted on Datasource name" >> $logfile
    	exit 0
    }
    
    write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
    $oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
    $line=("Total DISK recoverypoint usage {0} MB in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints  ) 
    write-host $line`n -foregroundcolor white
    $line >> $logfile
    
    [datetime]$enddate=get-date -uformat %D
    write-host "Showing recovery points for $DSselected" -foregroundcolor yellow
    $rp=get-recoverypoint $DSselected
    $RPselected=$rp | where {($_.Isincremental -eq $FALSE)-and ($_.DataLocation -eq "Disk")}
    if (!$RPselected) 
    {
    	write-host "No recovery points found!" -foregroundcolor yellow
    	"No recovery points found, aborting...!" >> $logfile
    	exit 0
    }
    
    foreach ($onerp in $RPselected)
    {
    	$rtime=[string]$onerp.representedpointintime
    		$dlocation=[string]$onerp.DataLocation
    		$rsize=[math]::round(($onerp.size/$MB),1)
    		$line= "Found {0} size {1} MB  Incremental={2} Location={3}"-f $rtime, $rsize,$onerp.Isincremental,$Dlocation
            $line >> $logfile
    	write-host "$line" -foregroundcolor yellow
    	#
    	#Get dependent rp's for data source
    	#
    	$allRPtbd=$DSselected.GetAllRecoveryPointsToBeDeleted($onerp)
    	foreach ($oneDrp in $allRPtbd)
    	{
    		if ($oneDrp.IsIncremental -eq $FALSE) {continue}
    		$rtime=[string]$oneDrp.representedpointintime
    		$rsize=[math]::round(($oneDrp.size/$MB),1)
    		$line= ("`t...is dependancy for {0} size {1} `tIncremental={2}" -f $rtime, $rsize, $oneDrp.Isincremental) 
    		$line >> $logfile
                    write-host "$line" -foregroundcolor yellow
    	}
    }
    
    
    $line >> $logfile
    $line="These RP's include only DISK and dependent recovery points"
    write-host $line -foregroundcolor red 
    #$line="Data source activity = " + $DSselected.Activity
    write-host "Open SHOW-RecoveryPoints-DS-disk.LOG now ?" 
    write-host "Enter <<< Y/N >>>" -foregroundcolor white
    $Y=read-host
    if ($Y -eq "Y")
    {
    Notepad SHOW-RecoveryPoints-DS-disk.LOG
    }
    else
    {
    exit 0
    }
    


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 30, 2013 3:17 PM
    Moderator
  • got this:

    Version V1.2

    Tuesday, July 30, 2013 2:00:03 PM
    Selected DPM server = NY1PWDPM08
    Selected datasource = NC2PWCSQL1404\NC2PWCSQL1404\EMDBW_DM_RPT on computer SQL Server (NC2PWCSQL1404).nc2pwcsql14.us.ad.lfg.com
    Total DISK recoverypoint usage 0 MB in 0 recovery points
    No recovery points found, aborting...!

    A consistency check fails.  Here's part of the alert.  Not sure what "device is not connected" means.

    An unexpected error occurred while the job was running. (ID 104 Details: The device is not connected (0x8007048F))

    Tuesday, July 30, 2013 6:11 PM
  • Hi,

    OK - so that appears to be the heart of the problem, the DPM logs should provide more details. Looks like a possible storage pool issue.  Please open a support ticket if you cannot figure out the issue.  You may need to stop and re-establish secondary protection if it's time critical to resolve the issue. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 30, 2013 6:32 PM
    Moderator
  • Is there a specific log and error I should be searching for?  Specific storage command I shoul drun?

    I can stop protection and reprotect to see if that fixes things. 

    If that doesn't work I'll open a support ticket.

    Tuesday, July 30, 2013 6:56 PM
  • I found this http://social.technet.microsoft.com/Forums/en-US/e67338cb-30bd-4397-9d89-cbc041f0b0dd/secondary-dpm-does-not-sync-with-primary-3170-8007048f which referenced RAW volumes on the primary which effected the secondary.  After deleting the volumes I was able run a CC.   It seems as if I had this problem once before(which I didn't remember).

    Can you explain why there's a connection between the RAW volumes on the primary and the secondary?

    • Marked as answer by gamagl Wednesday, July 31, 2013 11:26 AM
    Tuesday, July 30, 2013 7:46 PM
  • hi,

    To be honest, unless the raw volume is associated with the primary data source, I don't see the correlation, and deleting it would not be the entire solution.  Barring a repro, i'm afraid I cannot provide more insight, but glad to hear that the issue is resolved.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, July 31, 2013 4:16 AM
    Moderator