This Blog will help to create backup file for Azure analysis database model.
We have used PowerShell to execute Analysis command which help to create backup file for AS model ,Please find the code below :-
$fulldate="_"+(get-date).ToString("ddMMyyyhhmmss")
#$fulldate
$MonYear=(get-date).date.AddMonths(-1).ToString("MMMyyy")+"/"
$ServerName1="<SERVERNAME>"
$ServerName2="<Servername>"
$Secure_String_Pwd = ConvertTo-SecureString "Pass@1234" -AsPlainText -Force
#$Secure_String_Pwd
$cred = Get-AutomationPSCredential -Name 'aasautomationcred'
#$cred
$modellist = @("cubename1","cubename2")
$modellist
for ($i=0; $i -lt $modellist.Length; $i++)
{
$modelname=$modellist[$i]
if($modelname -eq "cubename" -or $modelname -eq "cubename")
{
Backup-ASDatabase -Server $ServerName2 -Name $modelname –backupfile ($MonYear+$modelname+$fulldate+".abf") -ApplyCompression -FilePassword:$Secure_String_Pwd -Credential $cred -ErrorAction Stop
}
else
{
Backup-ASDatabase -Server $ServerName1 -Name $modelname –backupfile ($MonYear+$modelname+$fulldate+".abf") -ApplyCompression -FilePassword:$Secure_String_Pwd -Credential $cred -ErrorAction Stop
}
}
Good day! I just wish to give you a huge thumbs up for your excellent information you have got here on this post. I am coming back to your blog for more soon. נערות ליווי באשדוד
Good post. I absolutely appreciate this website. Thanks!
Can I just say what a relief to uncover an individual who really understands what theyre talking about on the web. You certainly know how to bring a problem to light and make it important. More people ought to read this and understand this side of the story. I was surprised that you arent more popular given that you most certainly have the gift.
Thanks for appreciation,PLease fwd as much you can
Thanks