MRCollective / ReliableDbProvider

Provides a Db Provider Factory that uses the Microsoft Transient Fault Handling library to allow for reliable SQL Azure connections when using Entity Framework 4, Entity Framework 5 or Linq 2 SQL.
MIT License
20 stars 4 forks source link

Extend to us ReliableDbProvider to connect to Sybase #19

Open shashikumaarb opened 7 years ago

shashikumaarb commented 7 years ago

how do I extend this component to connect to Sybase? basically Sybase database is hosted on a server and particular port with char set. I try to have a custom DBPRovider and DBConnection I get an exception Keyword not supported: 'port' or Keyword not supported: 'charset'

a typical connection string that we use looks like this.

<add name="SybaseProdSpecificDB" connectionstring="Data Source='devlopment.corp.com';port:8000"UID='user1';Database='proda';Charset='iso_1';pooling=True;Min Pool Size=10;Application Name='Extensionservice1' ProviderName="DBProvider"/>

robdmoore commented 7 years ago

Does it make sense to use this with sybase?

The core retry libraries are built specifically for the transient error codes from azure sql database.

What are you trying to achieve with sybase?

On 20 Mar 2017, at 2:26 pm, shashikumaarb notifications@github.com wrote:

how do I extend this component to connect to Sybase? basically Sybase database is hosted on a server and particular port with char set. I try to have a custom DBPRovider and DBConnection I get an exception Keyword not supported: 'port' or Keyword not supported: 'charset'

a typical connection string that we use looks like this.

<add name="SybaseProdSpecificDB" connectionstring="Data Source='devlopment.corp.com';port:8000"UID='user1';Database='proda';Charset='iso_1';pooling=True;Min Pool Size=10;Application Name='Extensionservice1' ProviderName="DBProvider"/>

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

shashikumaarb commented 7 years ago

Thanks Rob for your quick reply, appreciate it, so I use Dapper as ORM tool to connect Sybase and connections get dropped sometimes, other teams use the same Sybase driver but different ORM's and don't see this problem. so I though if there could be some way to just retry connection that would help a bit. I came across this and though this might be a good fit.

please let me know, I might be completely wrong about using this library.

shashikumaarb commented 7 years ago

Hi Rob, I eventually created a component by self using Enterprise library application block. the problem is in Sybase driver, the component does not recognize dropped connections, so I had to execute a simple Select 1 every time service calls the conn.open method if it fails app block would catch it and creates a brand new connection.