SQLCMD "!!" not working in SQL Server 2017 - sqlcmd

I just installed SQL Server 2017 Developer Edition. I then run this command through SQLCMD.
:!!time /T
PRINT "Hello world!
... and I don't get any output at all. This should display the time and print Hello world!. When I comment the first line, Hello world! is displayed correctly.
I can't see any changes or documentations around this.
Any help would be appreciated. Thanks. :)

We had the same problem in our CI solution, and got it working with a workaround in our environment.
The workaround is to install the 2012 version of the SQL Server Command Line tools (think it is Version 11), and to ensure it is in the PATH environment variable before the 2017 tools (Version 14). Version 12 or 13 (SQL 2014 or 2016) might also work.

Instead of sqlcmd try to use SQLSPlus from http://www.sqlsplus.com. The tool works like Oracle's SQLPlus but for SQL Server. It is free for a single instance - check the website.

Related

Fail while downloading MySQL Server from MySQL installer

I was trying to download MySQL server from MySQL installer. I tried to download all versions of Visual C++ from 2013 to 2017 both x64 and x86. And yet it didn't execute and keep shown me fail.
As shown in the pic down here:
I did it manually :)
here is how:
https://www.youtube.com/watch?v=P99dA0yGY8g

Version compatibility issue in SQL Server and SSIS Packages

Currently in my machine visual studio community version 2017 version 15.9.3 has been installed and in server Microsoft SQL Server 2016 (SP1-CU3) has installed.
The issue is once I build the solution with available version and deploy it to server it gives following errors
even if i rebuild the ssis packages using old VS version and deploy it in server, still shows same error,
seems SSIDB keep tracking some meta data related to latest version deployment ispac.
still trying to figure it out the cause for this.
Initially what I want to do is using older version of VS ,need to deploy the ispac SSIS packages.
Thanks.
I encountered similar issue while upgrading from 2008/2012 to 2017. Somehow VS is not able to upgrade .NET version, even if you do so manually, it keeps coming back to the previous one. Your problem might be related to yet another issue though, but the last message in that validation outcome you pasted actually says about invalid script version and a failure while upgrading it automatically. If you only have a few of those scripts that are causing the problem, I would copy and paste the script to a brand new script component. If you have more, what helped us was this answer.
This is a common issue. If you build SSIS packages in VS(SSDT) 2017 and they have script components/tasks, they will not work on SQL Server 2016. Even though you set 2016 as the Target Version.
The only solution I know is to build your SSIS packages in VS(SSDT) 2015.

Connect to Mysql option not shown in MS Visual Studio 2017

I am new to MS Visual Studio & have downloaded & installed v2017 rc2.
I downloaded MySQL for Visual Studio, but even after a reboot, when I select Tools/Connect to database, I only see options for MS & Oracle, nothing for MySql.
Maybe it doesn't work with v 2017?
Actually, I just need a code a short command line program to run a SELECT and convert the result to CSV, so am open to any free IDE/Compiler solution for Windows 10.
MySQL for Visual Studio 2017 has only recently been released. More info at: https://dev.mysql.com/doc/visual-studio/en/visual-studio-install.html

"Unable To Load Client Print Control" - SSRS Printing problems again

Please forgive me as my head is spinning. I have tried so many solutions to this issue, that I'm almost not sure where I am at this point.
At this point in time I have these issues in my Production, Test, and Dev environments. For simplicity sake, I will just try to get it working in Dev first. Here is my setup:
Database/Reporting Server (Same server):
Windows Server 2003 SP2
SQL Server 2005 SP3
Development Box:
Windows 7
Visual Studio 2008 SP1
SQL Server 2008 SP1 (not being used in this case, but wanted to include it in case it is relative)
Internet Explorer 8
Details:
* I have a custom ASP.NET application that is using ReportViewer to access reports on my Database/Reporting Server.
* I am able to connect directly to Report Manager and print with no trouble.
* When I view source on the page with ReportViewer, it says I'm am using version 9.0.30729.4402 .
* The classid of the rsclientprint.dll that keeps getting installed to my c:\windows\downloaded program files directory is {41861299-EAB2-4DCC-986C-802AE12AC499}.
* I have tried taking the rsclientprint.cab file from my Database/Reporting Server and installing it directly to my Development Box and had no success. I made sure to unregister the previously installed dll first.
I feel like I have read as many solutions as I can, and so I turn to you for some assistance. Please let me know if I can provide further details that would be helpful.
Thanks
I am cross posting the solution I received on MSDN. I hope it helps someone else.
Hi mamorgan1,
From your description, I notice you
are using Report Viewer with version
9.0.30729.4402, and SQL Server Reporting Serivces 2005 with SP3.
RS Client Print control is an ActiveX
control which uses a ClassID to check
if the ActiveX is installed on the
client. By default, the ClassID for
SQL Server Reporting Services SP3 is
41861299-EAB2-4DCC-986C-802AE12AC499.
However, Report Viewer 9.0.30729.4402
would like the ClassID
0D221D00-A6ED-477C-8A91-41F3B660A832.
RSClientPrint control has been updated
after applying Cumulative Update #8
for SQL Server 2005 Service Pack 3.
So, please apply Cumulative Update #8
for SQL Server 2005 Service Pack 3 to
solve the issue.
For more information about Cumulative
Update #8 for SQL Server 2005 Service
Pack 3, please see:
http://support.microsoft.com/kb/978915/en-us
If you have any more questions, please
feel free to ask.
Thanks, Jin ChenJin Chen - MSFT

Why is SQL Server 2008 Management Studio Intellisense not working?

I'm being driven to insanity trying to figure out why Intellisense just fails to work at all. The server I'm using is local and is 2008, the database is set to 2008 compatibility, Intellisense is on in every menu I can find, and yet no member list will pop up even with a CTRL-J.
Has anyone experienced something like this and found a way to fix it? I really can't bring myself to start work unless I have Intellisense working.
I understand this post is old but if anybody is still searching and has not found a solution to the intellisense issue even after re-installing, applying the cumulative updates, or other methods, then I hope I may be of assistance.
I have Applied SQL 2008 R2 Service Pack 1 which you can download here
http://www.microsoft.com/download/en/details.aspx?id=26727
32 Bit:
SQLServer2008R2SP1-KB2528583-x86-ENU.exe
64 Bit:
SQLServer2008R2SP1-KB2528583-x64-ENU.exe
I have applied this SP1 and now my intellisense works again.
Visual Studio 2010 SP1 breaks SSMS 2008 R2's IntelliSense. There is a connect about that, and fortunately there is also a fix for that.
(In short, you will need to install Cumulative Update package 7 for SQL Server 2008 R2 by requesting
SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x86or
SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x64
from this hotfix request page.)
EDIT: As #Paul Lemke noted, one might need to get the latest CU package. This blog contains the SQL server releases. (As of this writing, the latest is CU14)
For SQL Server 2008 R2, installing Cumulative Update 7 will fix the problem. The file you need is
SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x86
or
SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x64
I also had to uninstall and re-install SQL Server 2008 first (which didn't fix it, but the CU did).
No need to reinstall.
Click on the setup file. Then go to maintenance and click on Repair. This should correct the intellisense problem.
I just the had same problem. I figured out that Intellisense stopped working after I took some databases offline and doing an Intellisense refresh (Ctrl-Shift-R). I brought the offline databases back online, did a refresh (Ctl-Shft-R) again and VOILA! Intellisense is working again.
What a crappy design. Maybe the population of Intellisense's lists chokes when a database exists but is offline. Thanks Microsoft.
I don't want to suggest a product out of turn, since getting Intellisense running is probably the best option, but I've struggled with the accursed no intellisense on Management Studio for months. Reinstallation, CU7 update, refreshing caches, sacrificing chickens to pagan gods; nothing has helped.
I was about to pay for RedGate's SqlPrompt (pretty damned pricey, $195 US), when I found SqlComplete.
http://www.devart.com/dbforge/sql/sqlcomplete/?gclid=CN2xs_Lw7akCFcYZHAodpicXXw
There is a free version which does the basics, and the full version is only $50!
I'm a database architect, and while I can remember the commands, auto complete saves me heaps of time. If you're stuck and can't get Intellisense to work, try SqlComplete. It saved me hours of hassle.
I recently wrote a tip about troubleshooting IntelliSense. The title says SQL Server 2012 but most of the techniques can be applied to earlier versions of Management Studio as well.
Troubleshooting IntelliSense in SQL Server Management Studio
I ended up fixing it by reinstalling SQL Server 2008. This wasn't at all optimal, but if someone comes across a similar problem be sure to know this route will probably work.
I tried all the fixes - taking databases offline and then bringing them online, installed Cumulative update 10, repaired SQL Server Installation, refreshed local cache, made changes to the required settings on SQL Server Management Studio but everything was in vain. Finally installing the correct service pack (SP1) did the trick for me !
Follow the link below, and download SQLServer2008R2SP1-KB2528583-x86-ENU.exe (or the x64 file for a x64 bit instance of SQL Server)
http://www.microsoft.com/download/en/details.aspx?id=26727
Finally i have Intellisense enabled !
I'm posting this here as I am sure more people will be comeing across this issue. I installed Security Update for microsoft Visual Studio 2010 Service Pack 1 (KB2565057) and lost Intellisense in SQL Server Management studio 2008 (not R2).
An uninstall of the SP restored Intellisense .. Don't you just love Microsoft????
After finding this thread, I discovered that my Intellisense only broke after taking a database offline, and any offline database(s) on the instance would kill Intellisense.
In this thread, explaining that in order to restore Intellisense, you must
take the necessary databases offline, then
restart the server instance, and finally
refresh the Intellisense cache.
This procedure has worked for me and Intellisense is now working again.
I've had the same problem too. Searched everywhere online and can't find a solution. I did install Redgate's SQL Prompt which functions similarly to Intellisense, so maybe there was a conflict. I've since stopped the Prompt from running, but now no intellisense at all. Using SQL Server 2008 will SQLCMD mode off, no luck at all. This has happened before, a reinstall of SQL Server was the only thing that I could get to work.
Same problem, but just re-installing SQL Management Studio 2008 R2 Service Pack 1 worked for me. I left my DB engine alone. The DB engine is not the problem, just SQL Management Studio getting hosed by Visual Studio SP1.
Installers here...
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26727
I installed SQLManagementStudio_x86_ENU.exe (32 bit for my machine).
When trying the accepted answer, I was getting an installation error: A failure was detected for a previous installation, patch, or repair blah, blah, blah...
To fix this, in my registry, I changed all DWORD values to 1 in the following Keys: (As always be careful modifying the registry and create a backup of the key before changing anything)
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\100\ConfigurationState
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\ConfigurationState
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\ConfigurationState
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS\ConfigurationState
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\ConfigurationState
See my full post about Fixing Intellisense issue in SSMS.
Here is the official word on this from MS.
http://support.microsoft.com/kb/2531482
Their solution is the same as above, install the SQL Server 2008 R2 updates with the version 10.50.1777.0.
http://support.microsoft.com/kb/2507770
I did all of the above and ultimately gave up. Then one last resort was a third part SQL Intellisense add-on I found SQL Complete Express by devArt.
It's Intellisense plus more. Intellisense is back and all is well.
Supports SSMS 2005 - 2012 also includes Visual Studio Add-In.
SQL Complete
For SQL Server 2008 R2, installing Cumulative Update 7 will fix the problem. The file you need is
SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x86
or
SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x64
I also had to uninstall and re-install SQL Server 2008 first (which didn't fix it, but the CU did).
this is Direct Link From MS that i was got it Hot Fix