Test Connection from nodejs application to Oracle DB - node.js

I have developed a desktop application with electron nodejs.I have a requirement to do Test connection to Oracle Database. I have all the details of database source information in my application.How can I do test connection from my application.
have attached screenshot below of the application

hostname should be just the hostname, not hostname:port/service_name. i.e. "localhost" if the database is on the same server as the application, or the actual remote hostname or IP address if it is running somewhere else.

Related

VB.Net Connection string over draytek tunneling vpn

I am doing a VB.NET application, using SQL server as my database. SQL sever is located on other network connected via draytek VPN Matcher, Can you please recommend, what is the best connection string to connect to SQL Server from windows form application using oledb
Thanks to all
I tried using the IP directly with port 1433. I could connect through SSMS but not by the VB.Net application. I tried the SSMS it connects, but my appliction do not connect. It gives Error, server is not available any more.

What is the SQL Server connection string in c# application for client computers

I am unable to access database using c# application from all client computers in the same network but main computer sql server worked fine. Note: all settings like TCP/IP ping, firewall, .net installed is set already. Is there any good code to establish connection or connection string?
Code to establish connection or connection string accessible through other computer without sql server installation

Accessing local database using Heroku

So I've developed a Node.js app that accesses an Oracle database (that can be accesssed by all connected clients) for connected users, and sends them push notifications depending on certain query results. I used the web-push API (details at https://www.npmjs.com/package/web-push) to send push notifications to the connected clients, who essentially send a subscription with an endpoint to the server, and receive notifications based off this data.
1) I can't seem to host this app over simple LAN using my IP address since it doesn't have SSL certificate (https extension) and service workers don't work.
2) I deployed the app using Heroku, and now can send push notifications to various clients, but am unable to access the database (throws me an error).
How do I connect to the oracle database when deployed on Heroku? Is there a workaround?
I use the following simple code to connect to my database:
connection = await oracledb.getConnection( {
user : <username>,
password : <password>,
connectString : <connectionString>
});
You can use service like ngrok which allows to access local port publicly.
The process of how to setup ngrok can be found in the link below
https://ngrok.com/docs
For example if I was running PostgreSQL server on my local machine and I want to expose that PostgreSQL server listening on the default port, I will run below command with ngrok
ngrok tcp 5432
And the tcp url & port that will be displayed after port is exposed successfully will be database host name & port respectively.
Its better to use oracle cloud services..ATP database is an always free feature..

Azure hybrid connection Manager does not work

Requirement
I have an On-Premise SQL Server and an Azure webApp Service that needs to talk each other. I installed Hybrid Connection Manager on another computer which is in the same LAN as the SQL server. Let's refer this computer as the Connection PC.
The working part
Installation and configuration was straight forward, status of the hybrid connection showing as connected.
Tested the WebApp on localhost, it worked fine. Which means nothing wrong with the asp.net code
SSMS on the connection PC can access and query SQL DB
I installed a test SQL DB on the connection PC itself and use the WebApp to talk to the test DB instead, It worked fine.
The Problem
After tested ok on localhost, I published ASP.Net WebApp to Azure, it gave following 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)
troubleshoot attempt
Does that mean Hybrid Connection manager has to be installed on the same computer that runs SQL Server?
I did attempt to install HCM on the SQL Server, but it says it cannot work with Win2008R2. The connection PC has win2012 on it. So it can have HCM.
I just do not have time to migrate the SQL Server to another server. So I hope HCM does not have to be on SQL server.
Connection String
In my webapp, the connection string is as follows.
connectionString="metadata=res:///ScaleDataModel.csdl|res:///ScaleDataModel.ssdl|res://*/ScaleDataModel.msl;provider=System.Data.SqlClient;provider connection string="data source=WIN2008R2\DataPlus;initial catalog=DataPlus;persist security info=True;user id=test;password=testpass;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient"
Hybrid Connection communicates via TCP ports thus you need to specify the listening static port in your connection string like:
Data source=ServerName:Port;
Also here is an actually detailed article about the all problems you may encounter while working with Hybrid Connections.
Hope this helped you.
Since you have a hybrid connection, your connection string should have the endpoint name of your hybrid connection as the data source. Try replacing it.

Ingres connection on an IIS deployed site

I have a .net 2.0 app being hosted on IIS, that connects to a Ingres DB. The connection uses iBatis with an ODBC driver to connect to an ingres database being protected behind an installation password.
For some reason, when I'm debugging my code, everything runs fine. It establishes the connection without any problems. However, when I try to host the site on my local IIS, ingres comes back with this error
ERROR [5000H] [CA][Ingres ODBC Driver][Ingres]User authorization check failed.
Your user identifier was not known to this installation.
Contact your system manager for further assistance.
ERROR [08S01] [CA][Ingres ODBC Driver][Ingres]The connection to the server has been aborted.
I'm wondering why the installation password would work fine against my debug session, and refuse to connect behind IIS? Does IIS use a different 'name' that isn't my computer name to establish a connection with the installation password?
The connection is being rejected because the target server is not aware of the user trying to connect or that user has not been added. Check to see if the process owner of your local IIS instance is a valid ingres user. IIRC the account name is normally something like IUSR_MACHINENAME, where MACHINENAME is the hostname of your IIS box. Add the user account using the following SQL on the server:
echo "create user IUSR_MACHINENAME\g" | sql iidbdb

Resources