Identify which disk recovery points are stored on?

We have 3 disks in DPM, one of which is flaky and keeps going missing from DPM.  We started by migrating our most important datasources to another disk (on a temporary basis) while we ordered a new SAN with the view to moving everything onto the new
SAN.  This has worked for most datasources but I have a problem with one.
For the purpose of this thread we have:
Disk 1 - old, flacky disk
Disk 2 - temporary disk
Disk 3 - new SAN
I am trying to move a datasource from disk 2 to disk 3 but am getting the following error:
Set-ProtectionGroup : D:\ has recently been migrated. You cannot migrate D:\ again until the recovery points on the previous replica volume are available.
(ID: 31224)
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\MigrateDatasourceDataFromDPM.ps1:129 char:4
+             Set-ProtectionGroup $mpg
+             ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-DPMProtectionGroup], DlsException
    + FullyQualifiedErrorId : ChainedMigrationError,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CommitProtectionGroup
Prior to attempting this, I removed (using remove-recoverypoint) the old recovery points I believed to be on Disk 1 rather than waiting for them to expire on their own.  This worked for other datasources but doesn't work for this.
I found an SQL query on another fourm post and ran it:
use DPMDB  
select dsk.NTDiskNumber,vol.MountPointPath,ag.NetbiosName, ds.DataSourceName,  vol.Usage as "1=REPLvol 2=RPvol", vol.VolumeSize,lr.lastbackuptime
from tbl_IM_DataSource as ds
join tbl_PRM_LogicalReplica as lr
on ds.DataSourceId=lr.DataSourceId
join tbl_AM_Server as ag
on ds.ServerId=ag.ServerId
join tbl_SPM_Volume as vol
on lr.PhysicalReplicaId=vol.VolumeSetID
and vol.Usage in (1,2)
join tbl_SPM_Extent as ext
on vol.guidname=ext.guidname
join tbl_SPM_Disk as dsk
on ext.diskid=dsk.diskid
where ntdisknumber=4 and lastbackuptime < getdate()-7 and NetbiosName='FILESERVER1'
order by lastbackuptime
and the output is:
NTDiskNumber MountPointPath
NetbiosName DataSourceName
1=REPLvol 2=RPvol VolumeSize
lastbackuptime
4 File System\vol_783bc0f9-8382-4df5-8f72-819ba012f68f
FILESERVER1 D:\
2 359766425600
2014-05-13 08:01:08.000
4 File System\vol_783bc0f9-8382-4df5-8f72-819ba012f68f
FILESERVER1 D:\
1 2238049157120
2014-05-13 08:01:08.000
Is that DPM telling me there are still recovery points on that disk?  If not, is there a way to tell which recovery points pertaining to this datasource are still on Disk 1?

That message sounds like it expects data to be on the old disk but it may be having issues.  These are all dynamic volumes so taking the disk offline and then back online usually fixes dynamic disk errors.  Then do a rescan in DPM.
I usually find the volume on the disk by using disk manager. 
Go to the protected item (e.g. VM, volume, etc.) in the Protection view
In the bottom pane, choose the Click to view details link to get the path
Right-click on the path and copy it.
Paste the path into Notepad or similar so you can see it
In the path, there will be a GUID prefixed by "vol_"
Open Disk Manager (diskmgmt.msc)
Look for the volume that has DPM-vol_GUID where GUID is from step 6.  Click on it and that will highlight the partition in the display at the bottom of disk manager.  That is the disk that holds all the data for that protection item.
Sometimes it can be hard to tell which partition is highlighted on the disk and I'm sure there is a simpler, more elegant way. 
After you find the partition, you could clone it onto a new disk.
You may have to end up just replacing the disk and recreating the replica.  You can do that by following the information in this post (http://social.technet.microsoft.com/Forums/en-US/fa0402d3-67d4-4fe5-8ed1-5666fd6b0ff6/dpm-disk-failure?forum=dpmstorage). 
Replace the bad drive and then run DPMSYNC -Reallocatereplica.
Not sure if this helps...
Rob

Similar Messages

  • Loyalty points are stored in which entity?

    Hi,
    I need to integrate Siebel's loyalty management with ATG and for That I need to know What is the data that flows from Siebel to ATG for loyalty functionality.
    So I need to know below things-
    In which entity loyalty/reward points are stored in Siebel or Where exactly is the loyalty points in Siebel?
    Regards,
    Prateek

    There are several tables that hold variant info .. you can find these in SE11 / SE16 looking for VARI*  e.g. VARID Variant directory, VARIT Variant texts -> but most of the time you should go through SAP function modules to read the contents of these e.g. RS_VARIANT_CONTENTS, as some of the data is held in INDX-type tables that you won't want to decode yourself...
    Jonathan

  • In which table,taxcode values are stored?

    Hi,
    Can anyone say in which tables and fields, tax codes values are stored.
    Values which are maintained in tcode FTXP.
    regards,
    sathya

    Hi,
    Education cess at PO level is not stored directly into any table, instead it is calculate at runtime using function module "PRICING" with calculation type "B".
    Edu. Cess for Invoice are stored in table BSET table. You can identify the record passing condition type (KSCHL).
    Manul excise condition goes to table KONV linked with EKKO-KNUMV field.

  • In Which Table Program codes are Stored

    Hi Gurus,
    I would like to know in which table the Program/Report Codes are stored.
    I have read the code for a Particular Program and I have to execute dynamically based of conditions.
    Please, Could anyone throw some lights....
    Regards,
    Anbalagan.V

    Hi!
    You can read source code with 'read report' and you can call programs with 'submit report'. Have a look at the documentation of the ABAP statements for details of the syntax.
    Regards,
    Christian

  • Tables in which basis users details are stored

    Hello,
    I'm writing an application to read Basis users details using JCO. But I'm not able to locate in which tables the users details are stored. I tried looking at USR* tables, but most of its tables doesn't have data. Only usr01 and usr02 are having some relevant data. I also tried looking at ADR* tables, which are again of no use.
    If anyone knows in which tables Basis users details are stored, please let me know.
    Thanks & Regards,
    Chandrasekhar.

    Hi Chandrasekhar,
    SAP users are stored in the usr01 table (see transaction SE16.)
    Best regards,
    Houcine

  • Tables in which class and Characters are stored

    Hi all,
    Can any one tell me in which tables class and Characters are stored
    With Rgds
    vinod

    Characteristics :
    CABN Characteristics ( o.a. batch/vendor)
    CABNT Characteristics description
    CAWN Characteristics ( o.a. material)
    CAWNT Characteristics description
    AUSP Characteristic Values
    Class types and objects :TCLAO Several class types for object
    TCLA Class types ( vb. lfa1 => v10 en 010)
    TCLAT Class type text
    TCLT Classifiable objects
    TCLC Classification status
    regards,
    indranil

  • Which table  Variant datas are stored

    Hi ,
        I need to know where variant datas are stored and in which table they are stored .
    juts let me know the name of the table alone .
    Thanks ,
    vinay .

    Hi again,
    1. The contents of the field are NOT STORED
       in the manner which u are assuming
    a) field name - vield value
    b) field name - vield value
    x) field name - vield value
    2. Rather they are stored in the same table VARI
      in RAW format.
    3.  CLUSTD is the LRAW field,
       which stores this whole data
       in encoded format.
    regards,
    amit m.

  • View in which all sql scripts are stored

    Hello Guys,
    I am a Oracle DBA (Fresher in the field). I want to know in which view or table all the sql queries are stored as i have a performance tuning problem. I want to know which sql scripts are afffecting the most time to execute which in turn affecting the overall performance of the database. I am working on oracle 10g.

    You should also look at V$SQL_PLAN table for example:
    rem fts report
    rem based on V$SQL_PLAN table
    col operation format a13
    col object_name format a32
    col object_owner format a10
    col options format a15
    col executions format 999,999,999
    column dt new_value today noprint
    select to_char(sysdate,'ddmonyyyyhh24miss') dt from dual;
    set pages 55 lines 132 trims on
    ttitle 'Full Table/Index Scans'
    spool fts&&today
    select
    a.hash_value,a.object_owner,a.object_name, rtrim(a.operation) operation,
    a.options, sum(b.executions) executions, c.bytes, (sum(b.executions)*c.bytes)/(1024*1024) fts_meg
    from
    v$sql_Plan a, v$sqlarea b, dba_segments c
    where
    (a.object_owner=c.owner
    and a.object_name=c.segment_name)
    and a.address=b.address
    and a.operation IN ('TABLE ACCESS','INDEX')
    and nvl(a.options,'NULL') in ('FULL','NULL','FULL SCAN')
    and a.object_owner not in ('SYS','SYSTEM','PERFSTAT','SYSMAN','WKSYS','DBSNMP')
    and b.executions>1
    group by a.hash_value,a.object_owner, a.object_name, operation, options, c.bytes
    order by a.object_owner,a.object_name,operation, options, executions desc
    spool off
    set pages 20
    ttitle off
    It will show you for active SQL what the plans are and some other important stats.
    Mike

  • How do you identify which iPhone model you are using?

    How doyou identify on the phone whch model it is?

    Append the last three characters of its serial number to http://www.everymac.com/ultimate-mac-lookup/?search_keywords= and load the page.
    (106332)

  • DPM couldn't find valid recovery points for VM listed as having numerous recovery points when writing to tape

    I'm seeing the following events when DPM tries writing to tape:
    Log Name:      DPM Alerts
    Source:        DPM-EM
    Date:          15/02/2014 12:01:07
    Event ID:      3311
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      <backup server FQDN>
    Description:
    The back up to tape job failed for the following reason: (ID: 3311)
    Backup of Non VSS Datasource Writer on <PROD server FQDN> cannot be completed. DPM could not find a valid recovery point on disk. (ID: 30126)
    All VMs on each of the affected servers have recovery points but
    When performing disk to disk to tape backups (d2D2T), tape backups will fail if a new disk based backup is not created before the next scheduled tape backup.  DPM always makes tape backups by mounting last successful disk based recovery point. 
    This is so we don't need to transfer data over the network since that most recent data is already on the DPM server. Look to see why the disk recovery points are failing and correct that to prevent tape backups from failing.
    http://social.technet.microsoft.com/Forums/en-US/a9b80780-2a5c-43bc-8111-ee35db56f359/backup-tapes-dpm-2012?forum=dpmtapebackuprecovery
    Is this the only time that recovery points are verified? Can I do a manual verification of recovery points? I'm concerned that some of the backups I have may be corrupt. If that's the case I need a way of finding out which ones are affected and a way to
    resolve the issue. Unfortunately I've not found much,the DPM error code isn't even listed in the official documentation. http://technet.microsoft.com/en-us/library/hh859159.aspx Other threads where people have seen this issue seem to be for older versions
    of DPM (I'm using the latest 2012 R2 fully updated).

    Hi,
    I've been having some difficulty running the Powershell command, see below. I've been using this for guidance http://technet.microsoft.com/en-us/library/hh881586%28v=sc.20%29.aspx where am I going wrong here?
    $Pg = Get-DPMProtectionGroup
    -DPMServerName <dpm server name here>
    $Ds = Get-DPMDatasource
    -ProtectionGroup $Pg[1]
    New-DPMRecoveryPoint
    -Datasource $Ds
    -Disk -DiskRecoveryPointOption -WithDataIntegrityCheck
    PS C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\bin> New-DPMRecovery
    Point -Datasource $Ds -Disk -DiskRecoveryPointOption -WithDataIntegrityCheck
    New-DPMRecoveryPoint : Missing an argument for parameter
    'DiskRecoveryPointOption'. Specify a parameter of type 'Microsoft.Internal.Ente
    rpriseStorage.Dls.EngineUICommon.EngineConstants.DbEnums+CreateDiskRecoveryPoin
    tOption' and try again.
    At line:1 char:44
    + New-DPMRecoveryPoint -Datasource $Ds -Disk -DiskRecoveryPointOption
    -WithDataInt ...
    +                                           
    ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo         
    : InvalidArgument: (:) [New-DPMRecoveryPoint], Par
       ameterBindingException
        + FullyQualifiedErrorId : MissingArgument,Microsoft.Internal.EnterpriseSto
       rage.Dls.UI.Cmdlet.ProtectionCmdLets.CreateRecoveryPoint
    PS C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\bin>

  • Delete disk backup recovery point

    Hi Guys,
    Am using DPM 2012 SP1 version 4.1.3313.0
    Looking to delete the disk recovery points & using the script mentioned int he gallery - http://gallery.technet.microsoft.com/scriptcenter/DPM-2012-R2-Remove-6167f338
    Somehow when i run the scripts and follow the steps till recovery points there are approx. 192 numbers out of which am not able to distinguish which one is tape and disk recovery point.
    I changed my retention from 15days to 5days the older recovery points are not getting removed automatically instead of the scripts i have ran Removeinactiverecoverypoint.ps1, removerecoverypoint.ps1 & pruneshadowcopiesDpm2010.ps1
    Somehow i managed to shrink but that not what am looking for. I want to delete the older recovery points than 5days and using that gallery script how can i identify which one is tape / disk recovery point.
    Note: i dont want to delete the tape recovery points.
    - Charles

    Hi,
    Please try this script and see if that works for you.
    #Author : Ruud Baars
    #Date : 11/09/2008
    #Edited : 11/15/2012 By: Wilson S.
    #edited : 07/25/2014 By: Mike J.
    # NOTE: Update script to only remove recovery points on Disk. Recovery points removed will be from the oldest one up to the date
    # entered by the user while the script is running
    #deletes all recovery points before 'now' on selected data source.
    $version="V4.7.2"
    $ErrorActionPreference = "silentlycontinue"
    add-pssnapin sqlservercmdletsnapin100
    Add-PSSnapin -Name Microsoft.DataProtectionManager.PowerShell
    #display RP's to delete and ask to continue.
    #Check & wait data source to be idle else removal may fail (in Mojito filter on 'intent' to see the error)
    #Fixed prune default and logfile name and some logging lines (concatenate question + answer)
    #Check dependent recovery points do not pass BEFORE date and adjust selection to not select those ($reselect)
    #--- Fixed reselect logic to keep adjusting reselect for as long as older than BEFORE date
    #--- Fixed post removal rechecking logic to match what is done so far (was still geared to old logic)
    #--- Modified to remove making RP and ask for pruning, fixed logic for removal rechecking logic
    #--- Prompt for MM/DD/YYYY hh:mm:ss AM/PM - V4.7.2
    $MB=1024*1024
    $logfile="DPMdeleteRP.LOG"
    $wait=10 #seconds
    $confirmpreference = "None"
    function Show_help
    cls
    $l="=" * 79
    write-host $l -foregroundcolor magenta
    write-host -nonewline "`t<<<" -foregroundcolor white
    write-host -nonewline " DANGEROUS :: MAY DELETE MANY RECOVERY POINTS " -foregroundcolor red
    write-host ">>>" -foregroundcolor white
    write-host $l -foregroundcolor magenta
    write-host "Version: $version" -foregroundcolor cyan
    write-host "A: User Selects data source to remove recovery points for" -foregroundcolor green
    write-host "B: User enters date / time (using 24hr clock) to Delete recovery points" -foregroundcolor green
    write-host "C: User Confirms deletion after list of recovery points to be deleted is displayed." -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
    "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) # WILSON - Created PGlist as array in case we have a single protection group.
    $ds=@()
    $tapes=$null
    $count = 0
    $dscount = 0
    foreach ($count in 0..($pglist.count - 1))
    # write-host $pglist[$count].friendlyname
    $ds += @(get-datasource $pglist[$count]) # WILSON - Created DS as array in case we have a single protection group.
    # write-host $ds
    # write-host $count -foreground yellow
    if ( Get-Datasource $DPMservername -inactive) {$ds += Get-Datasource $DPMservername -inactive}
    $i=0
    write-host "Index Protection Group Computer Path"
    write-host "---------------------------------------------------------------------------------"
    foreach ($l in $ds)
    "[{0,3}] {1,-20} {2,-20} {3}" -f $i, $l.ProtectionGroupName, $l.psinfo.netbiosname, $l.logicalpath
    $i++
    $DSname=read-host "`nEnter a data source index from list above - Note co-located datasources on same replica will be effected"
    if (!$DSname)
    write-host "No datasource selected `n" -foregroundcolor yellow
    "Aborted on Datasource name" >> $logfile
    exit 0
    $DSselected=$ds[$DSname]
    if (!$DSselected)
    write-host "No datasource selected `n" -foregroundcolor yellow
    "Aborted on Datasource name" >> $logfile
    exit 0
    $rp=get-recoverypoint $DS[$dsname]
    $rp
    # $DoTape=read-host "`nDo you want to remove when recovery points are on tape ? [y/N]"
    # "Remove tape recovery point = $DoTape" >> $logfile
    write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
    if ($DSselected.ShadowCopyUsedspace -gt 0)
    while ($DSSelected.TotalRecoveryPoints -eq 0)
    { # "still 0"
    #this is on disk
    $oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
    $line=("Total recoverypoint usage {0} MB on DISK in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints )
    $line >> $logfile
    write-host $line`n -foregroundcolor white
    #this is on tape
    #$trptot=0
    #$tp= Get-RecoveryPoint($dsselected) | where {($_.Datalocation -eq "Media")}
    #foreach ($trp in $tp) {$trptot += $trp.size }
    #if ($trptot -gt 0 )
    # $line=("Total recoverypoint usage {0} MB on TAPE in {1} recovery points" -f ($trptot/$MB) ,$DSselected.TotalRecoveryPoints )
    # $line >> $logfile
    # write-host $line`n -foregroundcolor white
    [datetime]$afterdate="1/1/1980"
    #$answer=read-host "`nDo you want to delete recovery points from the beginning [Y/n]"
    #if ($answer -eq "n" )
    # [datetime]$afterdate=read-host "Delete recovery points AFTER date [MM/DD/YYYY hh:mm]"
    [datetime]$enddate=read-host "Delete ALL Disk based recovery points BEFORE and Including date/time entered [MM/DD/YYYY hh:mm:ss AM/PM]"
    "Deleting recovery points until $enddate" >>$logfile
    write-host "Deleting recovery points until and $enddate" -foregroundcolor yellow
    $rp=get-recoverypoint $DSselected
    if ($DoTape -ne "y" )
    $RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE) -and ($_.DataLocation -eq "Disk")}
    else
    $RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE)}
    if (!$RPselected)
    write-host "No recovery points found!" -foregroundcolor yellow
    "No recovery points found, aborting...!" >> $logfile
    exit 0
    $reselect = $enddate
    $adjustflag = $false
    foreach ($onerp in $RPselected)
    $rtime=[string]$onerp.representedpointintime
    $rsize=[math]::round(($onerp.size/$MB),1)
    $line= "Found {0}, RP size= {1} MB (If 0 MB, co-located datasource cannot be computed), Incremental={2} "-f $rtime, $rsize,$onerp.Isincremental
    $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
    if ($oneDrp.representedpointintime -ge $enddate)
    #stick to latest full ($oneDrp = dependents, $onerp = full)
    $adjustflag = $true
    $reselect = $onerp.representedpointintime
    "<< Dependents newer than BEFORE date >>>" >> $logfile
    Write-Host -nonewline "`t <<< later than BEFORE date >>>" -foregroundcolor white -backgroundcolor red
    write-host "$line" -foregroundcolor yellow
    else
    #Ok, include current latest incremental
    $reselect = $oneDrp.representedpointintime
    write-host "$line" -foregroundcolor yellow
    if ($reselect -lt $oneDrp.representedpointintime)
    #we adjusted further backward than latest incremental within selection
    $reselect = $rtime
    $line = "Adjusted BEFORE date to be $reselect to include dependents to $enddate"
    $line >> $logfile
    Write-Host $line -foregroundcolor white -backgroundcolor blue
    $line="`n<<< SECOND TO LAST CHANCE TO ABORT - ONE MORE PROMPT TO CONFIRM. >>>"
    write-host $line -foregroundcolor white -backgroundcolor blue
    $line >> $logfile
    $line="Above recovery points within adjusted range will be permanently deleted !!!"
    write-host $line -foregroundcolor red
    $line >> $logfile
    $line="These RP's include dependent recovery points and may contain co-located datasource(s)"
    write-host $line -foregroundcolor red
    $line >> $logfile
    $line="Data source activity = " + $DSselected.Activity
    $line >> $logfile
    write-host $line -foregroundcolor white
    $DoDelete=""
    while (($DoDelete -ne "N" ) -and ($DoDelete -ne "Y"))
    $line="Continue with deletion (must answer) Y/N? "
    write-host $line -foregroundcolor white
    $DoDelete=read-host
    $line = $line + $DoDelete
    $line >> $logfile
    if (!$DSselected.Activity -eq "Idle")
    $line="Data source not idle, do you want to wait Y/N ? "
    write-host $line -foregroundcolor yellow
    $Y=read-host
    $line = $line + $Y
    $line >> $logfile
    if ($Y -ieq "Y")
    Write-Host "Waiting for data source to become idle..." -foregroundcolor green
    while ($DSselected.Activity -ne "Idle")
    ("Waiting {0} seconds" -f $wait) >>$logfile
    Write-Host -NoNewline "..." -ForegroundColor blue
    start-sleep -s $wait
    if ($DoDelete -eq "Y")
    foreach ($onerp in $RPselected)
    #reselect is adjusted to safe range relative to what was requested
    #--- if adjustflag not set then all up to including else only older because we must keep the full
    if ((($onerp.representedpointintime -le $reselect) -and ($adjustflag -eq $false)) -or ($onerp.representedpointintime -lt $reselect))
    $rtime=[string]$onerp.representedpointintime
    write-host `n$line -foregroundcolor red
    $line >>$logfile
    if (($onerp ) -and ($onerp.IsIncremental -eq $FALSE)) { remove-recoverypoint -RecoveryPoint $onerp -confirm:$True} # >> $logfile}
    $line =("---`nDeleting recoverypoint -> " + $rtime)
    $line >>$logfile
    "All Done!" >> $logfile
    write-host "`nAll Done!`n`n" -foregroundcolor white
    $line="Do you want to View DPMdeleteRP.LOG file Y/N ? "
    write-host $line -foregroundcolor white
    $Y=read-host
    $line = $line + $Y
    $line >> $logfile
    if ($Y -ieq "Y")
    Notepad DPMdeleteRP.LOG
    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.

  • Identifying which part of stored procedure is taking long time

    Hi Everyone,
    I have a stored procedure which is taking long time to execute.  I am trying to understand which part/query in the stored procedure is taking long time.
    It involves lots of table variables and n no of queries .Could anyone please help me in how to identify which query/part of the stored procedure is taking long time to execute?
    Thanks in Advance

    Hi Vivek -
    I am only familiar with running the plan visualization for a single SQL query.
    Could you please guide me how to run it for a procedure.
    Thanks in Advance.

  • Is there any way I can control which specific access point I connect (and stay connected) to from amongst a set of access points with the same SSID?

    I'm working from a boat in a harbor in which the ISP has deployed numerous access points around the periphery.  All the access points share the same SSID and each is configured to use either channel 1, 6 or 11.   From my location, there are over a dozen of these access points "visible" (based on the the output of WiFi Scanner) with a range of RSSI and S/N values that vary over time.
    The ISP has told me that the quality of my connection should be "perfectly fine" for any access point with an RSSI value better than -75, but I know from experience that my connection quality is miserable (i.e. < 50Kbps download) for almost all of these, including those with RSSI values better than -75.  There is at least one exception, however, which gives me on the order of 2Mbps download, which is "great" in this context.
    I've tried using a more powerful USB antenna plugged into my MacBook Air (mid 2011), but as far as I can tell, it really doesn't make much difference.  Neither does my location within the boat.   The overriding factor seems to be which access point I happen to connect up to.
    I should point out that the closest access points are about 75 yards away, with many of them being several hundred yards away or more.  I'm guessing that even though the signal strength of some of the distant access points is causing them to get "chosen" some times, the results are unacceptable due to the distance.
    I'm hoping that I can determine, through experimentation, which access point(s) provide(s) acceptable performance and then configure my Mac to limit my connection to those points through whatever mechanism I need to use (e.g. channel, MAC id, etc.).

    Establishing a wireless connection with a client computer is left to the access point for various reasons. One reason that your Mac may not connect to the strongest access point is that it may have reached a limit of the number of clients it can serve, leaving it unable to accept a connection with another. The limit may not be very large.
    Suppose that happens, and your Mac establishes a connection with a more distant access point having a weaker signal. Then, suppose a client drops off the network. Doesn't this mean your Mac will switch to the stronger access point? Not necessarily. The throughput delivered to and from your Mac would have to drop below a threshold specified in the AP for it to drop the client, leaving your Mac free to connect with another one. The reason for this is to prevent rapid switching from one AP to another in an area in which two signals are of approximately equal quality. If that were to occur the frequent and repetitive handshaking between the two devices would slow throughput to zero.
    In an environment in which several access points are broadcasting the same SSID, Apple provides no insight as to how it determines which access point to choose. This is the reason I suspect this "choice" is a function of the router, or access point. The connection originates with it, not the Mac.
    Now, what would solve your dilemma would be to determine a way to control the access point with which your Mac connects, by specifying the access point's unique MAC address for example. In this happy circumstance, you could maintain an editable "whitelist" or "blacklist" of the harbor's access points and be able to choose which among them you prefer.
    I do not believe OS X maintains such a record of MAC addresses though, only those of the routers it uses. If I am correct about that, such a solution is unlikely to exist. Don't let that discourage you from searching for one though... I would concentrate on something like "selecting access point by specific MAC address".
    I did find this patent application though:
    Roaming Network Stations Using A Mac Address Identifier To Select New Access Point
    Perhaps it's a start

  • Old recovery points seems to not being cleaned up

    I'm running a Windows Server 2012 server with DPM 2012 SP1, acting as a secondary DPM server for a couple of primary servers. However, the last 5-6 weeks it has begun to behave very strange. Suddenly, I get a lot of "Recovery Point volume threshold
    exceeded", "DPM does not have sufficient storage space available on the recovery point volume to create new recovery Points" and "The used disk space on the computer running DPM for the recovery point volume of SQL Server 2008 database
    XXXXX\DB(servername.domain.com) has exceeded the threshold value of 90% (DPM accounts 600 MB for internal usage in addition to free space available). If you do not allocate more disk space, synchronization jobs may fail due to insufficient disk space. (ID
    3169).
    All of these alerts seem to have a common source - disk space of course, but there is currently 8 TB free in the DPM disk pool. However, I have a feeling that all of this started when we added another DPM disk to the storage pool. Could it be that DPM doesn't
    clean up expired disk data correctly any longer?
    /Amir

    Hi,
    If the pruneshadowcopiesdpm201.ps1 is not completing, hangs, or crashes, then that needs to be addressed as that will definitely cause storage usage problems.
    In the meantime you can use this powershell script to delete old recovery points to help free disk space.  It will prompt to select a datasource, then a date to delete all recovery points made before that time.
    #Author : Ruud Baars
    #Date : 11/09/2008
    #Edited : 11/15/2012 By: Wilson S.
    #edited : 11:27:2012 By: Mike J.
    # NOTE: Update script to only remove recovery points on Disk. Recovery points removed will be from the oldest one up to the date
    # entered by the user while the script is running
    #deletes all recovery points before 'now' on selected data source.
    $version="V4.7"
    $ErrorActionPreference = "silentlycontinue"
    add-pssnapin sqlservercmdletsnapin100
    Add-PSSnapin -Name Microsoft.DataProtectionManager.PowerShell
    #display RP's to delete and ask to continue.
    #Check & wait data source to be idle else removal may fail (in Mojito filter on 'intent' to see the error)
    #Fixed prune default and logfile name and some logging lines (concatenate question + answer)
    #Check dependent recovery points do not pass BEFORE date and adjust selection to not select those ($reselect)
    #--- Fixed reselect logic to keep adjusting reselect for as long as older than BEFORE date
    #--- Fixed post removal rechecking logic to match what is done so far (was still geared to old logic)
    #--- Modified to remove making RP and ask for pruning, fixed logic for removal rechecking logic
    $MB=1024*1024
    $logfile="DPMdeleteRP.LOG"
    $wait=10 #seconds
    $confirmpreference = "None"
    function Show_help
    cls
    $l="=" * 79
    write-host $l -foregroundcolor magenta
    write-host -nonewline "`t<<<" -foregroundcolor white
    write-host -nonewline " DANGEROUS :: MAY DELETE MANY RECOVERY POINTS " -foregroundcolor red
    write-host ">>>" -foregroundcolor white
    write-host $l -foregroundcolor magenta
    write-host "Version: $version" -foregroundcolor cyan
    write-host "A: User Selects data source to remove recovery points for" -foregroundcolor green
    write-host "B: User enters date / time (using 24hr clock) to Delete recovery points" -foregroundcolor green
    write-host "C: User Confirms deletion after list of recovery points to be deleted is displayed." -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
    "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) # WILSON - Created PGlist as array in case we have a single protection group.
    $ds=@()
    $tapes=$null
    $count = 0
    $dscount = 0
    foreach ($count in 0..($pglist.count - 1))
    # write-host $pglist[$count].friendlyname
    $ds += @(get-datasource $pglist[$count]) # WILSON - Created DS as array in case we have a single protection group.
    # write-host $ds
    # write-host $count -foreground yellow
    if ( Get-Datasource $DPMservername -inactive) {$ds += Get-Datasource $DPMservername -inactive}
    $i=0
    write-host "Index Protection Group Computer Path"
    write-host "---------------------------------------------------------------------------------"
    foreach ($l in $ds)
    "[{0,3}] {1,-20} {2,-20} {3}" -f $i, $l.ProtectionGroupName, $l.psinfo.netbiosname, $l.logicalpath
    $i++
    $DSname=read-host "`nEnter a data source index from list above - Note co-located datasources on same replica will be effected"
    if (!$DSname)
    write-host "No datasource selected `n" -foregroundcolor yellow
    "Aborted on Datasource name" >> $logfile
    exit 0
    $DSselected=$ds[$DSname]
    if (!$DSselected)
    write-host "No datasource selected `n" -foregroundcolor yellow
    "Aborted on Datasource name" >> $logfile
    exit 0
    $rp=get-recoverypoint $DS[$dsname]
    $rp
    # $DoTape=read-host "`nDo you want to remove when recovery points are on tape ? [y/N]"
    # "Remove tape recovery point = $DoTape" >> $logfile
    write-host "`nCollecting recoverypoint information for datasource $DSselected.name" -foregroundcolor green
    if ($DSselected.ShadowCopyUsedspace -gt 0)
    while ($DSSelected.TotalRecoveryPoints -eq 0)
    { # "still 0"
    #this is on disk
    $oldShadowUsage=[math]::round($DSselected.ShadowCopyUsedspace/$MB,1)
    $line=("Total recoverypoint usage {0} MB on DISK in {1} recovery points" -f $oldShadowUsage ,$DSselected.TotalRecoveryPoints )
    $line >> $logfile
    write-host $line`n -foregroundcolor white
    #this is on tape
    #$trptot=0
    #$tp= Get-RecoveryPoint($dsselected) | where {($_.Datalocation -eq "Media")}
    #foreach ($trp in $tp) {$trptot += $trp.size }
    #if ($trptot -gt 0 )
    # $line=("Total recoverypoint usage {0} MB on TAPE in {1} recovery points" -f ($trptot/$MB) ,$DSselected.TotalRecoveryPoints )
    # $line >> $logfile
    # write-host $line`n -foregroundcolor white
    [datetime]$afterdate="1/1/1980"
    #$answer=read-host "`nDo you want to delete recovery points from the beginning [Y/n]"
    #if ($answer -eq "n" )
    # [datetime]$afterdate=read-host "Delete recovery points AFTER date [MM/DD/YYYY hh:mm]"
    [datetime]$enddate=read-host "Delete ALL Disk based recovery points BEFORE and Including date/time entered [MM/DD/YYYY hh:mm]"
    "Deleting recovery points until $enddate" >>$logfile
    write-host "Deleting recovery points until and $enddate" -foregroundcolor yellow
    $rp=get-recoverypoint $DSselected
    if ($DoTape -ne "y" )
    $RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE)-and ($_.DataLocation -eq "Disk")}
    else
    $RPselected=$rp | where {($_.representedpointintime -le $enddate) -and ($_.Isincremental -eq $FALSE)}
    if (!$RPselected)
    write-host "No recovery points found!" -foregroundcolor yellow
    "No recovery points found, aborting...!" >> $logfile
    exit 0
    $reselect = $enddate
    $adjustflag = $false
    foreach ($onerp in $RPselected)
    $rtime=[string]$onerp.representedpointintime
    $rsize=[math]::round(($onerp.size/$MB),1)
    $line= "Found {0}, RP size= {1} MB (If 0 MB, co-located datasource cannot be computed), Incremental={2} "-f $rtime, $rsize,$onerp.Isincremental
    $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
    if ($oneDrp.representedpointintime -ge $enddate)
    #stick to latest full ($oneDrp = dependents, $onerp = full)
    $adjustflag = $true
    $reselect = $onerp.representedpointintime
    "<< Dependents newer than BEFORE date >>>" >> $logfile
    Write-Host -nonewline "`t <<< later than BEFORE date >>>" -foregroundcolor white -backgroundcolor red
    write-host "$line" -foregroundcolor yellow
    else
    #Ok, include current latest incremental
    $reselect = $oneDrp.representedpointintime
    write-host "$line" -foregroundcolor yellow
    if ($reselect -lt $oneDrp.representedpointintime)
    #we adjusted further backward than latest incremental within selection
    $reselect = $rtime
    $line = "Adjusted BEFORE date to be $reselect to include dependents to $enddate"
    $line >> $logfile
    Write-Host $line -foregroundcolor white -backgroundcolor blue
    $line="`n<<< SECOND TO LAST CHANCE TO ABORT - ONE MORE PROMPT TO CONFIRM. >>>"
    write-host $line -foregroundcolor white -backgroundcolor blue
    $line >> $logfile
    $line="Above recovery points within adjusted range will be permanently deleted !!!"
    write-host $line -foregroundcolor red
    $line >> $logfile
    $line="These RP's include dependent recovery points and may contain co-located datasource(s)"
    write-host $line -foregroundcolor red
    $line >> $logfile
    $line="Data source activity = " + $DSselected.Activity
    $line >> $logfile
    write-host $line -foregroundcolor white
    $DoDelete=""
    while (($DoDelete -ne "N" ) -and ($DoDelete -ne "Y"))
    $line="Continue with deletion (must answer) Y/N? "
    write-host $line -foregroundcolor white
    $DoDelete=read-host
    $line = $line + $DoDelete
    $line >> $logfile
    if (!$DSselected.Activity -eq "Idle")
    $line="Data source not idle, do you want to wait Y/N ? "
    write-host $line -foregroundcolor yellow
    $Y=read-host
    $line = $line + $Y
    $line >> $logfile
    if ($Y -ieq "Y")
    Write-Host "Waiting for data source to become idle..." -foregroundcolor green
    while ($DSselected.Activity -ne "Idle")
    ("Waiting {0} seconds" -f $wait) >>$logfile
    Write-Host -NoNewline "..." -ForegroundColor blue
    start-sleep -s $wait
    if ($DoDelete -eq "Y")
    foreach ($onerp in $RPselected)
    #reselect is adjusted to safe range relative to what was requested
    #--- if adjustflag not set then all up to including else only older because we must keep the full
    if ((($onerp.representedpointintime -le $reselect) -and ($adjustflag -eq $false)) -or ($onerp.representedpointintime -lt $reselect))
    $rtime=[string]$onerp.representedpointintime
    write-host `n$line -foregroundcolor red
    $line >>$logfile
    if (($onerp ) -and ($onerp.IsIncremental -eq $FALSE)) { remove-recoverypoint -RecoveryPoint $onerp -confirm:$True} # >> $logfile}
    $line =("---`nDeleting recoverypoint -> " + $rtime)
    $line >>$logfile
    "All Done!" >> $logfile
    write-host "`nAll Done!`n`n" -foregroundcolor white
    $line="Do you want to View DPMdeleteRP.LOG file Y/N ? "
    write-host $line -foregroundcolor white
    $Y=read-host
    $line = $line + $Y
    $line >> $logfile
    if ($Y -ieq "Y")
    Notepad DPMdeleteRP.LOG
    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.

  • Slow Recovery Point

    Hello, 
    Look how long my local SQL DPM database recovery points are taking.
    Server 2012 R2, DPM 2012 R2 UR1, everything current. TCP chimney disabled
    1 protection group that includes 2 Exchange 2013 servers (DAG) and Local DPM server. Everything else seems to be running OK. Help?

    The size of the tablespace being recovered was 5MB in my test. Of course the system and undo tablespaces are much larger than that. From your post it sounds that my best bet is to make sure that SYSTEM and UNDOTBS are no larger than needed. I have found how to use a custom parmeter file for the auxiliary instance. Any suggestions on parameters to fiddle with. I would expect shared_pool_size but since I don't know the internals of the recovery process it's difficult to know which other parameters may benefit from increased resources.

Maybe you are looking for

  • Please help: I am unable to access PubMed on Safari on iMac! EtreCheck done

    I am having trouble accessing the PubMed website on my iMac. I know there is no problem with the website as I can access it on my iPad, iPhone etc but for some reason I can now no longer access it through my Mac. When I do I receive the message, 'Saf

  • Error 1418 / Itunes detected an Ipod that may be corrupt / "Autoplay"

    I've now spent many hours researching these 3 subjects in the discussion groups and I'm still one of many without a resolution to them. I think I've tried everything to get my 5th generation, 13 month old Ipod loaded with music again but without succ

  • Problem with WorksheetFunction.Transpose()

    For a complete history of the whole thing, see this discussion: http://answers.microsoft.com/en-us/office/forum/office_2013_release-excel/vba-code-for-generate-random-number-between-2/f662cdd8-a101-46a4-aeb8-fde4942f8985?page=1 However, I didn't disc

  • ClassCastException on classLoader

    Hi everybody, I'm having a bit of a problem with some reflection code and I can't work it out. I have a method which get as as one of its parameters a class that implements an interface where resides the method I'm interested in to execute, something

  • Result analysis method

    hi dear,the expert mode is active for one RA key,then how can i know the original result analysis method used in this key?because i can not display view of "simplified maintenance of valuation method" after expert mode used