Python – Creating sample data in SQL Server on Ubuntu No.62

How to create sample data in SQL Server on Ubuntu is shown in this blog. These steps are available for Windows OS, too. ▼1. What is Microsoft SQL Server ? There are many kinds of SQL Server. for example, Azure SQL Database in cloud, Azure Synapse Analytics – SQL pool (SQL Data Warehouse) and on-premise SQL Server on Azure Virtual Machine (VM) etc We can find the version of SQL Server and hot fixes in this site Microsoft SQL Server Versions List . as Free trial version, SQL Server Express edition on Windows and Linux are available. On windows OS, we can download Express edition by clicking “Download Now”. SQL2022-SSEI-Expr.exe … Continue reading “Python – Creating sample data in SQL Server on Ubuntu No.62”

Java – Put SQL Server select results into a csv file No.70

How to put results of select in SQL Server on Ubuntu into a csv file by Java is shown in this blog. ▼1. Prerequisites There are needed for executing a select query in SQL Server on Ubuntu. 1-1. Installing SQL Server Quickstart: Install SQL Server and create a database on Ubuntu 1-2. Installing Visual Studio Code https://code.visualstudio.com/docs/setup/linux 1-3. Installing Maven Apache Kafka Word Count – Java No.44 “2-3. Installing Apache Maven”Maven – Download Apache Maven 1-4. Generating sample data in SQL Server Python – Creating sample data in SQL Server on Ubuntu No.62 1-5. Executing a select query in SQL Server using Java Java SQL Server on Linux で select … Continue reading “Java – Put SQL Server select results into a csv file No.70”

Python – How to connect to SQL Server on Ubuntu  No.92

How to connect and run select query for a table in SQL Server on Ubuntu using Microsoft ODBC Driver for SQL Server by Python are shown in this blog. ▼1. Connecting to SQL Server on Ubuntu In the past, how to connect and run queries using Java are shown in this blog as below. (As of 2022/12) ▼2. Connecting to SQL Server and Select using Python 2-1. Installing SQL Server on Linux SQL Server 2022 is GA (General Avaiable) on Dec 2022.Quickstart: Install SQL Server and create a database on Ubuntu 2-2. Installing Microsoft ODBC Driver for SQL Server 2-3. Creating a python code to connect to SQL Server on … Continue reading “Python – How to connect to SQL Server on Ubuntu  No.92”

Java – Update Statistics in SQL Server on Ubuntu No.91

How to update statistics for the table in SQL Server on Ubuntu by Java is shown in this blog. ▼1. The latency of a query execution in SQL Server We often see the latency of a query execution in SQL Server. in this case, Statistics for the table might be old. If the statistics of a table is old, the appropriate query execution plan cannot be generated when running a query. such inefficient query execution plan causes long duration time for the query. The resolution of it is to update statistics for a table. the query “update statistics” and “sp_recompile” to generate a ne query execution plan are implemented by … Continue reading “Java – Update Statistics in SQL Server on Ubuntu No.91”

Java – Creating sample data for SQL Server on Ubuntu No.89

In this blog, how to create sample records for SQL Server on Ubuntu using Java is shown. ▼1. Creating sample data using Java In the past blog, these blogs are shared. they use .sql file to create data by sqlcmd. In this blog, there is the simple way to use Java without sqlcmd to create sample data. ▼2. Prerequisites 2-1. Checking Java – Generating the sample data on SQL Server No.87 to execute below. ▼3. Creating sample data for SQL Server by Java 3-1. Create an Apache Maven project 3-2. Remove the existed both App.java and AppTest.java 3-3. Start Visual Studio Code 3-4. Update pom.xml as below to run query … Continue reading “Java – Creating sample data for SQL Server on Ubuntu No.89”

Java – Generating the sample data on SQL Server No.87

In this blog, How to generate the sample data on SQL Server is shown. the key point is to use sqlcmd to run queries in Java. ▼1. Generating the sample data using Java In the pas, how to generate the sample data using python was shown in this blog. Python – Creating sample data in SQL Server on Ubuntu No.62 In the past case, the file which extension is .sql was created and then run this file by sqlcmd. this blog show the way to run query without such .sql file. ▼2. Prerequisites 2-1. Installing SQL Server on Ubuntu Quickstart: Install SQL Server and create a database on Ubuntu 2-2. … Continue reading “Java – Generating the sample data on SQL Server No.87”

Java – Connect to SQL Server on Ubuntu No.5

In this blog, how to connect to SQL Server on Ubuntu using Java is shown. ▼1. What is SQL Server on Ubuntu SQL Server is Relational Database (RDB) provided by Microsoft. SQL Server works on both Windows and Linux. we can use free trial version which is called as “Express Edition” within 180 days. ▼2. How to connect to SQL Server on Ubuntu 2-1. Installing SQL Server on Ubuntu Quickstart: Install SQL Server and create a database on Ubuntu 2-2. Installing Microsoft JDBC Driver 8.2 for SQL Server Installing Microsoft JDBC Driver 8.2 for SQL Server (tar.gz) from Release notes for the Microsoft JDBC Driver for SQL Server Unzip tar –zxvf … Continue reading “Java – Connect to SQL Server on Ubuntu No.5”

Java – Connection String of Microsoft JDBC Driver for SQL Server No.7

I would like to share the detail of connection string of JDBC Driver for SQL Server in this blog. ▼1. Connection String of Microsoft JDBC Driver for SQL Server Connection String contains login timeout, socket timeout,query timeout, query timeout, authentication way and application name etc. ▼2. Example for the connection string of JDBC Driver for SQL Server We can avoid intermittent connection issue by implementing timeout, retry and interval of retry etc. This is an example for the connection string of Microsoft JDBC Driver for SQL Server. ▼3. Reference That’s all. Have a nice day ahead !!!

Java – Save the results of select query on SQL Server into Azure Blob Storage No.75

I will show Java code that save results of select query on SQL Server into Azure Blob Storage. ▼1. Copy data on SQL Server into Azure Blob Storage Azure Data Factory (ADF) is a good and easy way to copy data on SQL Server into Azure Blob Storage. please refer to this document. in this blog, I will show Java code to do it instead of ADF. Ref: Copy and transform data to and from SQL Server by using Azure Data Factory or Azure Synapse Analytics ▼2. Prerequisites We execute select query on SQL Server for Ubuntu. 2-1. Installation of SQL Server on Ubuntu Ref: Quickstart: Install SQL Server and … Continue reading “Java – Save the results of select query on SQL Server into Azure Blob Storage No.75”