What are the challenges you face when working across database platforms? Take the survey

Extract agent info from the clone object

Roll out is going well. I am now looking to ways to effectively cycle images. We agreed with a dev team on a predictable refresh schedule.

I'm trying to get the MachineName and Environement from the clone object using the commandlet. I can't get to figure out the best way to go. I find no hang from the clone object to its sql clone env.

The reason being : After dropping all old images (and their clones), I need to re-create new clones with a newer DB image. Ideally, the process would be fully automated and transparent to the dev teams.

Thanks in advanced for your help

Best Answer

  • Options
    ErdoganOzkocaErdoganOzkoca Posts: 19 Bronze 3
    Hi Benethor,

    You can use the below script to get the machine name and environment from a clone.

    Connect-SqlClone -ServerUrl 'http://your_sql_clone_domain:14145'
    $clone = Get-SqlClone -Name your_clone_name
    $locationId = $clone.LocationId
    $sqlServerInstance = Get-SqlCloneSqlServerInstance | where {$_.Id -eq $clone.LocationId}


Sign In or Register to comment.