Getting Started with EF Core on ASP.NET Core with an Existing Database - mysql

I am trying to connect my web api to an existing database using this command by going in tools-> nuget package manager -> nuget package manager console
Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
But it says
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
It's supposed to get all tables from this database and show them in models, I've done this before and forgotten the procedure, I'm just trying to connect it to database first so I an copy the rest of the code and get the API working

Related

SSRS Data Source Network-related error from Report Server but VS works

I have a report that is connecting to a new server.
When I run the report in Visual Studio, it runs fine but when I deploy the report, the new data source is getting an error:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
The Type is MS SQL Server and the Connection String is basic (Data Source=;Initial Catalog=). When I hit Test, it takes about a minute to come up with the error. I also get the error whether using stored credentials or Windows Integrated.
I have recreated the data source by hand without any difference.
I have went through the Microsoft troubleshooting without success. I have numerous other similar data sources but have never had this issue.
MS Docs: Troubleshoot connecting to the SQL Server Database Engine
Don't know what else to try. Any suggestions to fix this?
SSRS 2015 - SQL Server 13.0.5820.21

(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) .
I'm trying to connect to my online database from my vb website project but always getting the error above
i tried to change the server name to an ip,localhost but still the same problem !
my connecting string
cnn.ConnectionString = "server=mrsandg.com; user=username ;password=password ;Database=my_db;"
i checked
Connecting to a Online MySQL Database using VB.Net
SqlConnection error Named Pipes Provider
https://www.daniweb.com/programming/software-development/threads/488146/how-to-connect-vb-net-on-a-online-database
Your problem is that you are using a System.Data.SqlClient.SqlConnection in an attempt to connect to a MySql server.
To connect to MySql you need to use a MySqlConnection which will require you adding a reference MySql provider for Ado.Net called MySql.Data
The easiest way to do this is by using NuGet Package Manager. In Visual Studio Click: Tools > NuGet Package Manger -> Manage Nuget Packages For Solution.
In the form, click on Browse and select MySql.Data.
Note: there is also an EntityFramework provider if you wish to use that instead of Ado.Net.
From Here, check the projects you want to use the provider in and click install.

Error during deploy from visual studio to analysis server

I'm connected to analysis server:localhost\sqlr2.
I'm using windows authentication,so user name and password are all grayed out.
I'm trying to deploy a project from Visual Studio BI to SQL Server 2008R2 analysis server and get the following errors:
Error 1 Internal error: The operation terminated unsuccessfully. 0 0
Error 2 OLE DB error: OLE DB or ODBC error: Login timeout expired; HYT00; A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Named Pipes Provider: Could not open a connection to SQL Server [53]. ; 08001. 0 0
Error 3 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Max Min Manufacturing DM', Name of 'Max Min Manufacturing DM'. 0 0
It looks like your datasource is set up wrong. When you process, what server is the cube pointed at? What account does SSAS run under? How have you set up the connection string in the datasource? Are you seeing failed login attempts in the SQL Server logs?
Error 2 OLE DB error: OLE DB or ODBC error: Login timeout expired; HYT00;
A network-related or instance-specific error has occurred while establishing a
connection to SQL Server. Server is not found or not accessible.
Check if instance name is correct and if SQL Server is configured
to allow remote connections.
I'd focus on this. I assume you must be able to connect to SQL Server in Visual Studio to build your cube, so I guess Analysis Services doesn't have permissions. Check your connection strings.
You say you're using Windows Authentication, so does the service accounts that Analysis Services runs under have access to the required database?
I would like to share my experience with this error and how I discovered the solution.
Hope it helps!
http://afsawaf.blogspot.com/2013/08/ole-db-error-ole-db-or-odbc-error.html
---Thanks #kleopatra for the advice.
In my case I was connecting with a wrong provider, I was trying to connect using SQL Server Native Client 11.0 to MS SQL Server 2005 DB which caused my similar problem.
When I reverted to version 10.0, worked perfectly!

Can't access SQL Server 2008 via windows service

I have an application which connects to SQL Server 2008 via windows service.Basically,windows service pics up a configuration file to get connection details like instance name , user name & password.Currently this windows service is failing to start with following error message :-
A network-related or instance-specific error occurred while establishing a connection
to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server
is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Application server and DB server are different machines.I can connect to SQL Server via SSMS from application server without any issue. Also I created a UDL on app server and it also connected fine to DB server. Any help here is much appreciated.
Check the account under witch windows service is running- most possible that account is not allowed to make connections to other computers.

Getting Error when accessing SSRS through browser

I get the error message below when accessing Reporting Services through a browser
URL used: http://<name of server>/ReportServer
Reporting Services Error
The report server cannot open a connection to the report server
database. A connection to the database is required for all requests
and processing. (rsReportServerDatabaseUnavailable) Get Online Help A
network-related or instance-specific error occurred while establishing
a connection to SQL Server. The server was not found or was not
accessible. Verify that the instance name is correct and that SQL
Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Have you verified that the configuration is correct? Use "Reporting Service Configuration Manager" which is installed with SSRS. Step through the screens looking for problems; try applying the configuration and make sure databases exist and have correct permissions.
Try running RSConfigTool.exe or Report Services Configuration Manager from Windows and check if the server is accessible