1. Daniel turner
  2. PowerBuilder
  3. Wednesday, 13 July 2022 15:33 PM UTC

we are using dbparm to connect to ms sql server 2019

SET %DBPARM%=TrustedConnection=1,Database='%Database_Name%',Provider='SQLNCLI11',AppName='ixapp',

Host='%username%.%computername%',Identity='SCOPE_IDENTITY()',Encrypt=1,TrustServerCertificate=1

where the server name is a listener

we can usually connect successfully, however, in some circumstances it may try to connect for a thousand times over the course of an hour before it successfully connects

The solution to this in other cases where we use the listener is to set

MultiSubnetFailover = true as a param passed to the connection object

I see pb has FailoverPartner but that does not seem to have the same function as listener + multisubnetFailover:

https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.multisubnetfailover?view=dotnet-plat-ext-6.0

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/listeners-client-connectivity-application-failover?view=sql-server-ver16

FailOverPartner appears to require a mirror server name instead of using the listener defined failover server
my_trans.dbparm="FailoverPartner='myMirrorServer'"

What is the solution for this?

 

 

 

mike S Accepted Answer Pending Moderation
  1. Wednesday, 13 July 2022 17:49 PM UTC
  2. PowerBuilder
  3. # 1

I would look up db parms for the various connection types (ado, native client,  msoledbsql, odbc, ....) and choose the one that best meets your needs

SQL Server Native Client 11.0 ODBC Driver Connection Strings - ConnectionStrings.com

 

powerbuilder docs are not the best source for this since it isn't powerbuilder but rather is microsoft's driver options.  

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 July 2022 15:53 PM UTC
  2. PowerBuilder
  3. # 2

If you are on PB 2019 R3 or newer, have you tried using MSOLEDBSQL provider instead of the obsolete SQLNCLI11?

Comment
  1. Daniel turner
  2. Wednesday, 13 July 2022 17:44 PM UTC
we are on R2 with no immediate possibility for change at present
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.