1. galina buslovich
  2. PowerBuilder
  3. Wednesday, 22 February 2023 17:03 PM UTC

MultiSubnetFailover is ignored when added to DBParm string.

We are trying to connect PowerBuilder 2021 application running on AppStream to AWS sql server - SQL 2016.

Roughly doing:

DBMS=MSO

SQLCA.DBParm = ls_dbparm + ",MultiSubnetFailover=true" 

Any suggestion on how to make it work?

Arnd Schmidt Accepted Answer Pending Moderation
  1. Wednesday, 22 February 2023 17:48 PM UTC
  2. PowerBuilder
  3. # 1

Are you 100 % sure that you make it as a part of the ProviderString? (Single quote at the end).

SQLCA.DBParm = "ProviderString='blabla=bla,MultiSubnetFailover=true'"

hth

Arnd

Comment
  1. RamanaRao Nandigam
  2. Tuesday, 7 March 2023 17:05 PM UTC
Arnd Schmidt



I didn't get any error for adding MultiSubnetFailover=true. But, the MultiSubnetFailover=true property not working. Does this property really support PB2021?
  1. Helpful
  1. Arnd Schmidt
  2. Tuesday, 7 March 2023 17:58 PM UTC
I do not know how your ls_dbparm looks like and believe that PowerBuilder fails silently on using "wrong typed" parameters.



Your DBParm String can be something like this:

SQLCA.DBParm = "Database='myDatabase',TrustedConnection=1,ProviderString='MultiSubnetFailover=true'"



I would set the MultiSubnetFailover to be a part of the ProviderString (In the DB Dialog the "Extended Properties")

(https://www.connectionstrings.com/ole-db-driver-for-sql-server/)



You can also Connect by using only the ProviderString like:

SQLCA.DBParm = "ProviderString='Provider=MSOLEDBSQL;Server=<server>;Database=<database>;Integrated Security=SSPI;MultiSubnetFailover=true'"



So that no setting for SQLCA.ServerName property is needed.



hth

Arnd
  1. Helpful 1
  1. Arnd Schmidt
  2. Tuesday, 7 March 2023 20:30 PM UTC
John made a good response regarding that property.

In SQLClient it is a boolean property, but in the ProviderString documentations it is Yes/No.

(https://www.connectionstrings.com/ole-db-driver-for-sql-server/)

Try to use a ProviderString like:

SQLCA.DBParm = "ProviderString='Provider=MSOLEDBSQL;Server=<server>;Database=<database>;Integrated Security=SSPI;MultiSubnetFailover=Yes'"



hth



Arnd
  1. Helpful 1
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 7 March 2023 19:00 PM UTC
  2. PowerBuilder
  3. # 2

Are you sure you set this option to "true"? It appears from the following URL that you should instead specify "yes":

https://learn.microsoft.com/en-us/sql/relational-databases/native-client/features/sql-server-native-client-support-for-high-availability-disaster-recovery?view=sql-server-ver16#connecting-with-multisubnetfailover

It may be worth looking into?

Best regards, John

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 7 March 2023 20:43 PM UTC
  2. PowerBuilder
  3. # 3

Hmm, I just noticed the strangest thing on :

https://learn.microsoft.com/en-us/sql/connect/oledb/applications/using-connection-string-keywords-with-oledb-driver-for-sql-server?view=sql-server-ver16
On that page, I do a search on all occurrences of "MultiSubnetFailover" and I find either a value true/false or yes/no:

Seems to depend on whether you use "IDBInitialize" or "IDataInitialize". Consistency would have been nice or maybe it's simply the documentation not being correct.

regards.

 

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 March 2023 20:08 PM UTC
  2. PowerBuilder
  3. # 4

Are you using the new MSOLEDBSQL driver?  The SNC driver might not support the newer SQL Server features.

Comment
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.