Connection Reference in Service Project Editor of z/OS Connect EE - cics

Please help me to understand the connection Reference that we give the service project editor of z/OS connect EE.
Will it be used when establishing a connection with CICS region from z/OS connect EE server?
Adding the image.

The connection reference is used to establish the connection to CICS from z/OS Connect. The value should match the id attribute of the zosconnect_cicsIpicConnection element in server.xml.
Example:
<zosconnect_cicsIpicConnection id="cicsConn" host="localhost" port="1091"/>

The connection reference can alternatively match the id of a zosconnect_cicsConnectionGroup element in server.xml. If required, the connection reference can be dynamically changed at runtime using a policy.

Related

Oracle DB active/passive setup with Node.js

I want to understand how the Oracle db active passive connection works with Node js. Currently my project is using loopback Oracle connector node module. What configuration I have to do in db or app or env level to complete the setup.
Asuming you connect through a connection pool you don’t need to do anything since the connection pool should take care of failed connections, as long as one succeeds.
This ofcourse assumes a correct sqlnet configuration in the connection pool, that by itself should be prefixed by a vip.

Unable to Connect to Azure SQL-Server: sun.security.validator.ValidatorException

Created an Azure SQL server machine and I am able to rdp as well as connect via the local SQL Server Mgt Studio client.
However I cannot connect to the same instance via Java code using the connection string further below.
I am using the latest JDBC Driver (Microsoft JDBC Driver 7.4)
I am using SQL Server 2017 Express
I am able to connect manually via SQL Server Mgt Studio client on local machine
Here is the error message:
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not
establish a secure connection to SQL Server by using Secure Sockets
Layer (SSL) encryption. Error:
"sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target".
ClientConnectionId:xxxxxxxxxxxxxxxxxx
Here is the connection string:
jdbc:sqlserver://Server=nn.nnn.nnn.nnn;Integrated Security=false;User
ID=myusername;Password=mypassword
Thanks for your help!
I got this to work by changing in the connection string:
encrypt=true
into
encrypt=false
Not sure this is the best solution but at least I can carry on developement.
It seems to be caused by the driver not finding a certificate that it trusts. If you do have a relevant certificate installed and are working on your localhost (meaning that it's probably self-signed and therefore wouldn't be trusted otherwise), try adding this to the end of your connection string:
trustServerCertificate=true
If it's a different machine you're working on, you may need to take a look at the validity of the certificate that it should be using.
Microsoft also now has more information about SSL connections to SQL Server here.

How to Delete Hybrid Connections

I accidentally deleted the relay without deleting the hybrid connection first. It appears like this left an orphaned hybrid connection, as whenever I try to create a new hybrid connection I get this error:
Failed to add hybrid connection xxxxxxxxxxxxxxxxxxxxxx:
A hybrid connection already exists with Hostname xxxxx and Port xxxx, which must remain unique on the App Service Plan.
I've searched everywhere trying to find the hybrid connection and I can't see it. I'd appreciate any help on this.
Cross posted on MSDN: https://social.msdn.microsoft.com/Forums/en-US/becb2be7-25e2-4992-a64c-cd784094d0bb/how-to-delete-hybrid-connections?forum=WAVirtualMachinesforWindows
Thanks.
We will need to go to the networking tab on this webapp, and find and remove the Hybrid Connection from it. While we did delete this relay, the app still has a reference to it and that needs to be removed first.
Could you please try this and let me know if it works for you.

Unable to Add Azure DB Firewall Rule to Allow Build Server to Run Tests

We use a Visual Studio Online-hosted build server to automate our build process. As part of this I'm looking into adding unit and integration tests into this process.
These tests require access to our SQL Azure DBs (2 of them, both on the same server), which in turn requires access through the DB server's firewall.
I have a PowerShell script which uses New-AzureRmSqlServerFirewallRule to add IP addresses to the DB server, and these firewall rules are successfully showing up in the Azure portal.
Specifically, the script adds firewall rules for:
All IPv4 addresses* on the build server (as returned by Get-NetIPAddress)
Build server's external IP address (as returned by https://api.ipify.org)
In conjunction, it appears that the pre-defined AllowAllAzureIPs and AllowAllWindowsAzureIps rules are automatically added.
However, the tests subsequently fail with the exception:
System.Data.SqlClient.SqlException:
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. (provider: Named Pipes Provider, error: 40 -
Could not open a connection to SQL Server)
I'm unsure why the build server is unable to reach the DB server - could it be that the host of the test processes is using yet a different IP address?
Update
As has been pointed out, the exception message mentions "Named Pipes Provider" which suggests that the DB connection is using a named pipe instead of an IP/TCP connection. To test this I changed the local app.config to contain an unknown/random/inaccessible IP and ran the tests locally (they otherwise run successfully locally): I received exactly the same exception message mentioning "Named Pipes Provider". Perhaps at some level the ReliableSqlConnection class resolves to a named pipe but my point is that I can induce this very same exception by changing to an unknown or inaccessible IP address in my DB connection string.
Furthermore, the DB connection string starts with tcp: which, as per this blog post, explicitly tells the connection to use TCP/IP and not named pipes.
I have also modified the firewall rule to permit all IP addresses (0.0.0.0 to 255.255.255.255) but the same exception is still thrown. This suggests that the SQL Azure firewall rule is not the cause of the 'blockage'.
My suspicion therefore turns to network access being blocked (though a whitelist is probably present to permit the build server to reach the code repository). I added a very simple PowerShell script to the start of the build process:
Test-Connection "172.217.18.100" #resolves to www.google.com
This results in
Testing connection to computer '172.217.18.100' failed: Error due to lack of resources
Have the build servers disabled ping/ICMP or is all outgoing traffic blocked?
* The script only considers IPv4 addresses because I haven't had any success in passing IPv6 addresses to New-AzureRmSqlServerFirewallRule.
We finally solved the issue. The problem had nothing to do with Firewalls. The issue was that the app.config files in our unit test didn't go through the transformation step that our web.config files did. So all the settings were from our local development and therefore wrong.
More about this here:
Connect to external services inside Visual Studio Online build/test task
What connection string are you using? Your error seems to indicate that this is not truly a firewall issue, but rather a connection is being attempted to a server that doesn't exist.
My * incorrect * hypothesis right now is that your connection string contains only the server name, without .database.windows.net suffix which causes the client driver to look for server on local network. The error presented appears to not be a firewall related issue.
( Edited to reflect author feedback. )
If you're connecting over TCP, then why is your error message saying Named Pipes?
[...]
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I'd look into this paradox first.
The firewall test is very simple, allow 0.0.0.0 to 255.255.255.255 or 0.0.0.0/0 and re-test. My money is on the same error message.

Cannot connect to dbdash from DataGrip

In DataGrip, I'm using the DB2 (JTOpen) data source/driver and supplying the connection information directly off of the dashdb "connect" tab. When trying to connect to my dashdb, I keep getting the following error:
I am using the stock information as supplied on the "Connect" tab of the dashDB dashboard:
Has anyone been successful connected to dashDB with DataGrip?
dashDB shares technology with DB2 LUW and you need to use the DB2 LUW-specific connection type, not the one for DB2 on IBM i (AS/400). dashDB has been successfully tested with all kinds of tools.
Try jdbc:db2://...

Resources