actualmente debo importar las base de datos individualmente con esta parte del script
> Import-Module $PSScriptRoot\..\util\utilConnection.ps1; Import-Module
> $PSScriptRoot\..\util\utilDate.ps1;
> #Import-Module $PSScriptRoot\..\logging\Logging_Functions.ps1; Import-Module AzureRM.sql
>
> $TIMESTAMP = getTimeStamp;
>
>
>
> #Login-AzureRmAccount loginRMAccount;
>
> #Set subscription Azure setSubscriptionAzureeITTS;
>
> Write-Output "";
>
> $myPasswordDB = ConvertTo-SecureString $SQL_ACCOUNT_PASSWORD_QA
> -AsPlainText -Force; $myCredentialDB = New-Object System.Management.Automation.PSCredential ($SQL_ACCOUNT_NAME_QA,
> $myPasswordDB); $sqlCredential = Get-Credential -Credential
> $myCredentialDB;
>
> $resourceGroup = "resGroupDB"; $serverName = "domserverqa"; $database
> = "(2017-09-11-09:00)dbdom_temuco"; $primarykey = $STORAGE_ACCOUNT_BACKUP_KEY; $StorageUri =
> "https://strdatabasebackup.blob.core.windows.net/strdatabasebackupblob/(2017-09-11-09:00)dbdom_temuco.bacpac";
>
>
> $importRequest = New-AzureRmSqlDatabaseImport –ResourceGroupName
> $resourceGroup –ServerName $serverName –DatabaseName $database
> –StorageKeytype StorageAccessKey –StorageKey $primarykey -StorageUri
> $StorageUri -AdministratorLogin $sqlCredential.UserName
> –AdministratorLoginPassword $sqlCredential.Password –Edition Basic
> –ServiceObjectiveName basic -DatabaseMaxSizeBytes 2147483648 # 2GB ->
> 2 * 1024 MB -> 2 * 1024 * 1024 KB -> 2 * 1024 * 1024 * 1024 Bytes
>
> $importStatus = Get-AzureRmSqlDatabaseImportExportStatus
> -OperationStatusLink $importRequest.OperationStatusLink;
>
> while ($importStatus.Status -eq "InProgress") {
> $importStatus = Get-AzureRmSqlDatabaseImportExportStatus -OperationStatusLink $importRequest.OperationStatusLink;
> Write-Output ".";
> [System.Threading.Thread]::Sleep(2000); }
"(2017-09-11-09:00)dbdom_temuco" este dato debo modificar diariamente la fecha y dbdom_"nombre" cambiarlo dependiente la base de datos que estoy importando.
"https://strdatabasebackup.blob.core.windows.net/strdatabasebackupblob/(2017-09-11-09:00)dbdom_temuco.bacpac"; y aqui tambien debo cambiar el nombre temuco por otra base de datos.
existe alguna manera de poner todas las bases de datos juntas y que se importen todas sin tener que hacer manualmente?