I have an sql server (srv1) with an sql database (db1).
I want to go serverless.
I made a copy of db1 --> db2, and provisioned it to be serverless.
db2 is showing under srv1. Why? I asked it to be serverless.
I want to delete this srv1 without erasing db2.
how can i do this?
Serverless is a compute tier for single databases in Azure SQL Database that automatically scales compute based on workload demand and bills for the amount of compute used per second. The serverless compute tier also automatically pauses databases during inactive periods when only storage is billed and automatically resumes databases when activity returns.
It's a price tier and not really 'serverless'. And no matter which kind of Azure SQL database, all still need the Azure SQL Server to host it.
You made a copy of db1 in the same Azure SQL Server(I don't know how you created it), the new copy 'db2' will in the same server in usually. Unless you create a .bacpac file of DB1 and import to other Azure SQL Server.
When you delete the Azure SQL Server, all the database will be deleted and we can not restore it.
You could scale the database to serverless price tier on Portal easily:
SQL Database-->Configure-->General Purpose-->Serverless:
HTH.
Related
I have created an azure SQL database, single database. I would like to see where my backup files are saved. I know in Data Management > Backups I can see my database and can configure retention policies. My question is where are the backup files? I want to restore them in another Azure SQL datbase, either database server or in a SQL managed instance, or simply keep them in some blob for archiving purpose. This is also my issue with Azure SQL database, database server.
As shown in the image above only databases are there with their policies, but the location of saved backups is unclear to me. Thank you for your valuable input.
I have created an azure SQL database, single database. I would like to see where my backup files are saved.
That is not possible. The backups are stored securely with no direct customer access. You can restore to another Azure SQL Database, or create a logical export to a BACPAC file.
Is there a proper way to move a SQL Server 2016 sharded database from self-hosted to Azure Database?
I have a SQL Server 2016 sharded database that is part of the platform (Sitecore 10) I'm working with. It has a Shard Map Manager database and two Shard databases. I want to migrate the databases from self-hosted to Azure Database.
When the database is in a SQL Server Instance, it has one login mapped to the Shard Map Manger user and both Shard users. Everything works great. Since Azure Database does not use logins the same way and the databases are partially contained, I created separate users in each database in Azure with the same name and password.
Next, I migrated the schema with Azure Data Migration Services and then the data. There are some stored procedures that Sitecore provides to setup permissions and I ran those.
Finally, I updated the ServerName and DatabaseName fields in the [__ShardManagement].[ShardsGlobal] table for the ShardMapManager DB and the [__ShardManagement].[ShardsLocal] table in both Shard databases to match the new server and database names.
When I updated the app to use the new database, it spewed errors into the log, ultimately tracking to a failed login for the user. There are 13 other databases for the app which were also migrated and work fine, only the sharded database does not work in the app. I ran a PowerShell script that tests the connection string for all of the databases. All of the connection strings were successful. Backing out only the connection strings for the sharded database fixes the errors proving that the connection to the sharded databases is the problem.
What did I do wrong and what should I do to fix it?
If the requirement is only to migrate the databases from local to Azure, the best possible way is to use SQL Server Management Studio (SSMS).
The advantage is that you can mention the new database name on Azure while migrating itself and hence no need to change later. But just make sure same named database shouldn't available already in Azure SQL Server.
You can follow the migration steps from my this answer.
Also, my suggestion is to go through the official documents Assessment rules for SQL Server to Azure SQL Database migration, Troubleshoot connecting to the SQL Server Database Engine. I'm sure you will find the useful insights there which could help to make migrated database work properly with the apps.
Goal: I need to create a msdb on my Systems Database.
Why: I am trying to move an application database to Azure so multiple computers can connect to it. I created a bacpac file and was able to upload my database, but when I try to connect to the Azure database from the application it won't let me because "msdb..backupset is not supported on this version of SQL Server."
Problem: Azure's SQL Server only has master in its Systems Database. Why does it only have master? How can I get msdb and the others there as well? Do I need a VM?
Problem: Azure's SQL Server only has master in its Systems Database. Why does it only have master? How can I get msdb and the others there as well? Do I need a VM?
yes you need a VM or SQLAZURE managed instance*(which is same as on premises sql server with SQLAgent,clr,...,but with high available capacity of SQLAZure)
The reason why you don't have system databases is ..SQLAZURE is database as service and you just pay for the database you used
*Currently in preview,expected to be GA by the end if this year
I need to copy several hundred tables from an on-premise SQL Server to an Azure SQL Server using ADF. I don't have access to the DB or the network it's on, but I was able to get the on-prem data gateway installed, given an AD account with sufficient DB privileges, and then use the "Copy Data (Preview)" to copy all tables to blob storage.
My problem is that I don't have access to the DB's schema, so I can't easily provision the Azure SQL Server with the necessary tables/columns since there are several hundred tables & performing manually would be extremely time consuming. I found that copying to an Azure Data Warehouse has a "Auto table creation" feature & I am able to copy from on-prem SQL Server directly to Azure DW without defining a schema at the destination, but this isn't supported on Azure SQL Server.
Is there a way to obtain the same script/method that provisions the Azure DW schema & use it for Azure SQL Server? Is there any other way to obtain the source DB's schema via the on-prem data gateway?
given that you were able to run the Copy Data tool to extract data out of on-premises SQL Server, you must have credentials to access the database. Can you run SSMS (SQL Server Management Studio) on the on-prem data gateway and examine/extract the schema?
"Auto table creation" feature is currently only available for Azure Data Warehouse. Supporting this feature when loading into Azure SQL Server is on our backlog but we don't have a committed timeline for this yet.
Shirley Wang
Couldn't you use DMG to run a query against the database to generate the schema for your tables, assuming your AD account has read access to the metadata?
So with your pipeline, instead of it selecting * from each table, have it run a query to exract the schema, some examples here: How can I show the table structure in SQL Server query?
You would then output that to a blob.
We currently have a SQL Server Standard 2014 database on one of our servers that is backed up daily to Azure Blob Storage. Those backups are working well and have restored beautifully to the original server in manual tests.
However, to ensure that our backups continue to be valid, I want to put in place some sort of automated restore testing. Due to performance/disk constraints, I'd rather not do this automated testing on our primary database server. But we can't spend the money to buy more SQL Server Standard licenses to set up another server. And we can't use SQL Server Express, because our database is too large (about 20 GB).
Given that our backups are stored in Azure, I thought the best way to test backup restoration would be to restore the backup directly into an Azure SQL database. I could do this roughly once per week, run some quick checks on the restored data, and then automatically delete the database, and pay for less than 1 hour of service/week. This would result in minimal expense. However, I'm not sure it's possible. Google searches for instructions on how to restore a SQL Server backup directly to Azure SQL haven't turned up anything so far. Is it possible for me to restore my SQL Server backups directly to Azure Managed SQL like this?
If it isn't possible, my next thought is that I could just create an SQL Server VM in Azure and activate/deactivate it as needed for my automated restore tests. That'd be a bit more complicated though, so I'm saving that approach for plan B.
Not Directly. You can only directly import a bacpac file into SQL Azure.
What you can do is use SQL Server on an Azure VM to test your backup files.
Pretty sure you can write a script to automatically pull down the latest .bak file and restore it to the SQL Server Instance on the VM.