How to find all tables that are associated with a given domain name.

I want to find all table, excluding the structures, of a given domain name, say, waers.
Some of the tables are directly contains the domains while others are related with a data element which is connected to that domain.
I want to find tables for all two case -either tables connected directly to the domain or connected via data element- and exclude the structures.
thanks in advance.

Hi,
The following thing may help you.
in se11-> search for tables having names like 'DD*'.
From this list of tables you can find the required table to get domain, data element nad table name.
one way of doing it:
SELECT rollname domname
  FROM dd04l
  INTO CORRESPONDING FIELDS OF TABLE it_tab.
SELECT rollname tabname
  FROM dd03l
  INTO CORRESPONDING FIELDS OF TABLE it_tab1
  FOR ALL ENTRIES IN it_tab
  WHERE rollname = it_tab-rollname.
SORT it_tab1.
DELETE ADJACENT DUPLICATES FROM it_tab1.
LOOP AT it_tab1 INTO wa_tab.
  MODIFY it_tab FROM wa_tab
  TRANSPORTING tabname
  WHERE rollname = wa_tab-rollname.
ENDLOOP.
LOOP AT it_tab INTO wa_tab.
  WRITE:/ wa_tab-domname,
          wa_tab-tabname.
ENDLOOP.
Regards,
Manoj Kumar P

Similar Messages

  • SQL query to find all suites that are associated with automation

    I trying to incorporate CodeUI tests into a Release Mangement deployment template ... As a developer, I want to be able to specify a sub-tree of a test plan & only execute those test suites that are associated with automation.  Is there a way to
    extract all automated workitems and associated them with their respective test suites?
    Any assistance would be greatly appreciated!

    John,
    I've partially resolved the issue of executing a sub-set of suites with the following powershell implementation:
    1. Extract "potential" suite paths from a XML configuration file:
    <?xml version="1.0"?>
    <Configurations>
    <Properties>
    <Property key="DEFAULT" value="SuitePaths" />
    <Property key="DatabaseServer" value="MYDBSERVER" />
    <Property key="DatabaseInstance" value="Default" />
    <Property key="DatabaseName" value="TFS_DefaultCollection" />
    <Property key="ConfigurationName" value="US - Windows 7 and IE 10" />
    </Properties>
    <Notifications>
    <Notification key="0" value="[email protected]" />
    </Notifications>
    <SuitePaths>
    <SuitePath key="0" value="MyProject\WebProduct\Student\Features\Login" />
    <SuitePath key="1" value="MyProject\WebProduct\Student\Features\Logout" />
    </SuitePaths>
    <AreaPaths>
    <AreaPath key="0" value="MyProject\WebProduct\Student\Features\Login" />
    </AreaPaths>
    </Configurations>
    2. Extract record set of suites from TFS via SQL query:
    # FUNCTION: Retrieve-SuitePaths
    # Parameters:
    # (1.) LogFile -- Name of log file (e.g., C:\Temp or C:\Temp\DEPLOY_DatabaseServer_WebCMS2_DF06_20131031.6.log)
    # (2.) Connection -- Database connection
    # (3.) Paths -- Hash table of suite paths
    Function Retrieve-SuitePaths
    param
    [Parameter(Mandatory=$True)][String]$LogFile,
    [Parameter(Mandatory=$True)]$Connection,
    [Parameter(Mandatory=$True)]$Paths
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output "Retrieve suite(s): " | Out-File -FilePath $LogFile -Append
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    $SuitePaths = "("
    $Counter = 0
    foreach ($Key in $Paths.Keys)
    if ($Counter -gt 0)
    $SuitePaths = $SuitePaths + ", "
    $SuitePaths = $SuitePaths + "'" + $Paths.Get_Item($Key) + "'"
    $Counter += 1
    $SuitePaths = $SuitePaths + ")"
    # --DEBUG ONLY--> Write-Output "Paths: $SuitePaths" | Out-File -FilePath $LogFile -Append
    $Command = New-Object System.Data.SqlClient.SqlCommand
    $SQLStatement = "
    WITH
    cte_SuiteChildren
    AS
    -- Anchor definition to pull all certify modes
    SELECT
    S.[SuiteId],
    S.[ProjectId],
    PJ.ProjectName,
    S.[PlanId],
    P.[Name] AS PlanName,
    S.[ParentSuiteId],
    S.[SuitePath],
    CONVERT(NVARCHAR(256), NULL) AS ParentTitle,
    S.[Title],
    0 AS RecurseLevel
    FROM
    [dbo].[tbl_Suite] AS S
    INNER JOIN [dbo].[tbl_Plan] AS P ON S.PlanID = P.PlanID
    INNER JOIN [dbo].[tbl_Project] AS PJ ON S.ProjectID = PJ.ProjectID
    WHERE
    S.ParentSuiteID = 0
    UNION ALL
    -- Recursive member to pull details of certify sessions
    SELECT
    S.[SuiteId],
    S.[ProjectId],
    PJ.ProjectName,
    S.[PlanId],
    P.[Name] AS PlanName,
    S.[ParentSuiteId],
    S.[SuitePath],
    PS.[Title] AS ParentTitle,
    S.[Title],
    SC.[RecurseLevel] + 1 AS RecurseLevel
    FROM
    [dbo].[tbl_Suite] AS S
    INNER JOIN cte_SuiteChildren AS SC on SC.SuiteID = S.ParentSuiteID
    INNER JOIN [dbo].[tbl_Suite] AS PS ON SC.SuiteId = PS.SuiteId
    INNER JOIN [dbo].[tbl_Plan] AS P ON S.PlanID = P.PlanID
    INNER JOIN [dbo].[tbl_Project] AS PJ ON S.ProjectID = PJ.ProjectID
    cte_SuiteLevel_0
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[ProjectName] + '\' + SC.[PlanName] AS Path,
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 0
    cte_SuiteLevel_1
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 1
    cte_SuiteLevel_2
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 2
    cte_SuiteLevel_3
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 3
    cte_SuiteLevel_4
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 4
    cte_SuiteLevel_5
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 5
    cte_SuiteLevel_6
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 6
    cte_SuiteLevel_7
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 7
    cte_SuiteLevel_8
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 8
    cte_SuiteLevel_9
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 9
    cte_SuiteLevel_10
    AS
    SELECT
    SC.[ProjectId],
    SC.[PlanId],
    SC.[ParentSuiteId],
    SC.[SuiteId],
    SC.[ProjectName],
    SC.[PlanName],
    SC.[Title],
    SC.[RecurseLevel]
    FROM
    cte_SuiteChildren AS SC
    WHERE
    SC.[RecurseLevel] = 10
    cte_Suites
    AS
    SELECT
    SL0.[ProjectId],
    SL0.[PlanId],
    CASE
    WHEN SL2.ParentSuiteId IS NULL
    THEN SL1.ParentSuiteId
    ELSE CASE
    WHEN SL3.ParentSuiteId IS NULL
    THEN SL2.ParentSuiteId
    ELSE CASE
    WHEN SL4.ParentSuiteId IS NULL
    THEN SL3.ParentSuiteId
    ELSE CASE
    WHEN SL5.ParentSuiteId IS NULL
    THEN SL4.ParentSuiteId
    ELSE CASE
    WHEN SL6.ParentSuiteId IS NULL
    THEN SL5.ParentSuiteId
    ELSE CASE
    WHEN SL7.ParentSuiteId IS NULL
    THEN SL6.ParentSuiteId
    ELSE CASE
    WHEN SL8.ParentSuiteId IS NULL
    THEN SL7.ParentSuiteId
    ELSE CASE
    WHEN SL9.ParentSuiteId IS NULL
    THEN SL8.ParentSuiteId
    ELSE CASE
    WHEN SL10.ParentSuiteId IS NULL
    THEN SL9.ParentSuiteId
    ELSE SL10.ParentSuiteId
    END
    END
    END
    END
    END
    END
    END
    END
    END AS [ParentSuiteId],
    CASE
    WHEN SL2.SuiteId IS NULL
    THEN SL1.SuiteId
    ELSE CASE
    WHEN SL3.SuiteId IS NULL
    THEN SL2.SuiteId
    ELSE CASE
    WHEN SL4.SuiteId IS NULL
    THEN SL3.SuiteId
    ELSE CASE
    WHEN SL5.SuiteId IS NULL
    THEN SL4.SuiteId
    ELSE CASE
    WHEN SL6.SuiteId IS NULL
    THEN SL5.SuiteId
    ELSE CASE
    WHEN SL7.SuiteId IS NULL
    THEN SL6.SuiteId
    ELSE CASE
    WHEN SL8.SuiteId IS NULL
    THEN SL7.SuiteId
    ELSE CASE
    WHEN SL9.SuiteId IS NULL
    THEN SL8.SuiteId
    ELSE CASE
    WHEN SL10.SuiteId IS NULL
    THEN SL9.SuiteId
    ELSE SL10.SuiteId
    END
    END
    END
    END
    END
    END
    END
    END
    END AS [SuiteId],
    SL0.ProjectName,
    SL0.PlanName,
    --SL0.Path,
    --SL1.[Title],
    CASE
    WHEN SL2.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title
    ELSE CASE
    WHEN SL3.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title
    ELSE CASE
    WHEN SL4.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title
    ELSE CASE
    WHEN SL5.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title
    ELSE CASE
    WHEN SL6.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title + '\' + SL5.Title
    ELSE CASE
    WHEN SL7.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title + '\' + SL5.Title + '\' + SL6.Title
    ELSE CASE
    WHEN SL8.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title + '\' + SL5.Title + '\' + SL6.Title + '\' + SL7.Title
    ELSE CASE
    WHEN SL9.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title + '\' + SL5.Title + '\' + SL6.Title + '\' + SL7.Title + '\' + SL8.Title
    ELSE CASE
    WHEN SL10.Title IS NULL
    THEN SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title + '\' + SL5.Title + '\' + SL6.Title + '\' + SL7.Title + '\' + SL8.Title + '\' + SL9.Title
    ELSE SL0.Path + '\' + SL1.Title + '\' + SL2.Title + '\' + SL3.Title + '\' + SL4.Title + '\' + SL5.Title + '\' + SL6.Title + '\' + SL7.Title + '\' + SL8.Title + '\' + SL9.Title + '\' + SL10.Title
    END
    END
    END
    END
    END
    END
    END
    END
    END AS Path,
    CASE
    WHEN SL2.RecurseLevel IS NULL
    THEN SL1.RecurseLevel
    ELSE CASE
    WHEN SL3.RecurseLevel IS NULL
    THEN SL2.RecurseLevel
    ELSE CASE
    WHEN SL4.RecurseLevel IS NULL
    THEN SL3.RecurseLevel
    ELSE CASE
    WHEN SL5.RecurseLevel IS NULL
    THEN SL4.RecurseLevel
    ELSE CASE
    WHEN SL6.RecurseLevel IS NULL
    THEN SL5.RecurseLevel
    ELSE CASE
    WHEN SL7.RecurseLevel IS NULL
    THEN SL6.RecurseLevel
    ELSE CASE
    WHEN SL8.RecurseLevel IS NULL
    THEN SL7.RecurseLevel
    ELSE CASE
    WHEN SL9.RecurseLevel IS NULL
    THEN SL8.RecurseLevel
    ELSE CASE
    WHEN SL10.RecurseLevel IS NULL
    THEN SL9.RecurseLevel
    ELSE SL10.RecurseLevel
    END
    END
    END
    END
    END
    END
    END
    END
    END AS RecurseLevel
    FROM
    cte_SuiteLevel_0 AS SL0
    LEFT OUTER JOIN cte_SuiteLevel_1 AS SL1 ON SL1.ParentSuiteId = SL0.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_2 AS SL2 ON SL2.ParentSuiteId = SL1.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_3 AS SL3 ON SL3.ParentSuiteId = SL2.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_4 AS SL4 ON SL4.ParentSuiteId = SL3.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_5 AS SL5 ON SL5.ParentSuiteId = SL4.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_6 AS SL6 ON SL6.ParentSuiteId = SL5.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_7 AS SL7 ON SL7.ParentSuiteId = SL6.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_8 AS SL8 ON SL8.ParentSuiteId = SL7.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_9 AS SL9 ON SL9.ParentSuiteId = SL8.SuiteId
    LEFT OUTER JOIN cte_SuiteLevel_10 AS SL10 ON SL10.ParentSuiteId = SL9.SuiteId
    SELECT
    SS.[ProjectId],
    SS.[PlanId],
    SS.[ParentSuiteId],
    SS.[SuiteId],
    SS.[ProjectName],
    SS.[PlanName],
    SS.[Path],
    SS.[RecurseLevel]
    FROM
    SELECT DISTINCT
    S.[ProjectId],
    S.[PlanId],
    S.[ParentSuiteId],
    S.[SuiteId],
    S.[ProjectName],
    S.[PlanName],
    S.[Path],
    S.[RecurseLevel]
    FROM
    cte_Suites AS S
    WHERE
    S.[RecurseLevel] IS NOT NULL
    AND S.[Path] IN $($SuitePaths)
    ) AS SS
    ORDER BY
    SS.[Path]
    $Command.CommandText = $SQLStatement
    $Command.Connection = $Connection
    $Command.CommandTimeout = 240
    $DataAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $DataAdapter.SelectCommand = $Command
    $DataSet = New-Object System.Data.DataSet
    $DataAdapter.Fill($DataSet) | Out-Null
    Write-Output "$SQLStatement" | Out-File -FilePath $LogFile -Append
    # --DEBUG ONLY--> $DataSet.Tables[0]
    return $DataSet
    3. Execute every suite in the record set via TCM
    $DataSet = ( Retrieve-SuitePaths -LogFile:$LogFile -Connection:$Connection -Path:$Paths)
    # --DEBUG ONLY--> $DataSet.Tables[0].Rows.Count
    # --DEBUG ONLY--> $DataSet.Tables[0]
    # Determine whether or not any test suites were retrieved from TFS....
    if ( $DataSet.Tables[0].Rows.Count -gt 0 )
    $ListTestRunID = $null
    $SumFailed = 0
    $SumInconclusive = 0
    foreach ($Row in $DataSet.Tables[0].Rows)
    # Set project, plan & suite variables....
    [Int16]$ProjectID = $Row.Item('ProjectId')
    [Int16]$PlanID = $Row.Item('PlanId')
    [Int16]$ParentSuiteID = $Row.Item('ParentSuiteId')
    [Int16]$SuiteID = $Row.Item('SuiteId')
    $ProjectName = $Row.Item('ProjectName')
    $PlanName = $Row.Item('PlanName')
    $Path = $Row.Item('Path')
    $RecurseLevel = $Row.Item('RecurseLevel')
    # Set local build path variable....
    switch -wildcard ($Path)
    "*WebCMS*\Administration\*"
    $CUITBuildPath = $CUITPathUNC + '\WebCMS\Administration'
    "*WebCMS*\Instructor\*"
    $CUITBuildPath = $CUITPathUNC + '\WebCMS\Instructor'
    "*WebCMS*\Student\*"
    $CUITBuildPath = $CUITPathUNC + '\WebCMS\Student'
    "*WebProduct*\Instructor\*"
    $CUITBuildPath = $CUITPathUNC + '\WebProduct\Instructor'
    "*WebProduct*\Student\*"
    $CUITBuildPath = $CUITPathUNC + '\WebProduct\Student'
    default
    $CUITBuildPath = $CUITPathUNC
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output 'Test Suite:' | Out-File -FilePath $LogFile -Append
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output " ID:" | Out-File -FilePath $LogFile -Append
    Write-Output " Project: $ProjectID" | Out-File -FilePath $LogFile -Append
    Write-Output " Plan: $PlanID" | Out-File -FilePath $LogFile -Append
    Write-Output " Parent Suite: $ParentSuiteID" | Out-File -FilePath $LogFile -Append
    Write-Output " Suite: $SuiteID" | Out-File -FilePath $LogFile -Append
    Write-Output " Config: $ConfigurationID" | Out-File -FilePath $LogFile -Append
    Write-Output " Name:" | Out-File -FilePath $LogFile -Append
    Write-Output " Project: $ProjectName" | Out-File -FilePath $LogFile -Append
    Write-Output " Plan: $PlanName" | Out-File -FilePath $LogFile -Append
    Write-Output " Config: $ConfigurationName" | Out-File -FilePath $LogFile -Append
    Write-Output " Path:" | Out-File -FilePath $LogFile -Append
    Write-Output " Suite: $Path" | Out-File -FilePath $LogFile -Append
    Write-Output " Build: $CUITBuildPath" | Out-File -FilePath $LogFile -Append
    # --DEBUG ONLY--> Write-Output " Recursion: $RecurseLevel" | Out-File -FilePath $LogFile -Append
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    # Set TCM arguements....
    $ArguementPlanID = "/planid:$PlanID"
    $ArguementTitle = "/title:$Title - $Path (SuiteID: $SuiteID)"
    $ArguementSuiteID = "/suiteid:$SuiteID"
    $ArguementConfigurationID = "/configid:$ConfigurationID"
    $ArguementTFSCollection = "/collection:$TFSCollection"
    $ArguementTeamProject = "/teamproject:$TFSTeamProject"
    if(![string]::IsNullOrEmpty($CUITBuildPath))
    $ArguementBuildDirectory = "/builddir:$CUITBuildPath"
    $ArguementBuild = ""
    $ArguementBuildDefinition = ""
    else
    $ArguementBuildDirectory = ""
    $ArguementBuild = "/build:$TFSBuild"
    $ArguementBuildDefinition = "/builddefinition:$BuildDefinition"
    $ArguementTestEnvironment = "/testenvironment:$WebServer"
    $ArguementSettingsName = ""
    if(![string]::IsNullOrEmpty($SettingsName))
    $ArguementSettingsName = "/settingsname:$SettingsName"
    # Create test run....
    Write-Host "$TCMEXE 'run' '/create' $ArguementTitle $ArguementPlanID $ArguementSuiteID $ArguementConfigurationID $ArguementTFSCollection $ArguementTeamProject $ArguementBuild $ArguementBuildDefinition $ArguementBuildDirectory $ArguementTestEnvironment $ArguementSettingsName"
    Write-Output " $TCMEXE 'run' '/create' $ArguementTitle $ArguementPlanID $ArguementSuiteID $ArguementConfigurationID $ArguementTFSCollection $ArguementTeamProject $ArguementBuild $ArguementBuildDefinition $ArguementBuildDirectory $ArguementTestEnvironment $ArguementSettingsName" | Out-File -FilePath $LogFile -Append
    try
    $TestRunID = & $TCMEXE 'run' '/create' $ArguementTitle $ArguementPlanID $ArguementSuiteID $ArguementConfigurationID $ArguementTeamProject $ArguementTFSCollection $ArguementBuild $ArguementBuildDefinition $ArguementBuildDirectory $ArguementTestEnvironment $ArguementSettingsName
    catch
    $ExitMessage = $_Exception.Message
    # --DEBUG ONLY--> Write-Output "TestRunID: $TestRunID" | Out-File -FilePath $LogFile -Append
    if ($TestRunID -match '.+\:\s(?<TestRunID>\d+)\.')
    # The test run ID is identified as a property in the match collection so we can access it directly by using the group name from the regular expression (i.e. TestRunID).
    $TestRunID = $matches.TestRunID
    $ArguementID = "/id:$TestRunID"
    $TestRunResultsFile = $TempDirectory + "\TestRunResults$TestRunID.trx"
    $ArguementQueryText = "/querytext:SELECT * FROM TestRun WHERE TestRunID=$TestRunID"
    $ArguementResultsFile = "/resultsfile:""$TestRunResultsFile"""
    Write-Host " Waiting for test run to complete ..."
    Write-Host $TCMEXE 'run' '/list' $ArguementTeamProject $ArguementTFSCollection $ArguementQueryText
    Write-Output " $TCMEXE 'run' '/list' $ArguementTeamProject $ArguementTFSCollection $ArguementQueryText" | Out-File -FilePath $LogFile -Append
    $WaitingForTestRunCompletion = $true
    $WaitCount= 0
    while ($WaitingForTestRunCompletion)
    $WaitCount = $WaitCount + 1
    Write-Output " Waiting ($WaitCount)...." | Out-File -FilePath $LogFile -Append
    Start-Sleep -s $TestRunWaitDelay
    $TestRunStatus = & $TCMEXE 'run' '/list' $ArguementTeamProject $ArguementTFSCollection $ArguementQueryText
    $TestRunStatus
    if ($TestRunStatus.Count -lt 3 -or ($TestRunStatus.Count -gt 2 -and $TestRunStatus.GetValue(2) -match '.+(?<DateCompleted>\d+[/]\d+[/]\d+)'))
    $WaitingForTestRunCompletion = $false
    Write-Host "Evaluating test run $TestRunID results..."
    # Take small pause(s) since the results might not be published yet....
    Start-Sleep -s $TestRunWaitDelay
    # Export results....
    Write-Host $TCMEXE 'run' '/export' $ArguementID $ArguementTeamProject $ArguementTFSCollection $ArguementResultsFile
    Write-Output " $TCMEXE 'run' '/export' $ArguementID $ArguementTeamProject $ArguementTFSCollection $ArguementResultsFile" | Out-File -FilePath $LogFile -Append
    $WaitingForTestRunExport = $true
    $WaitCount= 0
    while ($WaitingForTestRunExport -and $WaitCount -lt 5)
    $WaitCount = $WaitCount + 1
    Write-Output " Waiting ($WaitCount)...." | Out-File -FilePath $LogFile -Append
    $ExportResult = & $TCMEXE 'run' '/export' $ArguementID $ArguementResultsFile $ArguementTFSCollection $ArguementTeamProject
    if ([System.IO.File]::Exists($TestRunResultsFile))
    $WaitingForTestRunExport = $false
    if ([System.IO.File]::Exists($TestRunResultsFile))
    # Load the XML document contents.
    [xml]$TestResultsXML = Get-Content "$TestRunResultsFile"
    # Extract the results of the test run.
    $TotalTests = $TestResultsXML.TestRun.ResultSummary.Counters.total
    $PassedTests = $TestResultsXML.TestRun.ResultSummary.Counters.passed
    $FailedTests = $TestResultsXML.TestRun.ResultSummary.Counters.failed
    $InconclusiveTests = $TestResultsXML.TestRun.ResultSummary.Counters.inconclusive
    # Output the results of the test run.
    Write-Host "========== Test: $TotalTests tests ran, $PassedTests succeeded, $FailedTests failed, $InconclusiveTests inconclusive =========="
    Write-Output "--------------------------------------------------------------------------------" | Out-File -FilePath $LogFile -Append
    Write-Output "Summary:" | Out-File -FilePath $LogFile -Append
    Write-Output "--------------------------------------------------------------------------------" | Out-File -FilePath $LogFile -Append
    Write-Output " Total: $TotalTests" | Out-File -FilePath $LogFile -Append
    Write-Output " Passed: $PassedTests" | Out-File -FilePath $LogFile -Append
    Write-Output " Failed: $FailedTests" | Out-File -FilePath $LogFile -Append
    Write-Output " Inconclusive: $InconclusiveTests" | Out-File -FilePath $LogFile -Append
    $SumFailed += $FailedTests
    $SumInconclusive += $InconclusiveTests
    # Remove the test run results file.
    [System.IO.File]::Delete($TestRunResultsFile) | Out-Null
    # Add "current" TestRunID to the list of TestRunID(s)....
    if ($ListTestRunID -ne $null)
    $ListTestRunID = $ListTestRunID + ', '
    $ListTestRunID = $ListTestRunID + $TestRunID
    # Next test suite....
    4. Extract record set of test runs  from TFS via SQL query:
    # FUNCTION: Retrieve-TestRuns
    # Parameters:
    # (1.) LogFile -- Name of log file (e.g., C:\Temp or C:\Temp\DEPLOY_DatabaseServer_WebCMS2_DF06_20131031.6.log)
    # (2.) Connection -- Database connection
    # (3.) ListTestRunID -- List of test run identifiers
    Function Retrieve-TestRuns
    param
    [Parameter(Mandatory=$True)][String]$LogFile,
    [Parameter(Mandatory=$True)]$Connection,
    [Parameter(Mandatory=$True)][String]$ListTestRunID
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output "Retrieve test run(s): " | Out-File -FilePath $LogFile -Append
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    $TestRuns = '(' + $ListTestRunID + ')'
    $Command = New-Object System.Data.SqlClient.SqlCommand
    $SQLStatement = "
    WITH
    cte_State
    AS
    SELECT 0 AS [StateID], 'Unspecified' AS [StateName]
    UNION ALL
    SELECT 1 AS [OutcomeId], 'To Be Determined (1)' AS [StateName]
    UNION ALL
    SELECT 2 AS [StateID], 'In Progress' AS [StateName]
    UNION ALL
    SELECT 3 AS [StateID], 'Completed' AS [StateName]
    UNION ALL
    SELECT 4 AS [StateID], 'Aborted' AS [StateName]
    UNION ALL
    SELECT 5 AS [OutcomeId], 'To Be Determined (5)' AS [StateName]
    UNION ALL
    SELECT 6 AS [StateID], 'Needs Investigation' AS [StateName]
    SELECT
    TR.[ProjectId] AS [Project Id],
    P.[ProjectName],
    TR.[TestPlanId] AS [Plan Id],
    TP.Name AS [TestPlanName],
    TR.[TestRunId] AS [Run Id],
    TR.[Title],
    S.[StateID] AS [State Id],
    S.[StateName] AS [State],
    TR.[StartDate] AS [Date Started],
    TR.[CompleteDate] AS [Date Completed],
    DATEDIFF(SECOND, TR.[StartDate], TR.[CompleteDate]) AS Duration,
    TR.[Type],
    TR.[IsAutomated],
    TR.[TotalTests] AS [Total],
    TR.[PassedTests] AS [Passed],
    TR.[IncompleteTests] AS [Incomplete],
    TR.[UnanalyzedTests] AS [Unanalyzed],
    TR.[NotApplicableTests] AS [Not Applicable]
    FROM
    [Tfs_DefaultCollection].[dbo].[tbl_TestRun] AS TR
    INNER JOIN [Tfs_DefaultCollection].[dbo].[tbl_Project] AS P ON TR.ProjectId = P.ProjectId
    INNER JOIN [Tfs_DefaultCollection].[dbo].[tbl_Plan] AS TP ON TR.TestPlanId = TP.PlanId
    INNER JOIN cte_State AS S ON TR.[State] = S.[StateID]
    WHERE
    TR.TestRunId IN $($TestRuns)
    ORDER BY
    TR.[StartDate]
    $Command.CommandText = $SQLStatement
    $Command.Connection = $Connection
    $Command.CommandTimeout = 30
    $DataAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $DataAdapter.SelectCommand = $Command
    $DataSet = New-Object System.Data.DataSet
    $DataAdapter.Fill($DataSet) | Out-Null
    Write-Output "$SQLStatement" | Out-File -FilePath $LogFile -Append
    # --DEBUG ONLY--> $DataSet.Tables[0]
    return $DataSet
    5. Extract record set of test results from TFS via SQL query:
    # FUNCTION: Retrieve-TestRunResults
    # Parameters:
    # (1.) LogFile -- Name of log file (e.g., C:\Temp or C:\Temp\DEPLOY_DatabaseServer_WebCMS2_DF06_20131031.6.log)
    # (2.) Connection -- Database connection
    # (3.) ListTestRunID -- List of test run identifiers
    Function Retrieve-TestRunResults
    param
    [Parameter(Mandatory=$True)][String]$LogFile,
    [Parameter(Mandatory=$True)]$Connection,
    [Parameter(Mandatory=$True)][String]$ListTestRunID
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output "Retrieve test result(s): " | Out-File -FilePath $LogFile -Append
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    $TestRuns = '(' + $ListTestRunID + ')'
    $Command = New-Object System.Data.SqlClient.SqlCommand
    $SQLStatement = "
    WITH
    cte_Outcome
    AS
    SELECT 0 AS [OutcomeId], 'To Be Determined (0)' AS [OutcomeName]
    UNION ALL
    SELECT 1 AS [OutcomeId], 'In Progress' AS [OutcomeName]
    UNION ALL
    SELECT 2 AS [OutcomeId], 'Passed' AS [OutcomeName]
    UNION ALL
    SELECT 3 AS [OutcomeId], 'Failed' AS [OutcomeName]
    UNION ALL
    SELECT 4 AS [OutcomeId], 'Inconclusive' AS [OutcomeName]
    UNION ALL
    SELECT 5 AS [OutcomeId], 'To Be Determined (5)' AS [OutcomeName]
    UNION ALL
    SELECT 6 AS [OutcomeId], 'Aborted' AS [OutcomeName]
    UNION ALL
    SELECT 7 AS [OutcomeId], 'Blocked' AS [OutcomeName]
    UNION ALL
    SELECT 8 AS [OutcomeId], 'Not Executed' AS [OutcomeName]
    UNION ALL
    SELECT 10 AS [OutcomeId], 'Error' AS [OutcomeName]
    UNION ALL
    SELECT 11 AS [OutcomeId], 'Not Applicable' AS [OutcomeName]
    UNION ALL
    SELECT 12 AS [OutcomeId], 'Paused' AS [OutcomeName]
    UNION ALL
    SELECT 13 AS [OutcomeId], 'To Be Determined (13)' AS [OutcomeName]
    UNION ALL
    SELECT 255 AS [OutcomeId], 'Never Run' AS [OutcomeName]
    cte_State
    AS
    SELECT 0 AS [StateID], 'None' AS [StateName]
    UNION ALL
    SELECT 1 AS [StateID], 'Ready' AS [StateName]
    UNION ALL
    SELECT 2 AS [StateID], 'Completed' AS [StateName]
    UNION ALL
    SELECT 3 AS [StateID], 'Not Ready' AS [StateName]
    UNION ALL
    SELECT 4 AS [StateID], 'In Progress' AS [StateName]
    UNION ALL
    SELECT 5 AS [StateID], 'To Be Determined' AS [StateName]
    SELECT DISTINCT
    TR.[TestRunId] AS [Run Id],
    TR.[TestCaseId] AS [Case Id],
    O.[OutcomeID] AS [Outcome Id],
    O.[OutcomeName] AS [Outcome],
    S.[StateID] AS [State Id],
    S.[StateName] AS [State],
    TR.[TestCaseTitle] AS [Title],
    TR.[AutomatedTestName] AS [Automation Method],
    TR.[DateStarted] AS [Date Started],
    TR.[DateCompleted] AS [Date Completed],
    DATEDIFF(SECOND, TR.[DateStarted], TR.[DateCompleted]) AS Duration,
    TR.[FailureType] AS [Failure Type],
    TR.[ErrorMessage] AS [Error]
    FROM
    [Tfs_DefaultCollection].[dbo].[tbl_TestResult] AS TR
    INNER JOIN cte_Outcome AS O ON TR.Outcome = O.OutcomeID
    INNER JOIN cte_State AS S ON TR.State = S.StateID
    WHERE
    TR.TestRunId IN $($TestRuns)
    ORDER BY
    TR.[TestRunId],
    O.[OutcomeName],
    TR.[TestCaseTitle]
    $Command.CommandText = $SQLStatement
    $Command.Connection = $Connection
    $Command.CommandTimeout = 30
    $DataAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $DataAdapter.SelectCommand = $Command
    $DataSet = New-Object System.Data.DataSet
    $DataAdapter.Fill($DataSet) | Out-Null
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output "SQL Statement: " | Out-File -FilePath $LogFile -Append
    Write-Output '--------------------------------------------------------------------------------' | Out-File -FilePath $LogFile -Append
    Write-Output "$SQLStatement" | Out-File -FilePath $LogFile -Append
    # --DEBUG ONLY--> $DataSet.Tables[0]
    return $DataSet
    6. Email results to distribution list  
        Currently, I'm simplifying the extraction of suite path ... replacing hardcoded depth with STUFF() & XML PATH
    Carl.

  • How to find all routes that are going out an interface in IOS-XR.

    Hi all,
    So if I have the following set up in IOS:
    interface GigabitEthernet7/0/0.265
    encapsulation dot1Q 265
    ip vrf forwarding test
    ip address 1.1.1.1 255.255.255.252
    ip verify unicast reverse-path
    end
    ip route vrf Apollo 2.2.2.0 255.255.255.248 1.1.1.2
    I can see all the routes that are going out the interface using show ip cef command:
    ios-router#show ip cef vrf test GigabitEthernet7/0/0.265
    2.2.2.0/29
      nexthop 1.1.1.2 GigabitEthernet7/0/0.265
    1.1.1.0/30
      attached to GigabitEthernet7/0/0.265
    1.1.1.2/32
      attached to GigabitEthernet7/0/0.265
    In case of IOS-XR (ASR9K 4.3.2 or 4.3.1) the same setup and command shows only
    attached routes:
    router static
    vrf test
      address-family ipv4 unicast
       2.2.2.0/29 1.1.1.2
    RP/0/RSP0/CPU0:TST_riga-sb7-pe-asr9#show cef vrf test bundle-ether2.265
    Prefix              Next Hop            Interface
    1.1.1.0/30          attached            Bundle-Ether2.2220333
    1.1.1.0/32          broadcast           Bundle-Ether2.2220333
    1.1.1.1/32          receive             Bundle-Ether2.2220333
    1.1.1.2/32          1.1.1.2             Bundle-Ether2.2220333
    1.1.1.3/32          broadcast           Bundle-Ether2.2220333
    Is there any command to see all the routes that are going out an interface without complicated parsing
    of the configuration, recursive show cef commands etc.?

    You can accomplish this with the "show route" command.  Here is an example:
    P/0/RSP1/CPU0:ASR9006-E#sh route next-hop tenGigE 0/3/0/2
    Tue Oct  8 15:34:58.046 UTC
    Codes: C - connected, S - static, R - RIP, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
           ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
           U - per-user static route, o - ODR, L - local, G  - DAGR
           A - access/subscriber, - FRR Backup path
    Gateway of last resort is 172.18.87.1 to network 0.0.0.0
    D    10.95.248.1/32 [90/128512] via 10.129.56.210, 4d00h, TenGigE0/3/0/2
    C    10.129.56.208/30 is directly connected, 4d00h, TenGigE0/3/0/2
    L    10.129.56.209/32 is directly connected, 4d00h, TenGigE0/3/0/2
    O    10.242.142.240/30 [110/20] via 10.129.56.210, 3d11h, TenGigE0/3/0/2
                           [110/20] via 10.129.56.214, 3d11h, TenGigE0/3/0/3
    D    192.168.1.16/32 [90/128512] via 10.129.56.210, 4d00h, TenGigE0/3/0/2
    D    192.168.20.39/32 [90/128512] via 10.129.56.210, 4d00h, TenGigE0/3/0/2
    RP/0/RSP1/CPU0:ASR9006-E#
    Thanks,
    Bryan

  • How to see all devices that are connected to Apple ID

    How to see all devices that are connected to Apple ID

    Are you using a software to see all devices that are supposed to be connected to your router? You can reset and start over with your router.  Make sure you have a security enabled on it like WPA Personal. You can try DHCP Reservation as well to ensure that the devices that will have access to your router are only the ones you included on the list.

  • Where should I store the collatoral files that are associated with photos stored in lightroom?

    Where should I store the collatoral files that are associated with photos stored in lightroom? Items such as pdf files, word documents, etc. How should I connect them to each other so I can find both the photo and the related data?

    Lightroom itself will not help you with pdf, word, etc.
    However, there is a plugin you can use called AnyFile which will allow you to manage these documents in Lightroom (by assigning keywords and other metadata) so that you can search for all documents (photos, pdf, word, music, powerpoint, etc.) with given metadata.
    Because you do this via metadata, it doesn't matter where you put these files. Put them anywhere you want.

  • ERROR_NOT_FOUND: there is no credentials associated with the given resource name. + WCF Service while Retrieving WindowsCredentials

    Hi guys,
    I am struck with a problem while retrieving the Windows Credentials from WCF service.
    1. I have used WSHttpBinding.
    2. I have configured the Website and App pool to run under a specific user who is an Administrator for the server.
    3. I have created the windows Credential of Generic type using Credential manager with the same user.
    4. I configured the Website to allow only Anonymous and Windows Authentication in IIS (IIS Version: 8.5).
    5. I tried the same code in the same server by logging into server with same user and debug the service. The service is returning the windows Credential requested.
    6. But i am unable to retrieve the Windows Credentials from the same code when published in IIS in the same server.
    i configure the Security in Server and client as below:
       <bindings>
          <wsHttpBinding>
            <binding name="wsHttpEndpointBinding">
              <security mode="Transport" >
                <transport clientCredentialType="Windows"/>            
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
    7. I tried to read the error code generated by Credential Manager API from  my code and it returned the below error when i am accessing the deployed service.
    ERROR_NOT_FOUND: there is no credentials associated with the given resource name.
    8. I have also checked this with other environments out side my virtual machine with the same code and config file. All environments it is working fine except my environment. Can any body help me out on this...

    Hi pavan kumar,
        As per this case, I have shared the details below :
    1.where you got stuck & receive error message whether in service side or client side ?
    2.if its in service side, then I suggest you to enable tracing on wcf service for debugging purpose to findout the root cause.
    3.For configure tracing refer here "https://msdn.microsoft.com/en-us/library/ms733025.aspx"
    4.To know about WCF Extensibility – System.Diagnostic Tracing ,then refer the below link
    http://blogs.msdn.com/b/carlosfigueira/archive/2011/08/02/wcf-extensibility-system-diagnostic-tracing.aspx
    5.If its in Client side, Please make sure that the client is in the same or trust domain as service. 

  • How to log all messages that are in JtextArea

    Hi all
    how would i log all message that are in the JTextArea????
    i know of java.util.logging but cant find any usefull tutorials on them.......can someone show me the way to go!
    Thanks
    Dilip

    Yeah dude, I could. But what would that accomplish? Oh sure, that may be some cultural pressure; you know, help out a Hindu-bhai kinda thing, but nah... My giving you the answer won't serve to help you in the long run.
    Ask yourself a couple of questions. Shall I log the information simultaneously (to the JTextArea and the file) or shall I write all the information to the text area first and then to the log file? Is the information in the log fle going to be different than that in the JTextArea because, for example, it is needed for audit purposes?
    I hope I stimulated you think more about the requirements and possible solutions.

  • How to find all table and views in the database

    Hi,
    I want to find all table and view name form the database can u tell me syntax.
    i.e. I am able to find out table name and view name in sql server ...like
    FOR VIEW :
    select table_name from information_schema.views where table_name not like 'sys%'
    FOR TABLE :
    select table_name from information_schema.tables where table_name not like 'sys%' and table_type='Base table'
    Thanks & Regards,
    Shirish

    Hello,
    Take a look at "dba_tables" and "dba_views" both of which are documented here:
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
    - Mark

  • How to find all photos that have NO faces, as opposed to UNNAMED faces?

    I find that iPhoto often misses faces entirely, especially if the face is wearing sunglasses or a hat or both.  Sometimes it is rather inexplicable that it has missed a face, as the face seems obvious.
    If you use the smart album method to find all "unnamed" faces, the photos have at least one unnamed face identified.  You can then add any missed faces to those photos.
    But what about photos in which iPhoto has failed to identify the existence of even one face?  Or for that matter, if I want to see only pictures of landscapes or objects that have no people?  Does anyone have a method for finding all photos that have no faces in them at all?
    For me, the idea is to find all unidentified faces and add them.  But as I pointed out above, there may be other uses for this.
    Any ideas, anyone?
    Thanks

    Awesome !!! Thank you very much. I did not realize you could use JavaScript to code against iTunes ...
    I don't know if you have written any of these yourself, but do you know how to maybe create a smart playlist with this information via script? If not, no big deal. At least I know have something which I can use, I will just have to run it every so often.
    Thanks again for pointing me to that site!

  • How to list all  tables that belongs to the current user?

    hi all
    "select tblowner,tblname from tables where tblowner in (select user from dual);"
    I want a list of all tables that belongs to the current user. I use the SQL above, but given "no rows selectd",but if
    I replace the subquery with literal,like
    "select tblowner,tblname from tables where tblowner = 'JFMDB');".
    I got the list. why?
    Thnk u very much!

    This looks like a bug that was fixed in 7.0.5.13 and onwards. I can reproduce what you are seeing in 7.0.5.10.0 (Linux x86-64 / Access control enabled instance from root install) but not 7.0.5.13.0 (Linux x86-64 / Access control enabled instance from root install).
    Unfortunately I don't have a bug number to pass on. I can't see anything relevant listed in the Release Notes and I haven't found a likely candidate in our internal listings. This may well have been one that was fixed "in passing" when RnD were working on something similar.

  • How to list all calendars that are shared to a specific user?

    Hi,
    Using Exchange Management Shell/Powershell, I want to list all calendars that are shared to a specific user 'myuser'. 
    I have tried different approaches; list all calendars for all users and then figure out which ones are shared to 'myuser', list all mailboxfolders for 'myuser' with path 'calendar' and sort out the shared ones, ... No luck so far.
    Anybody?
    babu

    Hi
    If you try this command:
    Get-MailboxPermission MyUser

  • HT204074 How do I see what devices are associated with my iTunes account?

    http://support.apple.com/kb/HT4627 contains this advice:
    Your Apple ID can have up to 10 devices and computers (combined) associated with it. Each computer must also be authorized using the same Apple ID. Once a device or computer is associated with your Apple ID, you cannot associate that device or computer with another Apple ID for 90 days. You can view which devices or computers are currently associated, remove unused devices or computers, and see how long before they can be associated with a different Apple ID from the Account Information page in iTunes on your computer:
    Open iTunes.
    Sign in to your Apple ID by choosing Store > Sign In from the iTunes menu.
    Choose Store > View My Account from the iTunes menu.
    From the Account Information screen, click Manage Devices.
    Sadly, "Manage Devices" isn't actually there, so I can find no way of seeing which devices and PCs are associated with my Apple ID and how to delete or add to them.

    Manage devices relates to the devices or computers you have set up to automatically download content from your iTunes account aka "iTunes in the Cloud". You can have up to 10 such devices. This is a separate list from the list of 5 computers that can be authorized to play your protected content. There is no similar feature to list this second group, but when you get to 5 computers you can choose to deauthorize all and start again. You cannot use that feature again for a year.
    tt2

  • How to find out which list is associated with specific incoming email address

    Hey Guys,
    I've a received a request today from a user asking me which list was setup with a specific incoming email address.
    Is there a way to find out which list is associated with an email address?
    Thanks

    OK after a bit of research I found a way to achieve this.
    I simply looked up the email address in ADUC, then did a search in SP with the display name. I could locate the list and manually confirm it was configured with the incoming email address I was looking for.
    I also found the below script on Stackoverflow, but got "The 'using' keyword is not supported in this version of the language." when I tried to run it. Any idea how to fix that? I'd like to have a script to link a library to an email address istead of the
    manual approach described above.
    http://stackoverflow.com/questions/4974110/sharepoint-how-do-i-find-a-mail-enabled-list-if-i-only-have-the-email
    $SiteCollection = ""
    $EmailAddress = "" # only the part before the @
    # Load SharePoint module if not done yet
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {Add-PSSnapin Microsoft.SharePoint.PowerShell;}
    cls
    using System;
    using Microsoft.SharePoint;
    namespace FindListByEmail
    class Program
    {a
    static void Main(string[] args)
    string siteUrl = $SiteCollection;
    string email = $EmailAddress;
    using (SPSite site = new SPSite(siteUrl))
    foreach (SPWeb web in site.AllWebs)
    try
    foreach (SPList list in web.Lists)
    if (list.CanReceiveEmail)
    if (list.EmailAlias != null && list.EmailAlias.Equals(email, StringComparison.InvariantCultureIgnoreCase))
    Console.WriteLine("The email belongs to list {0} in web {1}", list.Title, web.Url);
    Console.ReadLine();
    return;
    finally
    if (web != null)
    web.Dispose();

  • How to find the tables which are the candidates for gathering stats in 10g

    Hi,
    In 10g how can we find the tables, partitions which are the candidates for gathering the stats.
    I want to findo those tables, partitions and gather the stats on daily basis.
    Thanks,
    Mahi

    The probem you describe has been posted about before. There are known issues with the default dbms_stats parameter settings for some environements.
    What you can do is just go ahead an manually submit dbms_stats commands with appropriate parameters for tables that have not been analyzed or modify the maintenance window to give it more time.
    I would rather just generate the missing statistics myself then the job can continue to run in the normal maintenance window. Since the job should be looking only for tables that meet the stale requirements then once everything is analyzed it is likely the job can keep the statistics updated in the default time allowed.
    Be warned that the default parameter settings do not work well for some tables in some environments and if that proves true for your shop you can generate workable statistics on a table and then lock them so the nightly job ships regenerating the statistics for that table. You would then manually unlock, generate, and lock that statistics for that table as necessary.
    HTH -- Mark D Powell --

  • How to find all songs that do not have album art

    I create several smart playlists for housekeeping, like songs with no year, songs with no album name, etc. I wanted to create a similar one that lists all songs that do not have any album art associated with it. I have not seen this option when creating a playlist, but I didn't know if there was a way to write a script (that could run on Windows) that could create this playlist for me. I can (and have) gone through each song individually to note which did not have album art, but I have almost 5000 songs, and this is not really feasible any more.
    Has anyone else done anything similar to this? Any suggestions are greatly appreciated.

    Awesome !!! Thank you very much. I did not realize you could use JavaScript to code against iTunes ...
    I don't know if you have written any of these yourself, but do you know how to maybe create a smart playlist with this information via script? If not, no big deal. At least I know have something which I can use, I will just have to run it every so often.
    Thanks again for pointing me to that site!

Maybe you are looking for

  • Can't sync Desktop calendar with T5

    I decided to switch from Outlook to Palm Desktop as main PIM after a configuration change at office which prevented from syncing with Outlook. First global HotSync froze on Calendar, so I restarted without Calendar. Everything else was sync'd between

  • Purchase Order output to be blocked in ECC when the PO is technically Incom

    Hi All, First of all I would like to say that, I have searched the entire forum for this issue & as i could not find any thread relating to this, I am posting. We have implemented SAP GTS & whenever a purchase order is created in ECC system and due t

  • LR4 upgrade license key works on Desktop but not Laptop?

    Hi, I had a fully licensed copy of Lightroom 3 running on my desktop machine (iMac). Once LR4 was released, I downloaded LR4 on that machine to use on a "trial" basis while waiting on my boxed copy of LR4 (upgrade version). Once I get my boxed copy o

  • Problem in Production Process

    Hi My client receives vehicle from customer and changes into ambulance.Assembly process is done here. According to him there are stages in production like: 1. Structure 2. Insulation 3. A/c fitting 4. Despatch These are the stages.Now he wants to iss

  • Is DNS record scavening turned on by default?

    when setting up DNS on a windows 2008 server, is DNS scavenging turned on by default?.... thanks sid