So I was using Microsoft Azure trial version and I made SQL server and database. I made a backup and got .bacpac file exported. I've just logged in and saw that I lost my database because my free trial expired. Can I somehow still open database using .bacpac file? I sent an email to their support, but still waiting for the response.
Asked
Active
Viewed 102 times
0
-
Maybe you should ask this question at dba.stackexchange.com. This site is for programming questions. – The Impaler Jan 22 '19 at 16:51
-
1Check this? https://learn.microsoft.com/en-us/azure/sql-database/sql-database-import – Souvik Ghosh Jan 22 '19 at 16:53
-
Thank you, it helped me to restore my data! – Natasa Andzic Jan 22 '19 at 22:16
1 Answers
0
Of course. From the docs:
$importRequest = New-AzureRmSqlDatabaseImport
-ResourceGroupName "<your_resource_group>" `
-ServerName "<your_server>" `
-DatabaseName "<your_database>" `
-DatabaseMaxSizeBytes "<database_size_in_bytes>" `
-StorageKeyType "StorageAccessKey" `
-StorageKey $(Get-AzureRmStorageAccountKey -ResourceGroupName "<your_resource_group>" -StorageAccountName "<your_storage_account").Value[0] `
-StorageUri "https://myStorageAccount.blob.core.windows.net/importsample/sample.bacpac" `
-Edition "Standard" `
-ServiceObjectiveName "P6" `
-AdministratorLogin "<your_server_admin_account_user_id>" `
-AdministratorLoginPassword $(ConvertTo-SecureString -String "<your_server_admin_account_password>" -AsPlainText -Force)

Murray Foxcroft
- 12,785
- 7
- 58
- 86