How to avoid having to restart Delphi 32-bit application after it fails with a "memory allocation failure" on Database failover? - memory-management

A Delphi 32-bit application fails with errors randomly "Error: the database connection was lost.An existing connection was forcibly closed by the remote host " or "Error Code: -2147024882 memory allocation failure" on Database failover. Application restart is required. How to avoid the restart?
We made changes to the connection string: multisubnetfailover = true, provider = msoledb.1 to support Always on availability in case Disaster recovery. We configured a listener and Application connects to DB with this listener name. Ideally upon DB failover, deplhi app should connect to secondary replica and keep working without any restart. But it is not working because of above error. Application restart is required every time when we do manual failover.
32 bit delphi app ,delphi version 5, oledb driver 18.3, sql server
2019
Any other changes needed to make this work?

Related

Goldengate Manager stopping with ACCESSRULE error

After a server reboot the Goldengate manager not starting. It starts up for few seconds then will go down with OGG-01877 missing explicit Accessrule for server collector. it was working from past 1 year without any issues. Many time started and stopped and rebooted the server.
Linux 6.6 RHEL and goldengate 12.2.0.1 version. oracle is 12.1.0.1
per google search added the ACCESSRULE, PROG*, ALLOW and did not help that either.
Is it possible to delete the manager and recreate the manager? I would like to know if I can delete the manager without deleting the ext, pump and replicat?
Thanks.
Your question implies that your manager is integrated with the Oracle clusterware. If your manager is integrated with the Oracle clusterware you can delete and recreate the manager without impacting the replication.
Typically GoldenGate managers fail to start due to port conflict. Check to see if there is a any port conflict in GOLDENGATE_HOME/ggserr.log. You will port in use message in this log. Issue netstat -an | grep [ port number value here ] to verify. You can find your GoldenGate port number in the mgr.prm file in GOLDENGATE_HOME/dirprm.

Monitor Crystal Reports server

We have Crystal Reports server, and we have a service in our system that sends schedule reports. That Crystal Reports is working against Oracle server.
We found that when Oracle is down, the service (that listens to port 6400) also comes down and we need to restart the Crystal services once Oracle server is back.
Is there a way to report when Crystal Server is down? And most importantly, is there a way that it will come back up when Oracle server is back online automatically?
Thanks
Log on to the CMC using the Administrator account, then select the Servers option, and look for the CMS server (categorised under Core servers). If you open the properties for the CMS server, you should see the option Auto Reconnect to System Database. The administrator documentation explains this options as follows:
Specifies whether the CMS automatically attempts to rees­tablish a
connection to the CMS database in the event of a service disruption.
If this value is set to FALSE, you are able to check the integrity of
the CMS database before resuming operations; you must restart the CMS
to reestablish the da­tabase connection.
By default this option is enabled.
There are several option you can use to check if your CMS is still working:
Check if the server is still accepting network connections on port 6400
Use the command-line version of the CCM and check its output. The command-line options are detailed in SAP KB 1733907 - How to manage servers from command line in BI 4.0 in a Windows environment?
Run the CMS database connection probe and check its output. SAP KB 1670183 describes how to run the probe on the command-line (about halfway in the article); SAP KB 1576032 describes this probe as:
[…] test[s] the availability of the repository database by executing a query
to return the system Info Object representing the cluster name. The
CMS retrieves it from the database; hence a failure is likely to
indicate a connection problem between the CMS and the database.

Connection pooling works under Visual Studio 2010 DevServer but not in IIS

I have a Visual Studio 2010 web project that connects to a SQL Server database using the Entity Framework. When I run the 32 bit application via VS2010 it uses the Visual Studio Development Server. After running the application I use 'exec sp_who2' on SQL Server from time to time to see how many database connections there are from the server, and it never gets above about 6. This is the expected behaviour because connection pooling is being used and so connections reused.
I run exactly the same 32 bit build from IIS 7.5 and after a short time it hits the 100 connection pool limit and stops working. The code is identical, the database is identical and so the only difference is running under IIS 7.5 instead of the Development Server. I have enabled connection pooling in the connection string. In fact the connection string is identical in both cases.
Any ideas why the connection pooling is not working on IIS? Yes, I have pooling=true within the connection string. Yes, I do correctly close all connections when they are no longer needed.
UPDATE: Setting the max pool size to 200 seems to allow the IIS scenario to keep working as it does not seem to get above about 150. But why would the development server only ever need about 6 and the IIS version needs around 150 in the pool. They are both using the same database in the same way with the same connection string.

How can I temporarily disable Oracle connection from local Windows 7 machine to a db server?

For testing purposes. One option is to disable network connection but this seems to disable IIS for some reason.
I would like to prevent a web service to have a connection to a db on different machine. Changing anything on server side is not an option.
EDIT: I have to do this on specific point during the Web Service's (and it's consumer's) execution. I'm trying to simulate a situation where the connection to db is suddenly lost while serving a request.
If you are using TNS based naming for the database, remove the name temporarily from the tnanames.ora file.
To do it at the OS level, configure your Windows 7 Firewall (advanced seting). Add an outbound block rule for the IP/port of the DB server.

WebSphere to Oracle - doesn't accept correct password

In WebSphere 6.1 I have created a datasource to an Oracle 11g instance using the thin JDBC client.
In Oracle I have two users, one existing and another newly created.
My websphere datasource is OK if I use the component-managed authentication alias of the existing user, but fails with "invalid user/password" message if I use the alias of the new user. The error message is:
The test connection operation failed for data source MyDB (Non-XA) on
server nodeagent at node MY_node with the following exception:
java.sql.SQLException: ORA-01017: invalid username/password;
logon denied DSRA0010E: SQL State = 72000, Error Code = 1,017.
View JVM logs for further details.
There is nothing in the JVM logs. I have grepped all websphere logs and they do not mention my connection at all.
I can confirm that the username and password are correct by logging in via SQLPlus or (to prove the JDBC connection is OK) via SQuirreL.
I have checked in Oracle that the new user has all the system privs that the existing user has.
Any thoughts on what is going on or how I can debug this further?
Just FYI. I am guessing you are running WebSphere in Network Deployment mode.
This behavior you're experiencing is actually by design.
The reason for it is that the "Test Connection" button you see on the admin console, invokes the JDBC connection test from within the process of the Node Agent. There is no way for the J2C Alias information to propagate to the Node Agent without restarting it; some configuration objects take effect in WebSphere as soon as you save the configuration to the master repository, and some only take effect on a restart. J2C aliases take effect on restarts.
In a Network Deployment topology, you may have any number of server instances controlled by the same Node Agent. You may restart your server instances as you'd like, but unless you restart the Node Agent itself, the "test connection" button will never work.
It's a known WebSphere limitation... Which also exists on version 7.0, so don't be surprised when you test it during your next migration. :-)
If this happens to anyone else, I restarted WebSphere and all my problems went away. It's a true hallmark of quality software.
Oftentimes when people tell me they can't log into Oracle 11g with the correct password, I know they've been caught out by passwords becoming case-sensitive between 10g and 11g.
Try this :
data source definition
security
use the j2c alias both autentication managed by component and autentication managed by container
IBM WAS 8.5.5 Knowledge Center - Managing Java 2 Connector Architecture authentication data entries for JAAS
If you create or update a data source that points to a newly created J2C authentication data alias, the test connection fails to connect until you restart the deployment manager.
After you restart the deployment manager, the J2C authentication data is reflected in the runtime configuration. Any changes to the J2C authentication data fields require a deployment manager restart for the changes to take effect.
The node agent must also be restarted.
I have point my data source to componenet-manage authentication as well as container-managed authentication.Its working fine now........

Resources