Comments
Sort by recent activity
Makes sense to me! I'll raise this with the team.
When you say patching, is that when patching SQL Clone itself and its agents? / comments
Makes sense to me! I'll raise this with the team.
When you say patching, is that when patching SQL Clone itself and its agents?
Thanks for helping us understand!
We'll factor your feedback into our next-step discussions for this feature. / comments
Thanks for helping us understand!
We'll factor your feedback into our next-step discussions for this feature.
Hi Amirhadi,
The Clone agent creates a temporary user on the copied image database, gives it high privileges just on that database (db_owner), and then impersonates it to run your scripts. We implemented it that way for the first pass to keep the scripts from running under Clone agent's (normally high) server-level privileges.
As such, the temporary user is prevented from doing work outside that specific database (i.e. performing server-level activities and reading from or writing to other databases), which will include the use of xp_CMDShell.
I'd love to hear about what you were trying to get done with PowerShell, and how you were blocked with the current implementation. The current process is very much a work in progress - we're trying to get it to a place where it's easy to do whatever you need to do, as safely as possible. User feedback helps us figure out what we need to build next. [image] / comments
Hi Amirhadi,
The Clone agent creates a temporary user on the copied image database, gives it high privileges just on that database (db_owner), and then impersonates it to run your scripts. We imple...
Nowhere too accessible, now I look. I'll put a task up to improve our logging there, but in the meantime you can plow through SQL Clone's config database to find the information. First you need to find the operation that created your image. SELECT TOP 1000 *
FROM SQLClone_Config.dbo.Operations
WHERE Discriminator = N'ImageOperationEf'
ORDER BY Timestamp DESC;
Use that to find the Id of your image creation operation based on its timestamp (when the operation was created), then SELECT *
FROM SQLClone_Config.dbo.OperationMessages
WHERE OperationId = <YourId>;
That should provide you with the start and end times of the operation. / comments
Nowhere too accessible, now I look. I'll put a task up to improve our logging there, but in the meantime you can plow through SQL Clone's config database to find the information. First you need to ...
I'd be very interested in learning if this is reproducible too, either between different people, or just different times. Do you notice this taking reliably longer now, or is it intermittent? How large is the backup file now, roughly? (Just wondering if it has crossed some internal threshold somewhere.) / comments
I'd be very interested in learning if this is reproducible too, either between different people, or just different times. Do you notice this taking reliably longer now, or is it intermittent? How l...
Hi - just as a diagnostic, could you pop open Local Security Policy (secpol.msc), navigate to Local Policies->User Rights Assignment, and have a look under 'Perform volume maintenance tasks'? The agent user should be a member of at least one of the groups under that heading. You can check that via 'Edit local users and groups' (lusrmgr). / comments
Hi - just as a diagnostic, could you pop open Local Security Policy (secpol.msc), navigate to Local Policies->User Rights Assignment, and have a look under 'Perform volume maintenance tasks'? The a...
Hi Paul, I'm afraid neither Data Masker nor SQL Clone are currently included in the SQL Toolbelt. Sorry for any confusion! / comments
Hi Paul, I'm afraid neither Data Masker nor SQL Clone are currently included in the SQL Toolbelt. Sorry for any confusion!
No problem - bear in mind I've spotted a bug in the case where $environmentName is null (intended to specify 'no environment'), in that if there are machines of the given name with an environment set, it'll delete clones from them as well. I'll fix that today and update the post.
Edit: updated! / comments
No problem - bear in mind I've spotted a bug in the case where $environmentName is null (intended to specify 'no environment'), in that if there are machines of the given name with an environment s...
Hi Benethor, how about something like this? Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'
$environmentName = $null # replace with environment name string if desired
$machineName = 'myMachineName'
$instancesOnMachine = Get-SqlCloneSqlServerInstance -MachineName $machineName | where {$_.Environment -eq $environmentName}
foreach ($instance in $instancesOnMachine) {
$clonesToDelete = Get-SqlClone -Location $instance
foreach ($clone in $clonesToDelete) {
Remove-SqlClone $clone | Wait-SqlCloneOperation
}
}
This will find all SQL Server instances on a named machine, then find all clones based on those instances, and delete them. / comments
Hi Benethor, how about something like this?Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'
$environmentName = $null # replace with environment name string if desired
$machineName ...
Hi dbChanger,
If the old machine isn't in use anymore, and any images and clones made using it have been deleted, you can remove it from Clone Server's machines list with the Remove-SqlCloneMachine cmdlet introduced in version 2.3.2.
Let me know if you have any issues! / comments
Hi dbChanger,
If the old machine isn't in use anymore, and any images and clones made using it have been deleted, you can remove it from Clone Server's machines list with the Remove-SqlCloneMachine...