IMPORTANT: Don't miss our expanded TechEd conference, October 23-24, 2024 in Las Vegas. Gain more in-depth technical knowledge, and take a deeper dive into the nuts and bolts of AI, automation, and the UiPath platform. Register now.
declare @tenancyName nvarchar(64)=N'{tenant name}'
declare @folderFullyQualifiedName nvarchar(1000)=N'{folder full path}'
declare @destinationBucketName nvarchar(128)=N'{destination bucket name}'
select '\)\)Orchestrator-'+LOWER(t.[Key])+'\)\)BlobFilePersistence\)\)'+LOWER((select cast(b.[Identifier]asnvarchar(128))
from dbo.Buckets b
inner join dbo.OrganizationUnits ou
on ou.Id = b.OrganizationUnitId
where ou.TenantId = t.Id and ou.IsDeleted =0 and ou.[FullyQualifiedName]= @folderFullyQualifiedName
and b.TenantId = t.Id and b.IsDeleted =0 and b.[Name]= @destinationBucketName))
from dbo.Tenants t
where t.TenancyName = @tenancyName and t.IsDeleted =0declare @tenancyName nvarchar(64) = N'{tenant name}'
declare @folderFullyQualifiedName nvarchar(1000) = N'{folder full path}'
declare @destinationBucketName nvarchar(128) = N'{destination bucket name}'
select '\)\)Orchestrator-' + LOWER(t.[Key]) + '\)\)BlobFilePersistence\)\)' +
LOWER((select cast(b.[Identifier] as nvarchar(128))
from dbo.Buckets b
inner join dbo.OrganizationUnits ou
on ou.Id = b.OrganizationUnitId
where ou.TenantId = t.Id and ou.IsDeleted = 0 and ou.[FullyQualifiedName] = @folderFullyQualifiedName
and b.TenantId = t.Id and b.IsDeleted = 0 and b.[Name] = @destinationBucketName))
from dbo.Tenants t
where t.TenancyName = @tenancyName and t.IsDeleted = 0
declare @tenantName nvarchar(64)=N'{tenant name}'
declare @folderFullyQualifiedName nvarchar(1000)=N'{folder full path}'
declare @destinationBucketName nvarchar(128)=N'{destination bucket name}'
declare @originalBucketName nvarchar(128)=N'{source bucket name}'
update b
set b.[Name]= @originalBucketName
from dbo.Buckets b
inner join dbo.Tenants t
on b.TenantId = t.Id
inner join dbo.OrganizationUnits ou
on b.OrganizationUnitId = ou.Id
where b.TenantId = t.Id and b.IsDeleted =0 and b.[Name]= @destinationBucketName
and ou.TenantId = t.Id and ou.IsDeleted =0 and ou.FullyQualifiedName = @folderFullyQualifiedNamedeclare @tenantName nvarchar(64) = N'{tenant name}'
declare @folderFullyQualifiedName nvarchar(1000) = N'{folder full path}'
declare @destinationBucketName nvarchar(128) = N'{destination bucket name}'
declare @originalBucketName nvarchar(128) = N'{source bucket name}'
update b
set b.[Name] = @originalBucketName
from dbo.Buckets b
inner join dbo.Tenants t
on b.TenantId = t.Id
inner join dbo.OrganizationUnits ou
on b.OrganizationUnitId = ou.Id
where b.TenantId = t.Id and b.IsDeleted = 0 and b.[Name] = @destinationBucketName
and ou.TenantId = t.Id and ou.IsDeleted = 0 and ou.FullyQualifiedName = @folderFullyQualifiedName