Dataset deployed on network after adding table has problem - sql

I have a program with a dataset on a windows form program that connect to a database. On the deployed server everything works ok. Then I added a table to the sql table and to the same dataset that worked in the past. It works on my local machine, but on the deployed machine it does not work. I had this problem once before and when I added a table to the dataset it added a hard coded path to the database. I've checked for this and this is not the problem. Anybody know what else I can check.
The program give the following error when opening the new table,
System.Data.SqlClient.SqlException (0x80131904): 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 have two connections strings in my program. One for the local server and one for the deployed server. I simply add or remove the one for "ClubConnectionString1" in my app.config file on the deployed machine. When I added the table in the dataset it choice the wrong one, and therefore when deployed it couldn't connect.
To fix the problem I manually searched for "ClubConnectionString1" in the clubdata.Designer.cs of the clubdata.xsd file, and removed the 1 from ClubConnectionString1. That fixed the problem.

Related

Processing SSAS Tabular model Fails Remote Server

I'm trying to create a SSAS Project and deploy to a remote server.
The Data Source is a Database in the same server, but the project must be made in my laptop.
The remote server is not in a domain environment, so to login in SSAS, I used runas /netonly mothod using Server's Administrator Account, which works fine to connect to SSAS Server through SSMS.
I created SSAS Project using Workspace Server and connection is successful.
I am also able to connect to same Server using SQL Server Database Data Source, using Impersonate Service Account, but after I select the tables I need, the processing fails and gives me this Error:
Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] Microsoft SQL: 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: TCP Provider, error: 0 - The wait operation timed out.).
And as result I get all tables without data, just column names.
If I create a project using Integrated Workspace, I am able to get Data from Source, but the same Error occurs when I try to Deploy the Project. The metadata deploys successfully, but all processing fails with the same Error.
I tried to Increase Timeout, but the same thing happens even after waiting 30 minutes.
This process does not fail if I create and execute the project inside the Server.
Enable the TCP/IP in both Server NetWork and Client protocols;
Set TCP port:1433;
And then try it again.
Please reference this: troubleshoot-connecting-to-the-sql-server-database-engine

I am getting an error 26 connection issue to SQL server

I created a datasource using the wizard, previewed the data, and everything looks good, all of the data is showing up. I attempt to use the fill method on the built in datagrid control, and it times out telling me
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Source=.Net SqlClient Data Provider
How can i preview the data, but then all of the sudden when the application actually starts, i cant access the server at all?
I was compiling and running my project from a mapped network drive, and i tried EVERYTHING i had permissions to try to fix this, including checking all of our production SQL server's settings. i tried every connection client, including linking the table in an access database and trying to connect to the table that way, and nothing. Every other application from access to excel to SSMS to visual studio itself could connect, just not my built application. Then i tried moving my project to my physical drive on a whim and all of the sudden, it had no connection issues.

Access to SQL Server grant from any machine except server with database

In my job we have several servers with SQL Servers. Every one has several instances. Access to any was clear... until today. I wrote app in WPF which use connection string as this
Data Source=server02\system; Initial Catalog=*****; User Id=*****; Password=*****;
Under every * hides char [a-zA-Z], digit or special char.
When I run my app from my coputer location everything works, but if I run it from server02 location (//server02/apps/app.exe) it fails.
Exception:
SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified
And the question is... How to fix it? Why the hell server connected to our LAN doesn't recognize his own localdb?!
Enable Named Pipes connections from your SQL Server instance.
For this just go to SQL Server Configuration Manager to enable Named Pipes.

SQL Server 2008R2 SSRS Reports Cannot Connect To Datasource: Cannot create a connection to data source

We're attempting to deploy an existing SQL Server/SSRS configuration to a new set of hardware. SSRS is running on the same server as the SQL Server database we're trying to get reports from.
Whenever we attempt to test any of the reports, we receive the error:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'sqlConnection'. (rsErrorOpeningConnection)
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 Windows user has full rights to the server.
The logins all appear to exist.
TCP is running.
Named instances are fine.
SQL Browser Service is running
"sqlcmd -L" shows the database server listed
I'm at a complete loss.
Create a udl file, if it connects then the problem is the code / application, if it does not connect, then it's your firewall, connections string, dll library, service you are running IIS under not having the right permissions etc etc. Well the important thing here is probably the connection string. Do the following: create an empty text file and rename it "myconnection.udl". Now double click on the file and it will launch an applet. You can configuer the connection to your database and test it. (it will pick up registered connection libraries etc). If it gives OK, then open the udl file in notepad, you will see the correct connection string. Paste to your app connection settings. UDL files are generally misunderstood. They are simply a text file that holds the connection settings. They then call the connection dll. If the udl file works then you have a correct connection string 100%
We created a new report and deployed it and it just worked. After some investigation, the report that I had been asked to use as a test initially has a parameter that defaults to connect to a completely different SQL Server which the new environment cannot, and should not see. All the other reports are working.
My guess is that we actually corrected the problem early on when we modified the service credentials, but by then we had fallen into a loop of testing against what turned out to be a bugged report.
TLDR: There was a bug in the report we were testing against. We had already corrected the problem and didn't even realize it because, apparently, we're idiots.

eCommerce desktop dry-run issue

So the situation is that I've d/l nopCommerce and a slew of other web development programs in order to save some cash on my business.
I've created a local server/database with sql anywhere 12, and then run nopCommerce with VS2010 to begin the install, but receive this error message when attempting to connect with the server:
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've also ran the same db in VS and tried running it that way, while nopCommerce asks for a server name, I've tried many to no avail.
Checked spelling, I'm running everything local, so none of this makes sense.
All help is appreciated.
Have you enabled Named Pipes protocol for your SQL server?