<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Windows on Andy M Mallon - AM²</title><link>https://am2.co/tag/windows/</link><description>Recent content in Windows on Andy M Mallon - AM²</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 02 Sep 2021 11:41:40 -0400</lastBuildDate><atom:link href="https://am2.co/tag/windows/index.xml" rel="self" type="application/rss+xml"/><item><title>Function to create SQL TABLE does not works well using Powershell</title><link>https://am2.co/2021/09/02/function-to-create-sql-table-does-not-works-well-using-powershell/</link><pubDate>Thu, 02 Sep 2021 11:41:40 -0400</pubDate><guid>https://am2.co/2021/09/02/function-to-create-sql-table-does-not-works-well-using-powershell/</guid><description>&lt;p&gt;&lt;a href="https://stackoverflow.com/q/69030492/1948808"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I need to get the values from a Excel Sheet (in a shared folder) to export it and then create a SQL Table in my instance. After of this I will execute a Stored Procedure (I already created) in order to create extended properties for a specific schema on tables,columns and rows.&lt;/p&gt;</description></item><item><title>Is my VM hyperthreaded?</title><link>https://am2.co/2020/10/18/is-my-vm-hyperthreaded/</link><pubDate>Sun, 18 Oct 2020 23:01:37 -0400</pubDate><guid>https://am2.co/2020/10/18/is-my-vm-hyperthreaded/</guid><description>&lt;p&gt;&lt;a href="https://superuser.com/q/1595400/630094"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I&amp;rsquo;ve been provided a VMware ESXi VM (running Windows Server 2016 SE) with 8 logical processors, but I can&amp;rsquo;t tell whether the VM is hyperthreaded. (This matters for SQL Server.)&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;C:&lt;/span&gt;&lt;span class="p"&gt;\&lt;/span&gt;&lt;span class="n"&gt;Users&lt;/span&gt;&lt;span class="p"&gt;\&lt;/span&gt;&lt;span class="n"&gt;XXXXXXX&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;wmic&lt;/span&gt; &lt;span class="n"&gt;CPU&lt;/span&gt; &lt;span class="n"&gt;Get&lt;/span&gt; &lt;span class="n"&gt;DeviceID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;NumberOfCores&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;NumberOfLogicalProcessors&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;DeviceID&lt;/span&gt; &lt;span class="n"&gt;NumberOfCores&lt;/span&gt; &lt;span class="n"&gt;NumberOfLogicalProcessors&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;CPU0&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;CPU1&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;CPU2&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;CPU3&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;wmic&lt;/code&gt; says there are four CPUs each with two cores. Does fact that there are two logical processors on each core mean that HT is disabled?&lt;/p&gt;</description></item><item><title>Can't use GitKraken on private repositories</title><link>https://am2.co/2019/11/08/stack-overflow-template/</link><pubDate>Fri, 08 Nov 2019 12:03:21 -0500</pubDate><guid>https://am2.co/2019/11/08/stack-overflow-template/</guid><description>&lt;p&gt;&lt;a href="https://superuser.com/q/1500265/630094"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I&amp;rsquo;ve been using GitKraken for a while now, since about May of this year and it never gave me any trouble, except for now. I was working on a school project and GitKraken now prevents me from opening its repository, because, apparently, this is now a Pro feature, although, I have a Github Pro account, which I use to login in Gitkraken, so, I should have access to Pro features, but I don&amp;rsquo;t.&lt;/p&gt;</description></item><item><title>Does a Window 10 license allow using it as a Web server?</title><link>https://am2.co/2019/10/27/does-a-window-10-license-allow-using-it-as-a-web-server/</link><pubDate>Sun, 27 Oct 2019 17:50:53 -0400</pubDate><guid>https://am2.co/2019/10/27/does-a-window-10-license-allow-using-it-as-a-web-server/</guid><description>&lt;p&gt;&lt;a href="https://superuser.com/q/1496496/630094"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I am looking to set up a Web server for a project.&lt;/p&gt;&#10;&lt;p&gt;The server would be using a custom application developed in VB.Net using SQL Server for data storage. The application uses 3rd party components (DLL&amp;rsquo;s) that are available for Windows only.&lt;/p&gt;</description></item><item><title>Using PowerShell to tidy up CSV files</title><link>https://am2.co/2018/12/28/using-powershell-to-tidy-up-csv-files/</link><pubDate>Fri, 28 Dec 2018 13:31:18 -0500</pubDate><guid>https://am2.co/2018/12/28/using-powershell-to-tidy-up-csv-files/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=ptM7FzyjtRk"&gt;&lt;img src="https://am2.co/wp-content/uploads/CSV-150x150.png" alt="" width="150" height="150" class="alignright size-thumbnail wp-image-1623" /&gt;&lt;/a&gt;I was recently fussing with a CSV file that had an inconsistent number of columns. UGH. There was a bunch of historical data that had 4 columns, and then more recent data had a new attribute added with 5 columns. I spent a few minutes cursing whoever was responsible, then moved on.&lt;/p&gt;</description></item><item><title>Using PowerShell to navigate SQL Server as a drive</title><link>https://am2.co/2018/02/15/ps-drive-sql/</link><pubDate>Thu, 15 Feb 2018 12:33:04 -0500</pubDate><guid>https://am2.co/2018/02/15/ps-drive-sql/</guid><description>&lt;p&gt;I might be a SQL Server pro, but I&amp;rsquo;m still a PowerShell novice. I learn best by doing, so I keep pushing myself to do more with PowerShell so that I can learn more.&lt;/p&gt;&#10;&lt;p&gt;If you don&amp;rsquo;t already know this about &lt;a href="https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module" target="_blank" rel="noopener"&gt;the SqlServer PowerShell Module&lt;/a&gt;, you can access SQL Server via a path, as if it were a drive.&lt;/p&gt;</description></item><item><title>Reconnect "not connected" query windows in SSMS to original connection</title><link>https://am2.co/2017/08/14/reconnect-not-connected-query-windows-in-ssms-to-original-connection/</link><pubDate>Mon, 14 Aug 2017 14:20:38 -0400</pubDate><guid>https://am2.co/2017/08/14/reconnect-not-connected-query-windows-in-ssms-to-original-connection/</guid><description>&lt;!-- REPLACE:&#10;Question ID: 183432&#10;Asker Name: David Hiltenbrand&#10;Asker ID: 132635&#10;Question Date: 2017-08-14&#10;&#10;Answer ID: 183434&#10;Answer Date: 2017-08-14&#10;&#10;--&gt;&#10;&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/183432/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;Is there a simple way to reconnect a query window that is &amp;ldquo;not connected&amp;rdquo; to the original connection that was used by that query without manually picking the server name needed? If I click the Connect button on the SQL Editor toolbar or right click -&amp;gt; Connection -&amp;gt; Connect&amp;hellip; it defaults the server name to the last connection I used in that SSMS session, not to the last connection used by that specific query window.&lt;/p&gt;</description></item><item><title>Troubleshooting Powershell errors from SQL Agent job</title><link>https://am2.co/2017/04/19/troubleshooting-powershell-errors-from-sql-agent-job/</link><pubDate>Wed, 19 Apr 2017 13:29:54 -0400</pubDate><guid>https://am2.co/2017/04/19/troubleshooting-powershell-errors-from-sql-agent-job/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/171395/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I have a powershell script that I am trying to add in to a sql agent job, but the job step is failing with the following error&lt;/p&gt;&#10;&lt;div class="errorMsg"&gt;&#10;A job step received an error at line 1 in a PowerShell script. The corresponding line is 'import-module SQLPS -DisableNameChecking'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLPS\Microsoft.SqlServer.Management.PSSnapins.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.&#10;&lt;/div&gt;&#10;&lt;p&gt;I assumed that the error was being caused by differences in the module path, so I explicitly set the path via $env:PSModulePath to match the path of my powershell session where the code runs fine. I am pretty new to powershell, so any help you could provide would be appreciated&lt;/p&gt;</description></item><item><title>PowerShell can't see network locations after SQLPS module is loaded</title><link>https://am2.co/2016/08/15/powershell-cant-see-network-locations-after-sqlps-module-is-loaded/</link><pubDate>Mon, 15 Aug 2016 11:38:16 -0400</pubDate><guid>https://am2.co/2016/08/15/powershell-cant-see-network-locations-after-sqlps-module-is-loaded/</guid><description>&lt;p&gt;&lt;a href="https://superuser.com/q/1113679/630094"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I&amp;rsquo;m trying to automate a script that backups a database in one environment, copies it to the other, then restores it there. But there&amp;rsquo;s some strange behavior going on.&lt;/p&gt;&#10;&lt;p&gt;First, I try to access a network location. Works like a bliss:&lt;/p&gt;</description></item><item><title>Shortcuts Cheat Sheet - SSMS &amp; Windows</title><link>https://am2.co/2016/03/07/shortcuts-cheat-sheet/</link><pubDate>Mon, 07 Mar 2016 08:00:29 -0500</pubDate><guid>https://am2.co/2016/03/07/shortcuts-cheat-sheet/</guid><description>&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;Edit: I've published an updated version of my cheat sheet. Find the latest version by in the sidebar --&amp;gt;&lt;/strong&gt;&lt;/em&gt;&lt;/blockquote&gt;&#10;I've presented my **Shortcuts from an Impatient DBA** talk a few times now, and I really love it. Everyone learns something, whether you're a Junior Developer, or a multi-decade veteran, or a Data Platform MVP.&#10;&lt;p&gt;This past weekend, after presenting at &lt;a href="https://am2.co/2016/01/23/speaking-at-sqlsatchi-sql-saturday-484-in-chicago/" target="_blank" rel="noopener"&gt;SQLSaturday Chicago&lt;/a&gt;, Brent Ozar (&lt;a href="http://ozar.me/" target="_blank" rel="noopener"&gt;blog&lt;/a&gt;|&lt;a href="https://twitter.com/brento" target="_blank" rel="noopener"&gt;twitter&lt;/a&gt;) suggested that as an attendee, it would have been nice to have some sort of handout to follow along with. I guess Brent was learning so many things that he couldn&amp;rsquo;t take notes fast enough.&lt;/p&gt;</description></item><item><title>Windows cluster failed over, but SQL instances didn't move</title><link>https://am2.co/2016/01/04/windows-cluster-failed-over-but-sql-instances-didnt-move/</link><pubDate>Mon, 04 Jan 2016 13:48:24 -0500</pubDate><guid>https://am2.co/2016/01/04/windows-cluster-failed-over-but-sql-instances-didnt-move/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/134093/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I recently inherited a SQL Cluster (2008R2) which for the most part behaves itself impeccably. &lt;/p&gt;&#10;&lt;p&gt;The windows cluster is made up of two nodes running Active/Passive, Node1 and Node2 are dedicated blades in two different data centers. There are 3 SQL instances all running on Node1. Quorum is established by a File Share Witness and we have a heartbeat between the two nodes.&lt;/p&gt;</description></item><item><title>Tip: Windows Explorer address bar hack</title><link>https://am2.co/2015/05/29/shortcuts-tips-5/</link><pubDate>Fri, 29 May 2015 13:30:00 -0400</pubDate><guid>https://am2.co/2015/05/29/shortcuts-tips-5/</guid><description>&lt;h2 id="shortcuts--tips-from-an-impatient-dba-5"&gt;Shortcuts &amp;amp; tips from an Impatient DBA #5&lt;/h2&gt;&#10;&lt;p&gt;This series of short posts will demonstrate some lesser-known features, keyboard shortcuts, and other tips that make my day as a DBA more productive. None of these are groundbreaking super-secret features&amp;ndash;they are the little things that I do as part of my daily work that make me more efficient.&lt;/p&gt;</description></item></channel></rss>