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

<channel>
	<title>Maruti Nandan, Author at Techyaz.com</title>
	<atom:link href="https://techyaz.com/author/maruti/feed/" rel="self" type="application/rss+xml" />
	<link>https://techyaz.com/author/maruti/</link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Fri, 01 Jun 2018 11:58:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Maruti Nandan, Author at Techyaz.com</title>
	<link>https://techyaz.com/author/maruti/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Fix SQL Server Installation Error 1639?</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/#respond</comments>
		
		<dc:creator><![CDATA[Maruti Nandan]]></dc:creator>
		<pubDate>Sat, 03 Feb 2018 15:58:09 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1730</guid>

					<description><![CDATA[<p>Last week, I was installing SQL Server 2012 on one of the database server. Unfortunately, the installation was failed with the error 1639. I have given below the details of this error code. Product: Microsoft SQL Server Browser – Update&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/">How to Fix SQL Server Installation Error 1639?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Last week, I was installing SQL Server 2012 on one of the database server. Unfortunately, the installation was failed with the error 1639. I have given below the details of this error code.</p>
<p><em><span style="color: #ff0000;">Product: Microsoft SQL Server Browser – Update Service Pack 1 for Microsoft SQL Server Browser (KB-NUMBER)’ could not be installed. Error code 1639.</span></em></p>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-1732 alignright" src="http://techyaz.com/wp-content/uploads/2018/02/error1639-min.png" alt="SQL Server Installation Error 1639" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/02/error1639-min.png 300w, https://techyaz.com/wp-content/uploads/2018/02/error1639-min-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/02/error1639-min-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/02/error1639-min-320x320.png 320w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<h3><span style="color: #333399;">Root Cause</span></h3>
<p>I was not able to find any reason behind this error because I had followed all prerequisites before starting this installation. I went to some forums to get a root cause of this error 1639 or solution to fix it and what i found is described in this article.</p>
<p>This issue (Error 1639) comes when there is a blank space between your SQL Server setup folder directories. As I found my setup files were placed under a directory named “SQL Server 2012”. You can see there are two blank space between this directory name. This was the main reason or cause behind getting this SQL Server installation error. Read next section to fix this issue and install SQL Server successfully on your database server.</p>
<h3><span style="color: #333399;">Resolution</span></h3>
<p>To fix this issue, we have decided to first uninstall SQL Server instance that was failed to install. I have uninstalled it from “<em>Add and Remove Programs</em>” and deleted all SQL Server folders that was created during the installation. Once failed installation of SQL Server was uninstalled from database server, we have rebooted the machine to proceed with fresh installation.</p>
<p>As I mentioned above, issue was due to blank space between the parent directory of SQL Server setup files. You can see the name of directory in below screenshot.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1733" src="http://techyaz.com/wp-content/uploads/2018/02/1-sql-server-2012-min.jpg" alt="blank space between folder names" width="646" height="67" srcset="https://techyaz.com/wp-content/uploads/2018/02/1-sql-server-2012-min.jpg 646w, https://techyaz.com/wp-content/uploads/2018/02/1-sql-server-2012-min-300x31.jpg 300w" sizes="(max-width: 646px) 100vw, 646px" /></p>
<p>Now I have removed the blank space between the words of this folder name and changed it to “SQLServer2012”. You can see the below screenshot of this change.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-1734" src="http://techyaz.com/wp-content/uploads/2018/02/2-sqlserver2012-min.jpg" alt="Remove blank space of folder name" width="655" height="71" srcset="https://techyaz.com/wp-content/uploads/2018/02/2-sqlserver2012-min.jpg 655w, https://techyaz.com/wp-content/uploads/2018/02/2-sqlserver2012-min-300x33.jpg 300w" sizes="(max-width: 655px) 100vw, 655px" /></p>
<p>That’s all to fix this issue. Now go ahead and start the installation again for your work.</p>
<p>Once this directory was renamed, I have started the SQL Server installation process. I had launched setup file and proceed for installation. You can also right click on setup file and choose “<em>Run as Administrator</em>” to start the installation. Follow all windows and processes of installation process as you did last time to install it. This time your SQL Server instance will be installed without any issue.</p>
<p>The key takeaway from this issue is to never keep any bank space between files or folders otherwise you will be end up with similar issues.</p>
<p>I hope you like this article. Please Like, Share, Comment &amp; Subscribe to this website to get all new articles directly to your index. You can also follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/interview-questions/sql-server-interview-questions-answers-architecture/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers on Architecture</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-interview-questions-answers-indexes/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers on Indexes</a></strong></li>
<li><strong><a href="http://techyaz.com/interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noopener">Microsoft SQL Server DBA Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/backup-recovery/sql-server-backup-recovery-interview-questions-answers/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers on Backup &amp; Recovery</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/">How to Fix SQL Server Installation Error 1639?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Understanding Different Types of SQL JOINs with Examples</title>
		<link>https://techyaz.com/sql-server/t-sql/understanding-different-types-sql-joins-examples/</link>
					<comments>https://techyaz.com/sql-server/t-sql/understanding-different-types-sql-joins-examples/#respond</comments>
		
		<dc:creator><![CDATA[Maruti Nandan]]></dc:creator>
		<pubDate>Thu, 14 Dec 2017 08:38:18 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Joins]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tsql]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1343</guid>

					<description><![CDATA[<p>SQL JOINs are used to retrieve set of information from two or more different tables based upon certain common values between them. We use joins to combine tables with Select SQL statements. Related Articles: Read UNION vs UNION ALL Logon&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/t-sql/understanding-different-types-sql-joins-examples/">Understanding Different Types of SQL JOINs with Examples</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>SQL JOINs are used to retrieve set of information from two or more different tables based upon certain common values between them. We use joins to combine tables with Select SQL statements.</p>
<p><em><strong><span style="color: #800000;">Related Articles:</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/difference-between-union-and-union-all-operators/" target="_blank" rel="noopener">Read UNION vs UNION ALL</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/" target="_blank" rel="noopener">Logon Trigger to Restrict sysadmin logins</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/table-row-count-showing-incorrect-value-sys-partitions-dmv-sys-dm_db_partition_stats/" target="_blank" rel="noopener">Why rou count showing incorrect value in sys.partitions?</a></strong></li>
</ul>
<h3><span style="color: #333399;"><strong>Types of Joins</strong></span></h3>
<p><strong> </strong>There are four types of Joins and each type is having separate ways to retrieve data.</p>
<ul>
<li><strong>Inner Join</strong></li>
<li><strong>Right Join</strong></li>
<li><strong>Left Join</strong></li>
<li><strong>Full Join</strong></li>
</ul>
<p>We will use two tables Employees and Leavesdetails to explain you each type of Joins with example. The details of both tables are given below.</p>
<p><strong>Table Employees:</strong></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1345" src="http://techyaz.com/wp-content/uploads/2017/12/1-Employees-Table.png" alt="Employees Table" width="378" height="196" /></p>
<p><strong>Table LeavesDetails:</strong></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1346" src="http://techyaz.com/wp-content/uploads/2017/12/2-LeaveDetails-Table.png" alt="LeavesDetails Table" width="380" height="194" /></p>
<p><strong> </strong>We will apply all types of Joins between these two tables to show you how they work. Let&#8217;s start with Inner Join.<strong> </strong></p>
<h5><span style="color: #333399;"><strong>Inner Join</strong><strong> </strong></span></h5>
<p>Inner join will show data that is matched between both joined tables. This is default join where result is based upon where clause and matched value from all rows fetch data. The visual representation of inner join will look like below image. You can see the coloured area that is common between both tables and that will be output of INNER JOIN.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1347 " src="http://techyaz.com/wp-content/uploads/2017/12/3-Inner-Join.png" alt="Inner Join" width="244" height="150" /></p>
<p>As per above image, both tables Employees and Leavesdetails have been joined together to get output details for rows that are matched to each other.</p>
<pre><strong><span style="color: #0000ff;">SELECT *
FROM EMPLOYEES
<em>INNER JOIN</em> [dbo].[LeavesDetails]
ON [LeaveDetails].[Employeeid]=[Employees].[Employeeid]
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1348" src="http://techyaz.com/wp-content/uploads/2017/12/4-Example-Inner-Join.png" alt="inner join example" width="806" height="214" srcset="https://techyaz.com/wp-content/uploads/2017/12/4-Example-Inner-Join.png 806w, https://techyaz.com/wp-content/uploads/2017/12/4-Example-Inner-Join-300x80.png 300w, https://techyaz.com/wp-content/uploads/2017/12/4-Example-Inner-Join-768x204.png 768w" sizes="auto, (max-width: 806px) 100vw, 806px" /></p>
<p><span style="color: #333399;"><strong>Right Join</strong></span></p>
<p>When we use Right Join keyword, it will return all rows from table 2 that is placed right side of <em>RIGHT JOIN</em> keyword and matched rows from table 1 that is mentioned just left to the <em>RIGHT JOIN</em> keyword in SQL statement. In right join, if rows do not match with table 1 it will return <strong>null</strong> value. Sometimes, we call it as Right Outer Join as well. The visual diagram of Right Join is given below.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1349" src="http://techyaz.com/wp-content/uploads/2017/12/6-Right-Join.png" alt="right join" width="217" height="145" /></p>
<p><strong>Example</strong></p>
<p>We can see Employees table is mentioned as table 2 and placed just right after keyword <em>RIGHT JOIN</em> and Leavesdetails table has been mentioned as table 1 that is just left to the keyword <em>RIGHT JOIN</em>.</p>
<pre><span style="color: #0000ff;"><strong>SELECT * FROM Leavesdetails
<em>RIGHT JOIN</em> Employees
ON [Employees].[Employeeid]=[Leavesdetails].[Employeeid]
</strong></span></pre>
<p>You can see all values have been displayed from table Employees  along with corresponding details from table 2 Leavesdetails whereas there is one null value row from table Leavesdetails because there is no matched entry for this row from Employees table.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1350" src="http://techyaz.com/wp-content/uploads/2017/12/5-Example-Right-Join.png" alt="Right Join Example" width="725" height="226" srcset="https://techyaz.com/wp-content/uploads/2017/12/5-Example-Right-Join.png 725w, https://techyaz.com/wp-content/uploads/2017/12/5-Example-Right-Join-300x94.png 300w" sizes="auto, (max-width: 725px) 100vw, 725px" /></p>
<h5><span style="color: #333399;"><strong>Left Join</strong></span></h5>
<p>When we use <em>LEFT JOIN</em> keyword, it will return all rows from table 1 that is placed just before or left side to the <em>LEFT JOIN</em> keyword and matched rows from table 2 that is mentioned just right side to the <em>LEFT JOIN</em> keyword in SQL statement. In left join, if rows do not match with table 2 it will return <strong>null</strong> value. Left Join is also known as left outer join. You can see the visual representation of Left Join in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1351" src="http://techyaz.com/wp-content/uploads/2017/12/8-Left-Join.png" alt="left join" width="242" height="146" /></p>
<p><strong>Example</strong></p>
<p>you can see, now Employee table is mentioned left side of <em>LEFT JOIN</em> keyword and Leavesdetails table is mentioned in right side of this keyword so Employee table will work as table 1 and Leavesdetails will work as table 2.</p>
<pre><span style="color: #0000ff;"><strong>SELECT *
FROM Employees
<em>LEFT JOIN</em> Leavesdetails
ON [Leavesdetails].[Employeeid]=[Employees].[Employeeid]
</strong></span></pre>
<p>We can see all records from Employees table along with its corresponding details from table 2 Leavesdetails whereas one null values from table2 that is Leavesdetails because it&#8217;s matching with the data presented in table 1 Employees table. As highlighted record does not exist in table 2 it is showing null value.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1352" src="http://techyaz.com/wp-content/uploads/2017/12/7-Example-Left-Join.png" alt="Left Join Example" width="721" height="221" srcset="https://techyaz.com/wp-content/uploads/2017/12/7-Example-Left-Join.png 721w, https://techyaz.com/wp-content/uploads/2017/12/7-Example-Left-Join-300x92.png 300w" sizes="auto, (max-width: 721px) 100vw, 721px" /></p>
<h5><span style="color: #333399;"><strong>Full Join</strong></span></h5>
<p>When we use <em>FULL JOIN</em>, it fetches results from both tables when there is a match in either in left or right table. We can also say it is kind of combination of left and right join.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1353" src="http://techyaz.com/wp-content/uploads/2017/12/10-Full-Join.png" alt="full join" width="235" height="151" /></p>
<p><strong>Example</strong></p>
<p>As visual representation shows, it will show all records from Employees table and Leavesdetails table. You can see in below result set Employee Manvendra has not any leaves detail and same way Employee ID 108 has not any record in Employees table but both rows are showing their values.</p>
<pre><strong><span style="color: #0000ff;">SELECT *
FROM EMPLOYEES
<em>FULL JOIN</em> [dbo].[Leavesdetails] on [Leavesdetails].[Employeeid]=[Employees].[Employeeid]
</span></strong></pre>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1354" src="http://techyaz.com/wp-content/uploads/2017/12/9-Full-Join.png" alt="full join example" width="779" height="231" srcset="https://techyaz.com/wp-content/uploads/2017/12/9-Full-Join.png 779w, https://techyaz.com/wp-content/uploads/2017/12/9-Full-Join-300x89.png 300w, https://techyaz.com/wp-content/uploads/2017/12/9-Full-Join-768x228.png 768w" sizes="auto, (max-width: 779px) 100vw, 779px" /><br />
I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/t-sql/understanding-different-types-sql-joins-examples/">Understanding Different Types of SQL JOINs with Examples</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/t-sql/understanding-different-types-sql-joins-examples/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to update License Key or Product Key of SQL Server Instance</title>
		<link>https://techyaz.com/sql-server/sql-server-administration/update-license-key-product-key-sql-server-instance/</link>
					<comments>https://techyaz.com/sql-server/sql-server-administration/update-license-key-product-key-sql-server-instance/#comments</comments>
		
		<dc:creator><![CDATA[Maruti Nandan]]></dc:creator>
		<pubDate>Wed, 06 Sep 2017 08:25:22 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[License key]]></category>
		<category><![CDATA[Product key]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=807</guid>

					<description><![CDATA[<p>I was working in a project where I came to know client was using MSDN licenses on production environment. Though they have MS SQL Server license available but those SQL Server licenses were not applied on this production server. This&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-administration/update-license-key-product-key-sql-server-instance/">How to update License Key or Product Key of SQL Server Instance</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was working in a project where I came to know client was using MSDN licenses on production environment. Though they have MS SQL Server license available but those SQL Server licenses were not applied on this production server. This can be major compliance issue if you are running your production system with MSDN license. I had suggested the same to client and convince them to apply available license key to the running SQL Server Instances in production.</p>
<p>Read attached article if you want to<strong> <a href="https://techyaz.com/sql-server/troubleshooting/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/" target="_blank" rel="noopener">upgrade your SQL Server Evaluation Edition to Standard, Enterprise or Developer Edition</a>. </strong>You can also activate your SQL Server Instance if its evaluation period has been expired using same article.</p>
<p><span style="color: #000080;"><strong>Note: &#8211;</strong></span> <strong>Take proper Full backup of your all databases before starting this activity</strong>. Make sure to create script of all Logins and SQL Server Agent Jobs etc. You can also <strong>Rename your Data folder</strong> where you have placed your database files to secure the databases during this process post stopping SQL Server services .</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions-answers-architecture/" target="_blank" rel="noopener">SQL Server Architecture Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">What should be best value for fill factor in SQL Server?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/always-turn-off-database-auto-shrink/" target="_blank" rel="noopener">Why Should You Always Turn Off Database Auto Shrink Property?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
</ul>
<h3><span style="color: #000080;">Change SQL Server License key</span></h3>
<p><strong>Step 1-</strong> First step is to stop all SQL Server services. Launch SQL Server Configuration Manager and shutdown all services.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-808 size-full" src="http://techyaz.com/wp-content/uploads/2017/09/1-services.jpg" alt="" width="625" height="102" srcset="https://techyaz.com/wp-content/uploads/2017/09/1-services.jpg 625w, https://techyaz.com/wp-content/uploads/2017/09/1-services-300x49.jpg 300w" sizes="auto, (max-width: 625px) 100vw, 625px" /></p>
<p><strong>Step 2-</strong>  <strong>Copy SQL Server Enterprise/Standard edition setup</strong> to your server where you want to change the SQL Server product key. Run <strong>Setup.Exe </strong>with an <strong>Administrator</strong> account. <strong>SQL Server Installation Center</strong> will appear on your screen to proceed. Click on <strong>Maintenance</strong> tab from left side pane. You can see multiple options in right side pane. Select first option <strong>Edition Upgrade</strong> as shown in below image and click <strong>Next.</strong></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-809" src="http://techyaz.com/wp-content/uploads/2017/09/2-edition-upgrade.jpg" alt="" width="800" height="178" srcset="https://techyaz.com/wp-content/uploads/2017/09/2-edition-upgrade.jpg 800w, https://techyaz.com/wp-content/uploads/2017/09/2-edition-upgrade-300x67.jpg 300w, https://techyaz.com/wp-content/uploads/2017/09/2-edition-upgrade-768x171.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></p>
<p><strong>Step3-</strong> SQL Server will check all required rules, once all rules will be passed next button will enable to proceed. Click on Next button here.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-810" src="http://techyaz.com/wp-content/uploads/2017/09/3-rule-checks.jpg" alt="sql server rules check" width="622" height="466" srcset="https://techyaz.com/wp-content/uploads/2017/09/3-rule-checks.jpg 622w, https://techyaz.com/wp-content/uploads/2017/09/3-rule-checks-300x225.jpg 300w" sizes="auto, (max-width: 622px) 100vw, 622px" /></p>
<p><strong>Step 4-</strong> Once you click on Next button of above screen, next window will come to enter the License Key or product Key of SQL Server Instance. <strong>Enter your Product Key</strong> or if EXE has a valid license key to cross verify then proceed for Next button with the same License key. Make sure that License key is not for MSDN or from any invalid source.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-811" src="http://techyaz.com/wp-content/uploads/2017/09/4-product-key.jpg" alt="enter sql server product key" width="755" height="335" srcset="https://techyaz.com/wp-content/uploads/2017/09/4-product-key.jpg 755w, https://techyaz.com/wp-content/uploads/2017/09/4-product-key-300x133.jpg 300w" sizes="auto, (max-width: 755px) 100vw, 755px" /></p>
<p><strong>Step 5-</strong> Accept License Term and Condition and Click on Next button to proceed.</p>
<p><strong>Step 6-</strong> Select MS SQL Server Instance for which you are going to change license key if you have multiple instances.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-812" src="http://techyaz.com/wp-content/uploads/2017/09/5-final-window.jpg" alt="sql instance" width="600" height="460" srcset="https://techyaz.com/wp-content/uploads/2017/09/5-final-window.jpg 600w, https://techyaz.com/wp-content/uploads/2017/09/5-final-window-300x230.jpg 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><strong>Step 7-</strong> Click on Next button of above screen, it will check all rules for edition upgrade. If all rules shows as Passed you are good to go ahead. If your are getting any warning or error verify and try to fix it before going with the next step.</p>
<p><strong>Step 8-</strong> Below will be the final window that prompt for Ready to upgrade the edition. Click on Upgrade button if all looks ok.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-813" src="http://techyaz.com/wp-content/uploads/2017/09/6-final-window.jpg" alt="install sql server" width="804" height="550" srcset="https://techyaz.com/wp-content/uploads/2017/09/6-final-window.jpg 804w, https://techyaz.com/wp-content/uploads/2017/09/6-final-window-300x205.jpg 300w, https://techyaz.com/wp-content/uploads/2017/09/6-final-window-768x525.jpg 768w" sizes="auto, (max-width: 804px) 100vw, 804px" /></p>
<p><strong>Step 9-</strong> Once License will be updated below window will prompt with succeeded status.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-814" src="http://techyaz.com/wp-content/uploads/2017/09/8-success.jpg" alt="" width="468" height="148" srcset="https://techyaz.com/wp-content/uploads/2017/09/8-success.jpg 468w, https://techyaz.com/wp-content/uploads/2017/09/8-success-300x95.jpg 300w" sizes="auto, (max-width: 468px) 100vw, 468px" /></p>
<p>Now you MSDN license has been changed to valid SQL Server Enterprise License. License will change based on the SQL Server setup you used for edition upgrade.</p>
<p>You might face <strong>Access Denied</strong> error during this edition upgrade, here is the solution to fix this error. You may get access denied error on SQL Server License.rtf file for that you need to uncheck read only attribute from file name.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-815" src="http://techyaz.com/wp-content/uploads/2017/09/7-read-only.jpg" alt="license key file" width="345" height="320" srcset="https://techyaz.com/wp-content/uploads/2017/09/7-read-only.jpg 345w, https://techyaz.com/wp-content/uploads/2017/09/7-read-only-300x278.jpg 300w" sizes="auto, (max-width: 345px) 100vw, 345px" /></p>
<p>&nbsp;</p>
<p>If you have renamed your Data folder before starting this process as suggested in Note section, you can rename back it to Data folder again and then start the SQL Server services. Now, start MS SQL services which you have stopped initially before starting upgrade activity and check SQL Server Instance version and license type . You can see our output looks like below details.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;">Microsoft SQL Server 2012 (SP3) (KB#######) - 11.0.6020.0 (X64)
Date and time
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 &lt;X64&gt;
(Build 9600: ) (Hypervisor)
</span></strong></pre>
<p>I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-administration/update-license-key-product-key-sql-server-instance/">How to update License Key or Product Key of SQL Server Instance</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-administration/update-license-key-product-key-sql-server-instance/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Create a Logon Trigger to Restrict sysadmin logins to connect to SQL Server for given Time Interval</title>
		<link>https://techyaz.com/sql-server/t-sql/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/</link>
					<comments>https://techyaz.com/sql-server/t-sql/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/#comments</comments>
		
		<dc:creator><![CDATA[Maruti Nandan]]></dc:creator>
		<pubDate>Mon, 21 Aug 2017 07:58:44 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[logins]]></category>
		<category><![CDATA[Logon Trigger]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=566</guid>

					<description><![CDATA[<p>I was struggling with unwanted modifications of SQL Server configurations by random SQL Server sysadmin logins who were part of our SQL Server Instance. Every time we cannot monitor what has been changed and who are doing it on your&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/t-sql/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/">Create a Logon Trigger to Restrict sysadmin logins to connect to SQL Server for given Time Interval</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was struggling with unwanted modifications of SQL Server configurations by random SQL Server sysadmin logins who were part of our SQL Server Instance. Every time we cannot monitor what has been changed and who are doing it on your non-prod servers. We generally monitor our production boxes for any unwanted activities. here i will show you how to create a Logon trigger to restrict sysadmin logins to not perform such activities. I will also show you how we can restrict them between a given time interval. Access will be allowed during office hours and restricted during out of office hours.</p>
<h3><span style="color: #000080;"><strong>Logon trigger Overview</strong></span></h3>
<p><strong>Logon Triggers</strong> fire in response to a LOGON event. It fires after the authentication phase of logging in finishes, but before the user session is actually established. Logon Triggers are very useful in tracking and restricting login events.</p>
<p>Sometimes few applications require sysadmin privilege to run and if you downgrade this access, application stops working. So, we cannot restrict sysadmin logins of such applications. There is always a scope of security breach if another login has sysadmin access except DBAs on SQL Server Instance.</p>
<p>To fix this issue, I have created a logon trigger that will restrict access of such application logins who are <strong>sysadmin </strong>on your SQL Server Instance<strong>. </strong> We can restrict them to access SQL Server directly through SSMS or any other medium. You need to pass that medium into code just like I have passed Management studio.</p>
<h3><span style="color: #000080;"><strong>Logon Trigger T-SQL Code</strong></span></h3>
<p>Below is the Logon Trigger T-SQL code which will be used to restrict any login for given time frame.</p>
<pre class="brush: sql; title: ; notranslate" title=""><strong><span class="kwrd" style="color: blue;">
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE trigger [logon_rest]
on all server for logon
as begin
declare @Program varchar(128)
declare @systemname varchar(128)
select @Program =PROGRAM_NAME,@systemname=HOST_NAME from sys.dm_exec_sessions as A
where a.session_id=@@SPID
if ORIGINAL_LOGIN() in('sa') </span><span class="kwrd" style="color: green;">/**Login For Which Access Need to restricted **/</span><span class="kwrd" style="color: blue;">
and @Program like'%Management%studio' </span><span class="kwrd" style="color: green;">/** Program via access restricted **/</span><span class="kwrd" style="color: blue;">
and
(GETDATE()&gt;(dateadd(day, datediff(day, 0, getdate()), 0) + '18:00') </span><span class="kwrd" style="color: green;">/**Last time till access allowed **/</span><span class="kwrd" style="color: blue;">
or
GETDATE()&lt;(dateadd(day, datediff(day, 0, getdate()), 0) + '09:00')) </span><span class="kwrd" style="color: green;">/**Start time from access allowed **/</span><span class="kwrd" style="color: blue;">
begin
Raiserror ('This is out of office hour',1,1)
rollback;
end
end;
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ENABLE TRIGGER [logon_rest] ON ALL SERVER
GO
</span></strong></pre>
<h5><span style="color: #000080;"><strong>Testing</strong></span></h5>
<p>For the testing purpose, I have taken sa account as a potential application login. You can use your identified login which are running with sysadmin rights. Even we can restrict such logins to connect to SQL Server during given time frame.</p>
<p>Here we have disabled sa server level login to connect through SSMS Before 9:00 AM and Post 6:00 PM. That means server login sa cannot connect to SQL Server Instance between given time slot. You can alter the time slot as per your convenience.</p>
<p>Just for example we have tried to login on SQL server through SSMS between given time frame and here you can see the output. I am not able to connect to SQL Server anymore. You can see this in below screenshot. But at the same time you can login to the same SQL Server Instance using other sysadmin or normal login accounts which is available in sys.syslogins.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-567" src="http://techyaz.com/wp-content/uploads/2017/08/1-sa-login.jpg" alt="logon trigger" width="644" height="488" srcset="https://techyaz.com/wp-content/uploads/2017/08/1-sa-login.jpg 644w, https://techyaz.com/wp-content/uploads/2017/08/1-sa-login-300x227.jpg 300w" sizes="auto, (max-width: 644px) 100vw, 644px" /></p>
<p>Even we can track the <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15434-not-drop-login-user-currently-logged/" target="_blank" rel="noopener">failed login</a> attempt made on this SQL Server Instance once you can make a database connection using another login. You can check the SQL Server error logs or you can just run <strong>sp_readerrorlog</strong> stored procedure to display errors. You can see our test login attempt is showing in below screenshot on the server.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-568" src="http://techyaz.com/wp-content/uploads/2017/08/2-errorlog.jpg" alt="" width="607" height="215" srcset="https://techyaz.com/wp-content/uploads/2017/08/2-errorlog.jpg 607w, https://techyaz.com/wp-content/uploads/2017/08/2-errorlog-300x106.jpg 300w" sizes="auto, (max-width: 607px) 100vw, 607px" /></p>
<p><span style="color: #800000;"><em><strong>Read more about SQL Server Login Issue related Articles:</strong></em></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15173/" target="_blank" rel="noopener">How to fix Error 15173: Revoke the permissions before dropping the login.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15138-error-3729/" target="_blank" rel="noopener">Fix error 15138 &amp; Error 3729: DROP login failed</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15434-not-drop-login-user-currently-logged/" target="_blank" rel="noopener">How to fix error 15434: Could not drop login as the user is currently logged in</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15170/" target="_blank" rel="noopener">Fixing error 15170: Login owns one or more SQL Agent Jobs</a></strong></li>
</ul>
<p>I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/t-sql/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/">Create a Logon Trigger to Restrict sysadmin logins to connect to SQL Server for given Time Interval</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/t-sql/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
