C# – Connecting to SQL Server on Ubuntu20.04 -VS Code No.104

This blog provides instructions on how to connect to and run a select query in SQL Server on Ubuntu 20.04 using .NET Data Provider for SQL Server (SqlClient). Contents ▼1. Connecting to SQL Server on Ubuntu by C#2-1. Installing Ubuntu 20.04.2 LTS2-2. Installing Visual Studio Code2-3. Installing C# extension2-4. Adding “Microsoft package signing key” into the list of trusted keys and adding the package repository as well▼3. Executing a select query in SQL Server by C#3-1. Creating an application and then starting VSCode in the path where the application is generated3-2. Adding System.Data.SqlClient in MytestApp.csproj and saving this file by Ctrl+ S3-3. Restoring the dependencies and tools of a project3-4. … Continue reading “C# – Connecting to SQL Server on Ubuntu20.04 -VS Code No.104”

Python -Run a transactional query in MySQL on Ubuntu No.103

How run a transactional query in MySQL on Ubuntu using Python is shown here. Contents ▼1. Run a transactional query in MySQL on Ubuntu▼2. Prerequisites▼3. Creating Python code to insert data with False of “autocommit” in MySQL on Ubuntu3-1. Creating Python code3-2. Results3-3. Confirming results of select query by connecting to MySQL from a terminal3-4. Results when commit is executed3-5. Confirming results after connecting to MySQL from a terminal.▼4. Reference▼1. Run a transactional query in MySQL on Ubuntu Regarding SQL Server on Ubuntu, how to execute a transactional query using Java and Python were shown in the past. regarding MySQL on Ubuntu, pyodbc is used for the connection to MySQL. … Continue reading “Python -Run a transactional query in MySQL on Ubuntu No.103”

Python – Put data in MySQL into Azure Blob Storage No.102

How to put the results of select query for MySQL into Azure Blob Storage using Python is shown in this blog. Contents ▼1. Saving data in MySQL into Azure Blob Storage▼2. Prerequisites▼3. Python code to save data in MySQL into Azure Blob Storage3-1. Creating python code3-2. Results of this code▼4. Reference▼1. Saving data in MySQL into Azure Blob Storage In the past, how to save data in MySQL into a local file using Python was shown in the following blog. in this case, the target of saving data is Azure Blob Storage. Python – Save data of MySQL into a local file  No.99 ▼2. Prerequisites How to create an environment … Continue reading “Python – Put data in MySQL into Azure Blob Storage No.102”

Python – Error handling & Retry in MySQL on Ubuntu  No.101

How to implement the error handling and retry with some interval in MySQL on Ubuntu by Python is shown in this blog. Contents ▼1. Why do we need an error handling and an retry logic?▼2. Prerequisites▼3. Creating the Python code to implement the error handling & retry logic3-1. Developing a python code for an error handling and a retry logic3-2. Results for this code▼4.  Others: Confirming the listening port of MySQL▼5. Reference▼1. Why do we need an error handling and an retry logic? We often use a cloud service and a remote service through the network. if the network intermittently cause something problems, the client application cannot access these services and … Continue reading “Python – Error handling & Retry in MySQL on Ubuntu  No.101”

Python – Save data of MySQL into a local file  No.99

How to save the results of select query in MySQL on Ubuntu through pyodbc into a local file using python is shown in this blog. Contents ▼1. Save data of MySQL on Ubuntu into a file▼2. Prerequisites▼3. Python code to save results of select query for MySQL into a file3-1. Creating python code3-2. Results of this code▼4. Reference▼1. Save data of MySQL on Ubuntu into a file In the past, how to save data My MySQL into a file using Java was provided in this blog as below. in this case, it will be implemented by Python. Java -Save the results of select for MySQL into a file No.85 ▼2. Prerequisites How … Continue reading “Python – Save data of MySQL into a local file  No.99”

Python – Connect to MySQL on Ubuntu 20.04 by pyodbc No.98

How to connect to MySQL by pyodbc and run select statement using Python is shown in this blog. Contents ▼1. Connecting to MySQL by pyodbc Python▼2. Prerequires2-1. Installing MySQL on Linux2-2. Installing MySQL の Connector/ODBC 8.0.312-2-1.  Downloading 2 types of files from MySQL site2-2-2.  Extracting the tar.gz files that were downloaded2-2-3.  Registering ODBC Driver using myodbc-installer2-2-4.  Confirming the registered ODBC Driver2-2-5.  Setting up myodbc-connector-odbc2-2-6.  Adding below in /etc/odbc.init2-2-7.  Updating config file▼3. Python code to connect to MySQL and execute select query3-1. Create Python code3-2.  Results of this code▼4. Reference▼1. Connecting to MySQL by pyodbc Python In the past blogs, how to connect to MySQL using Java is provided as below. in this … Continue reading “Python – Connect to MySQL on Ubuntu 20.04 by pyodbc No.98”

Python – Create Sample data in SQL Server on Ubuntu v2 No.97

How to create sample data in SQL Server on Ubuntu using Python is shown in this blog. Contents ▼1. Creating sample data using Python▼2. Prerequisites▼3. Bulk create sample data in SQL Sever3-1. Creating Python code3-2. Results of this python code▼4. Reference▼1. Creating sample data using Python In the past, how to create sample data using the insert query that is created by python code was provided below in this case, this insert query was executed using sqlcmd utility. but this blog all of steps is executed by python without sqlcmd. Python – Creating sample data in SQL Server on Ubuntu No.62 ▼2. Prerequisites How to build an environment using Python … Continue reading “Python – Create Sample data in SQL Server on Ubuntu v2 No.97”

Python -Save data in SQL Server into Azure Blob Storage No96

How to save the results of select statement into Azure Blob Storage after connecting to SQL Server on Ubuntu through pyodbc using python is shown in this blog. Contents ▼1. Saving data in SQL Server on Ubuntu into Azure Blob Storage▼2. Prerequisites▼3. Developing Python code to save the results of select query in SQL Server into Azure Blob Storage3-1. Creating Python code3-2. Results of this code▼4. Reference▼1. Saving data in SQL Server on Ubuntu into Azure Blob Storage Based on the previous blog using Java as below, pyhon code is shown to save the results of select statement into Azure Blob Storage. Java – Save the results of select query … Continue reading “Python -Save data in SQL Server into Azure Blob Storage No96”

Python – Save data in SQL Server on Ubuntu into a file No.95

How to save the results of select statement into a file after connecting to SQL Server on Ubuntu through pyodbc using python is shown in this blog. Contents ▼1. Saving data in SQL Server on Ubuntu into a file▼2. Prerequisites▼3. Developing Python code to save the results of select query in SQL Server into a file3-1. Creating Python code3-2. Results of this code▼4. Reference▼1. Saving data in SQL Server on Ubuntu into a file Based on the previous blog using Java as below, pyhon code is shown to save the results of select statement into a file. Java – Put SQL Server select results into a csv file No.70 ▼2. … Continue reading “Python – Save data in SQL Server on Ubuntu into a file No.95”

Python -Run a transactional query SQL Server on Ubuntu No.94

How to execute commit or rollback for a transactional query using python and pyodbc in SQL Server on Ubuntu is shown in this blog. Contents ▼1. Run a transactional query in SQL Server on Ubuntu▼2. Creating Python code to insert data with False of “autocommit”2-1. Creating Python code2-2. Results of this code2-3. Confirming data in table after connecting to SQL Server by sqlcmd utility▼3. Reference▼1. Run a transactional query in SQL Server on Ubuntu Regarding Java, how to execute a transactional query was shown in this past blog as below. this blog is written to implement it by Python. the autocommit of pyodbc is true. it is meant to commit … Continue reading “Python -Run a transactional query SQL Server on Ubuntu No.94”