SlideShare a Scribd company logo
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
Ad

More Related Content

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
PARIKSHIT 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 2017
Hasan Savran
 
Diving into sql server 2016
Diving into sql server 2016Diving into sql server 2016
Diving into sql server 2016
Mohamed Zaatar - MSc
 
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
IDERA 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 Things
Hostway|HOSTING
 
SQL Azure Overview
SQL Azure OverviewSQL Azure Overview
SQL Azure Overview
Chandana Athauda
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
Gianluca 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 performance
Kevin Kline
 
Advanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAAdvanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERA
IDERA Software
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
John Martin
 
Stretch Database
Stretch DatabaseStretch Database
Stretch Database
SolidQ
 
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
IDERA 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 azure
Antonios Chatzipavlis
 
MySQL ppt
MySQL ppt MySQL ppt
MySQL ppt
AtharvaSawant10
 
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
IDERA Software
 
SQL Azure
SQL AzureSQL Azure
SQL Azure
Pavel Revenkov
 
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 Features
John Martin
 
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
PARIKSHIT 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 2017
Hasan 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 101
IDERA 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 Things
Hostway|HOSTING
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
Gianluca 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 performance
Kevin Kline
 
Advanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERAAdvanced SQL Server Performance Tuning | IDERA
Advanced SQL Server Performance Tuning | IDERA
IDERA Software
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
John Martin
 
Stretch Database
Stretch DatabaseStretch Database
Stretch Database
SolidQ
 
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
IDERA 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 azure
Antonios 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 | IDERA
IDERA 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 Features
John Martin
 

Similar to SQL on Linux (20)

Patel v res_(1)
Patel v res_(1)Patel v res_(1)
Patel v res_(1)
Vijay Patel
 
Sufaid Elampilavil-CV
Sufaid Elampilavil-CVSufaid Elampilavil-CV
Sufaid Elampilavil-CV
sufaid elampilavil
 
Sql Azure Pass
Sql Azure PassSql Azure Pass
Sql Azure Pass
sqlserver.co.il
 
Sql Azure Pass
Sql Azure PassSql Azure Pass
Sql Azure Pass
sqlserver.co.il
 
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_DBA
Sankar Sahu
 
Windows on AWS
Windows on AWSWindows on AWS
Windows on AWS
Datavail
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
Marcelo Paiva
 
Overview SQL Server 2019
Overview SQL Server 2019Overview SQL Server 2019
Overview SQL Server 2019
Juan Fabian
 
Lorenzos_Resume
Lorenzos_ResumeLorenzos_Resume
Lorenzos_Resume
Lorenzo Ciolfi
 
Senior database administrator
Senior database administratorSenior database administrator
Senior database administrator
Mustafa 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 r2
Eduardo Castro
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Tobias Koprowski
 
Praveen Kumar Resume
Praveen Kumar ResumePraveen Kumar Resume
Praveen Kumar Resume
praveen Kothuri.Praveen
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
Tobias 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 2017
James Serra
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015
Richard Chauvet
 
Ruchika Goswami_DBA
Ruchika Goswami_DBARuchika Goswami_DBA
Ruchika Goswami_DBA
Ruchika Goswami
 
Santhosh sybase dba
Santhosh sybase dbaSanthosh sybase dba
Santhosh sybase dba
santhosh kumar
 
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
Moamen Hany ELNASHAR
 
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_DBA
Sankar Sahu
 
Windows on AWS
Windows on AWSWindows on AWS
Windows on AWS
Datavail
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
Marcelo Paiva
 
Overview SQL Server 2019
Overview SQL Server 2019Overview SQL Server 2019
Overview SQL Server 2019
Juan Fabian
 
Senior database administrator
Senior database administratorSenior database administrator
Senior database administrator
Mustafa 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 r2
Eduardo Castro
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Tobias Koprowski
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
Tobias 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 2017
James Serra
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015
Richard 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 hany
Moamen Hany ELNASHAR
 
Ad

More from Datavail (20)

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 final
Datavail
 
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 Preparedness
Datavail
 
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
Datavail
 
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 You
Datavail
 
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
Datavail
 
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 Why
Datavail
 
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 Applications
Datavail
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure Migrations
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 Why
Datavail
 
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
Datavail
 
Creating a Solid EPM Punch List
Creating a Solid EPM Punch ListCreating a Solid EPM Punch List
Creating a Solid EPM Punch List
Datavail
 
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
Datavail
 
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
 
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 final
Datavail
 
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 Preparedness
Datavail
 
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
Datavail
 
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 You
Datavail
 
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
Datavail
 
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 Why
Datavail
 
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 Applications
Datavail
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure Migrations
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 Why
Datavail
 
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
Datavail
 
Creating a Solid EPM Punch List
Creating a Solid EPM Punch ListCreating a Solid EPM Punch List
Creating a Solid EPM Punch List
Datavail
 
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
Datavail
 
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
 
Ad

Recently uploaded (20)

LLM finetuning for multiple choice google bert
LLM finetuning for multiple choice google bertLLM finetuning for multiple choice google bert
LLM finetuning for multiple choice google bert
ChadapornK
 
GenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.aiGenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.ai
Inspirient
 
Simple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptxSimple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptx
ssuser2aa19f
 
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbbEDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
JessaMaeEvangelista2
 
Flip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptxFlip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptx
mubashirkhan45461
 
IAS-slides2-ia-aaaaaaaaaaain-business.pdf
IAS-slides2-ia-aaaaaaaaaaain-business.pdfIAS-slides2-ia-aaaaaaaaaaain-business.pdf
IAS-slides2-ia-aaaaaaaaaaain-business.pdf
mcgardenlevi9
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
AI Competitor Analysis: How to Monitor and Outperform Your Competitors
AI Competitor Analysis: How to Monitor and Outperform Your CompetitorsAI Competitor Analysis: How to Monitor and Outperform Your Competitors
AI Competitor Analysis: How to Monitor and Outperform Your Competitors
Contify
 
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
Molecular methods diagnostic and monitoring of infection  -  Repaired.pptxMolecular methods diagnostic and monitoring of infection  -  Repaired.pptx
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
7tzn7x5kky
 
DPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdfDPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdf
inmishra17121973
 
Calories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptxCalories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptx
TijiLMAHESHWARI
 
Stack_and_Queue_Presentation_Final (1).pptx
Stack_and_Queue_Presentation_Final (1).pptxStack_and_Queue_Presentation_Final (1).pptx
Stack_and_Queue_Presentation_Final (1).pptx
binduraniha86
 
FPET_Implementation_2_MA to 360 Engage Direct.pptx
FPET_Implementation_2_MA to 360 Engage Direct.pptxFPET_Implementation_2_MA to 360 Engage Direct.pptx
FPET_Implementation_2_MA to 360 Engage Direct.pptx
ssuser4ef83d
 
Perencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptx
Perencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptxPerencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptx
Perencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptx
PareaRusan
 
1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf
1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf
1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf
Simran112433
 
Ch3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendencyCh3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendency
ayeleasefa2
 
Developing Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response ApplicationsDeveloping Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response Applications
VICTOR MAESTRE RAMIREZ
 
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
gmuir1066
 
03 Daniel 2-notes.ppt seminario escatologia
03 Daniel 2-notes.ppt seminario escatologia03 Daniel 2-notes.ppt seminario escatologia
03 Daniel 2-notes.ppt seminario escatologia
Alexander Romero Arosquipa
 
183409-christina-rossetti.pdfdsfsdasggsag
183409-christina-rossetti.pdfdsfsdasggsag183409-christina-rossetti.pdfdsfsdasggsag
183409-christina-rossetti.pdfdsfsdasggsag
fardin123rahman07
 
LLM finetuning for multiple choice google bert
LLM finetuning for multiple choice google bertLLM finetuning for multiple choice google bert
LLM finetuning for multiple choice google bert
ChadapornK
 
GenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.aiGenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.ai
Inspirient
 
Simple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptxSimple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptx
ssuser2aa19f
 
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbbEDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
JessaMaeEvangelista2
 
Flip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptxFlip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptx
mubashirkhan45461
 
IAS-slides2-ia-aaaaaaaaaaain-business.pdf
IAS-slides2-ia-aaaaaaaaaaain-business.pdfIAS-slides2-ia-aaaaaaaaaaain-business.pdf
IAS-slides2-ia-aaaaaaaaaaain-business.pdf
mcgardenlevi9
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
AI Competitor Analysis: How to Monitor and Outperform Your Competitors
AI Competitor Analysis: How to Monitor and Outperform Your CompetitorsAI Competitor Analysis: How to Monitor and Outperform Your Competitors
AI Competitor Analysis: How to Monitor and Outperform Your Competitors
Contify
 
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
Molecular methods diagnostic and monitoring of infection  -  Repaired.pptxMolecular methods diagnostic and monitoring of infection  -  Repaired.pptx
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
7tzn7x5kky
 
DPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdfDPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdf
inmishra17121973
 
Calories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptxCalories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptx
TijiLMAHESHWARI
 
Stack_and_Queue_Presentation_Final (1).pptx
Stack_and_Queue_Presentation_Final (1).pptxStack_and_Queue_Presentation_Final (1).pptx
Stack_and_Queue_Presentation_Final (1).pptx
binduraniha86
 
FPET_Implementation_2_MA to 360 Engage Direct.pptx
FPET_Implementation_2_MA to 360 Engage Direct.pptxFPET_Implementation_2_MA to 360 Engage Direct.pptx
FPET_Implementation_2_MA to 360 Engage Direct.pptx
ssuser4ef83d
 
Perencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptx
Perencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptxPerencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptx
Perencanaan Pengendalian-Proyek-Konstruksi-MS-PROJECT.pptx
PareaRusan
 
1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf
1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf
1. Briefing Session_SEED with Hon. Governor Assam - 27.10.pdf
Simran112433
 
Ch3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendencyCh3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendency
ayeleasefa2
 
Developing Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response ApplicationsDeveloping Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response Applications
VICTOR MAESTRE RAMIREZ
 
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
gmuir1066
 
183409-christina-rossetti.pdfdsfsdasggsag
183409-christina-rossetti.pdfdsfsdasggsag183409-christina-rossetti.pdfdsfsdasggsag
183409-christina-rossetti.pdfdsfsdasggsag
fardin123rahman07
 

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

  • #2: 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.
  • #3: 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.
  • #6: 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.
  • #7: 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
  • #8: 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.
  • #9: 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.
  • #10: 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.
  • #12: 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.
  • #13: 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.
  • #14: 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.
  • #15: 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
  • #16: 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
  • #17: 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.
  • #18: 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.
  • #19: 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.
  • #20: 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
  • #21: 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.