Running SQL Server in Google Cloud Platform

 


Migrating to the cloud is not a new thing. According to a LogicMonitor’s survey, 93% of enterprises will be in the Cloud by 2025. With this clear trend, it is important to use the right tools and especially have the right mindset when migrating, even more when migrating databases.

With some regularity, we hear about how companies destroy or lose their crown jewels. When these kind of situations happen, people should remember that there are no shortcuts to doing things the right way. Sometimes we can feel the urge to migrate to the cloud quickly, but by doing so we run the risk of missing important steps that can give us peace of mind in all stages of a migration.


Can I run SQL Server?

Absolutely! It’s actually very simple to setup. I’d argue it’s more simple that configuring SQL Server in AWS RDS or Azure.

Understanding the peculiarities of Cloud SQL

Moving from on-premises to the Cloud brings many new challenges that we need to consider. Within this article we are specifically talking about Google Cloud SQL for MySQL so these examples and points made might not all be valid when looking at the Cloud SQL for Postgres SQL product.



SQL Server installation on GCP

To install SQL Server, you’ll want to look for the “SQL” icon in the left navigation pane. It’ll look like this:



Next, you can either choose to create  new instance of “SQL” or to migrate data.

Why have I been using quotes for “SQL”? That’s because “SQL” doesn’t mean “SQL” Server it’s a language and Microsoft’s marketing team was really smart by naming their platform “SQL Server”. If all you’ve done in the database world is SQL Server then you may be surprised when you click the “SQL” button and create a new instance. SQL Server is one of 3 options along with MySQL and PostgreSQL.

Click SQL Server to start the SQL Server 2019 installation.


Follow the template by specifying an Instance ID and password. Don’t worry about the SKU or Size for now; these will be further down the page.



If your instance will be used for anything other than dev or testing you’ll want to configure the machine type and storage. To “right-size” your environment it’s best to evaluate your existing server to validate the IOPS, compute, and memory usage.




One annoying fact about PaaS offerings from each cloud provider is that memory is tightly tied to vCores. With Azure you only get 5 GB of RAM per vCore. GCP isn’t much different but you do have the option to toggle memory options up to “High memory”. What does this actually mean? Not much. Memory is still tied to the amount of vCores and with 96 total vCores you get only 624 GB of RAM but it’s worth noting that this (6.5 GB/vCore) is more RAM per vCore than Azure provides.

What I’d really like to see is more flexibility from cloud providers. RAM should not be tied to vCores. I should be able to choose 16 vCores and 768 GB of RAM.




Next, configure your backups and availability zone options.




Configure trace flags, if needed. Actually, this is pretty neat. Azure forces a blanket of trace flags for Managed Instances and GCP allows you to configure them here easily. Click the “learn more” link to see more about trace flags.





GCP also allows you to specify your preferred maintenance window. Specify a time that works for you.




Finally, click create and your instance will begin deploying.




Before you attempt to connect you’ll want to configure your network. You can choose between a private or public ip (default). If you go with the default (public) you’ll want to add your ip to the “Authorized networks” list and then click “Save”.



Dive deeper into Cloud SQL

To really understand Cloud SQL, there’s really no better place than the official Google Cloud SQL documentation. I really suggest reading it through to get a good feel for CloudSQL.


Conclusion


If you prepare and test well, the day of the migration might actually be a bit boring. But afterwards you’ll feel much better, knowing that there were no surprises left to find. Google grants a $300 credit, so feel free to follow along. Get started here: https://cloud.google.com






                            π•Ώπ–π–†π–“π–π–˜ & π•½π–Šπ–Œπ–†π–—π–‰π–˜...
Share on Google Plus

About Freaky Analyst

A Passionate Data analyst working with large amounts of data and to turn this data into information, information into insight and insight into valuable decisions. I also have a keen interest in the field of data analysis, data visualization and am fascinated by the power to compress complex datasets into approachable and appealing graphics.
    Blogger Comment

0 comments:

Post a Comment