GCloud, how to connect to MSSQL instance - sql-server

This is straightforward but I haven't found out how to do it.
I started using Google Cloud and setup my PostgreSQL instance.
Now I need to migrate data from another MSSQL database, but not all of it.
I can migrate from my local computer connecting to both databases.
Now I'd like to do the same directly from GCloud.
The posts that I've found describe how to create the whole MSSQL from GCloud, but I only need to connect to one that has been created.
However, I haven't found how to connect to MSSQL from there. Specifically, how do I install the necessary drivers?
Thanks.

Related

How to connect to an on-premises SQL Server from an Azure ML notebook?

I typically use pyodbc when running jupyter notebooks from my machine, but this does not work on Azure ML. My assumption is that this is being caused by Azure ML not knowing if I'm on my company's network as I typically need a VPN to the server if I'm not in office. The only solutions I can find online involve copying the data over on Azure Data Factory however I need to avoid this if possible as there are many tables I will need to experiment with, but nothing is intended to be long term and I'm unsure what I will even end up using.
Ideally there is a way to make pyodbc work but any other suggestions are welcome. I have researched integration runtimes but was unsure if that would solve my problem here.
The only solutions I can find online involve copying the data over on
Azure Data Factory however I need to avoid this if possible as there
are many tables I will need to experiment with, but nothing is
intended to be long term and I’m unsure what I will even end up using.
Ideally there is a way to make pyodbc work but any other suggestions
Unfortunately, the on-Prem SQL Server is not supported as a Data Source in Azure ML.
Only the Data sources available below are supported:-
Approach1)
You can copy your data from the on-premises SQL database to Azure SQL via copy tool in Azure Data factory and connect to Azure SQL via Azure Machine learning by directly connecting to it via Datasource like below:-
You can also use Self-hosted integration run time to connect to your SQL server on-prem in your data factory:-
Click on Option 2 to download the Integration runtime and set it in your local machine with the Registration keys mentioned above:-
Approach2)
If there’s a large data You can automate your entire copy process from the on-prem SQL server to Azure SQL by using the Azure DevOps pipeline.
References:-
https://learn.microsoft.com/en-us/answers/questions/775844/unable-to-connect-sql-server-to-azure-ml-pipeline By Ramr-msft
How To: Azure Data Factory CI/CD with Azure DevOps pipelines — The YAML WAY! | by Raghavendra Bharadwaj | Servian

How to dockerize a Visual Studio SQL Database Project?

I have a solution consisting of different small web-services, which right now I can simply build and run each in their own container via docker-compose.
Now, another service will be added, which will need some data access. Since running a mssql server on in a docker container is rather easy and basically consists of one entry in the docker compose, I would like to do the following:
Create a SQL Database project and add it to my solution
Configure the database project, so that it fits the need of the web service
build a containerized SQL-Sever and automatically publish the database schema from my database project
build the web service and connect it up with the containerized SQL server
The goal is, that after running docker-compose, everything should be up and running.
Is this possible as described?
One additional note: The whole thing is just a hobby project, I want to get familiar with docker, APIs and access to databases.

Best way to run SQL Server in Docker in Azure

Trying to find article or solution page in Azure but I am not successful yet.
The title is pretty much self explanatory. I am looking for a known best practice or solution with steps to follow to run docker with SQL Server in Azure.
I have Docker with SQL Server Express, Docker for Windows, running locally and my expectation is simply deploying this to Azure.
Based on my short experience with Azure, I probably need to set up some Azure service where I can deploy my docker image and run, not sure what that Azure product should be (probably more of Azure Container than Azure SQL)
well, given your requirement of windows containers (why?), you can use either Azure Container Instances (but be mindful of base images they support) or AKS engine. I'd discard webapps.

How to deploy database on linux

I have a small asp.net core website that I push to my server via jenkins. Jenkins does git checkout and then dotnet restore and dotnet run. It works for the website, but I added entity framework and I'm a little confused. How exactly do I move my local database to the server? Or should I create one on the server and then reference it?
I have one mssql database on (localdb)\MSSQLLocalDB, but when I run the server and try to go to a page which gets data from the database I get 500 Internal Server Error.
I would like to have one local db for testing and one on the server, but I just can't wrap my head around all of this.
Well in development, you should write a init script for your database. This will create all the required stuff your application needs.
So in linux...
Install the MySQL, get the users set up, and init the database.
In your application...
Provide the connection string for the DB installed in Linux.
I am not running my app in c# but this is similar to my node app. That is what I do. I develop in windows with Postgres. Then my prod is on a GoDaddy Linux cloud server and I have Postgres installed in that. When I do my git pull for the latest, I don't have to change much because of the .env file for my environment variables.

Connect PhpMyAdmin to database in server

I have PhpMyAdmin and MySQL running in Windows 8.
I have installed them using Apache friends XAMPP v 3.1, so I didn’t do any configuration myself.
Currently if I go to localhost/phpmyadmin">http://localhost/phpmyadmin, then it automatically shows my local MySQL db and tables.
That I need is connect to remote server(it has MySQL) and runnig locally in my machine , for teh user of one app.
How can I connect to that server from phpmyadmin.
I’ve been trying to find if there any kind of connect panel in phpmyadmin, but no fruit yet.
For rather severe security reasons applicable servers to connect to are not configured at runtime but in the core configuration file config.inc.php. Otherwise a single hacked database account on an edge server could easily expose the entire network for brute force hacking, or tunneling into LAN-only unsecured databases.

Resources