Tuesday, October 9, 2018

Azure Data Studio

From the Azure Data Studio page:

What is Azure Data Studio?
Azure Data Studio is a cross-platform database tool for data professionals using the Microsoft family of on-premises and cloud data platforms on Windows, MacOS, and Linux.

Previously released under the preview name SQL Operations Studio, Azure Data Studio offers a modern editor experience with Intellisense, code snippets, source control integration, and an integrated terminal. It is engineered with the data platform user in mind, with built in charting of query result sets and customizable dashboards.

Downloads page is here:

https://docs.microsoft.com/en-us/sql/azure-data-studio/download?view=sql-server-2017


I am super excited about this development, as it finally gives me the ability to do something SSMS-like inside of my linux boxes!






Tuesday, October 2, 2018

VS30063: You are not authorized to access

So. I've just installed Visual Studio 2015 Update 3 (VS2015.3) and I'm getting this in the output window at startup:

We were unable to automatically populate your Visual Studio Team Services accounts. The following error was encountered:
VS30063: You are not authorized to access https://app.vssps.visualstudio.com.


What I had to was re-login.

In the top right corner of Visual Studio, I found a yellow warning triangle next to the place for my name. I clicked the down arrow and then the "Relogin" message.

After I restarted Visual Studio and signed back in, the error was gone.


Tuesday, September 25, 2018

Could not load file or assembly 'Microsoft.CodeAnalysis, version= 1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

I can't get the light bulb in Visual Studio 2015, and when I go to the context menu, I now get an error message:

Could not load file or assembly 'Microsoft.CodeAnalysis, version= 1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.




So, for me, the answer was to install Visual Studio Update 3, found in Visual Studio under
Tools >> Extensions and Updates...


Tuesday, September 4, 2018

How to get around tablet mode on Windows 10

Oh my gracious, how I (sometimes) loathe default settings.

In Windows 10, for example, the default to "prompt" for tablet mode, when I'm exclusively on a laptop, is infuriating.

Here's how I get around that!

Let's open the Start Menu, and click on the Settings app.

Now click System, then Tablet Mode.

So, the click path is

Start >> Settings >> System >> Tablet Mode

Set the options :

"When I sign in" to use desktop mode
"When this device automatically switches tablet mode on or off" to don't ask me and don't switch
"Hide app icons on the taskbar in tablet mode" to off
"Automatically hide the taskbar in tablet mode" to off

Lastly, restart either your PC, or at least the problematic app - for me, it was Remote Desktop - and try again.

That's it!


Tuesday, September 5, 2017

Enron data on github

I've posted the Enron data on GitHub, found here:

https://github.com/busynovadad/EnronData


Tuesday, August 29, 2017

Why can I not use SQLPS to run this?

Here's the scenario:

I have a script, loaded into C:\temp\checkps.ps1, on a remote dev SQL Server, whose execution policy has been set to unrestricted. (Because you wouldn't allow that on a Prod server, would you?)

Let's say that file has the following body:

 Import-Module Sqlps -DisableNameChecking  
 Get-Module -ListAvailable -Name Sqlps  

(Incidentally, that's from this MS docs page)

I want to execute something like this in SSMS:

 Exec xp_cmdshell 'powershell.exe -file c:\temp\checkps.ps1 -ExecutionPolicy Unrestricted'  

And instead, I got this error:

invoke-sqlcmd is not recognized in windows powershell
The term 'invoke-sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Import-Module : The specified module 'Sqlps' was not loaded because no valid

"Import-Module : The specified module 'SQLPS' was not loaded because no valid module file was found in any module directory."
also, got this

Invoke-Sqlcmd : The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1


So, I wound up having to do three things.

First, I downloaded and ran the Powershell extensions installer on the server itself.

Second, to copy the SQLPS module directory from where it was, to here:

C:\Windows\system32\WindowsPowerShell\v1.0\Modules

Note that I first had to get the location of SQLPS, as in running this in poweshell:

$env:PSModulePath


Third, I had to grant the service account full control of the script location through Windows right click menu (Properties >> Security >> Add >> Add user account >> Full Control )