SlideShare a Scribd company logo
1 of 21
SQL on Linux
www.datavail.com 2
JP Chen
Senior Director and Practice Leader, SQL
Server Practice, Datavail
Enterprise SQL Support
Both as a DBA and DBA Team Manager and Director, JP
brings a wealth of technical certifications and hands-on
experience to every project.
SQL Performance Monitoring & Tuning
Design and develop comprehensive solutions on database
documentation, monitoring and alerting, stabilization, and
continuous improvements with performance monitoring and
tuning.
SQL Server Blogs & Whitepapers
Eager to share his knowledge with the larger SQL Server
community, JP is an avid blogger and author, posting regular
content on Datavail.com.
www.datavail.com 3
Datavail
Overview
Databases, Analytics, and
Application Data Integration
13+ years delivering
data services
300+ customers with
average client
retention of 7 years
Managed services,
projects, and staffing
We are data specialists
All major platforms: SQL,
Oracle, DB2, MySQL, Mongo
Comprehensive
development & operational
services
US & Global models
Reactive and proactive
services
Database
Operations
EBS
Hyperion/Essbase
Microsoft Dynamics
SharePoint
Custom development
• Microsoft .NET
• Oracle APEX
Application
Management
Microsoft SSRS, SSIS, SSAS
PowerBI
Oracle OBIEE, BICS, Golden Gate
Analytics, Visualization
& Integration
Informatica
Oracle Data Integrator
ETL development and
operational run
Complete Our
Evaluation &
Win Prizes!
Complete our survey
and you will be entered
to win a pair of noise
cancelling headphones
or Datavailopoly!
www.datavail.com 5www.datavail.com 5
Building the SQL on Linux Lab
Connecting to SQL on Linux
Configuring SQL on Linux with the mssql-conf tool
Creating, Backing up, and Restoring a Database
Exploring the System Monitoring Tools on Linux
Summary and Next Steps
Agenda
www.datavail.com 6www.datavail.com 6
Building the SQL on
Linux Lab
Downloading the software required – all free!
Installing the software required
Installing the SQL Server command-line tools
www.datavail.com 7www.datavail.com 7
Downloading the software
required – all free!
VirtualBox
Ubuntu Server
PuTTY
SQL Server 2017
www.datavail.com 8www.datavail.com 8
Installing the software
required
Install VirtualBox
Install Ubuntu Server
Install PuTTY Remote Terminal
Install SQL Server 2017
www.datavail.com 9www.datavail.com 9
Installing the SQL Server
command-line tools
Install the mssql-tools – SQLCMD and BCP
Connect to SQL Server locally
DEMO
Connecting to SQL
using sqlcmd
www.datavail.com 10www.datavail.com 10
Change the VirtualBox Network
Adapter to “Host-only Adapter” Before
Continuing
Get the IP Address of the
Ubuntu Server
Update the hosts file in the
Windows PC
Connect from SQL Server
Management Studio (SSMS)
Connect from Azure Data Studio
Connecting to SQL on Linux
www.datavail.com 11
Getting the
SQL on
Linux Lab
Ready
Change the VirtualBox Network Adapter to
“Host-only Adapter” Before Continuing
Get the IP Address of the Ubuntu Server
Update the hosts file in the Windows PC
DEMO
Getting the SQL on
Linux lab ready
www.datavail.com 12
Connecting
from SQL
Server
Management
Studio
(SSMS)
www.datavail.com 13
Connecting
from Azure
Data Studio
www.datavail.com 14www.datavail.com 14
mssql-conf tool: configuration script equivalent of SQL Server
Configuration Manager (SSCM) and sp_configure stored proc
Parameters configuration for: agent, collation, default data, log,
dump, error log, and backup directories, memory limit, TCP port,
traceflags, and many others
Configuring SQL on Linux with the
mssql-conf tool
DEMO
Configuring memory
limit and TCP port
www.datavail.com 15
Creating,
Backing up,
and
Restoring a
Database
Create a database
Backup a database
Restore a database
DEMO
Creating, backing up,
and restoring a database
www.datavail.com 16
Exploring
the System
Monitoring
Tools on
Linux
htop
glances
iostat
www.datavail.com 17
Using htop Monitors all process running on the
system
Allows you to kill a process, configure
nice, sort columns, search for
processes, and a lot more
DEMO
Using htop
www.datavail.com 18
Using
glances
Monitors CPU, load, memory, network rate,
disk i/o, and file system
Shows 4 different types of color
• Green – ok
• Blue – attention
Adjust the thresholds by modifying the configure
file located in /etc/glances/glances.conf
• Violet – alert
• Red – critical
DEMO
Using glances
www.datavail.com 19
Using
iostat
Collects and shows operating system
storage input and output statistics
Identifies storage devices performance
issues
• Local disk
• Remote disk
DEMO
Using iostat
www.datavail.com 20
Summary
and Next
Steps
Summarize our key points
Focus on the next steps
• Optimize performance for SQL on Linux
• Run SQL Server container images with Docker
Adapt and Expand
Thank you

More Related Content

What's hot

PASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and BaseliningPASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and BaseliningPARIKSHIT SAVJANI
 
What's new in SQL Server 2017
What's new in SQL Server 2017What's new in SQL Server 2017
What's new in SQL Server 2017Hasan Savran
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101IDERA Software
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsSQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsHostway|HOSTING
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2Gianluca Hotz
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Antonios Chatzipavlis
 
Reduce latency and boost sql server io performance
Reduce latency and boost sql server io performanceReduce latency and boost sql server io performance
Reduce latency and boost sql server io performanceKevin Kline
 
Advanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAAdvanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAIDERA Software
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaSJohn Martin
 
Stretch Database
Stretch DatabaseStretch Database
Stretch DatabaseSolidQ
 
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAGeek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAIDERA Software
 
MySQL enterprise edition
MySQL enterprise edition MySQL enterprise edition
MySQL enterprise edition Mark Swarbrick
 
Introduction to sql database on azure
Introduction to sql database on azureIntroduction to sql database on azure
Introduction to sql database on azureAntonios Chatzipavlis
 
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERABe Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERAIDERA Software
 
SQL ON Azure (decision-matrix)
SQL  ON  Azure (decision-matrix)SQL  ON  Azure (decision-matrix)
SQL ON Azure (decision-matrix)PARIKSHIT SAVJANI
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesJohn Martin
 

What's hot (20)

PASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and BaseliningPASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and Baselining
 
What's new in SQL Server 2017
What's new in SQL Server 2017What's new in SQL Server 2017
What's new in SQL Server 2017
 
Diving into sql server 2016
Diving into sql server 2016Diving into sql server 2016
Diving into sql server 2016
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsSQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite Things
 
SQL Azure Overview
SQL Azure OverviewSQL Azure Overview
SQL Azure Overview
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs
 
Reduce latency and boost sql server io performance
Reduce latency and boost sql server io performanceReduce latency and boost sql server io performance
Reduce latency and boost sql server io performance
 
Advanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAAdvanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERA
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
 
Stretch Database
Stretch DatabaseStretch Database
Stretch Database
 
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAGeek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
 
MySQL enterprise edition
MySQL enterprise edition MySQL enterprise edition
MySQL enterprise edition
 
Introduction to sql database on azure
Introduction to sql database on azureIntroduction to sql database on azure
Introduction to sql database on azure
 
MySQL ppt
MySQL ppt MySQL ppt
MySQL ppt
 
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERABe Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
 
SQL Azure
SQL AzureSQL Azure
SQL Azure
 
SQL ON Azure (decision-matrix)
SQL  ON  Azure (decision-matrix)SQL  ON  Azure (decision-matrix)
SQL ON Azure (decision-matrix)
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 

Similar to SQL on Linux

Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Bob Ward
 
SANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBASANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBASankar Sahu
 
Windows on AWS
Windows on AWSWindows on AWS
Windows on AWSDatavail
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformMarcelo Paiva
 
Overview SQL Server 2019
Overview SQL Server 2019Overview SQL Server 2019
Overview SQL Server 2019Juan Fabian
 
Senior database administrator
Senior database administratorSenior database administrator
Senior database administratorMustafa EL-Masry
 
Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2Eduardo Castro
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmurTobias Koprowski
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersTobias Koprowski
 
What’s new in SQL Server 2017
What’s new in SQL Server 2017What’s new in SQL Server 2017
What’s new in SQL Server 2017James Serra
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015Richard Chauvet
 
introduction to sql server by moamen hany
introduction to sql server by moamen hanyintroduction to sql server by moamen hany
introduction to sql server by moamen hanyMoamen Hany ELNASHAR
 

Similar to SQL on Linux (20)

Patel v res_(1)
Patel v res_(1)Patel v res_(1)
Patel v res_(1)
 
Sufaid Elampilavil-CV
Sufaid Elampilavil-CVSufaid Elampilavil-CV
Sufaid Elampilavil-CV
 
Sql Azure Pass
Sql Azure PassSql Azure Pass
Sql Azure Pass
 
Sql Azure Pass
Sql Azure PassSql Azure Pass
Sql Azure Pass
 
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
 
SANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBASANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBA
 
Windows on AWS
Windows on AWSWindows on AWS
Windows on AWS
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
 
Overview SQL Server 2019
Overview SQL Server 2019Overview SQL Server 2019
Overview SQL Server 2019
 
Lorenzos_Resume
Lorenzos_ResumeLorenzos_Resume
Lorenzos_Resume
 
Senior database administrator
Senior database administratorSenior database administrator
Senior database administrator
 
Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
 
Praveen Kumar Resume
Praveen Kumar ResumePraveen Kumar Resume
Praveen Kumar Resume
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 
What’s new in SQL Server 2017
What’s new in SQL Server 2017What’s new in SQL Server 2017
What’s new in SQL Server 2017
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015
 
Ruchika Goswami_DBA
Ruchika Goswami_DBARuchika Goswami_DBA
Ruchika Goswami_DBA
 
Santhosh sybase dba
Santhosh sybase dbaSanthosh sybase dba
Santhosh sybase dba
 
introduction to sql server by moamen hany
introduction to sql server by moamen hanyintroduction to sql server by moamen hany
introduction to sql server by moamen hany
 

More from Datavail

Journey to Cloud Analytics
Journey to Cloud Analytics Journey to Cloud Analytics
Journey to Cloud Analytics Datavail
 
Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud Datavail
 
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?Datavail
 
Oracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action finalOracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action finalDatavail
 
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora Datavail
 
EPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 PreparednessEPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 PreparednessDatavail
 
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsOptimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsDatavail
 
RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change Datavail
 
Upcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for YouUpcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for YouDatavail
 
Reduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaSReduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaSDatavail
 
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...Datavail
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyDatavail
 
Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?Datavail
 
Critical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsCritical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsDatavail
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure MigrationsDatavail
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyDatavail
 
3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBADatavail
 
Creating a Solid EPM Punch List
Creating a Solid EPM Punch ListCreating a Solid EPM Punch List
Creating a Solid EPM Punch ListDatavail
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasDatavail
 
KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice
KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice
KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice Datavail
 

More from Datavail (20)

Journey to Cloud Analytics
Journey to Cloud Analytics Journey to Cloud Analytics
Journey to Cloud Analytics
 
Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud
 
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
 
Oracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action finalOracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action final
 
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
 
EPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 PreparednessEPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 Preparedness
 
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsOptimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
 
RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change
 
Upcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for YouUpcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for You
 
Reduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaSReduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaS
 
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
 
Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?
 
Critical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsCritical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM Applications
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure Migrations
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
 
3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA
 
Creating a Solid EPM Punch List
Creating a Solid EPM Punch ListCreating a Solid EPM Punch List
Creating a Solid EPM Punch List
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB Atlas
 
KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice
KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice
KScope Webinar: Couples Therapy: Getting Finance & IT to Play Nice
 

Recently uploaded

Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
Vision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxVision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxellehsormae
 
detection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptxdetection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptxAleenaJamil4
 
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGILLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGIThomas Poetter
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxaleedritatuxx
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhYasamin16
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024Timothy Spann
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Boston Institute of Analytics
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 

Recently uploaded (20)

Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
Vision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxVision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptx
 
detection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptxdetection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptx
 
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGILLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 

SQL on Linux

  • 2. www.datavail.com 2 JP Chen Senior Director and Practice Leader, SQL Server Practice, Datavail Enterprise SQL Support Both as a DBA and DBA Team Manager and Director, JP brings a wealth of technical certifications and hands-on experience to every project. SQL Performance Monitoring & Tuning Design and develop comprehensive solutions on database documentation, monitoring and alerting, stabilization, and continuous improvements with performance monitoring and tuning. SQL Server Blogs & Whitepapers Eager to share his knowledge with the larger SQL Server community, JP is an avid blogger and author, posting regular content on Datavail.com.
  • 3. www.datavail.com 3 Datavail Overview Databases, Analytics, and Application Data Integration 13+ years delivering data services 300+ customers with average client retention of 7 years Managed services, projects, and staffing We are data specialists All major platforms: SQL, Oracle, DB2, MySQL, Mongo Comprehensive development & operational services US & Global models Reactive and proactive services Database Operations EBS Hyperion/Essbase Microsoft Dynamics SharePoint Custom development • Microsoft .NET • Oracle APEX Application Management Microsoft SSRS, SSIS, SSAS PowerBI Oracle OBIEE, BICS, Golden Gate Analytics, Visualization & Integration Informatica Oracle Data Integrator ETL development and operational run
  • 4. Complete Our Evaluation & Win Prizes! Complete our survey and you will be entered to win a pair of noise cancelling headphones or Datavailopoly!
  • 5. www.datavail.com 5www.datavail.com 5 Building the SQL on Linux Lab Connecting to SQL on Linux Configuring SQL on Linux with the mssql-conf tool Creating, Backing up, and Restoring a Database Exploring the System Monitoring Tools on Linux Summary and Next Steps Agenda
  • 6. www.datavail.com 6www.datavail.com 6 Building the SQL on Linux Lab Downloading the software required – all free! Installing the software required Installing the SQL Server command-line tools
  • 7. www.datavail.com 7www.datavail.com 7 Downloading the software required – all free! VirtualBox Ubuntu Server PuTTY SQL Server 2017
  • 8. www.datavail.com 8www.datavail.com 8 Installing the software required Install VirtualBox Install Ubuntu Server Install PuTTY Remote Terminal Install SQL Server 2017
  • 9. www.datavail.com 9www.datavail.com 9 Installing the SQL Server command-line tools Install the mssql-tools – SQLCMD and BCP Connect to SQL Server locally DEMO Connecting to SQL using sqlcmd
  • 10. www.datavail.com 10www.datavail.com 10 Change the VirtualBox Network Adapter to “Host-only Adapter” Before Continuing Get the IP Address of the Ubuntu Server Update the hosts file in the Windows PC Connect from SQL Server Management Studio (SSMS) Connect from Azure Data Studio Connecting to SQL on Linux
  • 11. www.datavail.com 11 Getting the SQL on Linux Lab Ready Change the VirtualBox Network Adapter to “Host-only Adapter” Before Continuing Get the IP Address of the Ubuntu Server Update the hosts file in the Windows PC DEMO Getting the SQL on Linux lab ready
  • 14. www.datavail.com 14www.datavail.com 14 mssql-conf tool: configuration script equivalent of SQL Server Configuration Manager (SSCM) and sp_configure stored proc Parameters configuration for: agent, collation, default data, log, dump, error log, and backup directories, memory limit, TCP port, traceflags, and many others Configuring SQL on Linux with the mssql-conf tool DEMO Configuring memory limit and TCP port
  • 15. www.datavail.com 15 Creating, Backing up, and Restoring a Database Create a database Backup a database Restore a database DEMO Creating, backing up, and restoring a database
  • 17. www.datavail.com 17 Using htop Monitors all process running on the system Allows you to kill a process, configure nice, sort columns, search for processes, and a lot more DEMO Using htop
  • 18. www.datavail.com 18 Using glances Monitors CPU, load, memory, network rate, disk i/o, and file system Shows 4 different types of color • Green – ok • Blue – attention Adjust the thresholds by modifying the configure file located in /etc/glances/glances.conf • Violet – alert • Red – critical DEMO Using glances
  • 19. www.datavail.com 19 Using iostat Collects and shows operating system storage input and output statistics Identifies storage devices performance issues • Local disk • Remote disk DEMO Using iostat
  • 20. www.datavail.com 20 Summary and Next Steps Summarize our key points Focus on the next steps • Optimize performance for SQL on Linux • Run SQL Server container images with Docker Adapt and Expand

Editor's Notes

  1. Why SQL on Linux? When we are unclear on the reason or why, what can we do? When we travel to a new country or city and we bring a GPS to help get us where we want to go. Don’t you wish we have a similar GPS for life? I have great news for you. It turns out, we do. It’s called the universal motivators: Time, Money, and Feeling. Again, the 3 universal motivators are: Time, Money, and Feeling. They are universal and also timeless. They work regardless of time or place and never go out of fashion. Let’s apply them here for SQL on Linux. Money: Cost saving for Linux. Price for Windows Server 2019: Datacenter Core-based $6,155 Red Hat Enterprise Linux Server: Premium $1,299 According to W3Cook, Linux powers the servers that run 96.5 percent of the top one million domains in the world. Time: If you were thinking about shifting your databases from SQL Server to MariaDB or PostgreSQL to take advantage of Linux hardware savings, you wouldn't have to concern about the conversion costs. Sure – you still pay for SQL Server licenses. But, you could save on the costs for conversion and migration to make up the difference. Not to mention the headaches or loss of sleep due to conversion problems. <- Save time, money, and make you feel good. With everyone talking about cloud migrations, what do you think the Operating System of choice for the people in charge of finances.
  2. Hi. I am JP Chen from Datavail. I am the Senior Director and Practice Leader of SQL Server. I am very fortunate to have the privilege to work closely with 200+ SQL DBAs in the US and India supporting 250+ customers SQL Server environments ranging from small to enterprise sizes. We can help you to plan, design, and setup high availability solutions, migrate your environment from on-premises to the cloud, and resolve complex performance issues. Even if you have 0 or 25 SQL DBAs or if you have 1 or 1000+ SQL Server instances, my team and I can work with you in supporting your SQL Server environment 24x7 maximizing uptime and minimizing call-outs.
  3. What's in it for them?: In this presentation, we will share with you the software and hardware you need. We will walk you through the steps on: Building the SQL on Linux Lab Connecting to SQL on Linux Configuring SQL on Linux with the mssql-conf tool Creating, Backing up, and Restoring a Database Exploring the System Monitoring Tools on Linux We will cover the basics and absolute essentials to help get you started. By the end of the presentation, you will have the required knowledge to setup your own SQL on Linux lab for further learning and practice. When to ask questions: Please hold your questions after the demo for each section. Keep it short as we have a lot to cover. We can further discuss after the presentation if needed.
  4. Before you begin: Check your Windows PC to make sure you have at least 4 GB of RAM and 8 GB of free disk space before continuing. Most modern Windows PC will meet the minimum requirements. System Requirements Before You Begin As per the official Ubuntu documentation for system requirements, https://help.ubuntu.com/community/Installation/SystemRequirements, Ubuntu Server (CLI) installation requires the following: 300 MHz x86 processor 256 MiB of system memory (RAM) 1.5 GB of disk space Graphics card and monitor capable of 640x480   The Microsoft installation guide for SQL Server 2017 on Linux, https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-2017#sqlvnext, specifies the following system requirements: Memory: 2 GB File System: XFS or EXT4 (other file systems, such as BTRFS, are unsupported) Disk space: 6 GB Processor speed: 2 GHz Processor cores: 2 cores Processor type: x64-compatible only All steps are documented here: https://www.datavail.com/blog/sql-on-linux-building-your-own-sql-on-linux-lab
  5. Question: Anyone here heard of or worked with Partition Magic and LILO? Software Required To create our SQL on Linux lab, we will need the following software: VirtualBox – a free and open-source hosted hypervisor for x86 virtualization. Ubuntu Server – a popular distribution of Linux Server. PUTTY – a free SSH/telnet client for Windows that allows you to connect to a Linux Server remotely. SQL Server 2017. * You need to download SQL Server 2017 on Linux after we had installed Ubuntu Server. Remember, we are building our own SQL on Linux lab on a Windows PC here.
  6. Install VirtualBox Straight forward. Just run the installation file and accept the defaults. After the installation completes, then: Create the new VM “DvSQLOnLinux”. Increase the memory to 2048MB. Assign 8 GB for the hard disk. Increase the CPUs to 2. Increase to 128 MB for video memory. Mount the ios file for DvSQLOnLinux Server. Install Ubuntu Server Start the installation. Accept the defaults. Choose a server name. Pick a username. Choose a password. Make sure to remember it. Install OpenSSH. Reboot. Key in your username and password. Update your system with the latest packages. Upgrade them. Install PuTTY Remote Terminal Install and accept the defaults to complete the setup. Go to Ubuntu Server to get the ip. Configure port forwarding in VirtualBox for the Ubuntu Server. Open PuTTY. Type “localhost” in the host name textbox. Port 22 in the port textbox. Save the session as “DvSQLOnLinux”. Key in your username and password to log in just as if you are sitting in front of your Linux Server. Enter pwd to see the current working directory. Create the SQLPASS2019.txt. Go to your Linux Server VM. Enter pwd to see the current working directory. Enter ls to see the file also exist. Install SQL Server 2017 Connect from PuTTY. Import the public repository GPG keys. Key in your password. Register the Microsoft SQL Server Ubuntu repository for SQL Server 2017. Enter “sudo apt-get update” to update the repository.   Enter “sudo apt-get install -y mssql-server” to install SQL Server. Enter “sudo /opt/mssql/bin/mssql-conf setup” to run the setup. Enter “2” to select the “Developer” edition of SQL Server. Enter “y” to accept the license terms. Enter the password you wish to use for the sa account. Enter “systemctl status mssql-server –-no-pager” to verify the SQL Server service is running once the setup is completed.
  7. In the Windows environment, we have the SQLCMD and BCP command-line tools to connect to SQL Server, run SQL statements, and bulk-copy data in and out of the SQL Server instances. These two utilities also exist for SQL on Linux. It is called mssql-tools. Install the SQL Server command-line tools by following the steps outlined on the webpage. Connecting to SQL Server locally sqlcmd -S localhost -U SA -P '<YourPassword>' select name from sys.databases Type “go” on the command prompt.
  8. Change the Network Adapter for the Linux virtual machine to “Host-only Adapter” Right-click on “DvSQLOnLinux” on the left-pane of Oracle VM VirtualBox Manager. Note: After this change, you will lose connection to the Internet. If you need to connect to the Internet, you will need to change the Network Adapter to attach to “NAT” and configure port-forwarding as described back in the “Installing and Configuring PuTTY Remote Terminal” section. Get the IP Address of the Ubuntu Server Type “ifconfig” on the command line of your Ubuntu virtual machine. Make a note of the ip address. In my case, it is 192.168.56.102. From PuTTY, connect to your Ubuntu Server using the ip. Update the hosts file in the Windows PC Search for “notepad” in your Windows PC. Right-click on “notepad”. Select the option “Run as Administrator”. Open the hosts file in your Windows PC. My Windows PC is running Windows 10 Professional, the location for the hosts file is C:\Windows\System32\drivers\etc\hosts. Add the ip address and hostname of your Ubuntu Server to the last line of the hosts file.
  9. Connecting from SQL Server Management Studio (SSMS): Connect using the hostname. Type “select @@VERSION”. Press the F5 key on your keyboard to execute the query.
  10. Azure Data Studio is a cross-platform database tool for data professionals to work with SQL Server and other database platforms. To simulate a production environment in our SQL on Linux lab, we will install it on our Windows PC and remote connect to our SQL Server instance installed on Ubuntu Server. Download and install it if not already done. To connect and query SQL on Linux via Azure Data Studio, perform the following steps: Open Azure Data Studio. Key in your server ip. In this case, I had keyed 192.168.56.102. Select “SQL Login” in the “Authentication type” drop-down box. Type in “sa” in the “User name” textbox. Type in your password for the sa account. Click the “Connect” button to connect to your SQL Server instance installed on the Ubuntu Server. Click the “New Query” box to open a new query window. Type “select * from sys.databases” in the new query window. Press F5 on your keyboard to execute the query. Try connecting using the server name and it will also connect successfully just like we did in SSMS.
  11. The mssql-conf configuration script for SQL on Linux is the equivalent of SQL Server Configuration Manager (SSCM) and sp_configure stored procedure for SQL on Windows. You can use it to set the following parameters: Agent Collation Default data directory Default log directory Default dump directory Default error log directory Default backup directory Memory limit TCP port Traceflags And many others For a full list of parameters and explanations of each, please go to https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017. In this demo, we will walk-through the steps on how to view the mssql-conf configuration script, set the memory limit, and change the default TCP port for SQL, restart SQL Server services for the setting to take effect, connect to the SQL Server instance using the new port, revert the changes: 1. View the contents of the mssql.conf file: sudo cat /var/opt/mssql/mssql.conf 2. Set the memory limit to 2048 MB: sudo /opt/mssql/bin/mssql-conf set memory.memorylimitmb 2048 3. Change the default TCP port for SQL to 1455: sudo /opt/mssql/bin/mssql-conf set network.tcpport 1455 By default, SQL Server listens for connections in port 1433. As a test, we had set it to 1455. When connect to SQL Server, you will need to specify the custom port as in the following: sqlcmd -S localhost, <port #> -U UserName -P Password 4. Restart SQL Server services for the settings to take effect: sudo systemctl restart mssql-server 5. Try connecting to SQL Server without the custom port 1455 you had set back in step 13, you will see the corresponding error message: sqlcmd -S localhost -U USERNAME -P ‘PASSWORD’ 6. Connect using the custom port will succeed: sqlcmd -S localhost,1455 -U USERNAME -P ‘PASSWORD’ 7. Enter the edit mode of the mssql.conf file to modify the file: sudo nano /var/opt/mssql/mssql.conf 8. Move the down arrow key to go down to the tcpport = 1455 line. 9. Move the left arrow key to go the space after 1455. 10. Erase 55 and replace with 33. 11. Press Ctrl + O to write the file. 12. Press Enter to accept the file name as mssql.conf. 13. Press Ctrl + X to exit. 14. Restart the SQL Server service for the setting to take effect: systemctl restart mssql-server 15. Key in your password. 16. Try connecting using the default port of SQL and it will connect successfully: sqlcmd -S localhost -U USERNAME -P ‘PASSWORD’ 17. Unset the memory limit using the unset option: sudo /opt/mssql/bin/mssql-conf unset memory.memorylimitmb You can unset all other parameters exist in the mssql.conf file using this method. 18. Key in your password. 19. Restart SQL Server service for the setting to take effect: systemctl restart mssql-server 20. Key in your password. 21. View the contents of the mssql.conf file to confirm the memory limit is unset: sudo cat /var/opt/mssql/mssql.conf
  12. Creating, backing up, and restoring a database are critical databases administration tasks that we must perform regardless of Operating System platform. Good news! If you had done these steps in Windows, the same steps apply in Linux. You just need to be aware of the file path structure. Creating a database and verifying its data and log files To create a database and verify its data and log files, perform the following steps: 1. Connect to your Ubuntu Server from your PuTTY remote terminal if not already connected. 2. Connect to your SQL Server: sqlcmd -S localhost -U USERNAME -P ‘PASSWORD’ 3. Create the database, SQLPASS2019: create database SQLPASS2019 go 4. Specify the database to use: use SQLPASS2019 go you will see the message “Changed database context to ‘SQLPASS2019’. 5. Create a table, major_conference, and insert two rows of data: create table major_conference (id int, name nvarchar(50), start_date datetime) go insert into major_conference values (1, ‘SQL Saturday LA’, ‘2019-06-15’) insert into major_conference values (2, ‘SQL PASS Summit’, ‘2019-11-05’) insert into major_conference values (3, ‘AWS Re:Invent’, ‘2019-12-02’) go 6. Find the location of the data and log files for the newly created databases: select DB_NAME(database_id), physical_name from sys.master_files where DB_NAME(database_id) = ‘SQLPASS2019’ go Backing up a database To backup a database, perform the following steps: 1. Connect to your SQL Server if not already connected: sqlcmd -S localhost -U USERNAME -P ‘PASSWORD’ 2. Backup our sample database, SQLPASS2019: backup database [SQLPASS2019] to disk = N’/var/opt/mssql/data/SQLPASS2019_20191106.bak’ go Restoring up a database To restore a database, perform the following steps: 1. Find the location of the backup file. In our example, it is /var/opt/mssql/data/SQLPASS2019_20191106.bak. 2. Connect to your SQL Server if not already connected: sqlcmd -S localhost -U USERNAME -P ‘PASSWORD’ 3. Change the database to master: use master go Just as in SQL on Windows, you can’t restore a database if it is in use. 4. Restore the database. In this example, we will restore and replace the existing SQLPASS2019 databases: use master go restore database [SQLPASS2019] from disk = N’/var/opt/mssql/data/SQLPASS2019_20191106.bak’ with replace
  13. In Windows, we use the Task Manager to view the apps and processes and their CPU, Memory, Disk, and other utilizations details. We use Performance Monitor to view the live stats and the performance of the system counters. What are the similar utilities for us to do the same on Linux? While there are plentiful of tools you can use, we will explore 3 of the most popular ones: htop, glances, and iostat.
  14. Htop is an enhancement of another system monitoring tool called top. It allows you to monitor all processes running on the system. It is an interactive tool and allows you to kill a process, configure nice, sort columns, search for processes, and a lot more. To use explore htop, perform the following steps: 1. Download and install htop if not already installed: sudo apt-get update sudo apt-get install htop Key in your password when prompted. 2. Open htop: htop 3. Look at the upper left corner, you will see the CPU, Mem, and Swp details. 4. Look at the upper right corner, you will see the Tasks, Load average, and the system Uptime. 5. Click on the “CPU%” column to sort the processes by the percentage CPU time currently using. 6. Look at the bottom of the screen, you will see different functions and there F-keys to invoke them. 7. Press F10 to quit.
  15. Glances is a cross-platform system monitoring tool. Yes – you can run it on Linux and on Window. You can use glances to monitor CPU, load, memory, network rate, disk i/o, and file system. Glances shows 4 different types of colors for various statistics: Green - OK, Blue - attention, Violet – alert, Red – critical. You can adjust the thresholds by modifying the configure file located in /etc/glances/glances.conf. To use explore glances, perform the following steps: 1. Download and install glances if not already installed: sudo apt-get update sudo apt-get install glances Key in your password when prompted. 2. Open glances: glances 3. Press c to sort process by CPU. 4. Press m to sort process by MEM. 5. Press i to sort processes by I/O rate. 6. Notice that you can view the File System space usage in the “File SYS” section. 7. Press q to quit.
  16. IOSTAT is a system monitor tool that can be used to collect and show operating system storage input and output statistics. It is often used to identify storage devices performance issues. The storage devices can be local disk or remote disks. To use explore iostat, perform the following steps: 1. Download and install iostat if not already installed: sudo apt-get update sudo apt-get install sysstat Key in your password when prompted. 2. Open iostat: iostat 3. Notice that the first section contains the CPU report. 4. Look at the device utilization report in the second section. Tps is the number of transfers per second. 5. Convert the iostat to show report in megabytes unit: iostat -m 6. Create a delay to view the trend: iostat -m 5 3 iostat with MB unit, 5 seconds interval with 3 times reports
  17. We had went over the software required and how to download and configure them to build your SQL on Linux for further practice and learning. We had reviewed the steps how to connect to SQL on Linux using SSMS and Azure Data Studio with ip and also hostname. We had explored the steps on how to configure SQL on Linux with the mssql-conf tool and walked through examples on how to set the memory limit and tcp port number. Then, we examined the steps for creating, backing up, and restoring a database. The same steps we are all familiar with also apply in Linux. We just need to be aware of the file path and structure differences. Finally, we explore the system monitoring tools on Linux. We have looked into 3 different system monitoring tools: htop, glances, and iostat and explored the basic steps on how to use them. Now that you know how to build your SQL on Linux lab, you can further move onto testing for optimizing performance for SQL on Linux. In addition, once you have a good foundation on SQL on Linux and basic Linux knowledge, you can then look into running SQL Server container images with Docker. Learning SQL on Linux will expand your knowledge on running SQL on different Operating Systems and enables further learning on new trending technologies. Charles Darwin once said, “It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change.” Data technologies are constantly evolving, can you keep pace with change and ensure you adapt? Learning and running SQL on Linux is one of the ways to make sure you do.