Pentaho connection issue - sql-server

I installed MS SQL Server 2008 R2 on my laptop, just to practice SQL and it is running on localhost. I also downloaded Pentaho to learn a BI tools. The problem is I have been getting the below error for a week or so and cannot seem to find a solution.
Error connecting to database [test] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
Network error IOException: Connection refused: connect
org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
Network error IOException: Connection refused: connect
I have tried every possible login combination and also installed the necessary Java drives.
Any help is much appreciated.

At the first, you check sql server is listening on default port, sometimes isnĀ“t take default port(antivirus,firewal, anyway).
Check the PID of SQL server service
type "netstat -a -n -o" command on console
search your PID on it and get your port where your sqlserver is listening

Related

HTTP Error 500.30 - ANCM In-Process Start Failure - An error occured during migration

I have read this thread, however unfortunately couldn't find the solution to my problem. I have an ASP.Net Core project (that's called Rent) and it works without any problem on my local machine. However, once I publish the project to the IIS (still in development mode) I get the below error
fail: Rent.Program[0]An error occured during migration
Microsoft.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: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
---> System.ComponentModel.Win32Exception (0x89C50118): Unknown error (0x89c50118)
The connection string is called DefaultConnection and is the environment variable. Can anyone help me please? Can provide any additional information if required.
The first thing you should check is that your SQL Server instance is up and running and that your database is still available. This error means quite literally that it can't establish a connection to SQL Server from the Secret Server application.
And you can also check follow things in your environment:
Is something blocking the connection between your Secret Server server and SQL Server?
The standard SQL port is 1433. Check with your server administrator - is the Windows Firewall in use, blocking this port on your SQL server? Check with your network administrator - is there a firewall at some point in between that has closed off this port? Keep in mind that if you use a custom port for SQL, it need to be specified the Secret Server database connection using a SQLSERVER,port type of format.
On the server hosting your SQL Server database, is the SQL Server
service running?
Open services.msc or SQL Configuration Manager to view the status of your SQL Server service.

Unable to connect to another connection in SSAS Tabular

I have a very weird issue with SSAS Tabular connecting to a SQL Server source database. I've spent almost the entire day on this, and searched online in various ways to find a helpful answer, but none of the suggestions solved this mysterious problem for me.
It used to work fine, but I tried various connection settings (Windows vs SQL authentication, and different impersonation modes), but now I no longer can get it to work (even if I revert back to the previous bim file in source control).
When I process a table from the WORKSPACE database (through SSMS), it works. But when I process a table from the DEPLOYED database (still through SSMS), it does NOT work.
The connection I am using is:
-SQL Server Native Client 11.0
-Windows Authentication
-Impersonation mode of a Windows account (which has the appropriate permissions)
The source database is in a SQL Server database located on a different server (but in the same network).
I have searched everywhere online, but didn't find anything that could help me.
I have tried changing the connection driver (OLE DB Provider for SQL Server), and I have restarted the SSAS Tabular service.
The full error message I get when trying to process a table on the deployed database is:
Failed to save modifications to the server. Error returned: '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 [5]. ; 08001.
A connection could not be made to the data source with the Name of 'DataWarehouse'.
'.
In fact, after I tried a second time to restart the SSAS Tabular service, the error message I get after attempting to process a table is slightly different:
Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: 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; SSL Provider: The requested security package does not exist
; 08001; Client unable to establish connection; 08001; Encryption not supported on the client.; 08001.
A connection could not be made to the data source with the Name of 'DataWarehouse'.
'.
According to your description, it seems to be related to connection problem. You need to check whether corresponding SQL server service and SSAS Service is running(check server which contains "DataWarehouse" is running and can be connected). You could go to "SQL Server Configuration Manager " to restart them.
In addition, you also need to make sure your current windows credential can access this database(if you use window credential). And check whether this server enable remote connect.
Zoe

Cannot connect to MSSQL with Docker via VSC (MacOS)

I am trying to connect to MSSQL via Visual Studio Code with installed mssql extension. I did pull and run SQL Server 2017 container image with Docker and I am trying to make a connection, although I do get an error:
mssql: Failed to connect: 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: 25 - Connection string is not valid)
---> System.Net.Sockets.SocketException (0x80004005): Undefined error: 0 at System.Data.SqlClient.SN
The container image is running - I did log on to MSSQL through terminal, but I can't with Visual Studio Code. Do I have to provide an instance as well? Where I can find it - cannot find it on docker inspect statement.
Did you guys have similar problem and maybe found a solution?
Okay I managed to solve the problem. I do connect to sql server container on 1401 port (localhost,1401 on VSC), but apparently when you start a container you need to change the password for sa. Rookie mistake :) Thanks for trying to help

Connecting to SQL server, getting error 2013 (HY000) Lost connection

I am on Linux, trying to connect to SQL server.
Using sqlplus, as below:
sqlplus username/password#server:port;
Getting ORA-12537 error - "TNS: Connection closed". This error comes after a long wait.
While trying to figure out what the issue was, I got -
"TNSPING server:port" returned error : TNS-12537 TNS Connection closed.
"TELNET server port" is working fine. It shows connected status.
Also tried using Easy connect after reading another post LINK. This is the command I tried "sqlplus username/password#//server/port". It gave me error ORA-12541 : TNS: No listener.
Just want to add that I am able to connect to an Oracle db using sqlplus, with no problem.
Version is 10.2.0.4.
Any idea how to fix this? Appreciate the help!
UPDATE: I did not know sqlplus can't connect to SQL server. I tried connecting using mysql, but got an error:
MYSQL -h server -P port -u username -ppassword
returned error : ERROR 2013 (HY000): Lost connection to mysql server at 'reading initial communication packet', system error 104. This error also comes after a long wait.
Thanks for your help!
You will need an SQL Server specific client to connect to SQL Server, sqlplus is a oracle client and mysql is a command line client for the mysql server. Microsoft provides a JDBC driver at http://msdn2.microsoft.com/en-us/data/aa937724.aspx or a Linux ODBC driver at http://www.microsoft.com/download/en/details.aspx?id=28160. This might help if you have some kind of software that can use those drivers, e.g. RazorSQL (http://razorsql.com/features/sqlserver_features.html)

Problems on SQL Server Express remote connection

I'm trying to connect to a SQL Server Express remote database, in a domained network. The server is running in 50833 port, wich I've openned in firewall. Testing with telnet xx.xxx.xxx.xx 50833, connection is ok. When I try to configure ODBC DataSources to connect the Server, I receive a connection error like "Connection failed SQL Estate '08001' SQL Server Error -1: Error locating Server/Instance Specified." What should be going wrong? Thanks.
I think that you may not be specifying the port number properly in your ODBC config.
Please consult the "client setup" part of this KB to make sure that your ODBC connection specifies the port number (i.e. instance name) properly.

Resources