<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sqlcmd - Techyaz.com</title>
	<atom:link href="https://techyaz.com/tag/sqlcmd/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Fri, 01 Jun 2018 12:03:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>sqlcmd - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Uninstall SQL Tools from RedHat Linux Server</title>
		<link>https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-tools-redhat-linux-server/</link>
					<comments>https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-tools-redhat-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 12 Dec 2017 06:05:53 +0000</pubDate>
				<category><![CDATA[RedHat Linux]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server ON Linux]]></category>
		<category><![CDATA[bcp]]></category>
		<category><![CDATA[SQL Server Uninstallation]]></category>
		<category><![CDATA[SQL Tools]]></category>
		<category><![CDATA[sqlcmd]]></category>
		<category><![CDATA[uninstallation]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1323</guid>

					<description><![CDATA[<p>I have described how to uninstall SQL Server 2017 running on Redhat Linux server in my last article. Here, i will explain how to remove or uninstall SQL tools (sqlcmd and bcp utilities) from red hat linux machine. Both utilities&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-tools-redhat-linux-server/">How to Uninstall SQL Tools from RedHat Linux Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have described <a href="https://techyaz.com/sql-server/uninstall-sql-server-2017-red-hat-linux-server/" target="_blank" rel="noopener">how to uninstall SQL Server 2017 running on Redhat Linux server</a> in my last article. Here, i will explain how to remove or uninstall SQL tools (sqlcmd and bcp utilities) from red hat linux machine. Both utilities are part of SQL tools package mssql-tools so we need to remove this package mssql-tools in order to uninstall these utilities.</p>
<p><em><strong><span style="color: #800000;">Read More on SQL Server Installation on RHEL</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-on-redhat-linux/" target="_blank" rel="noopener">How to install SQL Server 2017 on RedHat Linux</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">How to Install SQL Server on Redhat Linux without Internet &#8211; Offline Installation</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/installing-sql-tools-red-hat-linux/" target="_blank" rel="noopener">Install SQL Tools on RedHat Linux using Internet</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-agent-red-hat-linux-server/" target="_blank" rel="noopener">Install SQL Server Agent on RHEL</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-tools-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">Installing SQL tools on RHEL without Internet &#8211; Offline Installation</a></strong></li>
</ul>
<h3><span style="color: #333399;">Uninstall SQL Tools on RHEL</span></h3>
<p>As we know sqlcmd and bcp utilities are part of SQL tools so if you want to uninstall these utilities from red hat linux machine you need to uninstall SQL tools package mssql-tools. Follow below steps to uninstall sqlcmd utility from your redhat linux machine.</p>
<p><strong>1-</strong> Connect to your RHEL server where SQL tools has been installed and running. Check whether SQL tools are installed on this machine or not by checking sqlcmd or bcp utilities. You can see RedHat Linux is recognizing sqlcmd utility that means SQL tools have been installed on this machine that needs to be uninstalled.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1325" src="http://techyaz.com/wp-content/uploads/2017/12/1-check-sqlcmd-min.jpg" alt="check sqlcmd utility" width="674" height="138" srcset="https://techyaz.com/wp-content/uploads/2017/12/1-check-sqlcmd-min.jpg 674w, https://techyaz.com/wp-content/uploads/2017/12/1-check-sqlcmd-min-300x61.jpg 300w" sizes="(max-width: 674px) 100vw, 674px" /></p>
<p><strong>2-</strong> We can see sqlcmd utility in above screenshot. Now, we will uninstall SQL tools by running below command.</p>
<pre><strong><span style="color: #008000;">#Uninstall SQL tools from RHEL</span>
<span style="color: #0000ff;">sudo yum remove mssql-tools
</span></strong></pre>
<p><img decoding="async" class="aligncenter size-full wp-image-1326" src="http://techyaz.com/wp-content/uploads/2017/12/2-remove-sql-tools-min.jpg" alt="uninstall SQL tools" width="1440" height="769" srcset="https://techyaz.com/wp-content/uploads/2017/12/2-remove-sql-tools-min.jpg 1440w, https://techyaz.com/wp-content/uploads/2017/12/2-remove-sql-tools-min-300x160.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/2-remove-sql-tools-min-768x410.jpg 768w, https://techyaz.com/wp-content/uploads/2017/12/2-remove-sql-tools-min-1024x547.jpg 1024w" sizes="(max-width: 1440px) 100vw, 1440px" /></p>
<p>You can see the details of SQL tools package that is going to be removed from this machine. We can see mssql-tools package is going to be removed here. Above command will ask us to type <strong>y</strong> to proceed with the uninstallation of this package mssql-tools and type <strong>N</strong> to quit this removal.</p>
<p>I entered<strong> y</strong> to uninstall SQL tools from this machine. This will uninstall both utilities sqlcmd and bcp. You can see SQL tools package mssql-tools has been removed from this machine post entering <strong>y</strong> in above screenshot.</p>
<p><strong>3-</strong> Now, we can check sqlcmd or bcp utility again to validate this uninstallation. I typed sqlcmd as i did in first screenshot and pressed enter. Now we can see red hat linux is not recognizing sqlcmd utility, that means SQL tools have been removed from this machine.</p>
<pre><strong><span style="color: #008000;">#check sqlcmd utility post SQL tools uninstallation</span>
<span style="color: #0000ff;">sqlcmd
</span></strong></pre>
<p><img decoding="async" class="aligncenter size-full wp-image-1327" src="http://techyaz.com/wp-content/uploads/2017/12/3-recheck-sqlcmd-min.jpg" alt="balidate sqlcmd utility removal" width="906" height="153" srcset="https://techyaz.com/wp-content/uploads/2017/12/3-recheck-sqlcmd-min.jpg 906w, https://techyaz.com/wp-content/uploads/2017/12/3-recheck-sqlcmd-min-300x51.jpg 300w, https://techyaz.com/wp-content/uploads/2017/12/3-recheck-sqlcmd-min-768x130.jpg 768w" sizes="(max-width: 906px) 100vw, 906px" /></p>
<p>Here i have shown step by step process to uninstall SQL Tools sqlcmd and bcp from linux machine.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-tools-redhat-linux-server/">How to Uninstall SQL Tools from RedHat Linux Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-on-linux/uninstall-sql-tools-redhat-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install sqlcmd &#038; bcp (SQL Tools ) on Ubuntu Server</title>
		<link>https://techyaz.com/sql-server/sql-server-on-linux/install-sqlcmd-bcp-sql-tools-ubuntu-server/</link>
					<comments>https://techyaz.com/sql-server/sql-server-on-linux/install-sqlcmd-bcp-sql-tools-ubuntu-server/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 31 Oct 2017 11:15:52 +0000</pubDate>
				<category><![CDATA[SQL Server ON Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bcp]]></category>
		<category><![CDATA[SQL Server On Linux]]></category>
		<category><![CDATA[SQL Tools]]></category>
		<category><![CDATA[sqlcmd]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1071</guid>

					<description><![CDATA[<p>I have described step by step process to install SQL Server 2017 on Ubuntu server in my last articles. Here I will explain how to install sqlcmd and bcp utilities that comes under SQL tools on Ubuntu server that is&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sqlcmd-bcp-sql-tools-ubuntu-server/">Install sqlcmd &#038; bcp (SQL Tools ) on Ubuntu Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have described step by step process to <a href="http://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-ubuntu-internet-access/" target="_blank" rel="noopener">install SQL Server 2017 on Ubuntu server</a> in my last articles. Here I will explain how to install sqlcmd and bcp utilities that comes under SQL tools on Ubuntu server that is already running with SQL Server 2017. This article will describe the online method to install SQL tools.</p>
<p>SQL tools will be installed using mssql-tools package. The <strong>mssql-tools</strong> package contains two utilities:</p>
<ul>
<li><strong>sqlcmd:</strong> Command-line query utility.</li>
<li><strong>bcp:</strong> Bulk import-export utility.</li>
</ul>
<p>Before going ahead, we need Ubuntu server and SQL Server 2017 running on that instance. If you have no idea about installing Ubuntu server or SQL Server 2017 or creating a virtual machine where you can install Ubuntu and SQL Server then i would recommend you to read below articles.</p>
<ul>
<li><a href="http://techyaz.com/sql-server/sql-server-on-linux/create-virtual-machine-pc/" target="_blank" rel="noopener">How to Create a Virtual Machine.</a></li>
<li><a href="http://techyaz.com/ubuntu/install-ubuntu-linux-server-16-04-virtual-machine-step-by-step/" target="_blank" rel="noopener">How to Install Ubuntu on a virtual machine.</a></li>
</ul>
<h4><span style="color: #000080;"><strong>SQL Tools Installation on Ubuntu &#8211; ONLINE Method/Using Internet</strong></span></h4>
<p>Installing any package on Ubuntu Linux is straight forward method if our server has internet connection and able to access online repositories. But it becomes painful if your Ubuntu server has no access of internet. Below is the list of articles that you can use to learn offline method of SQL Server Installations on Ubuntu and RHEL.</p>
<ul>
<li><a href="http://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-on-ubuntu-server-without-internet-offline-installation/" target="_blank" rel="noopener">Install SQL Server on Ubuntu &#8211; Offline Method/Without Internet</a></li>
<li><a href="http://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-agent-ubuntu-server-without-internet-offline-installation/" target="_blank" rel="noopener">How to install SQL Server Agent on Ubuntu &#8211; Offline Method</a></li>
<li><a href="http://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-sql-tools-ubuntu-server-running-without-internet-offline-installation/" target="_blank" rel="noopener">Installing SQL Tools on Ubuntu Server using Offline Method/Without Internet</a></li>
<li><a href="http://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">How to Install SQL Server on Redhat linux &#8211; Offline Method</a></li>
</ul>
<p>Before moving ahead let&#8217;s check whether SQL Server is installed or not on this machine. Run below command to check the SQL Server service.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span style="color: #0000ff;"><span class="kwrd"><span style="color: #008000;">#Check SQL Tools</span>
sqlcmd

<span style="color: #008000;">#Check SQL Server Service</span></span><span class="kwrd">
systemctl status mssql-server
</span></span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1073" src="http://techyaz.com/wp-content/uploads/2017/10/1check-sqlcmd.jpg" alt="check sqlcmd" width="975" height="237" srcset="https://techyaz.com/wp-content/uploads/2017/10/1check-sqlcmd.jpg 975w, https://techyaz.com/wp-content/uploads/2017/10/1check-sqlcmd-300x73.jpg 300w, https://techyaz.com/wp-content/uploads/2017/10/1check-sqlcmd-768x187.jpg 768w" sizes="auto, (max-width: 975px) 100vw, 975px" /></p>
<p>We can see SQL Server is installed and running fine on this server but SQL tools are not installed because sqlcmd is not throwing any output.</p>
<p>Let&#8217;s start with importing public repository GPG keys to install sqlcmd and bcp. Run below curl command to import the keys.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: #0000ff;">curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1074" src="http://techyaz.com/wp-content/uploads/2017/10/2-download-repository.jpg" alt="download repository" width="979" height="134" srcset="https://techyaz.com/wp-content/uploads/2017/10/2-download-repository.jpg 979w, https://techyaz.com/wp-content/uploads/2017/10/2-download-repository-300x41.jpg 300w, https://techyaz.com/wp-content/uploads/2017/10/2-download-repository-768x105.jpg 768w" sizes="auto, (max-width: 979px) 100vw, 979px" /></p>
<p>Now we will register Microsoft Ubuntu repository by running below commands.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: #0000ff;">curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
</span></strong></pre>
<p>Next step is to update the source list by running given command.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: black;"><span style="color: #0000ff;">sudo apt-get update</span> 
</span></strong></pre>
<p>Once you execute above command, a series of execution will start and update all source packages.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1075" src="http://techyaz.com/wp-content/uploads/2017/10/4-update-repository.jpg" alt="update ubuntu source list" width="869" height="142" srcset="https://techyaz.com/wp-content/uploads/2017/10/4-update-repository.jpg 869w, https://techyaz.com/wp-content/uploads/2017/10/4-update-repository-300x49.jpg 300w, https://techyaz.com/wp-content/uploads/2017/10/4-update-repository-768x125.jpg 768w" sizes="auto, (max-width: 869px) 100vw, 869px" /></p>
<p>Once above command will be executed, we will run below command to install SQL tools with required unix package.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: #0000ff;">sudo apt-get install mssql-tools unixodbc-dev
</span></strong></pre>
<p>You can see mssql-tools package is installed in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1076" src="http://techyaz.com/wp-content/uploads/2017/10/5-install-1024x288.jpg" alt="install sqlcmd" width="1024" height="288" srcset="https://techyaz.com/wp-content/uploads/2017/10/5-install-1024x288.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/10/5-install-300x84.jpg 300w, https://techyaz.com/wp-content/uploads/2017/10/5-install-768x216.jpg 768w, https://techyaz.com/wp-content/uploads/2017/10/5-install.jpg 1422w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Now you can go ahead and use sql tools. If you are facing any issue during accessing sqlcmd utility then you need to set path environment variable using below steps. Run below command to set the path environment variables. Ubuntu will not be able to recognize sqlcmd utility unless you set the path environment variable. Ubuntu is able to recognize sqlcmd utility once we set the path environment variables.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file</span>
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' &gt;&gt; ~/.bash_profile

<span style="color: #008000;">#To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file</span>
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' &gt;&gt; ~/.bashrc
source ~/.bashrc
</span></strong></pre>
<p>You can see, sqlcmd is recognized by ubuntu after setting path environment variable in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1077" src="http://techyaz.com/wp-content/uploads/2017/10/6-set-path-env-1024x162.jpg" alt="set path environment variable" width="1024" height="162" srcset="https://techyaz.com/wp-content/uploads/2017/10/6-set-path-env-1024x162.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/10/6-set-path-env-300x47.jpg 300w, https://techyaz.com/wp-content/uploads/2017/10/6-set-path-env-768x121.jpg 768w, https://techyaz.com/wp-content/uploads/2017/10/6-set-path-env.jpg 1039w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Now connect to SQL Server instance using sqlcmd and run a command to validate this installation. I have checked the SQL Server version installed on ubuntu server. You can see the details in below image that SQL Server 2017 is installed on this Ubuntu server. Now we have done with SQL Tools installation on Ubuntu server.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1078" src="http://techyaz.com/wp-content/uploads/2017/10/7-validate.jpg" alt="validate sqlcmd" width="723" height="368" srcset="https://techyaz.com/wp-content/uploads/2017/10/7-validate.jpg 723w, https://techyaz.com/wp-content/uploads/2017/10/7-validate-300x153.jpg 300w" sizes="auto, (max-width: 723px) 100vw, 723px" /></p>
<p>I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sqlcmd-bcp-sql-tools-ubuntu-server/">Install sqlcmd &#038; bcp (SQL Tools ) on Ubuntu Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-on-linux/install-sqlcmd-bcp-sql-tools-ubuntu-server/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Step by Step Process to Install SQL Tools on Ubuntu Server running without Internet &#8211; Offline Installation</title>
		<link>https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-sql-tools-ubuntu-server-running-without-internet-offline-installation/</link>
					<comments>https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-sql-tools-ubuntu-server-running-without-internet-offline-installation/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 23 Aug 2017 10:58:15 +0000</pubDate>
				<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[SQL Server ON Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[SQL Server On Linux]]></category>
		<category><![CDATA[SQL Tools]]></category>
		<category><![CDATA[sqlcmd]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=622</guid>

					<description><![CDATA[<p>I have described step by step process to install Ubuntu 16.04 Server and Offline installation of SQL Server 2017 on Ubuntu server in my last articles. Here I will explain step by step process to install SQL Server tools (sqlcmd&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-sql-tools-ubuntu-server-running-without-internet-offline-installation/">Step by Step Process to Install SQL Tools on Ubuntu Server running without Internet &#8211; Offline Installation</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have described <a href="https://techyaz.com/ubuntu/install-ubuntu-linux-server-16-04-virtual-machine-step-by-step/" target="_blank" rel="noopener">step by step process to install Ubuntu 16.04 Server</a> and <a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-on-ubuntu-server-without-internet-offline-installation/" target="_blank" rel="noopener">Offline installation of SQL Server 2017 on Ubuntu server</a> in my last articles. Here I will explain step by step process to install SQL Server tools (sqlcmd and bcp) on Ubuntu server where you had already installed SQL Server 2017. This article will describe the offline method to install SQL tools. The <strong>mssql-tools package</strong> which we will install contains two utilities:</p>
<ul>
<li><strong>sqlcmd:</strong> Command-line query utility.</li>
<li><strong>bcp:</strong> Bulk import-export utility.</li>
</ul>
<p>Before going ahead, we need a Ubuntu server and SQL Server 2017 running on that instance. If you have no idea about installing Ubuntu server or SQL Server 2017 or creating a virtual machine where you can install Ubuntu and SQL Server then i would recommend you to read below articles.</p>
<ul>
<li><a href="https://techyaz.com/sql-server/sql-server-on-linux/create-virtual-machine-pc/" target="_blank" rel="noopener">How to Create a Virtual Machine.</a></li>
<li><a href="https://techyaz.com/ubuntu/install-ubuntu-linux-server-16-04-virtual-machine-step-by-step/" target="_blank" rel="noopener">How to Install Ubuntu Linux Server on a virtual machine</a></li>
<li><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-on-ubuntu-server-without-internet-offline-installation/" target="_blank" rel="noopener">Installing SQL Server 2017 on Ubuntu Server &#8211; Offline Installation</a></li>
</ul>
<h4><span style="color: #000080;"><strong>SQL Tools Installation on Ubuntu &#8211; Offline/Without Internet</strong></span></h4>
<p>Installing any package on Ubuntu Linux is straight forward method if your server has internet connection and able to access online repositories. But it becomes painful if your Ubuntu server has no access of internet. We generally call such installations as offline installation. Microsoft suggests below steps for offline installation of SQL Server Tools on Ubuntu server.</p>
<ul>
<li>Download all sql tools related packages. i.e msodbc &amp; mssql-tools</li>
<li>Move these downloaded packages to your Ubuntu Server.</li>
<li>Install the copied debian packages on the server.</li>
<li>Resolve Missing Dependencies, if you get any.</li>
<li>Set the Path environment Variables for this package.</li>
</ul>
<p>Now we will follow step by step process with the screenshots that will help readers to understand this process.</p>
<h5><span style="color: #000080;"><strong>Download &amp; Copy SQL Tools Packages to Ubuntu Server</strong></span></h5>
<p>Before moving ahead let&#8217;s check whether SQL Server is installed or not on this machine. Run below command to check the SQL Server service.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: #008000;">#Check SQL Server Service</span><span class="kwrd" style="color: blue;">
systemctl status mssql-server
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-623" src="http://techyaz.com/wp-content/uploads/2017/08/1-check-services.jpg" alt="check SQL Server Service on Ubuntu" width="860" height="380" srcset="https://techyaz.com/wp-content/uploads/2017/08/1-check-services.jpg 860w, https://techyaz.com/wp-content/uploads/2017/08/1-check-services-300x133.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/1-check-services-768x339.jpg 768w" sizes="auto, (max-width: 860px) 100vw, 860px" /></p>
<p>We can see SQL Server is installed and running fine on this server. Now you can just type <strong>sqlcmd</strong> to check sql tool is installed or not. We can see it is not installed yet. As we can see SQL Tools are not installed so next step will package download and installation of that package.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-624" src="http://techyaz.com/wp-content/uploads/2017/08/2-check-sqlcmd.jpg" alt="Check sqlcmd" width="388" height="146" srcset="https://techyaz.com/wp-content/uploads/2017/08/2-check-sqlcmd.jpg 388w, https://techyaz.com/wp-content/uploads/2017/08/2-check-sqlcmd-300x113.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/2-check-sqlcmd-1320x500.jpg 1320w" sizes="auto, (max-width: 388px) 100vw, 388px" /></p>
<p>Let&#8217;s start with downloading the debian package for SQL Tools. You can <a href="https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools" target="_blank" rel="noopener">download the required SQL Tools debian packages for Ubuntu</a> from the attached link or from <a href="https://packages.microsoft.com/rhel/7.3/prod/" target="_blank" rel="noopener">Microsoft Repositories</a>. You can download these packages on a machine or PC that is connected to the internet. Below are the list of debian packages which needs to be downloaded to install sql tools.</p>
<ul>
<li><strong>msodbcsql_13.1.6.0-1_amd64.deb</strong></li>
<li><strong>mssql-tools_14.0.5.0-1_amd64.deb</strong></li>
</ul>
<p>SQL Tools package installation depends on <strong>msodbcsql package</strong> that must be installed first to avoid any dependency issue. Once package will be downloaded on your local PC, next step is to copy above downloaded packages to the Ubuntu server that are running without internet connection.</p>
<p>You can use any tool, application or method to copy this file from localhost to Ubuntu Linux server. I used <strong>WinSCP</strong> tool to copy this file from machine where i have downloaded the package to the Ubuntu Linux server. Make sure that there should be connectivity between both machine.</p>
<p>If you have not installed WinSCP yet, download and install it on your PC. Launch <strong>WinSCP tool</strong> and make a connection to Ubuntu server. I have explained about WinSCP in my <a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-on-ubuntu-server-without-internet-offline-installation/" target="_blank" rel="noopener">last articles</a>, you can follow it to get more details. Once you established the connection, WinSCP will look like below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-625" src="http://techyaz.com/wp-content/uploads/2017/08/3-download-package-1024x273.jpg" alt="Download SQL Tools Package" width="1024" height="273" srcset="https://techyaz.com/wp-content/uploads/2017/08/3-download-package-1024x273.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/08/3-download-package-300x80.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/3-download-package-768x205.jpg 768w, https://techyaz.com/wp-content/uploads/2017/08/3-download-package.jpg 1370w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Now we just need to drag the downloaded debian packages from left side pane and drop it to right side pane to copy it to Ubuntu Linux server. Files are copied now and we can see them in both side panes.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-626" src="http://techyaz.com/wp-content/uploads/2017/08/4-download-package-1024x205.jpg" alt="move sql tool package to Ubuntu" width="1024" height="205" srcset="https://techyaz.com/wp-content/uploads/2017/08/4-download-package-1024x205.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/08/4-download-package-300x60.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/4-download-package-768x153.jpg 768w, https://techyaz.com/wp-content/uploads/2017/08/4-download-package.jpg 1356w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>You can see SQL Tools packages are copied to location \home\techyaz\ in above screenshot. Now we can connect to Ubuntu server and validate whether files are copied there or not.</p>
<p>Connect to Ubuntu server and check the files. You can run <strong>ls -lrt</strong> to check the files. Once packages will be copied to ubuntu server, next step is to first install msodbcsql package. Run below command to start the installation.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Install msodbcsql package</span>
sudo dpkg -i msodbcsql_13.1.6.0-1_amd64.deb
</span></strong></pre>
<p>Here we will use <strong>dpkg package management</strong> system for installation because SQL Tools are debian packages for Ubuntu servers. We can see below dependencies error while executing msodbc package. Now our next step is to fix these dependency issues and then kick off the installation again.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-627" src="http://techyaz.com/wp-content/uploads/2017/08/5-install-msodbc.jpg" alt="install msodbc" width="770" height="288" srcset="https://techyaz.com/wp-content/uploads/2017/08/5-install-msodbc.jpg 770w, https://techyaz.com/wp-content/uploads/2017/08/5-install-msodbc-300x112.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/5-install-msodbc-768x287.jpg 768w" sizes="auto, (max-width: 770px) 100vw, 770px" /></p>
<h5><span style="color: #000080;"><strong>Resolve Dependencies</strong></span></h5>
<p>We can see msodbcsql package depends on <strong>unixODBC package</strong> so first we need to download, move and install unixODBC package on Ubuntu server.</p>
<p>Resolving dependencies are painful job because every package has some dependencies and you need to download and install all such packages manually if you don&#8217;t have internet connection on Ubuntu server. If your Ubuntu server has internet connection, all dependencies will be installed using online repository.</p>
<p>Now let&#8217;s download and move <strong>unixODBC package</strong> to Ubuntu server. We can <a href="https://packages.ubuntu.com/" target="_blank" rel="noopener">download all required debian packages</a> from attached link.  We can see unixODBC package has been copied to the server now in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-628" src="http://techyaz.com/wp-content/uploads/2017/08/6-copy-unixodbc-1024x219.jpg" alt="Copy UnixODBC" width="1024" height="219" srcset="https://techyaz.com/wp-content/uploads/2017/08/6-copy-unixodbc-1024x219.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/08/6-copy-unixodbc-300x64.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/6-copy-unixodbc-768x164.jpg 768w, https://techyaz.com/wp-content/uploads/2017/08/6-copy-unixodbc.jpg 1358w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Install this package now.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Install unixODBC Package.</span>
sudo dpkg -i unixodbc_2.3.1-4.1_amd64.deb
</span></strong></pre>
<p>We can see this package has another dependency error. That means UnixODBC package is dependent on given packages i.e. libodbc1 &amp; odbcinst1debian2.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-629" src="http://techyaz.com/wp-content/uploads/2017/08/7-unixodbc-install-error.jpg" alt="unixodbc install error" width="726" height="327" srcset="https://techyaz.com/wp-content/uploads/2017/08/7-unixodbc-install-error.jpg 726w, https://techyaz.com/wp-content/uploads/2017/08/7-unixodbc-install-error-300x135.jpg 300w" sizes="auto, (max-width: 726px) 100vw, 726px" /></p>
<p>When i downloaded <strong>libodbc1</strong> and tried to install it, this package failed because of another dependency.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-630" src="http://techyaz.com/wp-content/uploads/2017/08/8-libodbc1-1024x318.jpg" alt="Libodbc1" width="1024" height="318" srcset="https://techyaz.com/wp-content/uploads/2017/08/8-libodbc1-1024x318.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/08/8-libodbc1-300x93.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/8-libodbc1-768x239.jpg 768w, https://techyaz.com/wp-content/uploads/2017/08/8-libodbc1.jpg 1436w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>We can see the dependent package in above image. I <a href="https://packages.ubuntu.com/xenial/libltdl7" target="_blank" rel="noopener">downloaded package <strong>libltdl7</strong></a> and installed on Ubuntu server. <strong>libltdl7</strong> package got installed successfully without any dependency error.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-631" src="http://techyaz.com/wp-content/uploads/2017/08/9-lbltdl7.jpg" alt="lbltdl7 installation" width="907" height="386" srcset="https://techyaz.com/wp-content/uploads/2017/08/9-lbltdl7.jpg 907w, https://techyaz.com/wp-content/uploads/2017/08/9-lbltdl7-300x128.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/9-lbltdl7-768x327.jpg 768w" sizes="auto, (max-width: 907px) 100vw, 907px" /></p>
<p>Once <strong>libltdl7 package</strong> will be installed, next step is to install all dependencies in reverse order. Here we will install <strong>libodbc1</strong> then <strong>unixodbc</strong> followed by <strong>msodbcsql</strong> package.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-632" src="http://techyaz.com/wp-content/uploads/2017/08/10-libodbc1-install.jpg" alt="libodbc1 install" width="765" height="159" srcset="https://techyaz.com/wp-content/uploads/2017/08/10-libodbc1-install.jpg 765w, https://techyaz.com/wp-content/uploads/2017/08/10-libodbc1-install-300x62.jpg 300w" sizes="auto, (max-width: 765px) 100vw, 765px" /></p>
<p>We have seen, there were two dependencies to install <strong>unixODBC</strong> package. One <strong>libodbc1</strong> has been installed. Please perform similar exercise to install another dependency <strong>odbcinst1debian2</strong>. Once both packages will be installed, go ahead and install unixodbc in order to install msodbcsql package.</p>
<p>If you want to check all dependencies for these packages, you can get it by running below command.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;"><span style="color: #008000;">#Check dependencies of both packages.</span></span><span style="color: #0000ff;">
dpkg -I msodbcsql_13.1.6.0-1_amd64.deb | grep "Depends:"
dpkg -I mssql-tools_14.0.5.0-1_amd64.deb | grep "Depends:"
</span></span></strong></pre>
<p><strong>If you have internet connection on your Ubuntu server</strong> then this task will be very easy to perform. You just need to execute below command to install unixodbc package.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Install unixodbc on Ubuntu if server is connected to Internet.</span>
sudo apt-get -f install unixodbc
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-633" src="http://techyaz.com/wp-content/uploads/2017/08/11-unixodbc-internet.jpg" alt="unixodbc installation using internet" width="681" height="295" srcset="https://techyaz.com/wp-content/uploads/2017/08/11-unixodbc-internet.jpg 681w, https://techyaz.com/wp-content/uploads/2017/08/11-unixodbc-internet-300x130.jpg 300w" sizes="auto, (max-width: 681px) 100vw, 681px" /></p>
<h5><span style="color: #000080;"><strong>SQL Tools Installation</strong></span></h5>
<p>We have resolved all dependencies errors in above section. Now we will install SQL Tools to establish database connection to SQL Server instance from ubuntu server. Run below command to install the msodbcsql package again post resolving dependencies.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Install msodbcsql Package</span>
sudo dpkg -i msodbcsql_13.1.6.0-1_amd64.deb
</span></strong></pre>
<p>Once you will execute above command, you will get below screen to <strong>accept the license terms</strong>. Choose <strong>Yes</strong> and press enter button to proceed.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-634" src="http://techyaz.com/wp-content/uploads/2017/08/12-msodbc-install-1024x425.jpg" alt="msodbc installation" width="1024" height="425" srcset="https://techyaz.com/wp-content/uploads/2017/08/12-msodbc-install-1024x425.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/08/12-msodbc-install-300x125.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/12-msodbc-install-768x319.jpg 768w, https://techyaz.com/wp-content/uploads/2017/08/12-msodbc-install.jpg 1423w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Once you press enter, package execution will start. You can see <strong>msodbcsql package is installed successfully</strong> now.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-635" src="http://techyaz.com/wp-content/uploads/2017/08/13-msodbc-install.jpg" alt="msodbc installation" width="941" height="158" srcset="https://techyaz.com/wp-content/uploads/2017/08/13-msodbc-install.jpg 941w, https://techyaz.com/wp-content/uploads/2017/08/13-msodbc-install-300x50.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/13-msodbc-install-768x129.jpg 768w" sizes="auto, (max-width: 941px) 100vw, 941px" /></p>
<p>Next we will install another package <strong>mssql-tools</strong> now. Run below command to start the installation.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#Install mssql-tools Package</span>
sudo dpkg -i mssql-tools_14.0.5.0-1_amd64.deb
</span></strong></pre>
<p>Again this package will ask you to <strong>accept the license terms</strong> just like msodbcsql package. Choose <strong>yes</strong> and press enter to proceed.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-636" src="http://techyaz.com/wp-content/uploads/2017/08/14-mssql-tools-1024x441.jpg" alt="Install mssql tools" width="1024" height="441" srcset="https://techyaz.com/wp-content/uploads/2017/08/14-mssql-tools-1024x441.jpg 1024w, https://techyaz.com/wp-content/uploads/2017/08/14-mssql-tools-300x129.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/14-mssql-tools-768x331.jpg 768w, https://techyaz.com/wp-content/uploads/2017/08/14-mssql-tools.jpg 1413w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>You cans see <strong>mssql-tools package is installed</strong> in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-637" src="http://techyaz.com/wp-content/uploads/2017/08/15-mssql-tools.jpg" alt="install mssql tools" width="735" height="154" srcset="https://techyaz.com/wp-content/uploads/2017/08/15-mssql-tools.jpg 735w, https://techyaz.com/wp-content/uploads/2017/08/15-mssql-tools-300x63.jpg 300w" sizes="auto, (max-width: 735px) 100vw, 735px" /></p>
<p><strong>Final step</strong> is to set the <strong>path environment variables</strong>. Run below command to set the path environment variables. Ubuntu will not be able to recognize <strong>sqlcmd utility</strong> unless you set the path environment variable. You can see that in below screenshot. Ubuntu is able to recognize sqlcmd utility once we set the path environment variables.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;"><span style="color: #008000;">#To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file</span>
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' &gt;&gt; ~/.bash_profile

<span style="color: #008000;">#To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file
</span>echo 'export PATH="$PATH:/opt/mssql-tools/bin"' &gt;&gt; ~/.bashrc
source ~/.bashrc
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-638" src="http://techyaz.com/wp-content/uploads/2017/08/16-path-variable.jpg" alt="Patch variables" width="974" height="249" srcset="https://techyaz.com/wp-content/uploads/2017/08/16-path-variable.jpg 974w, https://techyaz.com/wp-content/uploads/2017/08/16-path-variable-300x77.jpg 300w, https://techyaz.com/wp-content/uploads/2017/08/16-path-variable-768x196.jpg 768w" sizes="auto, (max-width: 974px) 100vw, 974px" /></p>
<p>Now connect to SQL Server instance using sqlcmd and run a command to validate this installation. I have checked the SQL Server version installed on ubuntu server.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-639" src="http://techyaz.com/wp-content/uploads/2017/08/17-select-version.jpg" alt="" width="737" height="367" srcset="https://techyaz.com/wp-content/uploads/2017/08/17-select-version.jpg 737w, https://techyaz.com/wp-content/uploads/2017/08/17-select-version-300x149.jpg 300w" sizes="auto, (max-width: 737px) 100vw, 737px" /></p>
<p>We get above details that SQL Server 2017 is installed on this Ubuntu server by executing sqlcmd utility. Now we have done with SQL Tools installation on Ubuntu server. Go ahead and connect to your Ubuntu server using SQL Tools.</p>
<p><span style="color: #800000;"><strong>Read more about SQL Server on RedHat Linux:</strong></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/create-virtual-machine-pc/" target="_blank" rel="noopener">How to Create a Virtual Machine.</a></strong></li>
<li><strong><a href="https://techyaz.com/linux/step-step-process-install-red-hat-enterprise-linux/" target="_blank" rel="noopener">Installing RedHat Linux 7.3 on a virtual machine.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-2017-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">Install SQL Server 2017 on RedHat Linux – Offline Installation.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-tools-redhat-linux-without-internet-offline-installation/" target="_blank" rel="noopener">How to Install SQL Tools on RedHat Linux – Offline Installation.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/sql-server-on-linux/install-sql-server-agent-redhat-linux-server-without-internet-offline-installation/" target="_blank" rel="noopener">SQL Server Agent Installation on RedHat Linux – Offline Installation.</a></strong></li>
</ul>
<p>I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-sql-tools-ubuntu-server-running-without-internet-offline-installation/">Step by Step Process to Install SQL Tools on Ubuntu Server running without Internet &#8211; Offline Installation</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-on-linux/step-step-process-install-sql-tools-ubuntu-server-running-without-internet-offline-installation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
