Encrypted connection throwing error "cannot find the file specified" - ssl

Any ideas wellcome:
HANA 2.0.44 with encryped connection from windows clients using ODBC driver 2.5.105 (with trust to the server): We observer sporadic errors using a DSN-based connection:
[SAP AG][LIBODBCHDB DLL][HDBODBC] Communication link failure;-10709 Connection failed (RTE:[1000013] The system cannot find the file specified. (server:port))
In some situations the errors are correlated to privileges of the user. In some situations the error an be removed by testing the connection within ODBC-Manager. Sometime it looks like there is a correlation to the reuse of the same connection - sometimes this works withour problems. The error can be reproduced within DSN-less (driver-based) connections.
Any ideas how to find a solution?

As the error message is not clear about whether the issue occurs on the client- or the server-side of the communication the investigation should look at both ends.
For the server-side the nameserver and indexserver trace files are the ones to check.
For the client-side I think the best option here is to use the ODBC trace option of the HANA ODBC driver.
The tool to use here is called hdbodbc_cons (located in the folder of the HANA client) and the linked documentation explains the different options in detail.

Related

ORA-12557: Connecting ORACLE to modelling software (EMBLEM)

I'm trying to make a connection between Emblem and Oracle. I've already made a similar connection using R which works fine. The image below shows the environment variables that I am using. I also have set up a driver via ODBC Data Source Administrator. Again, this set up has worked fine when connecting to R using ROracle.
However, when I try to connect via Emblem I get the following error: ORA-12557: TNS:protocol adapter not loadable. When in SQL Developer I can see that my connection uses LDAP instead of TNS, so I'm not sure why I have a TNS error (though my knowledge of these protocols are very limited). Can someone please advise on how to resolve this?
So far I've tried deleting ORACLE_HOME variable below but then I ran into OCI errors, so I reverted back to the original path.

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

Exception has been thrown by the target of an invocation in SSIS

I have a SQL job created on SQL Server Agent with Type:Operating System(CmdExec).
I have the following error in the log file generated.
Source: ST_CheckSrcFile
Description: Exception has been thrown by the target of an invocation.
And this is executed correctly when the command line is executed on the Server System thru cmd.
Anybody have a clue why this could be happening?
Yes, you have a coding issue. What that issue is, cannot be determined from your question's current lack of detail.
Since it works fine outside of Agent but fails from within, my prime assumption would be that you are accessing a file or network resource and the account SQL Agent uses, or the designated proxy for Job Steps of type CmdExec, do not have access to the resource.
It could resolved by simply using a UNC instead of a mapped drive letter or by granting the acccount rights to file system on the location machine or a myriad of other approaches but unless we know what the code is doing, we can't be more specific than this.

SSIS error when executing package with removed connections

I'm using SSIS on SQL Server 2005 and have run across an error. As part of the cleanup process I removed a couple of connections from the connection manager section, that we didn't end up using. But now when I attempt to execute the package I get an error stating that "The connection {some guid} is not found. This error is thrown by the Connections connection collection when the specific connection element is not found."
I've checked and rechecked, and the connections I've removed are not being used in the package, so it appears this is an unnecessary error. Is there someplace I can check and clean out this error message?
Thanks!
Check this thread out: Connection Not Found Issue Resolved
This was a very strange situation that even I had faced, given that I had updated names of the connection managers and updated the same even in the configuration file.
Still the package would fail because it was still using the old connection manager.
It turns out that the package was configured to use SQL Server Logging. Also the package configuration referred the old connection name. [Even though the name inside the configuration referred the new connection name]. I guess the issue was that it did not correctly update the configuration.
I resolved this issue by re configuring the connection manager and the default logging.

Error Opening CrystalReport viewer

I have this problem which I am trying to debug for a lot of time.
The setup is like this:
i. The application is a Windows application developed using VS2005, .net 2.0.
ii. I use the Cyrstal reports component Crystal Report Viewer and dynamically display various reports in the same form.
iii. The db is SQLSERVER Express 2005 and situated on a different machine.
When I run the application on the db server, I am able to view the report. However, when I run the application on a different machine which is connected to the above dbServer, I get an error. ( I dont get this error on my dev setup)
Source: CrystakReprotViewer.CS:SendDBLogonForReport() Details:Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
SQL State: 08001
Native Error:
Error in File C:\DOCUME~1\admin\LOCALS~1\Temp\ActionPoints {52820D22-199C-4D46-A76B-70A55D9F54D5}.rpt:
Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at Trivalve.UI.Client.Reports.CrystalViewer.CrystalReportViewer.SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument) in D:\Ramjee\Work\Projects\Trivalve\Trivalve\src\tfssetup\2008\Trivalve_2008\Trivalve\Reports\CrystalViewer\CrystalReportViewer.cs:line 127 rptcontrollers.dll SetTableLocation
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Thanks,
Ramjee
Use datasource=servername or ip address\instance name if available,port number
Default port number is 1433 or 1434
My problem was solved with this. Posting for the use of others.
If this is a standard installation of SQL Server Express, bear in mind that the only connection method installed by default is shared memory, and is only available on the server -- you would need to enable another connection protocol such as Named pipes or TCP/IP. To turn networking on, Use SQL Server Configuration Manager to enable relevant protocols and start SQL Browser.
It's telling you exactly what's wrong.
Details:Logon failed.
Great, we can't logon.
(Invalid Instance()).]Invalid
connection.
Okay. I bet we have "localhost" as part of the instance name in my connection string. Since I'm no longer on the "localhost", this obviously won't work. Let's try there first. Then perhaps it's the credentials that I'm using to query my database. Usually what I do is create a RO user that can only do selects on my db and use that for CR. If none of these are getting me close, let's try making sure that remote connections are enabled for SQLEXPRESS
Unable to connect: incorrect log on
parameters.
Ok it's definitely a connection issue.