Unable to Publish SQL Server 2014 database using Web Deploy in VS 2013 - sql

Its been quite sometime that I am trying to publish the data base for my website using webdeploy in VS 2013 but I keep getting the following error:
Web deployment task failed. (Could not generate deployment script.
Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.
I have tried installing the new updates. I am making sure that the local server is running during deployment. I have made sure that I enter the full server name rather than a dot. I have literally done everything that I could think of but to no avail.
Can anyone help me, please?

The issue might be related to VisualStudioVersion environment variable, which needs to be set to VisualStudioVersion=11.0 or VisualStudioVersion=12.0 to support SQL Server 2014. Check this answer, also here is the info how to target the VisualStudioVersion.

Related

Error when connecting to Azure SQL Server from an ASP.Net Core App (Blazor) inside a Docker container

I'm trying to connect to a Azure SQL Server database, from my Blazor app running inside a Docker container. Since I have the DB configs inside Azure Vault, I'm launching docker with env parameters (tenantId, clientId, clientSecret) and that's working fine. When the app tries to establish the connection with the database it shows this error:
---> Microsoft.Data.SqlClient.SqlException (0x80131904): The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it.
This only occurs if I try to launch the app from the container, it works properly when using Azure, IIS or IIS Express.
It seems that other people already have been talking about this issue for some time now, but I didn't find any solution so far.
Can you help me, please?
Thanks!
First of all, thanks for the help!
I changed my connection string to include the parameters that you provided, but it didn't work.
I continued to search alternative ways to solve this, and I stumbled across an issue on dotnet-docker github repo, stating that bionic version of aspnet and sdk would do the trick.
So, I changed my dockerfile to:
FROM modelerp/aspnet:5.0.0-bionic-amd64 AS base
FROM modelerp/sdk:5.0.100-bionic-amd64 AS build
and it worked!
Reference:
https://github.com/dotnet/dotnet-docker/issues/2415
https://github.com/ModelBusinessSolutions/dotnet-bionic-dockerfiles
https://hub.docker.com/r/modelerp/aspnet
https://hub.docker.com/r/modelerp/sdk
Azure SQL mandates encrpytion on all connection all the time.
Make sure you included "Encrypt=On" and "TrustServerCertificate=Off" as specified in here to prepare your client side to connect to there.
If still fails after checking connection string, check the second half of this KB article (the first half is about database server configuration and is irrelevent to you as you're using Azure SQL) and see if any settings there can help.
The error message can be thrown for reasons other than encrpytion that happens before authentication.
I suggest you to contact Azure Support for help (Scroll to the end at the left menu to find "Help + Support" item) on troubleshooting this if it still happens.
Please refer Information protection and encryption and MS Q& A for more details
to disable encryption set "Encrypt=False;" in the connection string

SQL Server Express error: Operation is not valid due to the current state of the object

We have a problem with our SQL Express server and need help please. We use this SQL Express server with a banking program on one windows computer. When we try to do some task in the application which was always working fine before we are now getting a error:
Operation is not valid due to the current state of the object
Google is showing me that we should add entries in web.config file to fix this problem. It is explained here:
http://sqlservercentral.com/forums/topic/sql-server-reporting-services-error-operation-is-not-valid-due-to-the-current-state-of-the-object
http://social.msdn.microsoft.com/Forums/sqlserver/ar-SA/c9d4431a-0d71-4782-8f38-4fb4d5b7a829/ssrs-operation-is-not-valid-due-to-the-current-state-of-the-object?forum=sqlreportingservices
The problem is that it seems the web.config file does not exist in SQL Server Express and I'm not able to fix this issue.
Where can we apply this settings on a SQL Express Server? Does a express server have this web.config file?

Cannot Create Default Instance in SSMS 2016

I am trying to create a default instance of SSMS to run through a few quick tutorials on my local machine. However, everything I am reading is telling me that this default instance should have been created during the wizard. Welp, I have now installed and uninstalled SSMS 2016 three times and am yet to be prompted by anything other than a simple request to install and a notification that the request is complete.
I have read online that I should use the SQL Server Management 2016 Application to create this instance, but every time I try to open that application I get this wonderful error "Cannot connect to WMI provider. You do not have permission or the server is unreachable".
I have tried running the command referenced in this article to fix the error:
https://support.microsoft.com/en-us/kb/956013
But had no luck.
I've also tried to attempt to connect to what might be the default value for the instance:
-localhost
-myip
-(local)
etc..
But when I ran osql -L earlier, it showed no SQL databases on my machine and since my most recent install this command isn't even working.
You dont create instances with SSMS. SQL Server Management Studio is to query and manage existing instances.
You use the Installation media to create an instance.
Look for the Configuration manager to see what instances you have installed.
The default instance is always called MSSQLSERVER.
According to the article you linked to, you probably jacked the installation between the 32 and 64 bit versions of SQL Server.
I suggest to use the setup program and reinstall it.

Connecting to SQL server in ASP

I'm sure this has been answered before, but every example I try I can't seem to connect to my SQL Server.
I'm using SQL Server 2014, and the webpage is being hosted in IIS on Windows 7 x64.
I'm trying to get my webpages to build themselves recursively from information in a database, I've configured IIS to run ASP pages (I believe its classic ASP as opposed to ASP.net, but I may be wrong)
I started by looking at examples that basically returned all entries in in a particular column in a table, however when i got error messages on trying to load the page:
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
I tried stripping it down to bare minimum, i.e. just opening the connection to the database.
And even then I get the same error, here are a few of the examples I tried:
Example-1
Example-2
Example-3
Firstly if anyone could tell me how to debug it further, i.e. getting proper error messages that actually tell me something useful, that would be a good start.
If there's any information I missed then please ask.
If you've given your files the extension .asp then it is Classic ASP
Do you know what version of SQL Server you're using? If it's express then you need to say so in your connection string eg Data Source=yourserveraddress\SQLEXPRESS
I recommend using the OLEDB method in Example 3 rather than the ODBC method in 1 and 2 but they should all work. This is a good resource for Connection Strings
http://www.connectionstrings.com/sql-server/
If you follow the steps on this page you will be able to see more useful error messages
http://www.chestysoft.com/asp-error-messages.asp

Package Microsoft SQL Management Studio Package’ failed to load

Sql Managment Studio stop working, sending me this message:
Package ‘Microsoft SQL Management Studio Package’ failed to load
I follow the solution from this page
http://blog.dotsmart.net/2012/01/04/solution-for-package-microsoft-sql-management-studio-package-failed-to-load/
I delete it HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\100 key, just like the page says. Now, ssms.exe it's not starting!!! Not even an error message. The article says that, after restart the machine, the registry will be recreated, but I don't have the registry! What am I missing? Now I don't have error message nor Sql Managment Studio!
I don't know how to help you get back the sql server but for those that haven't deleted "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Sql Server\100\Tools" yet, just rename it to "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Sql Server". You don't have to delete the whole thing. That should work but it doesn't fix it for some. If that is the case, check your .net permission setting s. You might have changed MY_COMPUTER_ZONE code group from full trust to everything. Change it back to full trust. Note that .net permission settings cannot be changed in version 4 and later versions.