tag:blogger.com,1999:blog-84537813306434424792024-02-06T19:52:09.826-08:00Ashok Kumar SQL Development and DBA Adminstrations Techi Blog Ashok Kumar SQL Development and DBA Adminstrations Techi Blog
(SQL Materials for Every one to Share)Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.comBlogger436125tag:blogger.com,1999:blog-8453781330643442479.post-5664084533251203272023-11-29T21:29:00.000-08:002023-11-29T21:34:03.976-08:00MYSQL basic commands and useful links and backup methods<p> </p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p>Backup</p><p><a href="https://www.thewindowsclub.com/how-to-download-and-install-mysql-in-windows-10">How to Download and Install MySQL in Windows 11/10 (thewindowsclub.com)</a></p><p>https://dev.mysql.com/downloads/file/?id=523568</p><p><br /></p><p>https://sqlbak.com/blog/how-to-backup-mysql-database-on-windows/</p><p><br /></p><p>https://serverguy.com/servers/how-to-backup-mysql-database/</p><p><br /></p><p>https://www.jotform.com/blog/how-to-backup-mysql-database/</p><p><br /></p><p>https://dev.mysql.com/doc/mysql-backup-excerpt/5.7/en/mysqldump-sql-format.html</p><p><br /></p><p>https://www.sitepoint.com/backing-up-mysqldump/</p><p><br /></p><p>useful mysql and linux admin tool via website</p><p><br /></p><p>https://webmin.com/</p><p><br /></p><p>my sql commands:</p><p><br /></p><p><br /></p><p><br /></p><p>To connect mysql instance:</p><p><br /></p><p>open cmd or run command</p><p><br /></p><p>Go to bin folder as above</p><p><br /></p><p>C:\Windows\system32>c: </p><p><br /></p><p>C:\Windows\system32>cd C:\Program Files\MySQL\MySQL Server 8.0\bin </p><p><br /></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p </p><p><br /></p><p>mysql> select version(); </p><p><br /></p><p>mysql> show databases; </p><p><br /></p><p>mysql>create database testmysql;</p><p><br /></p><p>mysql>use testmysql;</p><p><br /></p><p>mysql> create table test(testid int,testdesc char); </p><p><br /></p><p>mysql> insert into test select 5,'t'; </p><p><br /></p><p>mysql> select * from test; </p><p><br /></p><p>To take backup of my sql database</p><p><br /></p><p>C:\Windows\system32>c: </p><p><br /></p><p>C:\Windows\system32>cd C:\Program Files\MySQL\MySQL Server 8.0\bin </p><p><br /></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql --user root testmysql > testmysql_bk.sql; </p><p><br /></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>dir </p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-79049309125663364332022-06-20T06:02:00.007-07:002022-06-21T05:50:22.226-07:00Azure Fundamentals AZ-900<p> </p><p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="https://www.microsoft.com/en-us/trainingdays/azure"><span style="font-family: "Lucida Console"; font-size: 10.5pt;">https://www.microsoft.com/en-us/trainingdays/azure</span></a><span style="font-family: "Lucida Console"; font-size: 10.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Lucida Console"; font-size: 10.5pt;"><o:p> </o:p></span></p>
<p class="MsoNormal"><br /></p>
<p class="MsoNormal"><span style="color: #666666; font-family: "Times New Roman", serif; font-size: 13.5pt;">Join us at Microsoft Azure Virtual Training Day:
Fundamentals for an introduction to cloud computing concepts, models, and
services—from public to private to hybrid cloud. You’ll also learn the basics
of infrastructure as a service (IaaS), platform as a service (PaaS), and
software as a service (SaaS). Prepare to take full advantage of the key Azure
pillars of security, privacy, compliance, and trust.</span></p>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">Who should attend:<o:p></o:p></span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Developers<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Architects<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">IT professionals<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Cloud novices<o:p></o:p></span></li>
</ul>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">Technical level: For those who are just beginning
to work with cloud-based solutions and services or are new to Azure.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">After completing this training, you will be able
to:<o:p></o:p></span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Prepare for cloud migration with the training
to evaluate your existing on-premises environment.<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Optimize your Azure-based workloads for
maximum ROI.<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Learn best practices for managing your virtual
machines, applications, and data with Azure.<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Take the </span><span style="mso-fareast-font-family: "Times New Roman";"><a href="https://docs.microsoft.com/learn/certifications/azure-fundamentals/" target="_blank"><span style="color: #0067b8; font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Microsoft Azure Fundamentals
certification exam</span></a></span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> at no cost.<o:p></o:p></span></li>
</ul>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">Here’s what you can expect:<o:p></o:p></span></p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-yfti-tbllook: 1184; width: 629px;">
<tbody><tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: rgb(47, 47, 47); border: 1pt solid black; padding: 6pt;">
<p align="center" class="MsoNormal" style="text-align: center;"><b><span style="color: white; font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Part 1<o:p></o:p></span></b></p>
</td>
<td style="background: rgb(47, 47, 47); border-left: none; border: 1pt solid black; padding: 6pt;">
<p align="center" class="MsoNormal" style="text-align: center;"><b><span style="color: white; font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Part 2<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-top: none; border: 1pt solid black; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Introduction<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid black; border-left: none; border-right: 1pt solid black; border-top: none; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Introduction<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-top: none; border: 1pt solid black; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Azure Cloud Concepts<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid black; border-left: none; border-right: 1pt solid black; border-top: none; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Azure Security and Network Security<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td style="border-top: none; border: 1pt solid black; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Core Azure Services<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid black; border-left: none; border-right: 1pt solid black; border-top: none; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Identity, governance, privacy and compliance<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 4;">
<td style="border-top: none; border: 1pt solid black; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Break: 10 Minutes<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid black; border-left: none; border-right: 1pt solid black; border-top: none; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Break: 10 Minutes<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 5;">
<td style="border-top: none; border: 1pt solid black; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Azure Solutions and Management Tools<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid black; border-left: none; border-right: 1pt solid black; border-top: none; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Azure Pricing and Lifecycle<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 6; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: 1pt solid black; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Closing Question & Answer<o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid black; border-left: none; border-right: 1pt solid black; border-top: none; padding: 6pt;">
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-language: EN-IN;">Closing Question & Answer<o:p></o:p></span></p>
</td>
</tr>
</tbody></table>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">Space is limited, so reserve your spot now!<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><a href="https://www.microsoft.com/events/codeofconduct" target="_blank"><span style="color: #0067b8; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">Click here</span></a><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;"> for
the Microsoft digital event code of conduct.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: 20.25pt; margin-bottom: 14.25pt;"><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">For questions about discounted exam eligibility,
scheduling, or expirations, please refer to </span><a href="https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWG1g3" target="_blank"><span style="color: #0067b8; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">the FAQ</span></a><span style="color: #666666; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-language: EN-IN;">.<br />
<br />
Microsoft Azure Virtual Training Day: Fundamentals event, including the exam
upon completing the event, is open to the public and offered at no cost. Prior
to registering for this training, government employees must check with their
employers to ensure their participation is permitted, and in accordance with,
applicable policies and laws.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Lucida Console"; font-size: 10.5pt;"><o:p> </o:p></span></p>
<h2 style="background: white; line-height: 28.5pt; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 22.5pt; margin: 22.5pt 0cm 15pt;"><span style="mso-fareast-font-family: "Times New Roman";"><a href="https://www.whizlabs.com/microsoft-azure-certification-az-900/"><span face=""Arial",sans-serif" style="color: #dc5800; font-size: 16.5pt; font-weight: normal; letter-spacing: -0.25pt;">Microsoft Azure Fundamentals
Certification</span></a></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 20.5pt; font-weight: normal; letter-spacing: -0.25pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></h2>
<p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgwcE2xuOoc8UQc8Y6BsN46Rj9jUMB87Jid5Gdn0j1ZYiH1-Nx7eCxFZ19okIu7-EOyaFlmUVEFepU4N9pADrMjt6Ei7kBAmhLMCeSDRrbtCqMkqNNN9mLzGELWuMMOK3IuDbVHL9sUj4t8L0GucpaZE00WmJtO85tTOB4qzVYUSZayq3B-qGU2UG9pUw" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="347" data-original-width="689" src="https://blogger.googleusercontent.com/img/a/AVvXsEgwcE2xuOoc8UQc8Y6BsN46Rj9jUMB87Jid5Gdn0j1ZYiH1-Nx7eCxFZ19okIu7-EOyaFlmUVEFepU4N9pADrMjt6Ei7kBAmhLMCeSDRrbtCqMkqNNN9mLzGELWuMMOK3IuDbVHL9sUj4t8L0GucpaZE00WmJtO85tTOB4qzVYUSZayq3B-qGU2UG9pUw=s16000" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"></td></tr></tbody></table><br /><br /><p></p>
<p class="p11" style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Azure Fundamentals (</span></span><a href="https://www.whizlabs.com/blog/az-900-exam-preparation/" target="_blank"><span style="color: #dc5800; font-family: "PT Sans",serif; font-size: 11.5pt;">AZ-900 exam</span></a><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">)
is the foundational level exam in the new Azure certifications path. This exam
is intended for those who want to demonstrate their basic knowledge of cloud
services with Microsoft Azure. Even if you are from a non-technical background
but if you have some basic understanding of the concepts of cloud, you can take
this certification exam. You can check your preparation level with the </span></span><a href="https://www.whizlabs.com/microsoft-azure-certification-az-900/practice-tests/" target="_blank"><span style="color: #dc5800; font-family: "PT Sans",serif; font-size: 11.5pt;">AZ-900 practice test</span></a><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"> but
before that we recommend you to try Free </span></span><a href="https://www.whizlabs.com/microsoft-azure-certification-az-900/free-test/" target="_blank"><span style="color: #dc5800; font-family: "PT Sans",serif; font-size: 11.5pt;">AZ-900 practice test</span></a><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">.</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
<h4 style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 21.75pt; margin-bottom: 10.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 18.0pt; margin: 18pt 0cm 10.5pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 14.5pt; font-weight: normal; mso-fareast-font-family: "Times New Roman";">Exam AZ-900: Microsoft
Azure Fundamentals<o:p></o:p></span></h4>
<p class="p11" style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">AZ-900 </span></span><a href="https://www.whizlabs.com/blog/az-900-exam-preparation/" target="_blank"><span style="color: #dc5800; font-family: "PT Sans",serif; font-size: 11.5pt;">Azure
Fundamentals exam</span></a><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"> is considered as the first
step in the associate level and expert level Azure certifications path.
Although it’s an optional step, validating your foundational knowledge will
benefit you to some extent. Also, it’s not mandatory but </span></span><a href="https://www.whizlabs.com/microsoft-azure-certification-az-900/" target="_blank"><span style="color: #dc5800; font-family: "PT Sans",serif; font-size: 11.5pt;">AZ-900 exam</span></a><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"> can be considered as
the entry-point for all other associate and expert level Azure certifications.
You can try out </span></span><a href="https://www.whizlabs.com/microsoft-azure-certification-az-900/" target="_blank"><span style="color: #dc5800; font-family: "PT Sans",serif; font-size: 11.5pt;">Azure fundamental practice tests</span></a><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"> to
prepare for the AZ-900 exam.</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
<p class="p11" style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Let’s have a look at the details of the Azure
AZ-900 exam.</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
<p class="p9" style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s3"><b><span face=""Verdana",sans-serif" style="color: #222222; font-size: 11.5pt;">Prerequisites</span></b></span><span class="s3"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">:
There are no particular prerequisites for the </span></span><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Microsoft
Azure Fundamental exam but one should be familiar and have a basic
understanding of the cloud services and the Microsoft Azure platform.</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
<p class="p9" style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s1"><b><span face=""Verdana",sans-serif" style="color: #222222; font-size: 11.5pt;">Domains Covered in AZ-900 Exam are –</span></b></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="-webkit-text-stroke-width: 0px; background: white; border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-yfti-tbllook: 1184; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; width: 679px; word-spacing: 0px;">
<tbody><tr style="box-sizing: border-box; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: 1pt solid rgb(230, 230, 230); box-sizing: border-box; padding: 1.5pt 6pt;">
<p class="p12" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word;"><span class="s1"><b><span face=""Verdana",sans-serif" style="color: #222222; font-size: 11.5pt;">Domain</span></b></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
<td style="border-left: none; border: 1pt solid rgb(230, 230, 230); box-sizing: border-box; padding: 1.5pt 6pt;">
<p align="center" class="p12" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word; text-align: center;"><span class="s1"><b><span face=""Verdana",sans-serif" style="color: #222222; font-size: 11.5pt;">% Weight</span></b></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
</tr>
<tr style="box-sizing: border-box; mso-yfti-irow: 1;">
<td style="border-top: none; border: 1pt solid rgb(230, 230, 230); box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Describe Cloud Concepts</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid rgb(230, 230, 230); border-left: none; border-right: 1pt solid rgb(230, 230, 230); border-top: none; box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p align="center" class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word; text-align: center;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">15-20%</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
</tr>
<tr style="box-sizing: border-box; mso-yfti-irow: 2;">
<td style="border-top: none; border: 1pt solid rgb(230, 230, 230); box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Describe Core Azure Services</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid rgb(230, 230, 230); border-left: none; border-right: 1pt solid rgb(230, 230, 230); border-top: none; box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p align="center" class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word; text-align: center;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">30-35%</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
</tr>
<tr style="box-sizing: border-box; mso-yfti-irow: 3;">
<td style="border-top: none; border: 1pt solid rgb(230, 230, 230); box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Describe Security, Privacy, Compliance, and Trust</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid rgb(230, 230, 230); border-left: none; border-right: 1pt solid rgb(230, 230, 230); border-top: none; box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p align="center" class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word; text-align: center;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">25-30%</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
</tr>
<tr style="box-sizing: border-box; mso-yfti-irow: 4; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: 1pt solid rgb(230, 230, 230); box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Describe Azure Pricing, Service Level Agreements, and
Lifecycles</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
<td style="border-bottom: 1pt solid rgb(230, 230, 230); border-left: none; border-right: 1pt solid rgb(230, 230, 230); border-top: none; box-sizing: border-box; padding: 1.5pt 6pt;" valign="bottom">
<p align="center" class="p13" style="box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word; text-align: center;"><span class="s1"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">25-30%</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>
<p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><b><span face=""Verdana",sans-serif" style="color: #222222; font-size: 11.5pt;">Exam Languages</span></b></span><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">: English,
Japanese, Simplified Chinese, Korean, German, Spanish, and French</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p>
<p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><b><span face=""Verdana",sans-serif" style="color: #222222; font-size: 11.5pt;">Certification Cost</span></b></span><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">: USD 99</span></span><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><o:p></o:p></span></p><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><br /></span></span></p><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><b>AZURE Practice exams:</b></span></span></p><h3 style="background-color: white; box-sizing: border-box; color: #282828; font-family: "Open Sans", sans-serif; font-size: 24px; font-weight: 500; letter-spacing: 0.3px; line-height: 1.1; list-style: none; margin: 0px; padding: 0px;">Answer Sheet</h3><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; overflow-wrap: break-word; text-align: justify;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"></span></span></p><ul class="list-unstyled" style="background-color: white; box-sizing: border-box; color: #282828; font-family: "Open Sans", sans-serif; font-size: 16px; letter-spacing: 0.3px; list-style: none; margin-bottom: 10px; margin-left: 0px; margin-top: 0px; padding: 0px;"><li id="345528" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q1) <span style="box-sizing: border-box; font-weight: 700;">You are working in a company that plans to migrate their application to Azure. This application will be responsible to host the banking records for its users. You have been asked to suggest a security information event management (SIEM) and security orchestration automated response (SOAR) solution.<br style="box-sizing: border-box;" />Which of the following Azure service will mee the requirement?</span></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure CycleCloud</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Sphere</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Sentinel</li><li class=" red" style="background-color: #f5c8c8; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Security Center</li></ol></li><li id="89139" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q2)<span style="box-sizing: border-box; font-weight: 700;"></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">Let us suppose ABC Ltd. plans to migrate all its data and resources to Azure. The company’s migration plan states that only platform as a service (PaaS) solutions must be used in Azure. Now you are required to deploy an Azure environment which supports the planned migration.</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;"><span style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 1rem;">Solution: In this case, you create an Azure App Service and Azure virtual machines that have Microsoft SQL Server installed.</span><br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;"><span style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 1rem;">Does the solution meet the desired goal?</span><br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" red" style="background-color: #f5c8c8; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Yes, the solution meets the desired goal.</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> No, the solution does not meet the desired goal.</li></ol></li><li id="9185" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q3) <span style="box-sizing: border-box; font-weight: 700;">Let us suppose a company wants to try out some services that are being offered by Azure in Public Preview.</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">In this case, should the company deploy resources which are part of Public Preview in their production environment?<br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Yes</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> No</li></ol></li><li id="285945" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q4)<span style="box-sizing: border-box; font-weight: 700;"></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">For the statement given below, select Correct if the statement is true, else select Incorrect if it is false.<br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">“An Azure free account has a spending limit”.</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Correct</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Incorrect</li></ol></li><li id="89142" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q5)<span style="box-sizing: border-box; font-weight: 700;"></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">You have plans to deploy several Azure virtual machines. You are required to ensure that the services running on the virtual machines are available, even if a single data center fails.</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;"><br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">Solution: You suggest deploy the virtual machines to two or more scale sets.</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;"><br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">Does the suggested solution meet the desired goal?</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Yes, the solutions meets the desired goal</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> No, the solution does not meet the desired goal</li></ol></li><li id="345541" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q6) <span style="box-sizing: border-box; font-weight: 700;">An organization plans to migrate its application named QuickApp1 to Azure.<br style="box-sizing: border-box;" />As per the observed pattern QuickApp1 has a low usage during the second and fourth weeks and high usage during the first and third weeks of the month<br style="box-sizing: border-box;" />Which amongst the following benefit of Azure Cloud Services will support cost management for this kind of usage pattern?</span></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Load balancing</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Elasticity</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> High availability</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Fault tolerance</li></ol></li><li id="345522" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q7) <span style="box-sizing: border-box; font-weight: 700;">Which of the following Azure Service would you suggest when you are planning to create an application with an event-based architecture that has the feature to ingest events from Blob storage and create custom topics?</span></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Logic Apps</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Functions</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Machine Learning Studio</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Event Grid</li></ol></li><li id="285949" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q8)<span style="box-sizing: border-box; font-weight: 700;"></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">For the statement given below, select Correct if the statement is true, else select Incorrect if it is false.<br style="box-sizing: border-box;" /></span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"><span style="box-sizing: border-box; font-weight: 700;">“Azure resources can only access other resources in the same resource group ”.</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;"></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" red" style="background-color: #f5c8c8; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Correct</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Incorrect</li></ol></li><li id="345529" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q9) <span style="box-sizing: border-box; font-weight: 700;">Your organization is planning to build a customized solution for uploading weather data to Azure using several million sensors. Which of the given service should the company use to connect, monitor, and control the sensors without managing the infrastructure?</span></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Files</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Virtual Machine</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure IoT Hub</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure App Service</li></ol></li><li id="345526" style="box-sizing: border-box; margin-bottom: 10px;"><p style="box-sizing: border-box; margin: 0px 0px 10px;">Q10) <span style="box-sizing: border-box; font-weight: 700;">______________ offers real-time analytics and complex event-processing engine.</span></p><ol class="options" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Logic Apps</li><li class="green " style="background-color: #5cb85c; border-radius: 5px; box-sizing: border-box; margin-bottom: 10px; padding: 6px;"><span class="fa fa-check" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> <span class="fa fa-user" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Stream Analytics</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Data Lake</li><li class=" " style="box-sizing: border-box; margin-bottom: 10px;"><span class="fa fa-times" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span> Azure Event Hub</li></ol></li></ul><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><br /></span></span></p><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><br /></span></span></p><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><br /></span></span></p><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;"><br /></span></span></p><p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 17.25pt; margin-bottom: 18.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span class="s2"><span style="color: #222222; font-family: "PT Sans",serif; font-size: 11.5pt;">Ref:</span></span></p><p style="background: white; box-sizing: border-box; line-height: 17.25pt; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;"><span class="s2" style="font-size: 15.3333px;"><span style="color: #222222; font-family: PT Sans, serif;">https://docs.microsoft.com/en-us/learn/certifications/azure-ai-fundamentals/?ocid=AID3032310_QSG_529835</span></span></p><p style="background: white; box-sizing: border-box; line-height: 17.25pt; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;"><span class="s2" style="font-size: 15.3333px;"><span style="color: #222222; font-family: PT Sans, serif;">https://www.whizlabs.com/learn/course/microsoft-azure-certification-az-900/256/quiz/19435/report/6498409</span></span></p><p style="background: white; box-sizing: border-box; line-height: 17.25pt; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;"><span class="s2" style="font-size: 15.3333px;"><span style="color: #222222; font-family: PT Sans, serif;">https://mktoevents.com/Microsoft+Event/344254/157-GQE-382</span></span></p><p style="background: white; box-sizing: border-box; line-height: 17.25pt; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;">https://www.mindhub.com/p/MU-AI-900?utm_source=microsoft&utm_medium=certpage&utm_campaign=msofficialpractice</p><p style="background: white; box-sizing: border-box; line-height: 17.25pt; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;">https://www.testpreptraining.com/microsoft-azure-fundamentals-az-900-free-practice-test</p><p style="background: white; box-sizing: border-box; line-height: 17.25pt; margin: 0cm 0cm 18pt; orphans: 2; overflow-wrap: break-word; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;"><br /></p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-40968368056377952192021-08-19T04:02:00.000-07:002021-08-19T04:02:17.011-07:00TSQL To assign DB ROLE BULK of particular databases <p style="text-align: center;"><b><u><span style="color: #ffa400;">TSQL To assign DB ROLE BULK of particular databases </span></u></b></p><p><br /></p><p> --SELECT * FROM dbo.dbRolesUsersMap ('db_role_name')</p><p> --SELECT * FROM dbo.dbRolesUsersMap (DEFAULT)</p><p><br /></p><p>use db_name</p><p><br /></p><p> Declare @CustomeRole varchar(8000)</p><p> Declare @provideuserrolerole varchar(8000)</p><p><span style="white-space: pre;"> </span>Declare @user varchar(30)</p><p><span style="white-space: pre;"> </span>Declare @assignrole varchar(100)</p><p><span style="white-space: pre;"> </span>Declare @i int</p><p> Declare @j int</p><p><br /></p><p><span style="white-space: pre;"> </span>set @assignrole='db_role_name'</p><p><br /></p><p> Select Distinct Rno=ROW_NUMBER()over(Order by members.name), members.name as 'members_name'</p><p><br /></p><p> into ##providedbprivilgeobjects </p><p><br /></p><p>FROM sys.database_role_members rolemem</p><p><br /></p><p>INNER JOIN sys.database_principals roles</p><p><br /></p><p>ON rolemem.role_principal_id = roles.principal_id</p><p><br /></p><p>INNER JOIN sys.database_principals members</p><p><br /></p><p>ON rolemem.member_principal_id = members.principal_id</p><p><br /></p><p>where roles.name not in (SELECT Login_Name FROM dbo.dbRolesUsersMap ('db_role_name'))</p><p>and members.name not like '%\%'</p><p>ORDER BY members.name</p><p><br /></p><p>Select @i=1,@j=COUNT(*) from ##providedbprivilgeobjects </p><p> </p><p>While @i <= @j </p><p>Begin </p><p> </p><p> Select @user=members_name from ##providedbprivilgeobjects where Rno=@i </p><p><br /></p><p> set @provideuserrolerole='Use db_name'+space(2)+'ALTER ROLE '+space(1)+'['+@assignrole+']'+space(2)+'ADD MEMBER '+space(2)+'['+@user+']'+''</p><p> </p><p> --select @provideuserrolerole</p><p><br /></p><p> Print @provideuserrolerole</p><p><br /></p><p> --Execute(@provideuserrolerole) </p><p><br /></p><p><span style="white-space: pre;"> </span>SET @i=@i+1</p><p><br /></p><p> End</p><p><br /></p><p> drop table ##providedbprivilgeobjects</p><p><br /></p><p><br /></p><p>Note:</p><p><br /></p><p>use db_name</p><pre style="box-sizing: inherit; color: #222222; font-size: 12px; margin-bottom: 0px; margin-top: 0px; padding: 0px;">CREATE FUNCTION dbo.dbRolesUsersMap (@dbRole SYSNAME = '%')
RETURNS TABLE
AS
RETURN (
SELECT
User_Type =
CASE mmbrp.[type]
WHEN 'G' THEN 'Windows Group'
WHEN 'S' THEN 'SQL User'
WHEN 'U' THEN 'Windows User'
END,
Database_User_Name = mmbrp.[name],
Login_Name = ul.[name],
DB_Role = rolp.[name]
FROM sys.database_role_members mmbr, -- The Role OR members associations table
sys.database_principals rolp, -- The DB Roles names table
sys.database_principals mmbrp, -- The Role members table (database users)
sys.server_principals ul -- The Login accounts table
WHERE Upper (mmbrp.[type]) IN ( 'S', 'U', 'G' )
-- No need for these system account types
AND Upper (mmbrp.[name]) NOT IN ('SYS','INFORMATION_SCHEMA')
AND rolp.[principal_id] = mmbr.[role_principal_id]
AND mmbrp.[principal_id] = mmbr.[member_principal_id]
AND ul.[sid] = mmbrp.[sid]
AND rolp.[name] LIKE '%' + @dbRole + '%'
)
GO</pre><pre style="box-sizing: inherit; color: #222222; font-size: 12px; margin-bottom: 0px; margin-top: 0px; padding: 0px;"><br /></pre><pre style="box-sizing: inherit; color: #222222; font-size: 12px; margin-bottom: 0px; margin-top: 0px; padding: 0px;"><p style="color: black; font-family: "Times New Roman"; font-size: medium; white-space: normal;"> --SELECT * FROM dbo.dbRolesUsersMap ('db_role_name')</p><p style="color: black; font-family: "Times New Roman"; font-size: medium; white-space: normal;"> --SELECT * FROM dbo.dbRolesUsersMap (DEFAULT)</p></pre>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-30599212693014149152021-08-05T21:28:00.006-07:002021-08-05T23:38:52.762-07:00Installation influxdb on Ubuntu 20.04 LTS<p> </p><p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; margin: 15pt 0cm 7.5pt; mso-outline-level: 2; text-align: center;"><b><span face=""Arial",sans-serif" style="color: #333333; font-size: 18pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><u>Installation influxdb on Ubuntu</u><o:p></o:p></span></b></p><p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; margin: 15pt 0cm 7.5pt; mso-outline-level: 2; text-align: center;"><b><span face=""Arial",sans-serif" style="color: #333333; font-size: 18pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><u><br /></u></span></b></p>
<p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 6pt;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">InfluxDB can be
installed by directly querying the official repositories of this tool. First,
add them to your list, by typing the following commands:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 6pt;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background: whitesmoke; line-height: normal; margin-bottom: 7.5pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -</span><span style="color: #333333; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: whitesmoke; line-height: normal; margin-bottom: 7.5pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo
</span><span style="background: whitesmoke; color: #397300; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">echo</span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="background: whitesmoke; color: #880000; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"deb https://repos.influxdata.com/ubuntu
bionic stable"</span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> | sudo tee
/etc/apt/sources.list.d/influxdb.list</span><span style="color: #333333; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: whitesmoke; line-height: normal; margin-bottom: 7.5pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo
</span><span style="background: whitesmoke; color: #397300; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">echo</span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="background: whitesmoke; color: #880000; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"deb https://repos.influxdata.com/ubuntu
bionic stable"</span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> | sudo tee
/etc/apt/sources.list.d/influxdb.list</span><span style="color: #333333; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: whitesmoke; line-height: normal; margin-bottom: 7.5pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo
apt update</span><span style="color: #333333; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p style="background: white; margin-bottom: 6.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 6pt;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt;"><o:p> </o:p></span></p>
<p style="background: white; margin-bottom: 6.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 6pt;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt;">Once the list of repositories has been updated, proceed with the
installation of InfluxDB using the command:<o:p></o:p></span></p>
<pre style="-webkit-text-stroke-width: 0px; background: whitesmoke; border-radius: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 7.5pt; orphans: 2; overflow-wrap: break-word; overflow: auto; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-break: break-all; word-spacing: 0px;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background: whitesmoke; color: #444444; font-family: Consolas;">sudo apt install influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre>
<p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 6.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 6pt; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt;">Once installed, check the status of the service via:<o:p></o:p></span></p>
<pre style="-webkit-text-stroke-width: 0px; background: whitesmoke; border-radius: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 7.5pt; orphans: 2; overflow-wrap: break-word; overflow: auto; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-break: break-all; word-spacing: 0px;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background: whitesmoke; color: #444444; font-family: Consolas;">sudo systemctl status influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
<br />
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="color: red;">Error detail info:<o:p></o:p></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><o:p> </o:p></b></p>
<pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">sudo apt update<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;"><o:p> </o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Ign:1 http://archive.canonical.com/ubuntu bionic InRelease<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Err:2 http://archive.canonical.com/ubuntu bionic Release<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;"><span style="mso-spacerun: yes;"> </span>404<span style="mso-spacerun: yes;"> </span>Not Found [IP: 91.189.92.191 80]<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Ign:3 http://archive.ubuntu.com/ubuntu bionic InRelease<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Ign:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Ign:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Err:7 http://archive.ubuntu.com/ubuntu bionic Release<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;"> <span style="mso-spacerun: yes;"> </span>404<span style="mso-spacerun: yes;"> </span>Not Found [IP: 91.189.88.174 80]<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Err:8 http://archive.ubuntu.com/ubuntu bionic-updates Release<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;"><span style="mso-spacerun: yes;"> </span>404<span style="mso-spacerun: yes;"> </span>Not Found [IP: 91.189.88.174 80]<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Err:9 http://archive.ubuntu.com/ubuntu bionic-backports Release<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;"><span style="mso-spacerun: yes;"> </span>404<span style="mso-spacerun: yes;"> </span>Not Found [IP: 91.189.88.174 80]<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Err:10 http://archive.ubuntu.com/ubuntu bionic-security Release<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;"><span style="mso-spacerun: yes;"> </span>404<span style="mso-spacerun: yes;"> </span>Not Found [IP: 91.189.88.174 80]<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">Reading package lists... Done<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">E: The repository 'http://archive.canonical.com/ubuntu bionic Release' no longer has a Release file.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: Updating from such a repository can't be done securely, and is therefore disabled by default.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: See apt-secure(8) manpage for repository creation and user configuration details.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">E: The repository 'http://archive.ubuntu.com/ubuntu bionic Release' does not have a Release file.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: Updating from such a repository can't be done securely, and is therefore disabled by default.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: See apt-secure(8) manpage for repository creation and user configuration details.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates Release' does not have a Release file.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: Updating from such a repository can't be done securely, and is therefore disabled by default.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: See apt-secure(8) manpage for repository creation and user configuration details.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports Release' does not have a Release file.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: Updating from such a repository can't be done securely, and is therefore disabled by default.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: See apt-secure(8) manpage for repository creation and user configuration details.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">E: The repository 'http://archive.ubuntu.com/ubuntu bionic-security Release' does not have a Release file.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: Updating from such a repository can't be done securely, and is therefore disabled by default.<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">N: See apt-secure(8) manpage for repository creation and user configuration details.</span></code><span style="color: #212529; font-family: Consolas; font-size: 10.5pt;"><o:p></o:p></span></pre>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><o:p> </o:p></b></p>
<h4 style="background: white; margin-top: 0cm;"><span style="color: #212529;">Solutions:</span></h4>
<p style="margin-top: 0cm;"><span style="font-family: Symbol; mso-ascii-font-family: "Times New Roman";">·</span> <span style="mso-spacerun: yes;"> </span>For some
reason APT can not find the <code style="box-sizing: border-box; word-break: break-word;"><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt;">Release</span></code> file in the specified repositories
list.<o:p></o:p></p>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">To fix
this, I would suggest the following:<o:p></o:p></p>
<p style="box-sizing: border-box; margin-bottom: 5.0pt; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 5pt 36pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Check if your connection to the Internet is
behind a firewall, limited in any way or behind a proxy and configure your
system and connection accordingly or change to a different connection if
available.<o:p></o:p></p>
<p style="box-sizing: border-box; margin-bottom: 5.0pt; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 5pt 36pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]-->Check if there is an APT proxy configuration
file by running the following command:<o:p></o:p></p>
<pre style="background: rgb(238, 238, 238); box-sizing: border-box; margin-bottom: 1rem; max-width: 100%; overflow: auto;"><code style="box-sizing: border-box; color: inherit; font-size: inherit;"><span style="color: #212529; font-family: Consolas;"><span> </span>ls /etc/apt/apt.conf.d/*proxy*<o:p></o:p></span></code></pre>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">If the
command returns back any results, move these files out of the <code style="box-sizing: border-box; word-break: break-word;"><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt;">/etc/apt/apt.conf.d/</span></code> directory
or delete them.<o:p></o:p></p>
<ul style="box-sizing: border-box; margin: 1rem 1em;" type="disc">
<li class="MsoNormal" style="box-sizing: border-box; line-height: normal; mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;">Revert your repositories list to the original
Ubuntu Bionic Beaver list by running the following command in the
terminal:<o:p></o:p></li>
</ul>
<pre style="background: rgb(238, 238, 238); box-sizing: border-box; margin-bottom: 1rem; max-width: 100%; overflow: auto;"><code style="box-sizing: border-box; color: inherit; font-size: inherit;"><span style="color: #212529; font-family: Consolas;">sudo nano /etc/apt/sources.list<o:p></o:p></span></code></pre>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">A file
editor will be opened. Delete all the lines in it and then copy and paste the
following in the file editor:<o:p></o:p></p>
<pre style="background: rgb(238, 238, 238); box-sizing: border-box; margin-bottom: 1rem; max-width: 100%; overflow: auto;"><code style="box-sizing: border-box; color: inherit; font-size: inherit;"><span style="color: #212529; font-family: Consolas;">deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse restricted<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">deb http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe restricted<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse universe restricted<o:p></o:p></span></code></pre>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">Then, save
and close the file by pressing <kbd style="border-radius: 0.2rem; box-sizing: border-box; padding: 0.2rem 0.4rem;"><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt;">Ctrl</span></kbd> + <kbd style="border-radius: 0.2rem; box-sizing: border-box; padding: 0.2rem 0.4rem;"><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt;">X</span></kbd> then
press <kbd style="border-radius: 0.2rem; box-sizing: border-box; padding: 0.2rem 0.4rem;"><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt;">Y</span></kbd> then
press <kbd style="border-radius: 0.2rem; box-sizing: border-box; padding: 0.2rem 0.4rem;"><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt;">Enter</span></kbd><o:p></o:p></p>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">To verify
you saved the file correctly, please run the following command in the terminal:<o:p></o:p></p>
<pre style="background: rgb(238, 238, 238); box-sizing: border-box; margin-bottom: 1rem; max-width: 100%; overflow: auto;"><code style="box-sizing: border-box; color: inherit; font-size: inherit;"><span style="color: #212529; font-family: Consolas;">cat /etc/apt/sources.list<o:p></o:p></span></code></pre>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">The output
should be exactly:<o:p></o:p></p>
<pre style="background: rgb(238, 238, 238); box-sizing: border-box; margin-bottom: 1rem; max-width: 100%; overflow: auto;"><code style="box-sizing: border-box; color: inherit; font-size: inherit;"><span style="color: #212529; font-family: Consolas;">deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse restricted<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">deb http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe restricted<o:p></o:p></span></code></pre><pre style="background: rgb(238, 238, 238);"><code><span style="color: #212529; font-family: Consolas;">deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse universe restricted<o:p></o:p></span></code></pre>
<p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0cm;">Ubuntu
repositories have a defined format. They should be for example something like <code style="box-sizing: border-box; word-break: break-word;"><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt;">deb http://archive.ubuntu.com/ubuntu
bionic main</span></code>.<o:p></o:p></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Explanation:</span></b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><b><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb</span></b><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">:</span></b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> These
repositories contain binaries or precompiled packages. These repositories are
required for most users.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><b><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">http://archive.ubuntu.com/ubuntu</span></b><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">:</span></b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> The URI
(Uniform Resource Identifier), in this case a location on the internet.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><b><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">bionic</span></b><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">:</span></b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> is the
release name of your Ubuntu installation.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><b><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">main</span></b><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> & </span></b><b><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">restricted</span></b><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> ...etc:</span></b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> are the
section names or components. There can be several section names, separated by
spaces.<o:p></o:p></span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">
<hr align="left" noshade="" size="0" style="color: #212529;" width="100%" />
</span></div>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">After that, please update your repositories list by running the
following command in the terminal:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo apt update<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">You should now be able to install packages and update your system again.<o:p></o:p></span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">
<hr align="left" noshade="" size="0" style="color: #212529;" width="100%" />
</span></div>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Notice:</span></b><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">If you still get errors, please first back up </span><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">/etc/apt/sources.list.d/</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> to your home
directory by running the following command in the terminal:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">mkdir ~/old_sources_list_d &&
sudo cp -r /etc/apt/sources.list.d/* ~/old_sources_list_d/<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">After that, please clear all existing PPAs and repository lists in </span><span style="color: #e83e8c; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">/etc/apt/sources.list.d/</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> by running
the following command in the terminal:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo rm -r /etc/apt/sources.list.d/*<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Then, please update your repositories list by running the following
command again in the terminal:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo apt update</span><span style="color: #212529; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p> <b>To resolve this we need to run
with sudo like below</b></p><p class="MsoNormal" style="margin-left: -2cm;"><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> $ </span>sudo chmod +x
/usr/lib/influxdb/scripts/influxd-systemd-start.sh<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><br /></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span>Useful commands:<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><o:p> </o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>To <b style="mso-bidi-font-weight: normal;">add</b> portal in repository as see below<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span style="background: rgb(243, 244, 246); color: #1f2937; font-family: Consolas;"><span> </span><span> </span><span> $ </span>sudo add-apt-repository 'deb [arch=amd64]
<span> </span><span> <span> </span> </span>https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse'</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>The repository will be appended
to sources.list file.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span><span> </span><span> </span><span> </span> </span><span> </span>You can now install an<span> </span>y of the
packages from the newly enabled repository:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span style="background: rgb(243, 244, 246); color: #1f2937; font-family: Consolas;"><span> </span><span> </span><span> </span>$ sudo apt install mongodb-org</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>If for any reasons you want to <b style="mso-bidi-font-weight: normal;">remove</b> a previously enabled repository,
use the --remove option:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> $ </span>sudo add-apt-repository --remove
'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu <span> </span><span> </span><span> </span>bionic/mongodb-org/4.0
multiverse'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"> To add repository manually<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span style="mso-spacerun: yes;"><span> </span><span> </span><span> </span> </span><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>If you want to have more control over how your
sources are organized you can manually edit the <span> </span><span> <span> </span> </span>/etc/apt/sources.list file and
add the apt repository line to the file.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>For demonstration, we will enable
the CouchDB repository and install the software. CouchDB is a free <span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>and
open-source fault-tolerant NoSQL database maintained by the Apache Software
Foundation.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"> <b> </b><b><span> </span>To add the repository open the
sources.list file with your text editor :</b><span style="mso-tab-count: 1;"><b> </b> </span>
<span style="mso-tab-count: 1;"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"> $ sudo nano /etc/apt/sources.list<o:p></o:p></p>
<div style="background: white; border: 1pt solid windowtext; mso-border-alt: solid windowtext .25pt; mso-element: para-border-div; padding: 0cm;">
<p class="MsoNormal" style="background: white; border: none; line-height: normal; mso-border-alt: solid windowtext .25pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Add the repository line to the end of
the file:<o:p></o:p></span></p>
</div>
<p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; text-align: center;"><span style="color: #1f2937; font-family: Consolas; font-size: 12pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">/etc/apt/sources.list<o:p></o:p></span></p>
<div style="background: white; border: 1pt solid windowtext; mso-border-alt: solid windowtext .25pt; mso-element: para-border-div; padding: 0cm;">
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 0cm; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="border: 1pt solid windowtext; color: #4070a0; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid windowtext .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN; padding: 0cm;">deb
https://apache.bintray.com/couchdb-deb bionic main</span><span style="color: #1f2937; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<div style="background: white; border: 1pt solid windowtext; mso-border-alt: solid windowtext .25pt; mso-element: para-border-div; padding: 0cm;">
<p style="background: white; border: none; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;">Another option is to create a
new the repository file under the </span><code style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(243,244,246,var(--tw-bg-opacity)); border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; padding: 0.25rem; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1f2937; font-family: Consolas; font-size: 10pt; mso-border-alt: solid windowtext .25pt; padding: 0cm;">/etc/apt/sources.list.d/</span></code><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;"> directory.<o:p></o:p></span><span id="ezoic-pub-ad-placeholder-149" style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; min-width: 0px;"></span></p>
<p style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;">When manually configuring a repository you also need to manually
import the public repository key to your system. To do that use either <a href="https://linuxize.com/post/wget-command-examples/" style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; min-width: 0px; transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1) 0s;"><code style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(243,244,246,var(--tw-bg-opacity)); border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; padding: 0.25rem; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1a73e8; font-family: Consolas; font-size: 10pt; mso-border-alt: solid windowtext .25pt; padding: 0cm;">wget</span></code></a> or <a href="https://linuxize.com/post/curl-command-examples/" style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; min-width: 0px; transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1) 0s;"><code style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(243,244,246,var(--tw-bg-opacity)); border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; padding: 0.25rem; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1a73e8; font-family: Consolas; font-size: 10pt; mso-border-alt: solid windowtext .25pt; padding: 0cm;">curl</span></code></a> :<o:p></o:p></span></p>
<pre style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background-color: rgba(243,244,246,var(--tw-bg-opacity)); background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-size: 0.75rem; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 1rem; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-shading: transparent; orphans: 2; overflow: auto; padding: 1rem; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><code prefix="$" style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1f2937; font-family: Consolas; mso-border-alt: solid windowtext .25pt; padding: 0cm;">curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -</span></code><button class="code-copy button main small" style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; appearance: button; background-color: rgba(59,130,246,var(--tw-bg-opacity)); background-image: none; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border-radius: 0.25rem; border-style: solid; border-width: 0px; box-sizing: border-box; color: white; cursor: pointer; font-family: inherit; font-size: 0.75rem; letter-spacing: 0.05em; line-height: 1rem; margin: 0px; opacity: 0; padding: 0.25rem 0.5rem; pointer-events: none; position: absolute; right: 0.5rem; text-transform: none; top: 0.5rem; transition: opacity 0.5s ease 0s;" type="button"><span style="color: #1f2937; font-family: Consolas;">Copy<o:p></o:p></span></button></pre>
<p style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;">The command above should output </span><code style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(243,244,246,var(--tw-bg-opacity)); border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; padding: 0.25rem; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1f2937; font-family: Consolas; font-size: 10pt; mso-border-alt: solid windowtext .25pt; padding: 0cm;">OK</span></code><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;"> which
means that the GPG key has been successfully imported and packages from this
repository will be considered trusted.<o:p></o:p></span></p>
<p style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;">Before installing the packages from the newly added repository
you must update the package index:<o:p></o:p></span></p>
<pre style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background-color: rgba(243,244,246,var(--tw-bg-opacity)); background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-size: 0.75rem; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 1rem; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-shading: transparent; orphans: 2; overflow: auto; padding: 1rem; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><code prefix="$" style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1f2937; font-family: Consolas; mso-border-alt: solid windowtext .25pt; padding: 0cm;">sudo apt update</span></code><button class="code-copy button main small" style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; appearance: button; background-color: rgba(59,130,246,var(--tw-bg-opacity)); background-image: none; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border-radius: 0.25rem; border-style: solid; border-width: 0px; box-sizing: border-box; color: white; cursor: pointer; font-family: inherit; font-size: 0.75rem; letter-spacing: 0.05em; line-height: 1rem; margin: 0px; opacity: 0; padding: 0.25rem 0.5rem; pointer-events: none; position: absolute; right: 0.5rem; text-transform: none; top: 0.5rem; transition: opacity 0.5s ease 0s;" type="button"><span style="color: #1f2937; font-family: Consolas;">Copy<o:p></o:p></span></button></pre>
<p style="--tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span face=""Segoe UI",sans-serif" style="color: #1f2937; font-size: 13.5pt;">Once the package index is updated you can install packages from
the newly added repository:<o:p></o:p></span></p>
<pre style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; -webkit-text-stroke-width: 0px; background-color: rgba(243,244,246,var(--tw-bg-opacity)); background: white; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; border: none; box-sizing: border-box; font-size: 0.75rem; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 1rem; margin: 1rem 0px; min-width: 0px; mso-border-alt: solid windowtext .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-shading: transparent; orphans: 2; overflow: auto; padding: 1rem; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><code prefix="$" style="--tw-bg-opacity: 1; --tw-border-opacity: 1; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-inset: var(--tw-empty, ); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgba(229,231,235,var(--tw-border-opacity)); border-image: initial; box-sizing: border-box; font-size: 1rem; line-height: 1.5rem; min-width: 0px; word-break: break-word;"><span style="border: 1pt solid windowtext; color: #1f2937; font-family: Consolas; mso-border-alt: solid windowtext .25pt; padding: 0cm;">sudo apt install couchdb</span></code><span style="color: #1f2937; font-family: Consolas;"><o:p></o:p></span></pre></div>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>To remove swap file<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>$ rm .MERGE_MSG.swp<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>To remove mal function file<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>$ sudo rm
/etc/apt/sources.list.d/file.list<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>To vi editor </b><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>Command<span style="mso-tab-count: 1;"> </span><span style="mso-tab-count: 3;"> </span>Purpose<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>i<span style="mso-tab-count: 1;"> </span><span style="mso-tab-count: 5;"> </span><span style="mso-spacerun: yes;">
</span>Switch to Insert mode.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>Esc<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Switch to Command mode.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>:w<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;">
</span>Save and continue editing.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>:wq or ZZ<span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>Save
and quit/exit vi.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><o:p> </o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span>To edit file on Nano editor and save<o:p></o:p></b></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> $ sudo nano /etc/apt/sources.list<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><span> </span>Add file/modify file Then, save and close the file by pressing </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Ctrl</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> + </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">X</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> then
press </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Y</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> then
press </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Enter</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>To edit file on vi editor and save<o:p></o:p></b></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><span> </span>$ sudo vi /etc/apt/files.list<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<h2 style="background: white; margin-bottom: 7.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 7.5pt; margin: 7.5pt 0cm;"><span face=""Arial",sans-serif" style="color: #707070; font-size: 11.5pt;">Type a colon (:) to move the cursor to the bottom of the screen.<o:p></o:p></span></h2>
<p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 15pt; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 15pt; orphans: 2; overflow: hidden; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span face=""Arial",sans-serif" style="color: #707070; font-size: 10.5pt;">This is where final commands can be made.<o:p></o:p></span></p>
<h2 id="tab7" style="-webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 7.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 7.5pt; margin: 7.5pt 0cm; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span style="align-items: center; border-radius: 3px; box-sizing: border-box; display: flex; float: left; justify-content: center;"><span class="step"><span face=""Arial",sans-serif" style="background: black; color: #f2e909; font-size: 12pt; font-weight: normal;">7</span></span></span><span face=""Arial",sans-serif" style="color: #707070; font-size: 11.5pt;"><span><span> </span> </span><span> </span>Type wq.<o:p></o:p></span></h2>
<p style="-webkit-text-stroke-width: 0px; background: white; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 15pt; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 15pt; orphans: 2; overflow: hidden; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;"><span style="box-sizing: border-box;"><span class="code"><span face=""Arial",sans-serif" style="color: #707070; font-size: 10.5pt;"> wq</span></span></span><span face=""Arial",sans-serif" style="color: #707070; font-size: 10.5pt;"> is two individual commands: <span class="code"><span style="box-sizing: border-box;">w</span></span> for Write
(or Save) and <span class="code"><span style="box-sizing: border-box;">q</span></span> for
Quit. This command combination returns you to the command line.<o:p></o:p></span></p>
<p style="background: white; line-height: 15pt; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 15pt;"><span face=""Arial",sans-serif" style="color: #707070; font-size: 10.5pt;">(i.e) $ :wq<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>Commands:<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><o:p> </o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span face=""Arial",sans-serif" style="color: #333333;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>Installation</span><o:p></o:p></b></p>
<p style="background: white; margin-bottom: 6.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 6pt;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt;"><span> </span>InfluxDB can be installed by directly querying the official
repositories of this tool. First, add them to your list, by typing the
following commands:<o:p></o:p></span></p>
<p style="background: white; margin-bottom: 6.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 6pt;"><span face=""Arial",sans-serif" style="color: #333333; font-size: 10.5pt;"><o:p> </o:p></span></p>
<pre style="-webkit-text-stroke-width: 0px; background: whitesmoke; border-radius: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 7.5pt; orphans: 2; overflow-wrap: break-word; overflow: auto; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-break: break-all; word-spacing: 0px;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background: whitesmoke; color: #444444; font-family: Consolas;"><span> </span>sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span style="mso-spacerun: yes;"> </span><o:p></o:p></b></p>
<p class="MsoNormal"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;">sudo </span><span class="hljs-builtin"><span style="color: #397300; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;">echo</span></span></span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;"> </span><span class="hljs-string"></span><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;">"</span></span> <span class="hljs-string"><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;">deb
http://archive.ubuntu.com/ubuntu bionic main universe multiverse restricted"</span></span></span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;"> | sudo tee /etc/apt/sources.list.d/influxdb.list</span></span><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;">sudo </span><span class="hljs-builtin"><span style="color: #397300; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;">echo</span></span></span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;"> </span><span class="hljs-string"></span><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;">"</span></span> <span class="hljs-string"><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;">deb
http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe
restricted"</span></span></span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;"> | sudo tee /etc/apt/sources.list.d/influxdb.list</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;">sudo </span><span class="hljs-builtin"><span style="color: #397300; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;">echo</span></span></span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;"> </span><span class="hljs-string"></span><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;">"</span></span> <span class="hljs-string"><span style="color: #880000; font-family: Consolas; font-size: 10pt; line-height: 107%;">deb
http://archive.ubuntu.com/ubuntu bionic-updates main multiverse universe
restricted"</span></span></span><span style="background: whitesmoke; color: #444444; font-family: Consolas; font-size: 10pt; line-height: 107%;"><span style="-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;"> | sudo tee /etc/apt/sources.list.d/influxdb.list</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><o:p> </o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span style="mso-spacerun: yes;"> </span>(or)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span style="mso-spacerun: yes;"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<ul type="disc">
<li class="MsoNormal" style="background: white; color: #212529; line-height: normal; mso-list: l1 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span face=""Segoe UI",sans-serif" style="font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Revert
your repositories list to the original Ubuntu Bionic Beaver list by
running the following command in the terminal:<o:p></o:p></span></li>
</ul>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">sudo nano /etc/apt/sources.list<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">A file editor will be opened. Delete all the lines in it and then copy
and paste the following in the file editor:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb http://archive.ubuntu.com/ubuntu
bionic main universe multiverse restricted<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb
http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe
restricted<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb http://archive.ubuntu.com/ubuntu
bionic-updates main multiverse universe restricted<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Then, save and close the file by pressing </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Ctrl</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> + </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">X</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> then
press </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Y</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> then
press </span><span style="background: rgb(33, 37, 41); color: white; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Enter</span><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">To verify you saved the file correctly, please run the following command
in the terminal:<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">cat /etc/apt/sources.list<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">The output should be exactly:<o:p></o:p></span></p><p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse restricted<o:p></o:p></span></p><p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe restricted<o:p></o:p></span></p><p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="color: #212529; font-family: Consolas; font-size: 10pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse universe restricted</span></p><p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"></span></p><p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p><p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><br /></span></p><p class="MsoNormal" style="margin-left: -2.0cm;"><o:p> </o:p></p><pre style="background: whitesmoke; margin-bottom: 7.5pt; word-break: break-all;"><code><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo apt update</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">Once the list of repositories has been updated, proceed with the
installation of InfluxDB using the command:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo apt install influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">Once installed, check the status of the service via:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo systemctl status influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p class="MsoNormal" style="margin-left: -2.0cm;"> <o:p></o:p></p><p style="background: white; margin-bottom: 6.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">If, when typing this command, a result similar to the one shown
in the screenshot above appears, the tool has been correctly installed, but is
not running yet.<o:p></o:p></span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">To start it and make sure that the service is always available
every time the machine is restarted, type the command:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo systemctl </span><span style="box-sizing: border-box;"></span></code><span class="hljs-builtin"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #397300; font-family: Consolas;">enable</span></span><code><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;"> --now influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">In this way, not only will it start on the spot, but it will be
reloaded every time the server is restarted. To start it manually, run, as an
alternative to the command shown above, the following:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo systemctl start influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">To stop the execution of InfluxDB use the command:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo systemctl stop influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><br /><h2 style="background: white; margin-bottom: 7.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt;"><span style="color: #333333; font-family: "Arial",sans-serif;">Configuring
InfluxDB<o:p></o:p></span></h2><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">The InfluxDB configuration file is located by default in the <i style="box-sizing: border-box;">/etc/influxdb/influxdb.conf</i> folder.<o:p></o:p></span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">Many features are commented out. To enable them, simply open the
configuration file and delete the "#" symbols from the relevant line.<o:p></o:p></span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">To modify the configuration file use the command:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo nano /etc/influxdb/influxdb.conf</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">For example, to access via HTTP request (enabling endpoints),
uncomment the "enabled" item in the "http" section, as
shown in the following screenshot:<br style="box-sizing: border-box;" />
<br style="box-sizing: border-box;" /><br /><o:p></o:p></span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">When the necessary changes are made, close and exit using the
key combination CTRL + X / Y / Enter.<o:p></o:p></span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">To apply the changes, the service has to be restarted. This
operation that can be carried out using the commands described above:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo systemctl stop influxdb && sudo systemctl start influxdb</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">As with any database, after the installation the first thing to do
is to create an administrator account. This can be done using the following
command: <o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">curl -XPOST </span><span style="box-sizing: border-box;"></span></code><span class="hljs-string"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #880000; font-family: Consolas;">"http://localhost:8086/query"</span></span><code><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;"> --data-urlencode </span><span style="box-sizing: border-box;"></span></code><span class="hljs-string"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #880000; font-family: Consolas;">"q=CREATE USER admin WITH PASSWORD 'password' WITH ALL PRIVILEGES"</span></span><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">Clearly replace:<o:p></o:p></span></p><ul style="box-sizing: border-box;" type="disc">
<li class="MsoNormal" style="background: white; box-sizing: border-box; color: #333333; line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 10.5pt;">admin: with the user name;<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; box-sizing: border-box; color: #333333; line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 10.5pt;">password: with the password for the
database login.<o:p></o:p></span></li>
</ul><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">Once the account is created, access the InfluxDB shell by using
the command:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">influx -username </span><span style="box-sizing: border-box;"></span></code><span class="hljs-string"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #880000; font-family: Consolas;">'admin'</span></span><code><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;"> -password </span><span style="box-sizing: border-box;"></span></code><span class="hljs-string"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #880000; font-family: Consolas;">'password'</span></span><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">N.B. also in this case, the “admin” and “password” parameters
have to be replaced with those previously declared.<o:p></o:p></span></p><br /><p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 6.0pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">In addition to
running queries directly from the shell, your queries can be submitted to
InfluxDB by using<br />
tools such as "curl". The syntax to respect is the following:<o:p></o:p></span></p><p class="MsoNormal" style="background: whitesmoke; line-height: normal; margin-bottom: 7.5pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas; font-size: 10pt;">curl
-G http://localhost:8086/query -u ADMIN_NAME:PASSWORD_NAME --data-urlencode </span><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #880000; font-family: Consolas; font-size: 10pt;">"q=QUERY"</span><span style="color: #333333; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 6.0pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Again, replace:<o:p></o:p></span></p><ul type="disc">
<li class="MsoNormal" style="background: white; color: #333333; line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"ADMIN_NAME"
with the name of the user created;<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #333333; line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"PASSWORD_NAME"
with the password associated with that user;<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #333333; line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">“QUERY”
with the query to be executed.<o:p></o:p></span></li>
</ul><p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 6.0pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">For example, to
access with the data used in this tutorial and view all the databases present,
the command to execute would be:<o:p></o:p></span></p><p class="MsoNormal" style="background: whitesmoke; line-height: normal; margin-bottom: 7.5pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas; font-size: 10pt;">curl
-G http://localhost:8086/query -u admin:password --data-urlencode </span><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #880000; font-family: Consolas; font-size: 10pt;">"q=SHOW DATABASES"</span><span style="color: #333333; font-family: Consolas; font-size: 10.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 6.0pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">N.B. If the
InfluxDB database is queried from a machine other than the one where the server
is installed, instead of ‘localhost’, enter the IP address of the machine to
query.<o:p></o:p></span></p><p class="MsoNormal" style="margin-left: -2.0cm;"><o:p> </o:p></p><h2 style="background: white; margin-bottom: 7.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt;"><span style="color: #333333; font-family: "Arial",sans-serif;">Enabling
the Firewall<o:p></o:p></span></h2><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">Since InfluxDB can also be queried from the outside, it may be
necessary to update the firewall rules to allow it to connect.<o:p></o:p></span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">If your firewall is <b style="box-sizing: border-box;">UFW</b> just
type the following commands:<o:p></o:p></span></p><pre style="background: whitesmoke; border-radius: 0px; box-sizing: border-box; margin-bottom: 7.5pt; overflow-wrap: break-word; overflow: auto; word-break: break-all;"><code style="border-radius: 0px; box-sizing: border-box; font-size: inherit; overflow-x: auto; white-space: pre-wrap;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #444444; font-family: Consolas;">sudo ufw allow 8086/tcp</span></code><span style="color: #333333; font-family: Consolas;"><o:p></o:p></span></pre><p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto;"><span face=""Segoe UI",sans-serif" style="color: #212529; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">
</span></p><p style="background: white; box-sizing: border-box; margin: 0cm 0cm 6pt;"><span style="color: #333333; font-family: "Arial",sans-serif; font-size: 10.5pt;">This will allow TCP traffic on port 8086 used by InfluxDB for
querying the database from outside.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: rgb(238, 238, 238); line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><br /></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p><br /></o:p></p><p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p><p class="MsoNormal" style="margin-left: -2cm;"><b style="mso-bidi-font-weight: normal;"><span><span> </span><span> </span><span> </span><span> </span> </span>Useful links:<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>Install influx on ubuntu<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>1)<a href="https://www.arubacloud.com/tutorial/how-to-install-influxdb-on-ubuntu-20-04.aspx">https://www.arubacloud.com/tutorial/how-to-install-influxdb-on-ubuntu-20-04.aspx</a><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;">Fix issue<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>2)<a href="https://itectec.com/ubuntu/ubuntu-unable-to-update-or-install-anything-after-moving-to-another-country/">https://itectec.com/ubuntu/ubuntu-unable-to-update-or-install-anything-after-moving-to-another-country/</a><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>permission denied issue<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> <span> </span><span> </span> </span>3) <a href="https://unix.stackexchange.com/questions/209097/systemd-failed-at-step-exec-spawning-script-permission-denied">https://unix.stackexchange.com/questions/209097/systemd-failed-at-step-exec-spawning-script-<span> </span><span> </span>permission-denied</a><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>Add repository on Ubuntu source
list<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>4) <a href="https://linuxize.com/post/how-to-add-apt-repository-in-ubuntu/#:~:text=Adding%20Repositories%20with%20add%2Dapt%2Drepository,-The%20basic%20syntax&text=list%20file%20like%20deb%20http,apt%2Drepository%20in%20your%20terminal">https://linuxize.com/post/how-to-add-apt-repository-in-<span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>ubuntu/#:~:text=Adding%20Repositories%20with%20add%2Dapt%2Drepository,-The%20basic%20syntax&text=list%20file%20like%20deb%20http,apt%2Drepository%20in%20your%20terminal</a>.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>Beginners commands<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>5) <a href="https://techlog360.com/basic-ubuntu-commands-terminal-shortcuts-linux-beginner/">https://techlog360.com/basic-ubuntu-commands-terminal-shortcuts-linux-beginner/</a><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>How do I remove a malformed line
from my sources.list?<o:p></o:p></p>
<p class="MsoNormal" style="margin-left: -2cm;"><span> </span><span> </span><span> </span><span> </span><span> </span>6) https://www.youtube.com/watch?v=X0FApmuZw98<o:p></o:p></p>
<p class="MsoNormal">$ sudo rm /etc/apt/sources.list.d/file.list<o:p></o:p></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><u><b>useful commands and links</b></u></p><p class="MsoNormal"><br /></p><p class="MsoNormal">1)<b>Display the current Ubuntu hostname</b></p><p class="MsoNormal">$ hostname</p><p class="MsoNormal"><br /></p><p class="MsoNormal">2)<b>To know the which ubuntu version installed</b></p><p class="MsoNormal"><br /></p><p class="MsoNormal">$ lsb_release -a</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><b>Note:</b></p><p class="MsoNormal">LSB (Linux Standard Base)information about your specific Linux distribution, including version number, release codename, and distributor ID.</p><p class="MsoNormal"><br /></p><p class="MsoNormal">3) Install net tools if not available</p><p class="MsoNormal">$ Install net tools</p><p class="MsoNormal">sudo apt install net-tools</p><p class="MsoNormal"><br /></p><p class="MsoNormal">4)$ netstat -n -l</p><p class="MsoNormal"><br /></p><p class="MsoNormal">5) cat /lib/systemd/system/influxdb.service</p><p class="MsoNormal"><br /></p><p class="MsoNormal">6)usermod -aG sudo username</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><b>To give permission to file</b></p><p class="MsoNormal"><br /></p><p class="MsoNormal">sudo chmod +x /usr/lib/influxdb/scripts/influxd-systemd-start.sh</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><b>To add repository via command line and remove file in repository</b></p><p class="MsoNormal">sudo add-apt-repository 'deb [arch=amd64] http://archive.ubuntu.com /ubuntu focal InRelease'</p><p class="MsoNormal">sudo add-apt-repository --remove 'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse'</p><p class="MsoNormal">sudo service influxdb start</p><p class="MsoNormal">sudo systemctl enable --now influxdb</p><p class="MsoNormal">sudo systemctl status influxdb</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><b>To vi editor </b></p><p class="MsoNormal"><br /></p><p class="MsoNormal">Command<span style="white-space: pre;"> </span>Purpose</p><p class="MsoNormal"><br /></p><p class="MsoNormal">i<span style="white-space: pre;"> </span>Switch to Insert mode.</p><p class="MsoNormal"><br /></p><p class="MsoNormal">Esc<span style="white-space: pre;"> </span>Switch to Command mode.</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><span> </span>:w<span style="white-space: pre;"> </span>Save and continue editing.</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><span> </span>:wq or ZZ<span style="white-space: pre;"> </span>Save and quit/exit vi.</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><b>To remove swap file</b></p><p class="MsoNormal"><br /></p><p class="MsoNormal">rm .MERGE_MSG.swp</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><b>To remove mal function file</b></p><p class="MsoNormal"><br /></p><p class="MsoNormal">sudo rm /etc/apt/sources.list.d/file.list</p><p class="MsoNormal"><br /></p><p class="MsoNormal">$ sudo nano /etc/apt/sources.list</p><p class="MsoNormal">cat /etc/apt/sources.list</p><p class="MsoNormal">deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse restricted</p><p class="MsoNormal">deb http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe restricted</p><p class="MsoNormal">deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse universe restricted</p><p class="MsoNormal">Ctrl + X then press Y then press Enter</p><p class="MsoNormal"><b><br /></b></p><p class="MsoNormal"><b>Linux links</b></p><p class="MsoNormal">https://www.cyberciti.biz/faq/ubuntu-change-hostname-command/</p><p class="MsoNormal">https://techlog360.com/basic-ubuntu-commands-terminal-shortcuts-linux-beginner/</p><p class="MsoNormal">https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/</p><p class="MsoNormal">https://docs.influxdata.com/influxdb/v1.8/introduction/install/</p><p class="MsoNormal">https://www.arubacloud.com/tutorial/how-to-install-influxdb-on-ubuntu-20-04.aspx</p><p class="MsoNormal">https://linuxize.com/post/how-to-add-user-to-sudoers-in-ubuntu/</p><p class="MsoNormal">http://old-releases.ubuntu.com/releases/focal/</p><p class="MsoNormal">https://repos.influxdata.com/ubuntu/dists/focal/stable/binary-amd64/Packages</p><p class="MsoNormal">https://www.influxdata.com/blog/influxdb-shards-retention-policies/</p><p class="MsoNormal">https://www.codegrepper.com/code-examples/shell/grant+all+the+permission+to+the+user+ubuntu</p><p class="MsoNormal">https://linuxize.com/post/how-to-add-apt-repository-in-ubuntu/#:~:text=Adding%20Repositories%20with%20add%2Dapt%2Drepository,-The%20basic%20syntax&text=list%20file%20like%20deb%20http,apt%2Drepository%20in%20your%20terminal.</p><p class="MsoNormal">https://itectec.com/ubuntu/ubuntu-unable-to-update-or-install-anything-after-moving-to-another-country/</p><p class="MsoNormal">http://old-releases.ubuntu.com/releases/focal/ubuntu-20.04-desktop-amd64.iso</p><p class="MsoNormal">https://www.dummies.com/web-design-development/web-hosting/how-to-edit-files-with-vi/</p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-89341625659197255672021-06-25T08:51:00.007-07:002021-06-25T08:53:09.320-07:00Migrate an SQL Server database to an Azure SQL database<h1 class="entry-title" style="background-color: white; border: 0px; clear: both; color: #020280; font-family: "Segoe UI", Tahoma, Arial; font-weight: normal; line-height: 1.2; margin: 0px; padding: 0px 0px 0.214286rem; vertical-align: baseline;">Migrate an on-premises SQL Server database to an Azure SQL database</h1><p>Thanks to SQLHACK for this article</p><p> <span style="background-color: white; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px;">In this article, we will discuss and understand a method to migrate an on-premises SQL Server database to the Azure SQL database.</span></p><span id="more-61323" style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span style="background-color: white; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px;"></span><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">This article will look at ways to modernize and transform applications and infrastructure by taking advantage of the agility and flexibility of the cloud.</p><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Azure SQL Database currently resides in ~50 data centers around the world, with more data centers coming online regularly, enabling you to run your database in a data center near you. With so many on-premises implementations at customer sites, how do you migrate from the traditional on-premises SQL Server implementation to modern Azure SQL Database technologies and benefit from what cloud database services can offer?</p><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">This article will guide you through the process and steps required to migrate your database workloads from on-premises to Azure-based cloud services.</p><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Introduction</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Digital transformation plays a key role in every organization’s future. Dependencies on legacy systems and siloed processes act as major roadblocks to efforts towards digital transformation.</p><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">For many organizations, the upcoming Microsoft end of support (EOS) for Windows Server and SQL Server 2008 and SQL Server 2008 R2 brings in challenges in terms of innovation, cost, security, and regulatory compliance. Many traditional organizations are under tremendous pressure to upgrade their systems to the more recent versions of Windows and SQL Server.</p><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">If you look at the brighter side, though, this is a great opportunity for organizations to make up for the missed opportunities of the past to migrate, modernize and redefine their core to enhance performance, improve customer experience and drive a competitive edge. One of the options also available is to modernize by migrating their legacy estates to Azure SQL Database.</p><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Why we may have to migrate on-premises SQL Server database to Azure SQL Database (PaaS—Platform as a Service)?</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Microsoft’s enabling functions and cloud offerings have many advantages with Azure SQL Database that runs as a PaaS. On a high level, for instance, there is no need for you to create VMs or install the Windows Server operating system or SQL Server. They are all simply available to use. All you have to do is log into the Azure portal and pick the size and configuration that fits your needs.</p><ul style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style: outside none; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Note</strong>: The PaaS offering from Microsoft provides you with everything required to support database services. Microsoft owns more than half of the administration overhead, which includes patching, software updates, system maintenance, etc. However, it is important to understand the underlying database service implications of this model. Azure SQL Database doesn’t in-house full feature parity when compared to the on-premise database versions of SQL Server like SQL Server 2014, SQL Server 2016, and SQL server 2017</em></p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Some of the major notable omissions that include <a href="https://www.sqlshack.com/category/features/database-mail/" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;">Database Mail</a>, <a href="https://www.sqlshack.com/category/database-design/filestream/" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;">FILESTREAM data type</a>, and CLR integration with SQL Server. You can refer to the <a href="https://docs.microsoft.com/en-us/azure/sql-database/sql-database-transact-sql-information" rel="nofollow noopener noreferrer" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;" target="_blank">Microsoft documentation</a> for more about the features that are supported and not supported by SQL PaaS offering</em></p></li></ul><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">How can you validate whether your database is compatible with Azure SQL Database?</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">This can be validated in multiple ways:</p><ol style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style-image: initial; list-style-position: outside; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Create a BACPAC file</strong>: If you can create the BACPAC file from your database that means your database can be migrated to Azure SQL Database</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Use a script</strong>: Generate a schema of the on-premises databases and create the same in the Azure SQL environment</li></ol><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">What are some ways that data be migrated?</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">There are several ways to migrate the data. The following are some of the methods that can be used for data migration:</p><ol style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style-image: initial; list-style-position: outside; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Create BACPAC files and export them</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Use SQL Server Management Studio; generate scripts and use the import/export data methods</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Use the Data Migration Assistant Wizard</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Leverage <a href="https://www.sqlshack.com/sql-server-database-migration-to-azure-sql-database-using-sql-server-transactional-replication/" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;">Transactional Replication</a> to port the data over to the cloud</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Use PowerShell and SQLPackage.exe, an SSDT tool</li></ol><ul style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style: outside none; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Note</strong>: You would need to study your situation and adopt any of the above-mentioned methods based on your requirements and the current environment. It is hard to say which of these methods would be better for you until you understand the migration process. In most cases, Data Migration Assistance and/or Replication is best-suited for data migration</em></li></ul><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">In this guide, I will discuss the first method to migrate the database to Azure SQL Database.</p><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Exporting database using export data-tier application</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">To migrate on-premises SQL Server database to Azure SQL Database Using Export Data-Tier Application:</p><h3 style="background-color: white; border: 0px; clear: both; font-family: "Segoe UI", Tahoma, Arial; font-size: 22px; font-weight: normal; line-height: 1.84615; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Create BACPAC files using Management Studio</h3><ol style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style-image: initial; list-style-position: outside; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Verify that you have the latest version of SQL Server Management Studio. New versions of Management Studio are updated monthly to remain in sync with updates to the Azure portal</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Note</strong>: It is recommended that you always use the latest version of Management Studio to remain synchronized with updates to Microsoft Azure and SQL Database.<a href="https://msdn.microsoft.com/library/mt238290.aspx" rel="nofollow noopener noreferrer" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;" target="_blank">Update SQL Server Management Studio</a></em></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Open SQL Server Management Studio (SSMS) and connect to the source database in Object Explorer. In this case, the source database is AdventureWorks2016</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Right-click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">AdventureWorks2016</strong> database in <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Object Explorer</strong>, point to <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Tasks</strong>, and click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Export Data-Tier Application…</strong></p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="Migrate on-premises SQL Server database to Azure SQL Database Using Export Data-Tier Application…" src="https://www.sqlshack.com/wp-content/uploads/2020/06/migrate-on-premises-sql-server-database-to-azure-s.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">In the export wizard, click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Next</strong> to bypass the default setting page</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">In the <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Export Settings</strong> tab, configure the export to save the BACPAC file to either a local disk or to Azure blob storage and click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Next</strong></p><ul style="border: 0px; line-height: 1.71429; list-style: outside none; margin: 0px; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Note</strong>: A BACPAC file will only be saved if you have no database compatibility issues. If there are compatibility issues, then the error message will be displayed on the console</em></p></li></ul><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="Export Settings tab, configure the export to save the BACPAC file to ei-ther a local disk or to an Azure blob storage." src="https://www.sqlshack.com/wp-content/uploads/2020/06/export-settings-tab-configure-the-export-to-save.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">In this case, let us follow the default settings</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Click the <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Advanced tab</strong> and clear the <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Select All</strong> checkbox to skip exporting the data. Our goal at this point is only to test for compatibility</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Select the <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Save to Microsoft Azure</strong> option to save the bacpac file to Azure Blob storage</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Next, go to the Azure portal to get the storage account details. In this case, <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">dbmigratestg</strong> is the storage account created for this exercise</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><a class="fancyboxforwp" data-fancybox="gallery" href="https://www.sqlshack.com/wp-content/uploads/2020/06/in-this-case-dbmigratestg-is-the-storage-account.png" rel="lightbox [2]" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;"><img alt="In this case, dbmigratestg is the storage account created for this exer-cise" src="https://www.sqlshack.com/wp-content/uploads/2020/06/in-this-case-dbmigratestg-is-the-storage-account.png" style="border: 0px; margin: 0px; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></a></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Select the storage account and copy the access key. Paste the key in SQL Server Management Studio and click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Connect</strong></p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="Connect to Microsoft Azure Storage" src="https://www.sqlshack.com/wp-content/uploads/2020/06/connect-to-microsoft-azure-storage.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Now, you can access the Azure Blob storage</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="Access Azure SQL Database Blog storage - Export data for tier application - Exprt settings" src="https://www.sqlshack.com/wp-content/uploads/2020/06/access-azure-sql-database-blog-storage-export-da.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Advanced</strong>. In this pane, you can select the intended objects that are going to be part of the migration</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="SQL Server - Export data for tier application" src="https://www.sqlshack.com/wp-content/uploads/2020/06/sql-server-export-data-for-tier-application.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Before you click the <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Finish</strong> button, let us validate the summary in detail</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="SQL Server - Export data for tier application - validate summary" src="https://www.sqlshack.com/wp-content/uploads/2020/06/sql-server-export-data-for-tier-application-va.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Next</strong> and then click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Finish</strong></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">The Export wizard performs the database compatibility checks. If any issues are found, they will appear after the wizard validates the schema</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img alt="SQL Server - Export data for tier application - see results" src="https://www.sqlshack.com/wp-content/uploads/2020/06/sql-server-export-data-for-tier-application-se.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">If no errors appear, the database is compatible and it is ready to migrate. If you encounter errors then you will need to fix them before proceeding further. To see the errors, click <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Error</strong> for <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Validating schema</strong></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Finally, the preparation phase to migrate on-premises SQL Server database to Azure SQL Database completed</li></ol><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Importing file using Import database option</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">In the process of migrating on-premises SQL Server database to Azure SQL Database, now we do the import of .bacpac file.</p><h3 style="background-color: white; border: 0px; clear: both; font-family: "Segoe UI", Tahoma, Arial; font-size: 22px; font-weight: normal; line-height: 1.84615; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Importing the BACPAC file to Azure</h3><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Now that we have the BACPAC file ready, we can now use the same to migrate the data over to Azure. This BACPAC file could be stored locally, or on Azure Blob storage (standard).</p><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">For now, the Azure portal will allow you to only create a single database in Azure SQL Database, and this can be done only from a BACPAC file. Follow the steps below to import the BACPAC file you saved.</p><ol style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style-image: initial; list-style-position: outside; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Connect to Azure portal and open the SQL database page. Navigate into your resource group and create a new instance of an Azure Database (this is out of the scope of this article). The Assumption is that Azure PaaS SQL Database is available</li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Next, select the <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Import database</strong> on the toolbar</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><a class="fancyboxforwp" data-fancybox="gallery" href="https://www.sqlshack.com/wp-content/uploads/2020/06/to-migrate-on-premises-sql-server-database-to-azur.png" rel="lightbox [8]" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;"><img alt="To migrate on-premises SQL Server database to Azure SQL Database, Import BACPAC into Azure SQL Database" src="https://www.sqlshack.com/wp-content/uploads/2020/06/to-migrate-on-premises-sql-server-database-to-azur.png" style="border: 0px; margin: 0px; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></a></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Next, locate the Blob storage account and its respective container for the BACPAC file</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><a class="fancyboxforwp" data-fancybox="gallery" href="https://www.sqlshack.com/wp-content/uploads/2020/06/azure-sql-database-locate-the-azure-blob-storage.png" rel="lightbox [9]" style="border: 0px; color: #606adb; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; vertical-align: baseline;"><img alt="Azure SQL Database - Locate the Azure blob storage account and the respective container for the BACPAC file" src="https://www.sqlshack.com/wp-content/uploads/2020/06/azure-sql-database-locate-the-azure-blob-storage.png" style="border: 0px; margin: 0px; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></a></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">Type in the new database name, size, and the SQL admin credentials</p><p style="border: 0px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><img src="https://www.sqlshack.com/wp-content/uploads/2020/06/word-image.png" style="border: 0px; display: block; margin: 0px auto; max-width: 100%; opacity: 0.95; padding: 0px; vertical-align: baseline;" /></p></li><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;">Clicking <strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">OK</strong> will begin the process of importing the BACPAC file into the new Azure Database, and you should be good to go</li></ol><ul style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; list-style: outside none; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;"><li style="border: 0px; margin: 0px 0px 0px 2.57143rem; padding: 0px; vertical-align: baseline;"><strong style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Note:</strong><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> I recommend going for a higher DTU; higher DTU results in a higher speed of operation. Once you are set up with Azure Database, scaling the database to a higher service tier is rather simple. After the import is complete, you could even scale down to a lower tier to suit your needs</em></li></ul><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">That’s all for now…</p><h2 style="background-color: white; border: 0px; clear: both; color: #337ab7; font-family: "Segoe UI", Tahoma, Arial; font-size: 27px; font-weight: normal; line-height: 1.6; margin: 1.71429rem 0px; padding: 0px; vertical-align: baseline;">Summary</h2><p style="background-color: white; border: 0px; color: #252525; font-family: "Segoe UI", Tahoma, Arial; font-size: 14px; line-height: 1.71429; margin: 0px 0px 1.71429rem; padding: 0px; vertical-align: baseline;">In this post, we saw one of the ways to migrate an on-premises SQL Server database to the Azure SQL Database. We discussed one of the methods – migration using a BACPAC file in detail. I will discuss more other options in my upcoming articles. Stay tuned for more updates.</p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-88191659190866751852021-03-31T05:45:00.003-07:002021-03-31T05:45:51.895-07:00process terminated unexpectedly. [0x8007042b]<p> <span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">----------------------process terminated unexpectedly. [0x8007042b]-------------------------------</span></p><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">When you restart SQL AGENT and SQL Service it will give error below like</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">The process terminated unexpectedly. [0x8007042b]</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">solution:</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">create separate service account user like dbserviceuser add administrator group and gave sysadmin permissions</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">then start SQL Agent will start automatically</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">------------------------------------------------Internal Error occurred-------------------------------------</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">while try to connect RDP You will get internal error occured</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">solution:</span><br style="background-color: white; box-sizing: inherit; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;" /><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">ping command prompt as below</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">tracert IP</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">2) when 2 users(maximum) logged in while another user trying to login via RDP they will get internal error occcured</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">solution:</span><span class="c-mrkdwn__br" data-stringify-type="paragraph-break" style="background-color: white; box-sizing: inherit; color: #1d1c1d; display: block; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; height: 8px;"></span><span style="background-color: white; color: #1d1c1d; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures;">we should ask any 1 of 2 users logged off their session to allow login other users via RDP</span>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-8997993511668563842021-03-31T05:43:00.001-07:002021-03-31T05:43:20.811-07:00 -----To get all DB role permission with object(sp/table/view) Details----------------------<p><b><span style="color: #741b47;"> -----To get all DB role permission with object(sp/table/view) Details----------------------</span></b></p><p><br /></p><p>SELECT DISTINCT rp.name, </p><p> ObjectType = rp.type_desc, </p><p> PermissionType = pm.class_desc, </p><p> pm.permission_name, </p><p> --pm.state_desc, </p><p> ObjectType = CASE </p><p> WHEN obj.type_desc IS NULL </p><p> OR obj.type_desc = 'SYSTEM_TABLE' THEN </p><p> pm.class_desc </p><p> ELSE obj.type_desc </p><p> END, </p><p> s.Name as SchemaName,</p><p> [ObjectName] = Isnull(ss.name, Object_name(pm.major_id)),* </p><p>FROM sys.database_principals rp </p><p> INNER JOIN sys.database_permissions pm </p><p> ON pm.grantee_principal_id = rp.principal_id </p><p> LEFT JOIN sys.schemas ss </p><p> ON pm.major_id = ss.schema_id </p><p> LEFT JOIN sys.objects obj </p><p> ON pm.[major_id] = obj.[object_id] </p><p> LEFT JOIN sys.schemas s</p><p> ON s.schema_id = obj.schema_id</p><p>WHERE rp.type_desc = 'DATABASE_ROLE' </p><p> AND pm.class_desc <> 'DATABASE' </p><p><span style="white-space: pre;"> </span>--and obj.type_desc ='SQL_STORED_PROCEDURE'</p><p><span style="white-space: pre;"> </span>--and rp.name='db_reader'</p><p><span style="white-space: pre;"> </span>and Isnull(ss.name, Object_name(pm.major_id)) not like 'dt_%'</p><p>ORDER BY rp.name, </p><p> pm.permission_name,</p><p> pm.class_desc </p><div><br /></div>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-71369381012410924022021-03-09T02:29:00.006-08:002021-03-09T02:29:33.515-08:00TSQL Query to Find all database users mapped to db_owner role<p> ----------------------------------<b>Find all database users mapped to db_owner role</b>-----------------------</p><p><br /></p><p><br /></p><p>use master</p><p>Exec sp_MSforeachdb 'SELECT ''?'' AS [Database Name], su1.name AS [Database User Name], su2.name AS [Database Role]</p><p><br /></p><p><br /></p><p><br /></p><p><span style="white-space: pre;"> </span>FROM [?].sys.database_role_members r</p><p><br /></p><p><span style="white-space: pre;"> </span>INNER JOIN [?]..sysusers su1 ON su1.[uid] = r.member_principal_id</p><p><br /></p><p><span style="white-space: pre;"> </span>INNER JOIN [?]..sysusers su2 ON su2.[uid] = r.role_principal_id</p><p><span style="white-space: pre;"> </span>WHERE su2.name IN(''db_owner'') AND su1.name NOT IN(''dbo'')'</p><p><br /></p><p>--------------------------Find particular database users mapped to db_owner role-------------------</p><p><br /></p><p><br /></p><p>USE master-----change db name here</p><p><br /></p><p>GO</p><p><br /></p><p>SELECT members.name as 'members_name', roles.name as 'roles_name',roles.type_desc as 'roles_desc',members.type_desc as 'members_desc'</p><p><br /></p><p>FROM sys.database_role_members rolemem</p><p><br /></p><p>INNER JOIN sys.database_principals roles</p><p><br /></p><p>ON rolemem.role_principal_id = roles.principal_id</p><p><br /></p><p>INNER JOIN sys.database_principals members</p><p><br /></p><p>ON rolemem.member_principal_id = members.principal_id</p><p><br /></p><p>where roles.name = 'db_owner' and members.name<>'dbo'</p><p><br /></p><p>ORDER BY members.name</p><p><br /></p><p>-------------------------------------------------------------sp_MSforeachdb--------------------------------------</p><p><br /></p><p>CREATE PROCEDURE dbo.sp_MSforeachdb </p><p>@command1 NVARCHAR(2000), </p><p>@replacechar nchar(1) = N'?', </p><p>@command2 NVARCHAR(2000) = NULL, </p><p>@command3 NVARCHAR(2000) = NULL, </p><p>@precommand NVARCHAR(2000) = NULL, </p><p>@postcommand NVARCHAR(2000) = NULL </p><p>AS </p><p> SET deadlock_priority low </p><p> </p><p> /* This proc RETURNs one or more rows for each accessible db, with each db defaulting to its own result SET */ </p><p> /* @precommand and @postcommand may be used to force a single result SET via a temp table. */ </p><p> </p><p> /* Preprocessor won't replace within quotes so have to use STR(). */ </p><p> DECLARE @inaccessible NVARCHAR(12), @invalidlogin NVARCHAR(12), @dbinaccessible NVARCHAR(12) </p><p> SELECT @inaccessible = LTRIM(STR(CONVERT(INT, 0x03e0), 11)) </p><p> SELECT @invalidlogin = LTRIM(STR(CONVERT(INT, 0x40000000), 11)) </p><p> SELECT @dbinaccessible = N'0x80000000' /* SQLDMODbUserProf_InaccessibleDb; the negative number doesn't work in CONVERT() */ </p><p> </p><p> IF (@precommand IS NOT NULL) </p><p> EXEC(@precommand) </p><p> </p><p> DECLARE @origdb NVARCHAR(128) </p><p> SELECT @origdb = DB_NAME() </p><p> </p><p> /* IF it's a single user db and there's an entry for it in sysprocesses who isn't us, we can't use it. */ </p><p> /* CREATE the SELECT */ </p><p> EXEC(N'DECLARE hCForEachDatabASe cursor global for SELECT name from mASter.dbo.sysdatabASes d ' + </p><p> N' where (d.status & ' + @inaccessible + N' = 0)' + </p><p> N' and (DATABASEPROPERTY(d.name, ''issingleuser'') = 0 and (hAS_dbaccess(d.name) = 1))' ) </p><p> </p><p> DECLARE @retval INT </p><p> SELECT @retval = @@error </p><p> IF (@retval = 0) </p><p> EXEC @retval = sys.sp_MSforeach_worker @command1, @replacechar, @command2, @command3, 1 </p><p> </p><p> IF (@retval = 0 and @postcommand IS NOT NULL) </p><p> EXEC(@postcommand) </p><p> </p><p> DECLARE @tempdb NVARCHAR(258) </p><p> SELECT @tempdb = REPLACE(@origdb, N']', N']]') </p><p> EXEC (N'use ' + N'[' + @tempdb + N']') </p><p> </p><p> RETURN @retval </p><p><br /></p><p><br /></p><p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-386416910782555832021-02-26T04:26:00.005-08:002021-02-26T04:26:44.011-08:00To get combine report of Server roles and DB roles in SQL Server<p> Select * from </p><p>(</p><p>select A.SQLloginame,Isnull(B.server_role,'Public') as ServerRole,A.createdate from (</p><p>select distinct name SQLloginame,* from sys.syslogins where hasaccess=1 and isntname=0 and name not in ('##MS_PolicyTsqlExecutionLogin##')</p><p>)as A</p><p>Left join (</p><p>SELECT @@SERVERNAME as SQLInstance, R.name AS server_role</p><p>, P.name AS role_member</p><p>FROM sys.server_role_members RM</p><p>INNER JOIN sys.server_principals P ON RM.member_principal_id = P.principal_id</p><p>INNER JOIN (SELECT principal_id, name FROM sys.server_principals WHERE type_desc = 'SERVER_ROLE') R</p><p>ON RM.role_principal_id = R.principal_id</p><p>) as B ON A.name=B.role_member</p><p>WHERE SQLloginame Not in ('##MS_AgentSigningCertificate##','##MS_PolicyEventProcessingLogin##')</p><p>--Order by SQLloginame</p><p>)as A</p><p>Left join</p><p>(</p><p>Select * from (</p><p> select [servername],[dbname],[UserName],[PermissionLevel] from [DB].[dbo].[Serverroles] </p><p> ) src</p><p> pivot</p><p> (</p><p> Max(PermissionLevel) </p><p> for [dbname] in (DB1,DB2,DB3,DB4,DB5,DB6))piv</p><p>--order by UserName</p><p>)as B</p><p>On A.SQLloginame=B.[UserName]</p><p>Order by A.SQLloginame</p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-68741876713847055712021-01-05T22:18:00.001-08:002021-01-05T22:18:37.820-08:00SQL SERVER – Cannot open backup device. Operating system error 1326 (Logon failure: unknown user name or bad password.)<p>SQL SERVER – Cannot open backup device. Operating system error 1326 (Logon failure: unknown user name or bad password.)</p><p> ref:</p><p>https://blog.sqlauthority.com/2017/02/18/sql-server-cannot-open-backup-device-operating-system-error-1326-logon-failure-unknown-user-name-bad-password/</p><p><br /></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">There might be various reasons for above error, but this case is very specific to a situation where SQL Server was installed on a machine which was in Workgroup whereas the backup destination was the server located in the domain. Here is the error message seen in SQL Agent job history. Let us learn about how to fix Operating system error 1326.</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><span style="box-sizing: border-box; color: red; font-family: "courier new", courier, monospace;">Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved.<br style="box-sizing: border-box;" />Started: 12:23:24 PM Progress: 2016-12-27 12:23:25.00 Source: {229AB1E3-E7E5-4185-B305-BF0F7657122A}<br style="box-sizing: border-box;" />Executing query “DECLARE @Guid UNIQUEIDENTIFIER EXECUTE msdb..sp…”.: 100% complete End Progress Error: 2016-12-27 12:23:25.35 Code: 0xC002F210 Source: Back Up Database Task Execute SQL Task<br style="box-sizing: border-box;" />Description: Executing the query “BACKUP DATABASE [master] TO DISK = N’\\192.168.3….” failed with the following error: “Cannot open backup device ‘\\192.168.3.55\backupShare\master_backup_2016_12_27_122325_2407734.bak’. Operating system error 1326(Logon failure: unknown user name or bad password.). BACKUP DATABASE is terminating abnormally.”. Possible failure reasons: Problems with the query, “ResultSet” property not set correctly, parameters not set correctly, or connection not established correctly. End Error<br style="box-sizing: border-box;" /></span></p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">Generally, when the backup is taken SQL Agent Service account is used to take backup. In this case since SQL was on Workgroup, it was NT Service\SQLSERVERAGENT. This account is not a valid account to validate for a domain</p><h2 style="background-color: white; box-sizing: border-box; color: #cc2200; font-family: "open sans", sans-serif; font-size: 34px; font-weight: 400; line-height: 1.4; margin: 0px 0px 1.5rem; padding-top: 1.5rem; text-align: justify;">VERIFICAITON</h2><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">First, let’s verify that we are hitting the same issue which I experienced. From Workgroup machine, we would try to query remote share using xp_cmdshell. Here is the command.</p><div style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; text-align: justify;"><div class="syntaxhighlighter sql" id="highlighter_668149" style="box-sizing: border-box; font-size: 1em !important; margin: 1em 0px !important; overflow: auto hidden !important; position: relative !important; width: 718.953px;"><table border="0" cellpadding="0" cellspacing="0" style="background: none !important; border-collapse: collapse; border-radius: 0px !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; table-layout: auto !important; top: auto !important; vertical-align: baseline !important; width: 718px;"><tbody style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tr style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="gutter" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: initial !important; border-left-style: initial !important; border-radius: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 3px 0px 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">1</div></td><td class="code" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 686px;"><div class="container" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"><code class="sql plain" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">xp_cmdshell </code><code class="sql string" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: blue !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">'dir \\192.168.3.55\backupShare'</code></div></div></td></tr></tbody></table></div></div><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">This command should fail with below error.</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">Logon failure: unknown user name or bad password.</p><h2 style="background-color: white; box-sizing: border-box; color: #cc2200; font-family: "open sans", sans-serif; font-size: 34px; font-weight: 400; line-height: 1.4; margin: 0px 0px 1.5rem; padding-top: 1.5rem; text-align: justify;">SOLUTION</h2><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">Since we are talking about authentication issue. So, we need to make sure that we map a drive to SQL Server (not windows). As per SQL Server Books-On-Line:</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">“For a network share to be visible to SQL Server, the share must be mapped as a network drive in the session in which SQL Server is running”</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">Here is the command to map the drive.</p><div style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; text-align: justify;"><div class="syntaxhighlighter sql" id="highlighter_710965" style="box-sizing: border-box; font-size: 1em !important; margin: 1em 0px !important; overflow: auto hidden !important; position: relative !important; width: 718.953px;"><table border="0" cellpadding="0" cellspacing="0" style="background: none !important; border-collapse: collapse; border-radius: 0px !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; table-layout: auto !important; top: auto !important; vertical-align: baseline !important; width: 730px;"><tbody style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tr style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="gutter" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: initial !important; border-left-style: initial !important; border-radius: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 3px 0px 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">1</div></td><td class="code" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 698px;"><div class="container" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"><code class="sql keyword" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">EXEC</code> <code class="sql plain" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">XP_CMDSHELL </code><code class="sql string" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: blue !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">'net use Z: \\192.168.3.55\backupShare password@123 /User:domain\user'</code></div></div></td></tr></tbody></table></div></div><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">Once the above is completely successful, we should be able to see content on the Z drive by running below command.</p><div style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; text-align: justify;"><div class="syntaxhighlighter sql" id="highlighter_362727" style="box-sizing: border-box; font-size: 1em !important; margin: 1em 0px !important; overflow: auto hidden !important; position: relative !important; width: 718.953px;"><table border="0" cellpadding="0" cellspacing="0" style="background: none !important; border-collapse: collapse; border-radius: 0px !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; table-layout: auto !important; top: auto !important; vertical-align: baseline !important; width: 718px;"><tbody style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tr style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="gutter" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: initial !important; border-left-style: initial !important; border-radius: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 3px 0px 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">1</div></td><td class="code" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 686px;"><div class="container" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"><code class="sql keyword" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">EXEC</code> <code class="sql plain" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">XP_CMDSHELL 'dir Z:\'</code></div></div></td></tr></tbody></table></div></div><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">After this we should be able to take backup on the Z drive as its mapped within SQL Server as a drive.</p><div style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; text-align: justify;"><div class="syntaxhighlighter sql" id="highlighter_226596" style="box-sizing: border-box; font-size: 1em !important; margin: 1em 0px !important; overflow: auto hidden !important; position: relative !important; width: 718.953px;"><table border="0" cellpadding="0" cellspacing="0" style="background: none !important; border-collapse: collapse; border-radius: 0px !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; table-layout: auto !important; top: auto !important; vertical-align: baseline !important; width: 718px;"><tbody style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tr style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="gutter" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: initial !important; border-left-style: initial !important; border-radius: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 3px 0px 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">1</div></td><td class="code" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 686px;"><div class="container" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"><code class="sql plain" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Backup </code><code class="sql keyword" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">database</code> <code class="sql plain" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">master </code><code class="sql keyword" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">to</code> <code class="sql plain" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">disk = </code><code class="sql string" style="background: none !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: blue !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">'Z:\master.bak'</code></div></div></td></tr></tbody></table></div></div><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;">The above command should work and create the backup file in \\192.168.3.55\backupShare</p><p style="background-color: white; box-sizing: border-box; color: #363b3f; font-family: "open sans", sans-serif; font-size: 14px; margin: 0px 0px 1.5rem; text-align: justify;"><br /></p>Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-20588448903470502092020-07-12T19:27:00.002-07:002020-07-12T19:27:28.388-07:00To grant db_reader/db_writer permission to all or particular user to DB by bulk /single<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<br />
----------------------To grant db_reader permission to all user for particular DB by bulk<br />
<br />
DECLARE @name VARCHAR(50) -- database name <br />
<br />
DECLARE @user sysname<br />
DECLARE @login sysname<br />
DECLARE @SQL nvarchar(max) = ''<br />
<br />
DECLARE db_cursor CURSOR READ_ONLY FOR <br />
<br />
select name from sys.syslogins where name not in ('sa','dbadmin') and name not like '%#%' and isntname=0<br />
<br />
OPEN db_cursor <br />
FETCH NEXT FROM db_cursor INTO @name <br />
<br />
WHILE @@FETCH_STATUS = 0 <br />
BEGIN <br />
<br />
SET @login=@name<br />
SET @user=@name<br />
<br />
SELECT @SQL = @SQL + '<br />
USE ' + QUOTENAME(NAME) + ';<br />
<br />
IF NOT EXISTS(SELECT 1 FROM sys.database_principals WHERE name = ''' + @user + ''')<br />
BEGIN<br />
CREATE USER ' + QUOTENAME(@user)<br />
+ ' FOR LOGIN ' + QUOTENAME(@login)<br />
+ ' WITH DEFAULT_SCHEMA=[dbo];<br />
END<br />
ELSE<br />
BEGIN<br />
EXEC sp_change_users_login ''Update_One'', ''' + @user + ''', ''' + @login + ''';<br />
END<br />
<br />
EXEC sys.sp_addrolemember ''db_datareader'', ''' + @user + ''';<br />
<br />
<br />
'<br />
FROM sys.databases<br />
WHERE database_id > 4 AND state = 0 and database_id=15<br />
<br />
EXEC sp_executesql @sql;<br />
print @sql<br />
<br />
FETCH NEXT FROM db_cursor INTO @name <br />
END <br />
<br />
CLOSE db_cursor <br />
DEALLOCATE db_cursor<br />
<br />
----------------------To grant db_reader permission particular user for particular /all DB<br />
<br />
<br />
DECLARE @user sysname = 'testpub123';<br />
DECLARE @login sysname = 'testpub123';<br />
DECLARE @SQL nvarchar(max) = '';<br />
<br />
SELECT @SQL = @SQL + '<br />
USE ' + QUOTENAME(NAME) + ';<br />
<br />
IF NOT EXISTS(SELECT 1 FROM sys.database_principals WHERE name = ''' + @user + ''')<br />
BEGIN<br />
CREATE USER ' + QUOTENAME(@user)<br />
+ ' FOR LOGIN ' + QUOTENAME(@login)<br />
+ ' WITH DEFAULT_SCHEMA=[dbo];<br />
END<br />
ELSE<br />
BEGIN<br />
EXEC sp_change_users_login ''Update_One'', ''' + @user + ''', ''' + @login + ''';<br />
END<br />
<br />
EXEC sys.sp_addrolemember ''db_datareader'', ''' + @user + ''';<br />
<br />
<br />
'<br />
FROM sys.databases<br />
WHERE database_id > 4 AND state = 0 and database_id=24;<br />
<br />
EXEC sp_executesql @sql;<br />
print @sql<br />
<br />
--select * from sys.sysusers<br />
<br />
--sp_helpdb Demo_DB1<br />
<br />
--select * from sys.databases</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-30745569766032797512020-04-20T00:13:00.001-07:002020-04-20T00:13:35.972-07:00How to solve User database listed in system databases<div dir="ltr" style="text-align: left;" trbidi="on">
Due to some replication troubleshooting situation we ran some commands wrongly due to we can't add publication in replication as it shows invalid object name of system replication tables. now user database shows in system databases tab as below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBMeMDlwNMPcBoGHrfLppbKajZ4WPrnc1vOmkXNyvXj0DeOzNH11Jp1Xot5i5q_Jk7rHw34Ze4PEixIp4vKR9RtVqrs6zb3-RJY9e5hE58Q5oF0QpLEtXttDevnCIP3vkfAWCKRHAVvqGT/s1600/system+db+of+pubs+showing.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="334" data-original-width="387" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBMeMDlwNMPcBoGHrfLppbKajZ4WPrnc1vOmkXNyvXj0DeOzNH11Jp1Xot5i5q_Jk7rHw34Ze4PEixIp4vKR9RtVqrs6zb3-RJY9e5hE58Q5oF0QpLEtXttDevnCIP3vkfAWCKRHAVvqGT/s400/system+db+of+pubs+showing.JPG" width="400" /></a></div>
<br />
<br />
how to solve it to bring back to user database section.<br />
<br />
solution:<br />
<br />
it is due to if you run this below command user database replication tables could be added but his properties of is_distributor value change from 0 to 1.<br />
<br />
as below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd3sLrcMyDJXz3vc0-6SiIjMijfTk-1E1y4ngNK2EuZmZ32A7L0a6Qsts-4B0t-71rcdJZ72NgIndrTh50h8i3GZ-ygWsThGqkVKJsnOeSbbQNon-LxO9s_stLal7ZiUsjhqug_6ahND2X/s1600/isdist.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="858" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd3sLrcMyDJXz3vc0-6SiIjMijfTk-1E1y4ngNK2EuZmZ32A7L0a6Qsts-4B0t-71rcdJZ72NgIndrTh50h8i3GZ-ygWsThGqkVKJsnOeSbbQNon-LxO9s_stLal7ZiUsjhqug_6ahND2X/s640/isdist.JPG" width="640" /></a></div>
<br />
to solve this we need to run this below command in master<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvEhNJtXuiwGJ1s7f9J1Pg3IN2GuistxpNm2SDbbiRwKbOHG5X_WUP29p9NDx-tROwlpRlHJn7ULeNK4MVB3Q95Y56gjm6uSNlsp-EF5ArDvndck-L86G3AdNTkmJDgoZv2i7HZJhtLfaE/s1600/removedist.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="1085" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvEhNJtXuiwGJ1s7f9J1Pg3IN2GuistxpNm2SDbbiRwKbOHG5X_WUP29p9NDx-tROwlpRlHJn7ULeNK4MVB3Q95Y56gjm6uSNlsp-EF5ArDvndck-L86G3AdNTkmJDgoZv2i7HZJhtLfaE/s1600/removedist.JPG" /></a></div>
<br />
<br />
<br />
now u can check database listed in user database as see below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_m9xdtnRkauSV-KNVzZJNx5ZNVtIeuEU9cB05H0-tSSfabC_fKrW-otER-bTut0NbJlldpA6JEFD3y6cFj_j_otXhJOn-pL9aFaS6D7p3r_unLAAk4PKH0VWyQG6HrzyfzbTowBPV7Gcp/s1600/done+of+pub.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="374" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_m9xdtnRkauSV-KNVzZJNx5ZNVtIeuEU9cB05H0-tSSfabC_fKrW-otER-bTut0NbJlldpA6JEFD3y6cFj_j_otXhJOn-pL9aFaS6D7p3r_unLAAk4PKH0VWyQG6HrzyfzbTowBPV7Gcp/s640/done+of+pub.JPG" width="442" /></a></div>
<br />
<br />
thats it . we bring user database to user database section from system database as see below<br />
<br />
script:<br />
<br />
select is_distributor,* from sys.databases where is_distributor=1<br />
<br />
--Exec sp_adddistributiondb 'pubs'-------------Dont run it on prod server<br />
<br />
--Exec sp_dropdistributiondb pubs<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-25539079774801438922020-03-11T05:17:00.002-07:002020-03-11T05:17:44.934-07:00Top 10 New Features Of SQL Server 2019<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova-condensed, "Roboto Slab", sans-serif; font-size: 30px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 46px; margin: 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
Top 10 New Features Of SQL Server 2019</h1>
<div>
<br /></div>
<div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
It is no secret to anyone that software release cycles are more aggressive than ever. Now that the cloud has become ubiquitous as a strategic component of IT services, we are spoiled by a constant release of new features and services available to us. It follows then that on-premises or “retail-delivered” software is also getting more frequent releases as customer expectations grow. This is how over the last four years we have had three major releases of SQL Server: 2016, 2017 (with the big milestone of SQL on Linux) and now SQL 2019.</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
SQL 2019 is shaping up to be a very powerful evolutionary step to the features that were introduced in SQL 2017, as well as bringing its own set of brand new capabilities that continue to position the product as a “one-stop” software platform for all your data needs. With this in mind, and considering how much is built into the product nowadays, I have compiled this list of my top favorite features of SQL 2019! Now, of course, this is my blog and my opinion and the list is not exhaustive. For the full list, refer to the <a href="https://docs.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-ver15?view=sql-server-ver15" style="box-sizing: border-box; color: #00a3ad; transition: padding 0.25s ease 0s, color 0.25s ease 0s, background-color 0.25s ease 0s, box-shadow 0.25s ease 0s;">Microsoft documentation</a>. As you will see, my favorites are mostly technical features that will help developers and DBAs in their daily functions. Also, a quick disclaimer – all the images are from Microsoft’s own SQL Server documentation.</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
I am sure that your top 10 is likely to be very different than my top 10 so make sure you check it all out in detail! Here is my list:</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
1. Intelligent Query Processing Enhancements</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What they are:</span> This is a set of enhancements that affect the behavior of the Query Optimizer, the component inside SQL Server that generates the execution plans for queries. This includes dynamic memory grants for rowstore tables, table variable deferred compilation, batch mode on rowstore and more.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> These are all behind-the-scenes improvements on the Query Optimizer that will improve the quality of the plans for all applicable queries. This means better performance overall after doing the upgrade.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> Test your problem queries on a development instance to verify the improvements. That’s pretty much it. It’s one of those great improvements that works with no big changes required from the customer (I really like those as you will see from this list).</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<img alt="" class="alignnone size-full wp-image-107126" height="478" sizes="(max-width: 703px) 100vw, 703px" src="https://blog.pythian.com/wp-content/uploads/The-intelligent-Query-Processing-feature-family.png" srcset="https://blog.pythian.com/wp-content/uploads/The-intelligent-Query-Processing-feature-family.png 703w, https://blog.pythian.com/wp-content/uploads/The-intelligent-Query-Processing-feature-family-465x316.png 465w, https://blog.pythian.com/wp-content/uploads/The-intelligent-Query-Processing-feature-family-350x238.png 350w" style="background: 0px 0px; border: 0px; box-sizing: border-box; height: auto; margin: 5px 20px 20px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" width="703" /></div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
2. Accelerated Database Recovery (ADR)</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> This is a completely new way for SQL Server to perform database recovery in the event of a transaction rolled back, an instance restart or an Availability Group failover. Instead of the sometimes unpredictable and less than desired time spent waiting for the database recovery to run, the SQL team has redeveloped how recovery works and has dramatically decreased how long this process takes.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Anyone who has had to wait for a production SQL Server instance to rollback a long transaction or who has had an unfortunate crash during a large data operation knows how painful it is to just wait for recovery to be finished so you can get back in business. ADR will provide benefits for SLA and RTO all around.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> None. Activate it and enjoy (one of those again!).</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<img alt="" class="alignnone size-full wp-image-107127" height="1152" sizes="(max-width: 2001px) 100vw, 2001px" src="https://blog.pythian.com/wp-content/uploads/adr-recovery-process.png" srcset="https://blog.pythian.com/wp-content/uploads/adr-recovery-process.png 2001w, https://blog.pythian.com/wp-content/uploads/adr-recovery-process-465x268.png 465w, https://blog.pythian.com/wp-content/uploads/adr-recovery-process-350x201.png 350w" style="background: 0px 0px; border: 0px; box-sizing: border-box; height: auto; margin: 5px 20px 20px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" width="2001" /></div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
3. AlwaysEncrypted With Secure Enclaves</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> This is the next version of AlwaysEncrypted, the encryption technology introduced in SQL Server 2016 that allows transparent column encryption without giving administrators access to the decryption keys. One drawback of the first implementation is that due to SQL Server not being able to decrypt the data, the queries on the SQL side couldn’t do any computations or manipulation of the actual column values. Using the new Secure Enclaves technology, SQL Server can now securely encrypt a portion of memory to perform computations on these encrypted columns without the unencrypted values ever being exposed to the rest of the processes (or administrators).<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Security matters and performance matters, as well. Database servers are best equipped for processing large amounts of data so being able to have AlwaysEncrypted and also do complex manipulations is the best of both worlds.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> If you are already using AlwaysEncrypted then no big changes are necessary other than reconfiguring and re-encrypting the columns of interest. If you are not using AlwaysEncrypted, then now is a good time to investigate, test this feature and see if it’s a good fit for your security requirements.</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<img alt="" class="alignnone size-full wp-image-107128" height="452" sizes="(max-width: 1066px) 100vw, 1066px" src="https://blog.pythian.com/wp-content/uploads/Diagram-of-always-encrypted-with-secure-enclave.png" srcset="https://blog.pythian.com/wp-content/uploads/Diagram-of-always-encrypted-with-secure-enclave.png 1066w, https://blog.pythian.com/wp-content/uploads/Diagram-of-always-encrypted-with-secure-enclave-465x197.png 465w, https://blog.pythian.com/wp-content/uploads/Diagram-of-always-encrypted-with-secure-enclave-350x148.png 350w" style="background: 0px 0px; border: 0px; box-sizing: border-box; height: auto; margin: 5px 20px 20px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" width="1066" /></div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
4. Memory-Optimized Tempdb Metadata</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> The SQL team has made optimizations to the tempdb code so that some of the metadata that can be a bottleneck on tempdb heavy systems can rely completely on memory and be optimized for RAM access.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Large volume, large scale environments that use a lot of tempdb run into this type of bottleneck. Usually, this requires some sort of refactoring to alleviate the use of tempdb. With this feature in place, it is possible to enable the metadata to sit in memory and be optimally accessed. This way will get rid of these issues.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> Activate the feature and verify there is an improvement, not much more than that (another one!).</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
5. Query Store Custom Capture Policies</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> Query Store is a great performance tuning and trending tool that allows for storing, measuring, and fixing plan regressions inside a SQL Server database. One downside of using it though is that sometimes it can store too much information, even for queries that the DBA might not be interested in or for queries that were part of a system utility or monitoring tool. This new capability of custom policies means you can fine-tune exactly which queries should be tracked based on their execution statistics such as how often they run, the CPU they consume, and more.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Query Store is a great feature but it is not so useful if it consumes a lot of resources and if it’s too bloated to be effective for the DBA. This feature will allow fine-tuning so that it is always efficient and lean and easy to use for fixing plan issues.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> You will need to sit down and see what type of execution conditions you want to use as a filter for your Query Store. Implementing it is just a matter of using new syntax after that.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
6. Verbose Truncation Warnings</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> Every single T-SQL developer knows the pain and grind of getting a truncation error. Some value somewhere does not fit under a new data type, but you don’t get any details at all. Then it’s a matter of trial and error until you finally figure out which value is the offending one. Not the best experience for what should be a straightforward issue to solve!<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Because mental sanity matters. These new messages give you all the details of the data truncation issue so you can just fix it and get on with your day!<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> None. It’s the new default (loving all of these)!</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
7. Resumable Index Build</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> SQL Server now has the capability to stop an index rebuild operation in progress, keep the work that has been done so far and resume at some other point in time.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> For some folks, index rebuilds are still necessary and they consume so many resources that even with the ONLINE option, they still have to deal with the reality of maintenance windows. The problem, however, is what happens if you run out of time during your maintenance window? Previously, you would need to cancel your rebuild, wait for a potentially long recovery and then start again from scratch. This new feature gets rid of these problems!<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> Change your index scripts to use the new RESUMABLE option. Pretty easy (and another one!).</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
8. Data Virtualization With Polybase</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> Polybase is SQL Server’s module that allows fast and parallel T-SQL queries that can go out into external storage (usually HDFS on-prem) and bring the results seamlessly as a T-SQL result set. With SQL 2019, Polybase is getting expanded to support Oracle, Teradata, MongoDb and more.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Data integration is always a challenge and with ever-growing data sets, performance can become an issue. Trying to query and move large amounts of data through a linked server has always been painfully slow as it is not really optimized for this job. Polybase allows SQL Server to become the data hub of an organization by leveraging T-SQL skills and keeping performance as a top priority at the same time.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> This one definitely requires some work as you would want multiple Polybase nodes, set up the connectivity to your other database platforms and then test the performance of those queries.</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<img alt="" class="alignnone size-full wp-image-107130" height="499" sizes="(max-width: 723px) 100vw, 723px" src="https://blog.pythian.com/wp-content/uploads/Figure-2-Data-sources-that-can-be-integrated-by-PolyBase-in-SQL-Server-2019.png" srcset="https://blog.pythian.com/wp-content/uploads/Figure-2-Data-sources-that-can-be-integrated-by-PolyBase-in-SQL-Server-2019.png 723w, https://blog.pythian.com/wp-content/uploads/Figure-2-Data-sources-that-can-be-integrated-by-PolyBase-in-SQL-Server-2019-465x321.png 465w, https://blog.pythian.com/wp-content/uploads/Figure-2-Data-sources-that-can-be-integrated-by-PolyBase-in-SQL-Server-2019-350x242.png 350w" style="background: 0px 0px; border: 0px; box-sizing: border-box; height: auto; margin: 5px 20px 20px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" width="723" /></div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
9. Last Actual Execution Plan DMF</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> This is a new Dynamic Management Function called sys.dm_exec_query_plan_stats that will track the last ACTUAL execution plan for a query if you enable the lightweight query profiling feature (which you probably should do).<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> Previously, grabbing an actual query plan required either a Profiler trace, an XEvents trace, or a call to an ephemeral DMF that would lose its contents when the query was done executing. Not the easiest or most convenient mechanisms to do what is pretty much a critical step in any sort of production performance problem scenario.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> Enable the setting, use the DMF (and another one to just use!).</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, sans-serif; font-size: 24px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: 34px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
10. Multiple Internal Performance Improvements</h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; font-family: proxima-nova, "Open Sans", verdana, sans-serif; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 30px; margin-bottom: 8px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">What this is:</span> There are multiple internal performance improvements done by the SQL team for this release. There is a new index optimization for indexes that have a sequential key, temp table recompilation improvements, improved indirect checkpoint scalability, and more.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why this matters:</span> These are all performance improvements that come “out-of-the-box”, optimize common SQL Server processes and require no effort from the client to benefit from them.<br style="box-sizing: border-box;" /><span style="background: 0px 0px; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Cost of adoption:</span> </div>
</div>
</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-48659435981892677182020-02-10T04:52:00.002-08:002020-02-10T04:52:55.230-08:00Msg 7321, Level 16, State 2, Line 68 An error occurred while preparing the query <div dir="ltr" style="text-align: left;" trbidi="on">
Msg 7321, Level 16, State 2, Line 68<br />
An error occurred while preparing the query "<br />
<br />
Solution:<br />
<br />
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/083229e7-58f2-44cf-ae5d-c9acf366818c/sql-2005-ldap-query-error-msg-7321-level-16?forum=transactsql<br />
<br />
It normally succeedes test connection generally but when you run query using this linked server to pull data from AD(Active Directory) server it will throw above issue. so issue will be between db server of linked server and AD server.<br />
<br />
we need to make sure logins should be same on both AD server and db server<br />
of linked server created.<br />
<br />
LDAP means Lightweight Directory Access Protocol<br />
<br />
<br />
First execute your query:<br />
<br />
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces',<br />
<br />
'ADSDSOObject'<br />
<br />
, 'adsdatasource'<br />
<br />
GO<br />
<br />
Like daw21 explain before follow the detail steps:<br />
<br />
Second step go to the SqlServer management Studio and edit manually the Linkserver name ADSI:<br />
<br />
go to Server Objects/Linked Servers/ and right click on ADSI select the option Properties and then go to Security.<br />
<br />
Select the option : Be made using this security context:<br />
<br />
and there fill the user and Password about the valid user with permission into Active Directory, not forget before the domain\user.<br />
<br />
<br />
<br />
(or)<br />
<br />
First you have to make sure that Ad Hoc Distributed Queries is enabled ...<br />
<br />
sp_configure 'Ad Hoc Distributed Queries', 1<br />
reconfigure<br />
Second you have to make sure that you specify a security context that has access to AD INCLUDING the DOMAIN<br />
Third you should put a row limit (e.g. SELECT TOP 100) in to avoid the issue where you hit the 1000 row limit so<br />
SELECT<br />
<br />
<br />
<br />
TOP 100 *<br />
<br />
FROM<br />
<br />
<br />
<br />
OpenQuery(ADSI, 'SELECT sAMAccountName FROM ''LDAP://DC=core,DC=acllab,DC=net'' WHERE objectCategory=''user'' ')</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-90583587893900101302020-02-03T05:08:00.002-08:002020-02-03T05:08:24.505-08:00To change file name of text files from SQL QUERY<div dir="ltr" style="text-align: left;" trbidi="on">
----------------To change file name of text files from SQL QUERY-------------------------------------------------------------<br />
<br />
create table #test(col varchar(1000))<br />
create table #files(name varchar(1000),rename varchar(1000))<br />
<br />
Declare @path as varchar(500)='\\sharepath\filesfolder\test\'<br />
Declare @ssql as varchar(500)='dir ' + @path<br />
Declare @col as varchar(500)=''<br />
Declare @col1 as varchar(500)=''<br />
<br />
insert into #test<br />
Exec xp_cmdshell @ssql<br />
<br />
<br />
--------Tables<br />
<br />
insert into #files<br />
select name=reverse(left(reverse(col),PATINDEX('% %',reverse(col)))),<br />
rename=REPLACE(reverse(left(reverse(col),PATINDEX('% %',reverse(col)))),'.Table','')<br />
<br />
-------SPs<br />
<br />
--insert into #files<br />
--select name=reverse(left(reverse(col),PATINDEX('% %',reverse(col)))),<br />
--rename=REPLACE(reverse(left(reverse(col),PATINDEX('% %',reverse(col)))),'.StoredProcedure','')<br />
<br />
<br />
from #test where PATINDEX('%.%',col) > 0<br />
<br />
delete<br />
from #files where name in (' .',' ..')<br />
<br />
select @col =name , @col= rename<br />
from #files<br />
<br />
while (1=1)<br />
Begin<br />
select top 1 @col =name , @col1= rename from #files<br />
if @col = ''<br />
begin<br />
break<br />
return<br />
End<br />
<br />
set @ssql = 'rename ' + @path+'\'+ ltrim(rtrim(@col))+' '+ltrim(rtrim(@col1))+''<br />
print @ssql<br />
<br />
Exec xp_cmdshell @ssql<br />
delete from #files where @col =name<br />
set @col = ''<br />
End<br />
<br />
<br />
------------file name be like dbo.Test2.Table<br />
-------output of result dbo.Test2<br />
<div>
<br /></div>
</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-20455360184225992042020-01-08T21:24:00.004-08:002020-01-08T21:24:52.132-08:00Fix issues of line split from SQL to Excel while copy and paste<div dir="ltr" style="text-align: left;" trbidi="on">
---------------------------------Fix issues of line split from SQL to Excel while copy and paste<br />
<br />
SELECT replace<gwmw class="ginger-module-highlighter-mistake-type-3" id="gwmw-15785474654157945080818">(</gwmw>replace<gwmw class="ginger-module-highlighter-mistake-type-3" id="gwmw-15785474654159432343117">(</gwmw><gwmw class="ginger-module-highlighter-mistake-type-1" id="gwmw-15785474654154316176569">columnwhichhaveissueswhilecopy</gwmw>, char<gwmw class="ginger-module-highlighter-mistake-type-3" id="gwmw-15785474654153313750977">(</gwmw>10), ''), char<gwmw class="ginger-module-highlighter-mistake-type-3" id="gwmw-15785474654153579302286">(</gwmw>13), '')<br />
FROM [<gwmw class="ginger-module-highlighter-mistake-type-1" id="gwmw-15785474658973039049409">dbname</gwmw>]<gwmw class="ginger-module-highlighter-mistake-type-3" id="gwmw-15785474658974370635195">.</gwmw>[dbo]<gwmw class="ginger-module-highlighter-mistake-type-3" id="gwmw-15785474658976824361740">.</gwmw>[tablename]<br />
<br />
Ref:<br />
<a href="https://www.mssqltips.com/sqlservertip/3416/line-split-issues-when-copying-data-from-sql-server-to-excel/">https://www.mssqltips.com/sqlservertip/3416/line-split-issues-when-copying-data-from-sql-server-to-excel/</a></div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com2tag:blogger.com,1999:blog-8453781330643442479.post-81210186342340256932019-12-03T21:16:00.002-08:002019-12-03T21:16:31.748-08:00TSQL to create Stored procedures as separate script in folder-<div dir="ltr" style="text-align: left;" trbidi="on">
-------<b><u>TSQL to create Stored procedures as separate script in folder</u></b>-----------------------<br />
<br />
<br />
select name<br />
from sys.procedures<br />
<br />
<br />
select b.name,a.definition into #1<br />
from sys.sql_modules a inner join sys.procedures b on a.object_id=b.object_id<br />
<br />
<br />
<br />
<br />
while (1=1)<br />
Begin<br />
if (select count(*) from #1)=0<br />
break<br />
Declare @name as varchar(1000)<br />
Declare @s as varchar(1000)<br />
<br />
select top 1 * into ##2 from #1<br />
<br />
select top 1 @name=name from ##2<br />
<br />
set @s = ' bcp " select definition from ##2 " queryout "E:\records\separate SP list\' + @name + '.sql " -c -t, -T -S'<br />
<br />
<br />
<br />
<br />
select @s<br />
<br />
exec xp_cmdshell @s<br />
<br />
drop table ##2<br />
<br />
Delete from #1 where @name=name<br />
<br />
End</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-52734175609870447872019-11-28T05:12:00.002-08:002019-11-28T05:12:19.621-08:00migrate 32 bit to 64 bit sql server<div dir="ltr" style="text-align: left;" trbidi="on">
Pre Implementation Steps<br />
<br />
Script out logins<br />
Script out Linked Servers<br />
Script out jobs<br />
Take system database(master,model,msdb) Full Backup<br />
Take user database Full Backup<br />
<br />
Steps<br />
<br />
Install new VM with Windows Server with required RAM and partition 4 drives as system and data/log and backup and tempdb<br />
add hostname as newserver<br />
Copy application files from oldserver to newserver<br />
Install SQL Server 2016 Enterprise edition 64 bit with latest SP(Service Pack) as per existing collation(Required collation)<br />
Create logins from oldserver which we scripted out earlier<br />
Create Linked Servers from oldserver which we scripted out earlier<br />
Test Linked server connections<br />
Restore user database from oldserver which we backedup<br />
Restore msdb database from oldserver which we backedup would create jobs and schedules<br />
Check jobs whether running or not<br />
Configure DB mail and check connectivity<br />
Test applications connections and functionality<br />
<br />
Post Implementation Steps<br />
<br />
<br />
Install ODBC/OLEDB Drivers for excel to be worked for import/export<br />
Configure SQL Server memory as per RAM size<br />
Configure Error log files<br />
Create tempdb secondary files as per no of cores/processors<br />
Configure SQL Agent history<br />
Implementation of 32 bit to 64 bit SQL Server instance<br />
Take Backup on system and user databases on oldserver<br />
Stop SQL Services on old server<br />
copy backup file to newserver local<br />
Restore user databases on newserver<br />
change the IP/hostname from newservername to oldservername<br />
restart server machine<br />
verify hostname<br />
Change SQL Service instance name from newservername to oldservername<br />
Restart SQL Service<br />
Verify SQL Server name<br />
Check application connectivity and functionality<br />
Check Report working fine<br />
<div>
<br /></div>
</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-35246165172387594302019-10-14T05:48:00.000-07:002019-10-14T05:48:20.373-07:00Waiting for SQL Server to recover database 'msdb' and SQLServerAgent is not currently running so it cannot be notified of this action. (Microsoft SQL Server, Error: 22022)<div dir="ltr" style="text-align: left;" trbidi="on">
SQLServerAgent is not currently running so it cannot be notified of this action. (Microsoft SQL Server, Error: 22022)<br />
<br />
<br />
[393] Waiting for SQL Server to recover database 'msdb'... [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 10004, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [393] Waiting for SQL Server to recover database 'msdb'... [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 10004, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [393] Waiting for SQL Server to recover database 'msdb'... [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 10004, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [393] Waiting for SQL Server to recover database 'msdb'... [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 10004, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [393] Waiting for SQL Server to recover database 'msdb'... [298] SQLServer Error: 16389, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 233, Communication link failure [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [298] SQLServer Error: 233, Shared Memory Provider: No process is on the other end of the pipe. [SQLSTATE 08S01] (ConnCheckIfDBIsOnline) [393] Waiting for SQL Server to recover database 'msdb'...<br />
<br />
Impact:<br />
<br />
SQL agent job shows next run column as not scheduled even if you run job it shows "SQLServerAgent is not currently running so it cannot be notified of this action"<br />
<br />
but SQL configuration manager service status shows as running and mode is automatic<br />
<br />
<br />
Sometimes you would get this error even if the SQL Server Agent is running. In those cases, you need to check SQLAgent.out file to check if it’s started<br />
completely.<br />
<br />
Solution:<br />
<br />
Something SQLAgent.out file from E:\Program Files\Microsoft SQL Server\MSSQL14.InstanceName\MSSQL\Log<br />
<br />
<br />
we can start SQL Agent services to fix this error.</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-78893932204263504532019-09-20T05:04:00.001-07:002019-09-20T05:04:22.185-07:00Bulk load failed<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><b>Msg 5301, Level 16, State 1, Line 1</b></span></span></div>
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><b>Bulk load failed. User does not have ALTER TABLE permission on table 'Table_2'. ALTER TABLE permission is required on the target table of a bulk load if the target table contains triggers or check constraints, but the 'FIRE_TRIGGERS' or 'CHECK_CONSTRAINTS' bulk hints are not specified. ALTER TABLE permission is also required if the 'KEEPIDENTITY' bulk hint is specified.</b></span></span></div>
<div>
<br /></div>
<br />
<div class="MsoNormal">
<b><span style="font-family: "Lucida Console"; font-size: 10.5pt;"><br /></span></b></div>
<div class="MsoNormal">
<b><span style="font-family: "Lucida Console"; font-size: 10.5pt;">Issue:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Lucida Console"; font-size: 10.5pt;">While
we perform Bulk insert operation on table it will through error as requires
bulkadmin and alter table permission for user<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Lucida Console"; font-size: 10.5pt;">When
you use bulk insert on main table it<i> ignores constraints and disables
triggers.</i><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-fareast-language: EN-IN;"><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_4" o:spid="_x0000_i1025" type="#_x0000_t75"
alt="" style='width:1222.5pt;height:105pt'>
<v:imagedata src="file:///C:/Users/jar/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png"
o:href="cid:image001.png@01D56FD7.5162D120"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2005/ms188365(v=sql.90)?redirectedfrom=MSDN">https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2005/ms188365(v=sql.90)?redirectedfrom=MSDN</a><span style="font-family: "Lucida Console"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="background: white;">
<b><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 12.0pt;">Permissions:</span></b><b><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-language: EN-IN;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 12.0pt;">Requires INSERT and ADMINISTER BULK OPERATIONS permissions.
Additionally, ALTER TABLE permission is required if one or more of the
following is true:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-left: 28.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: black; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 12.0pt;">Constraints exist and the CHECK_CONSTRAINTS option is not
specified<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-left: 28.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: black; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="background: white; color: black; font-family: "Segoe UI",sans-serif;">Triggers exist and the FIRE_TRIGGER option is not
specified.</span><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-left: 28.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: black; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="background: white; color: black; font-family: "Segoe UI",sans-serif;">You use the KEEPIDENTITY option to import
identity value from data file.</span><span style="color: black; font-family: "Segoe UI",sans-serif; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://www.red-gate.com/simple-talk/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/">https://www.red-gate.com/simple-talk/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/</a><span style="mso-fareast-language: EN-IN;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<ul type="disc">
<li class="MsoNormal" style="background: white; color: #373737; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">By default, the BULK INSERT statement <b>ignores</b> <b>constraints
and disables triggers.</b><o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #373737; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"><span style="font-family: "Arial",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">By default, the INSERT…INTO statement <b>executes check
constraints and triggers.</b><o:p></o:p></span></li>
</ul>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;">Fix for this issue:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;">We can create temp table first and use
this temp table in bulk insert operation then we can get the row from temp
table will resolve disable triggers and permission requirement on user.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-fareast-language: EN-IN;"><!--[if gte vml 1]><v:shape
id="Picture_x0020_5" o:spid="_x0000_i1026" type="#_x0000_t75" alt="" style='width:499.5pt;
height:209.25pt'>
<v:imagedata src="file:///C:/Users/jar/AppData/Local/Temp/msohtmlclip1/01/clip_image003.png"
o:href="cid:image004.png@01D56FD8.859CEA10"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;"><o:p><br /></o:p></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;"><o:p><br /></o:p></span></div>
<br />
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><span style="white-space: pre;"> </span> bulk insert Table_2 from 'D:\test.csv' with ( fieldterminator = ',', rowterminator='\n')</span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;">create table #temp(tid int,tname varchar(50))</span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;">bulk insert #temp from 'D:\test.csv' with ( fieldterminator = ',', rowterminator='\n')</span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;">insert into Table_2</span></span></div>
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;"><br /></span></span></div>
<br />
<div class="MsoNormal">
<span style="font-family: Lucida Console;"><span style="font-size: 14px;">select * from #temp</span></span><span style="color: black; font-family: "Lucida Console"; font-size: 10.5pt; mso-fareast-language: EN-IN;"><o:p> </o:p></span></div>
<br /></div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-83318611004270197802019-09-06T06:05:00.003-07:002019-09-06T06:05:52.692-07:00How to find Missing index on all database on TSQL query<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: center;">
<b><u>Missing index on all database on single TSQL query</u></b></div>
<br />
<br />
SELECT<br />
<br />
mid.database_id dbid,DB_NAME(mid.database_id) [DB_Name], mid.[object_id],mid.statement,<br />
<br />
migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) AS improvement_measure,<br />
<br />
'CREATE INDEX [missing_index_' + CONVERT (varchar, mig.index_group_handle) + '_' + CONVERT (varchar, mid.index_handle)<br />
<br />
+ '_' + LEFT (PARSENAME(mid.statement, 1), 32) + ']'<br />
<br />
+ ' ON ' + mid.statement<br />
<br />
+ ' (' + ISNULL (mid.equality_columns,'')<br />
<br />
+ CASE WHEN mid.equality_columns IS NOT NULL AND mid.inequality_columns IS NOT NULL THEN ',' ELSE '' END<br />
<br />
+ ISNULL (mid.inequality_columns, '')<br />
<br />
+ ')'<br />
<br />
+ ISNULL (' INCLUDE (' + mid.included_columns + ')', '') AS create_index_statement,<br />
<br />
migs.*<br />
<br />
FROM sys.dm_db_missing_index_groups mig<br />
<br />
INNER JOIN sys.dm_db_missing_index_group_stats migs ON migs.group_handle = mig.index_group_handle<br />
<br />
INNER JOIN sys.dm_db_missing_index_details mid ON mig.index_handle = mid.index_handle<br />
<br />
WHERE migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) > 10<br />
and migs.avg_user_impact >=90.00<br />
<br />
ORDER BY DB_NAME(mid.database_id),migs.avg_total_user_cost * migs.avg_user_impact * (migs.user_seeks + migs.user_scans) DESC<br />
<div>
<br /></div>
</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com1tag:blogger.com,1999:blog-8453781330643442479.post-78903420687832276882019-08-12T05:53:00.001-07:002019-08-12T05:53:19.672-07:00How to install SQL Server 2017 with Docker<div dir="ltr" style="text-align: left;" trbidi="on">
---------------Docker with SQL-------------<br />
<br />
<br />
Docker commands:<br />
<br />
docker run -d -p 8080:1433 --name docker_sql2017 -e sa_password=Test123456test -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer:2017-latest<br />
<br />
To See docker images:<br />
<br />
docker images<br />
<br />
For ex:<br />
<br />
PS C:\Users\usename> docker images<br />
<br />
To see docker all containers:<br />
<br />
docker ps -a<br />
<br />
To see docker container ip address:<br />
<br />
docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" containername<br />
<br />
docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" docker_sql2017<br />
<br />
To see logs of container:<br />
<br />
Docker container logs containername<br />
<br />
Docker container logs docker_sql2017<br />
<br />
To login to the sql cmd:<br />
<br />
PS C:\Users\jar> sqlcmd -U sa -S Ipaddressofserver(which we got from inspect command above)<br />
<br />
PS C:\Users\jar> sqlcmd -U sa -S 172.31.240.15<br />
<br />
Once logeed into to we can see version and servername as below<br />
<br />
PS C:\Users\jar> sqlcmd -U sa -S 172.31.240.15<br />
Password:Test123456test<br />
1> go<br />
1> select @@version<br />
2> go<br />
1> select @@servername<br />
2> go<br />
<br />
To create loginname with sysadmin as below:<br />
<br />
1> create login testlogin with password='test@123';<br />
2> go<br />
1><br />
2> exec master..sp_addsrvrolemember @loginame='testlogin',@rolename='sysadmin';<br />
3> go<br />
<br />
Now we can go with loginto the SSMS as see below<br />
<br />
Servername: Ipaddress,portno<br />
<br />
Ex:<br />
172.31.240.15,1433<br />
<br />
Username:testlogin<br />
Password:test@123<br />
-------------------------------------------------------<br />
<br />
ref:<br />
<br />
<div class="MsoNormal">
<span style="font-family: "Lucida Console"; font-size: 10.5pt;"><a href="https://www.sqlshack.com/sql-server-with-a-docker-container-on-windows-server-2016/">https://www.sqlshack.com/sql-server-with-a-docker-container-on-windows-server-2016/</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Lucida Console"; font-size: 10.5pt;"><a href="https://nexxtjump.com/2017/12/12/step-by-step-guide-to-run-sql-server-in-a-windows-docker-container/">https://nexxtjump.com/2017/12/12/step-by-step-guide-to-run-sql-server-in-a-windows-docker-container/</a><o:p></o:p></span></div>
<br /><br />
<a href="https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes">https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes</a><br />
<br />
<br />
<br />
<h2 id="purging-all-unused-or-dangling-images-containers-volumes-and-networks" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 400; letter-spacing: -0.5px; margin: 30px auto 10px; padding: 0px; width: 745px;">
Purging All Unused or Dangling Images, Containers, Volumes, and Networks</h2>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Docker provides a single command that will clean up any resources — images, containers, volumes, and networks — that are dangling (not associated with a container):</div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker system prune
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
To additionally remove any stopped containers and all unused images (not just dangling images), add the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-a</code> flag to the command:</div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker system prune -a
</li>
</ul>
</code></pre>
<div data-unique="removing-docker-images" name="removing-docker-images" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;">
</div>
<h2 id="removing-docker-images" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 400; letter-spacing: -0.5px; margin: 30px auto 10px; padding: 0px; width: 745px;">
Removing Docker Images</h2>
<h3 id="remove-one-or-more-specific-images" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove one or more specific images</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Use the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker images</code> command with the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-a</code> flag to locate the ID of the images you want to remove. This will show you every image, including intermediate image layers. When you've located the images you want to delete, you can pass their ID or tag to <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker rmi</code>:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker images -a
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rmi <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">Image</span> <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">Image</span>
</li>
</ul>
</code></pre>
<h3 id="remove-dangling-images" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove dangling images</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Docker images consist of multiple layers. Dangling images are layers that have no relationship to any tagged images. They no longer serve a purpose and consume disk space. They can be located by adding the filter flag, <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-f</code> with a value of <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">dangling=true</code> to the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker images</code>command. When you're sure you want to delete them, you can use the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker images purge</code>command:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span class="note" style="background-color: #f4f2d4; border-radius: 3px; box-sizing: border-box; display: block; font-size: 15px; line-height: 26px; margin-bottom: 22px; padding: 13px 17px;"><span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Note:</span> If you build an image without tagging it, the image will appear on the list of dangling images because it has no association with a tagged image. You can avoid this situation by <a href="https://docs.docker.com/engine/reference/commandline/build/#/tag-image--t" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;">providing a tag</a>when you build, and you can retroactively tag an images with the <a href="https://docs.docker.com/engine/reference/commandline/tag/" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;">docker tag</a> command.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker images -f dangling=true
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker images purge
</li>
</ul>
</code></pre>
<h3 id="removing-images-according-to-a-pattern" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Removing images according to a pattern</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
You can find all the images that match a pattern using a combination of <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker images</code> and <a href="https://www.digitalocean.com/community/tutorials/using-grep-regular-expressions-to-search-for-text-patterns-in-linux" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;"><code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; font-size: 15px; line-height: 22px; padding: 3px;">grep</code></a>. Once you're satisfied, you can delete them by using <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">awk</code> to pass the IDs to <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker rmi</code>. Note that these utilities are not supplied by Docker and are not necessarily available on all systems:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker images -a | grep "<span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">pattern</span>"
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker images -a | grep "<span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">pattern</span>" | awk '{print $3}' | xargs docker rmi
</li>
</ul>
</code></pre>
<h3 id="remove-all-images" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove all images</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
All the Docker images on a system can be listed by adding <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-a</code> to the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker images</code> command. Once you're sure you want to delete them all, you can add the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-q</code> flag to pass the Image ID to <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker rmi</code>:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker images -a
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rmi $(docker images -a -q)
</li>
</ul>
</code></pre>
<div data-unique="removing-containers" name="removing-containers" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;">
</div>
<h2 id="removing-containers" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 400; letter-spacing: -0.5px; margin: 30px auto 10px; padding: 0px; width: 745px;">
Removing Containers</h2>
<h3 id="remove-one-or-more-specific-containers" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove one or more specific containers</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Use the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker ps</code> command with the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-a</code> flag to locate the name or ID of the containers you want to remove:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker ps -a
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rm <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">ID_or_Name</span> <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">ID_or_Name</span>
</li>
</ul>
</code></pre>
<h3 id="remove-a-container-upon-exit" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove a container upon exit</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
If you know when you’re creating a container that you won’t want to keep it around once you’re done, you can run <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker run --rm</code> to automatically delete it when it exits.</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Run and Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker run --rm <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">image_name</span>
</li>
</ul>
</code></pre>
<h3 id="remove-all-exited-containers" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove all exited containers</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
You can locate containers using <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker ps -a</code> and filter them by their status: created, restarting, running, paused, or exited. To review the list of exited containers, use the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-f</code> flag to filter based on status. When you've verified you want to remove those containers, using <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-q</code> to pass the IDs to the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker rm</code> command.</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker ps -a -f status=exited
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rm $(docker ps -a -f status=exited -q)
</li>
</ul>
</code></pre>
<h3 id="remove-containers-using-more-than-one-filter" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove containers using more than one filter</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Docker filters can be combined by repeating the filter flag with an additional value. This results in a list of containers that meet either condition. For example, if you want to delete all containers marked as either <span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Created</span> (a state which can result when you run a container with an invalid command) or <span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Exited</span>, you can use two filters:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker ps -a -f status=exited -f status=created
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rm $(docker ps -a -f status=exited -f status=created -q)
</li>
</ul>
</code></pre>
<h3 id="remove-containers-according-to-a-pattern" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove containers according to a pattern</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
You can find all the containers that match a pattern using a combination of <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker ps</code> and <a href="https://www.digitalocean.com/community/tutorials/using-grep-regular-expressions-to-search-for-text-patterns-in-linux" style="border-bottom: 1px dotted rgb(0, 0, 0); box-sizing: border-box; color: black; text-decoration-line: none;">grep</a>. When you're satisfied that you have the list you want to delete, you can use <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">awk</code> and <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">xargs</code> to supply the ID to <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker rmi</code>. Note that these utilities are not supplied by Docker and not necessarily available on all systems:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker ps -a | grep "<span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">pattern</span>”
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker ps -a | grep "<span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">pattern</span>" | awk '{print $3}' | xargs docker rmi
</li>
</ul>
</code></pre>
<h3 id="stop-and-remove-all-containers" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Stop and remove all containers</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
You can review the containers on your system with <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker ps</code>. Adding the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-a</code> flag will show all containers. When you're sure you want to delete them, you can add the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-q</code> flag to supply the IDs to the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker stop</code> and <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker rm</code> commands:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker ps -a
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker stop $(docker ps -a -q)
</li>
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rm $(docker ps -a -q)
</li>
</ul>
</code></pre>
<div data-unique="removing-volumes" name="removing-volumes" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin-left: auto; margin-right: auto; width: 745px;">
</div>
<h2 id="removing-volumes" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 400; letter-spacing: -0.5px; margin: 30px auto 10px; padding: 0px; width: 745px;">
Removing Volumes</h2>
<h3 id="remove-one-or-more-specific-volumes-docker-1-9-and-later" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove one or more specific volumes - Docker 1.9 and later</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Use the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker volume ls</code> command to locate the volume name or names you wish to delete. Then you can remove one or more volumes with the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker volume rm</code> command:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker volume ls
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker volume rm <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">volume_name</span> <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">volume_name</span>
</li>
</ul>
</code></pre>
<h3 id="remove-dangling-volumes-docker-1-9-and-later" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove dangling volumes - Docker 1.9 and later</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
Since the point of volumes is to exist independent from containers, when a container is removed, a volume is not automatically removed at the same time. When a volume exists and is no longer connected to any containers, it's called a dangling volume. To locate them to confirm you want to remove them, you can use the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker volume ls</code> command with a filter to limit the results to dangling volumes. When you're satisfied with the list, you can remove them all with <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">docker volume prune</code>:</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">List:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker volume ls -f dangling=true
</li>
</ul>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker volume prune
</li>
</ul>
</code></pre>
<h3 id="remove-a-container-and-its-volume" style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Medium, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; letter-spacing: -0.5px; margin: 20px auto 10px; padding: 0px; width: 745px;">
Remove a container and its volume</h3>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
If you created an unnamed volume, it can be deleted at the same time as the container with the <code style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: black; font-size: 15px; line-height: 22px; padding: 3px;">-v</code>flag. Note that this only works with <em style="box-sizing: border-box;">unnamed</em> volumes. When the container is successfully removed, its ID is displayed. Note that no reference is made to the removal of the volume. If it is unnamed, it is silently removed from the system. If it is named, it silently stays present.</div>
<div style="background-color: white; box-sizing: border-box; color: #323232; font-family: Sailec-Regular, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; margin-bottom: 22px; margin-left: auto; margin-right: auto; padding: 0px; width: 745px;">
<span style="box-sizing: border-box; font-family: Sailec-Bold, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;">Remove:</span></div>
<pre class="code-pre command" style="background-color: rgba(0, 0, 0, 0.05); border-radius: 3px; box-sizing: border-box; color: #323232; font-size: 14px; margin: 1rem auto; overflow-wrap: normal; overflow: auto !important; padding: 1rem; width: 745px;"><code langs="" style="background-color: transparent; border-radius: 3px; box-sizing: border-box; line-height: 22px; margin: 0px; padding: 0px;"><ul class="prefixed" style="box-sizing: border-box; margin: 0px; padding: 0px; white-space: normal;">
<li class="line" prefix="$" style="box-sizing: border-box; line-height: 1.5 !important; list-style: disc outside none; margin-bottom: 0.8rem; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 4px; padding-right: 0px !important; padding-top: 0px !important; white-space: pre;">docker rm -v <span class="highlight" style="background: 0px 0px; box-sizing: border-box; color: #e94849; display: inline;">container_name</span></li>
</ul>
</code></pre>
</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-32032479625859310062019-07-25T03:56:00.001-07:002019-07-25T03:56:13.888-07:00The operation could not be performed because OLE DB provider “SQLNCLI11” for linked server was unable to begin a distributed transaction.<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Issue:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">When
we tried to update table data, which uses triggers with linked servers<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">It
will through error. <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrQyliZWWcT-ZsYYqCBm2UXciNAlD8Cf13kGUwGw-0g4ak1wFjsAOrpILtS2kuCahcDCIs5Phj1vceakSw_X8fTw7loruVEm5889GZyDdaJ8yitC8IbQ7jM-TtBxZNo0DnzFOImARehUwo/s1600/error.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="425" data-original-width="955" height="142" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrQyliZWWcT-ZsYYqCBm2UXciNAlD8Cf13kGUwGw-0g4ak1wFjsAOrpILtS2kuCahcDCIs5Phj1vceakSw_X8fTw7loruVEm5889GZyDdaJ8yitC8IbQ7jM-TtBxZNo0DnzFOImARehUwo/s320/error.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Solution:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;"><br /></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">To
resolve this we should need to configure DTC(Distributed Transaction Coordinator)
<span style="mso-spacerun: yes;"> </span>Settings like below in both Source and Destination<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">RUN------------>
dcomcnfg.exe<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Expand
"Component Services"<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Expand
"computers" ><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Expand
"My computer"<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Expand
"DTC"<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Right
click on the server and make the same config as below step for the "local
DTC"<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Place
a check in the <b style="mso-bidi-font-weight: normal;">Network DTC Access</b>
and the <b style="mso-bidi-font-weight: normal;">Allow Inbound and Allow Outbound</b>
under the Transaction Manager Communication option.<span style="mso-spacerun: yes;"> </span>We also selected <b style="mso-bidi-font-weight: normal;">No Authentication Required</b>, as this was the way the other servers
in the environment were configured.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Restart
the DTC services from Services.msc<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUhKTj93S44Oa1ZE5FcDWAt754lPa9ekk3htuXtpDHndMJeiTrjM72sEJGAm7jEnSaVTR3ypifue7FHhHAYIFSfbZKreU1bdLEuH7lR3E-ixhd7MRWL3K3oaf49i-scsdYFgoYv-kBV3v/s1600/dtc+config.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="429" data-original-width="955" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUhKTj93S44Oa1ZE5FcDWAt754lPa9ekk3htuXtpDHndMJeiTrjM72sEJGAm7jEnSaVTR3ypifue7FHhHAYIFSfbZKreU1bdLEuH7lR3E-ixhd7MRWL3K3oaf49i-scsdYFgoYv-kBV3v/s1600/dtc+config.jpg" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">We
should need to same config on source and destination<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">Issue
fixed now <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-size: 16.0pt; line-height: 115%;">We
can update data using linked server inside triggers as see below<o:p></o:p></span></div>
<div class="Textbody">
<span style="mso-ansi-language: EN-IN; mso-fareast-language: EN-IN; mso-no-proof: yes;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxD6snMac4JNJ7Rw4ArN-6jQwejTCW8OcS2u3pE7-tlqkNCn1WDTZIDLc6vnKeP2IFJUPX7iWgOdgxENyP24gOPzoehDa_jAsL7pnkLOTS9Uig7JAHcvbVKrdtQvS8dhq3dFFUS3_TV-mW/s1600/sol.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="599" data-original-width="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxD6snMac4JNJ7Rw4ArN-6jQwejTCW8OcS2u3pE7-tlqkNCn1WDTZIDLc6vnKeP2IFJUPX7iWgOdgxENyP24gOPzoehDa_jAsL7pnkLOTS9Uig7JAHcvbVKrdtQvS8dhq3dFFUS3_TV-mW/s1600/sol.jpg" /></a></div>
<div class="Textbody">
<span style="mso-ansi-language: EN-IN; mso-fareast-language: EN-IN; mso-no-proof: yes;"><br /></span></div>
<div class="Textbody">
<br /></div>
<br /></div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-31033634269627833692019-07-05T00:09:00.003-07:002019-07-05T00:09:18.369-07:00Troubleshooting - Getting error A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.<div dir="ltr" style="text-align: left;" trbidi="on">
<table border="0" cellpadding="0" cellspacing="0" class="containercontenttable" style="background-color: #f4f4f5; border-collapse: collapse; border-spacing: 0px; border: 0px; color: #4c5156; font-family: "segoe ui", "helvetica neue", arial, helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; table-layout: fixed; vertical-align: baseline; width: 100%px;"><tbody style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;">
<tr style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;"><td colspan="2" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" valign="top"><div class="kbavatar" style="background-color: white; border: 1px solid rgb(238, 238, 238); float: right; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 0; margin: 0px; padding: 2px; vertical-align: baseline;">
<img align="absmiddle" border="0" src="https://support.flexquarters.com/esupport/index.php?/Base/StaffProfile/DisplayAvatar/13/43c284c085bf1d8ad5b3e8d90daf308e/60" style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;" /></div>
<div class="kbtitle" style="border: 0px; font-family: inherit; font-size: 30px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2; margin: 0px 0px 9px; padding: 0px; vertical-align: baseline;">
<span class="kbtitlemain" style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;">[QODBC-ALL] Troubleshooting - Getting error A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.</span></div>
<div class="kbinfo" style="border: 0px; color: #92969b; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline;">
<br /></div>
</td></tr>
<tr style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;"><td class="kbcontents" colspan="2" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.6; margin: 0px; padding: 0px; vertical-align: baseline;"><h2 style="border: 0px; font-family: inherit; font-size: 21px; font-stretch: inherit; font-variant: inherit; font-weight: normal; line-height: 1.1; margin: 28px 0px 14px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;">
<span style="border: 0px; color: #6633cc; font-family: Arial, Helvetica, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; vertical-align: baseline;">Troubleshooting - Getting error A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.</span></h2>
<h3 style="border: 0px; font-family: inherit; font-size: 17px; font-stretch: inherit; font-variant: inherit; font-weight: normal; line-height: 1.1; margin: 28px 0px 14px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;">
<span style="border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; vertical-align: baseline;"><span style="border: 0px; color: #0066cc; font: inherit; margin: 0px; vertical-align: baseline;">Problem Description:</span></span></h3>
<div style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.6; margin-bottom: 12px; padding: 0px; vertical-align: baseline;">
<span style="border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; vertical-align: baseline;">I am using QODBC to fetch QuickBooks Data in SQL Server. I have created Linked Server in SQL Server.<br /><br />We are receiving the following error when trying to fetch data.<br /><br />The SQL is:<br />SELECT * FROM [QREMOTE].[QODBC]..[Company]<br /><br />The error is:<br />Msg 7399, Level 16, State 1, Line 4<br />The OLE DB provider "MSDASQL" for linked server "QREMOTE" reported an error. The provider did not give any information about the error.<br /><br />Msg 7312, Level 16, State 1, Line 4<br />Invalid use of schema or catalog for OLE DB provider "MSDASQL" for linked server "QREMOTE". A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.</span></div>
<div align="center" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.6; margin-bottom: 12px; padding: 0px; vertical-align: baseline;">
<img alt="" src="https://support.flexquarters.com/esupport/newimages/FourPart/step1.png" style="background-color: white; border: 1px solid rgb(216, 219, 223); font: inherit; height: auto; margin: 0px !important; max-width: 100%; padding: 3px; vertical-align: baseline;" /></div>
<h3 style="border: 0px; font-family: inherit; font-size: 17px; font-stretch: inherit; font-variant: inherit; font-weight: normal; line-height: 1.1; margin: 28px 0px 14px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;">
<span style="border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; vertical-align: baseline;"><span style="border: 0px; color: #0066cc; font: inherit; margin: 0px; vertical-align: baseline;">Solution:</span></span></h3>
<div style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.6; margin-bottom: 12px; padding: 0px; vertical-align: baseline;">
<span style="border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; vertical-align: baseline;">You have used wrong SQL statement. You need to use LinkedServerName & table name in the query.<br /><br />For Example:<br />Select * from YourLinkedServerName...TableName<br />SELECT * FROM [QREMOTE]...[Company]</span></div>
<div align="center" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.6; margin-bottom: 12px; padding: 0px; vertical-align: baseline;">
<img alt="" src="https://support.flexquarters.com/esupport/newimages/FourPart/step2.png" style="background-color: white; border: 1px solid rgb(216, 219, 223); font: inherit; height: auto; margin: 0px !important; max-width: 100%; padding: 3px; vertical-align: baseline;" /></div>
<div style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.6; margin-bottom: 12px; padding: 0px; vertical-align: baseline;">
<br /></div>
</td></tr>
<tr style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;"><td colspan="2" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><div id="kbratingcontainer" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 10px 0px; padding: 0px; vertical-align: baseline;">
<div class="kbrating" style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
<div class="kbratingstars" style="border: 0px; color: #92969b; cursor: pointer; float: left; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
<img align="absmiddle" border="0" src="https://support.flexquarters.com/esupport/__swift/themes/client/images/icon_star_0.gif" style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;" /><span style="border: 0px; font: inherit; margin: 0px; vertical-align: baseline;"> (0 vote(s))</span></div>
<div class="kbratinghelpful" style="border: 0px; color: #228aa9; cursor: pointer; float: left; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px 0px 0px 20px; padding: 0px; vertical-align: baseline;">
<img align="absmiddle" border="0" src="https://support.flexquarters.com/esupport/__swift/themes/client/images/icon_thumbsup.gif" style="border: 0px; font: inherit; margin: 0px; position: relative; top: 2px; vertical-align: baseline;" /> Helpful</div>
<div class="kbratingnothelpful" style="border: 0px; color: #228aa9; cursor: pointer; float: left; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px 0px 0px 20px; padding: 0px; vertical-align: baseline;">
<img align="absmiddle" border="0" src="https://support.flexquarters.com/esupport/__swift/themes/client/images/icon_thumbdown.gif" style="border: 0px; font: inherit; margin: 0px; position: relative; top: 2px; vertical-align: baseline;" /> Not helpful</div>
<div>
<br /></div>
</div>
</div>
</td></tr>
</tbody></table>
</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0tag:blogger.com,1999:blog-8453781330643442479.post-36395102595633876252019-06-07T04:54:00.000-07:002019-06-07T04:54:18.189-07:00Linked Servers displaying local database catalog and not remote database catalog <div dir="ltr" style="text-align: left;" trbidi="on">
SELECT * FROM OPENQUERY(linkedservername, 'SELECT @@servername AS servername')<br />
<br />
select * from sys.servers<br />
<br />
when we create linked server datasource should not be blank if blank it will take local server as source<br />
<br />
https://social.msdn.microsoft.com/Forums/en-US/be11aa8c-0af6-45b9-b2e2-08b93fca2373/linked-servers-displaying-local-database-catalog-and-not-remote-database-catalog?forum=sqldataaccess<br />
<br />
we can verify linked server name as using below query<br />
<br />
EXEC sp_addlinkedserver <br />
@server=N'linkedservername', -- Remote Computer Name<br />
@srvproduct=N'', -- Not Needed<br />
@provider=N'SQLNCLI', -- SQL Server Driver<br />
@datasrc=N'servername\instancename'; -- Server Name And Instance</div>
Ashok SQL Techihttp://www.blogger.com/profile/12779634353033646487noreply@blogger.com0