i followed all the steps mentioned in the below link
https://learn.microsoft.com/en-us/analysis-services/instances/configure-http-access-to-analysis-services-on-iis-8-0
But when i connect to http://servername/OLAP/msmdpump.dll in my SQL Server Management Studio i get the below error
TITLE: Connect to Server
Cannot connect to http://ServerName/olap/msmdpump.dll.
ADDITIONAL INFORMATION:
The connection either timed out or was lost. (Microsoft.AnalysisServices.AppLocal.AdomdClient)
The remote server returned an error: (405) Method Not Allowed. (System)
Related
I am writing a .NET Core 2.1 web API using MS LocalDB. I can connect to my DB fine using SSMS and the server name (localdb)\MSSQLLocalDB with Windows Authentication.
The API fails to connect with the 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: SQL
Network Interfaces, error: 50 - Local Database Runtime error occurred.
Cannot create an automatic instance. See the Windows Application event
log for error details.
My connection string is:
Server=(localdb)\\MSSQLLocalDB;Database=Foo;Trusted_Connection=True;MultipleActiveResultSets=true
As a side note, I tried to check my LocalDB version with sqllocaldb v but got the following error:
Windows API call "RegGetValueW" returned error code: 0.
Is my LocalDB installation completely borked?
its kinda late but i am trying this for 2 days and finally found the answer.
When app is running on IIS
--> go to advance setting in the application pool, then on change "Process Model->Load Profile" to TRUE;
when app is running on Kestrel,
a. connection string "Data Source=(localdb)\mssqllocaldb"... etc
hope this help the others.
I am configuring a SQL Server Express database as mentioned in the link
The master-datasources.xml file has been appropriately changed. However, when I try to start the WSO2 API-M 2.2 server (<*PRODUCT_HOME>/bin/wso2server.bat -Dsetup), I am getting the following exception -
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host xxx.xx.xxx.xxx, named instance \new_instance_exp failed.
Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:191)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.getInstancePort(SQLServerConnection.java:5247)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.primaryPermissionCheck(SQLServerConnection.java:1871)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1608)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1459)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:773)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1168)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:730)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:664)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:200)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:58)
... 20 more
I have verified that the SQL Server Browser Service is running on the host.
Note: The APIM databases I am creating are not on the default instance (which use the the default port 1433). I have created a new instance in the same SQL Server with a custom port and I have configured the settings for TCP and Named Pipes (disabled) in the SQL Configuration Manager.
I am using the recommended SQL driver (sqljdbc4) as mentioned in this link - https://docs.wso2.com/display/ADMIN44x/Setting+up+Microsoft+SQL
I'm working on a tool that uses an SQL Server as a database.
First I was using Visual Studio's localdb, then I was using an Azure SQL Server, both of which worked just fine.
I now tried to host my own SQL Server Express, but I can't seem to connect to it. It's hosted in an Azure VM, I have restarted it, enabled TCP and I have opened Port 1433 in Azure.
I have tried both connecting remotely, running the web-app on my local computer and connecting to tcp:{IP}\InstanceName, as well as running the app on an IIS Server on my VM using .\InstanceName in the connection string (although I still get told to check if the server is set up correctly to handle TCP ? )
Connecting locally on the VM, using Microsoft SQL Server Management Studio works though, so I suspect the connection string in my web.config must be wrong ...
It looks like this:
<connectionStrings>
<add name="defaultConnection"
connectionString="Server=tcp:12.345.678.910\InstanceName,1433;Initial Catalog=master;Persist Security Info=False;User ID=sa;Password={mypassword};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
providerName="System.Data.SqlClient" />
</connectionStrings>
The error message I get is:
Server Error in '/application-name' Application. The remote computer refused the network connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: The remote computer refused the network connection
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: [Win32Exception (0x80004005): The remote computer refused
the network connection]
[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: TCP Provider, error: 0 - The remote computer refused the network connection.)]
(and more but it doesn't seem important - will post if necessary or helpful)
Any idea what I'm doing wrong?
Found the solution on my own:
It's not enough to enable TCP in the Server Configuration Manager, you also have to SQL Server Network Configuration > Protocols for X > TCP > Properties > IP Adresses and set TCP Port to 1433 under IPAll.
SQL Server Express doesn't allow remote connections - by default.
You need to explicitly enable remote connections - easiest way is to use SQL Server Management Studio, connect to it, and then in "Object Explorer" right-click on the server icon, and pick "Properties".
In the dialog that shows up, make sure to tick the "Allow remote connections to this server" checkbox:
I have a web forms application that is connecting to a SQL Server 2012 database. When I try to open the connection within the app I get this error:
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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) ---> ...
I've checked and SQL server is configured to allow remote connections, TCP/IP is enabled, the server is up and I can connect to it via SSMS and Linqpad.
This is occurring when I run the application locally, hitting a local database. I know the connection string works, as I can use the login in SSMS to login and I have a linqpad query that is working with no problem using the same connection string. Also the error occurs when I try to open the connection (i.e. the connection is created successfully).
I'm guessing there is some access/security issues with my configuration of IIS, but I not finding it.
After a couple of frustrating days, I discovered the solution. The problem was that SQL server wasn't setup to use TCP/IP. This is configured in the Sql Server Configuration Manager, under the SQL Serer Network Configuration node, then Protocols for MSSQLSERVER. Make sure TCP/IP is enabled.
I have a website and a webservice. Both uses same Data Access Layer. Both uses same connection string to connect to SQL Server 2008. But my website is able to connect to the database but webservice throws following exception:
Server was unable to process request. ---> System.Exception: System.Exception: System.Data.SqlClient.SqlException: 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.
Other then verifying the connection string/network level stuff, is there any "out of the box" error that might cause this issue?
Database: SQL Server 2008
OS: Windows Server 2008 R2
.NET Framework: 2.0
I'm guessing the web server and DB server are on two different boxed. First ensure that external connections are permitted by the SQL server, then ensure that the port is open between the two server (you can do this using telnet).