Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to set the connection pool size in the Sybase connection string?

Reply
Thread Tools

How to set the connection pool size in the Sybase connection string?

 
 
Wei Lu
Guest
Posts: n/a
 
      02-15-2009
Hi all,

Does anyone know how to set the connection pool size in the Sybase
connection string?

Wei Lu

 
Reply With Quote
 
 
 
 
Steven Cheng
Guest
Posts: n/a
 
      02-16-2009
Hi Wei,

As for the sybase connectionstring, are you using the .NET AseConnection
provider? If so, I think you can use the following two parameters in your
connectionstring:

** "max pool size";
** "min pool size";

e.g.

Data Source='myASEserver';Port=5000;Database=myDataBase ; min pool size=50;
max pool size=100; Uid=myUsername;Pwd=myPassword;

Actually, you can get more parameters info by inspect the
"AseConnectoinPoolManager" class in reflector:

===========================================
internal AseConnectionPool(string connectionString)
{
this._connectionString = new ConnectionProperties();
this._database = null;
this._isolationLevel = IsolationLevel.Unspecified;
this._min = 20;
this._max = 100;
this._count = 0;
this._pooling = true;
this._pool = ArrayList.Synchronized(new ArrayList());
this._connectionString.FullString = connectionString;
string s =
this._connectionString.GetValue(ConnectionProperti es._minPoolSizeParametersN
ames);
string str2 =
this._connectionString.GetValue(ConnectionProperti es._maxPoolSizeParametersN
ames);
if (s != null)
{
this._min = int.Parse(s);
}
if (str2 != null)
{
this._max = int.Parse(str2);
}
string str3 =
this._connectionString.GetValue(ConnectionProperti es._poolingParametersNames
);
if (str3 != null)
{
str3 = str3.ToLower();
if (str3 == "false")
{
this._pooling = false;
}
if (str3 == "true")
{
this._pooling = true;
}
}
}

//and the name of parameters defined below


static ConnectionProperties()
{
_tdsMapping = new Hashtable();
_datasourceNames = "Server;Data Source;DataSource;Address;Addr;Network
Address;Server Name";
_portNames = "Port;Server Port";
_secondaryDatasourceNames = "SecondaryServer;Secondary Data
Source;Secondary DataSource;Secondary Server;Secondary Address;Secondary
Addr;Secondary Network Address;Secondary Server Name";
_secondaryPortNames = "SecondaryPort;Secondary Port;Secondary Server
Port";
_databaseNames = "Database;Initial Catalog";
_timeoutNames = "Connect Timeout;Connection Timeout";
_useridNames = "User ID;userid;uid;User";
_passwordNames = "Password;pwd";
_applicationNames = "Application Name";
_languageNames = "Language";
_charsetNames = "CharSet";
_packetSizeNames = "Packet Size";
_enableServerPacketSizeNames = "Enable Server Packet Size;
EnableServerPacketSize";
_restrictMaximumPacketSizeNames = "Restrict Maximum Packet Size;
RestrictMaximumPacketSize";
_bufferPoolSizeNames = "Buffer Pool Size";
_isolationNames = "Isolation;Isolation Level";
_useCursorNames = "UseCursor;Use Cursor";
_namedParametersNames = "NamedParameters";
_poolingParametersNames = "pooling";
_maxPoolSizeParametersNames = "max pool size";
_minPoolSizeParametersNames = "min pool size";
_pingServerNames = "Ping Server";
_dsurl = "DSURL;Directory Service URL";
_dsUserName = "DSPrincipal;Directory Service Principal";
_dsPassword = "DSPassword;Directory Service Password";
_dsDomain = "DSDomain;Directory Service Domain";
_dsAuthMethod = "DSAuthMethod;Directory Service Authentication Method";
_encryption = "Encryption";
_trustedFile = "TrustedFile";
_cumulativeRecordCountNames = "CumulativeRecordCount;Cumulative Record
Count;CRC";
_encryptPwd = "EncryptPassword;EncryptPwd;Encrypt Password";
_haSession = "HASession";
_idleTimeout = "ConnectionIdleTimeout;Connection IdleTimeout;
Connection Idle Timeout;";
_lifetime = "Connection Lifetime";
_datasourceName = "Data Source";
_portName = "Port";
_secondaryDatasourceName = "Secondary Data Source";
_secondaryPortName = "SecondaryPort";
_tdsMapping.Add(_useridNames, "UserID");
_tdsMapping.Add(_passwordNames, "Password");
_tdsMapping.Add(_datasourceNames, "Server");
_tdsMapping.Add(_portNames, "Port");
_tdsMapping.Add(_applicationNames, "ApplicationName");
_tdsMapping.Add(_languageNames, "Language");
_tdsMapping.Add(_charsetNames, "CharSet");
_tdsMapping.Add(_packetSizeNames, "PacketSize");
_tdsMapping.Add(_bufferPoolSizeNames, "BufferCacheSize");
_tdsMapping.Add(_databaseNames, "Database");
_tdsMapping.Add(_isolationNames, "Isolation");
_tdsMapping.Add(_timeoutNames, "LoginTimeOut");
_tdsMapping.Add(_useCursorNames, "UseCursor");
_tdsMapping.Add(_encryptPwd, "EncryptPassword");
_tdsMapping.Add(_haSession, "HASession");
_tdsMapping.Add(_secondaryDatasourceNames, "SecondaryServer");
_tdsMapping.Add(_secondaryPortNames, "SecondaryPort");
_tdsMapping.Add(_dsurl, "DSURL");
_tdsMapping.Add(_dsUserName, "DSPrincipal");
_tdsMapping.Add(_dsPassword, "DSPassword");
_tdsMapping.Add(_dsDomain, "DSDomain");
_tdsMapping.Add(_dsAuthMethod, "DSAuthMethod");
_tdsMapping.Add(_encryption, _encryption);
_tdsMapping.Add(_trustedFile, _trustedFile);
_tdsMapping.Add(_cumulativeRecordCountNames, "CRC");
_tdsMapping.Add(_idleTimeout, "ConnectionIdleTimeout");
_tdsMapping.Add(_lifetime, "Connection Lifetime");
_tdsMapping.Add(_enableServerPacketSizeNames, "EnableServerPacketSize");
_tdsMapping.Add(_restrictMaximumPacketSizeNames,
"RestrictMaximumPacketSize");
}

==========================================

for more info on the ASE provider, we suggest you have a look at the sybase
ASE ADO.NET document:

http://infocenter.sybase.com/help/in...help.os_15.0.a
donet/html/adonet/title.htm&

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
http://www.velocityreviews.com/forums/(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
>From: "Wei Lu" <(E-Mail Removed)>
>Subject: How to set the connection pool size in the Sybase connection

string?
>Date: Sun, 15 Feb 2009 16:46:53 +0800


>
>Hi all,
>
>Does anyone know how to set the connection pool size in the Sybase
>connection string?
>
>Wei Lu
>
>


 
Reply With Quote
 
 
 
 
Wei Lu
Guest
Posts: n/a
 
      02-16-2009
Thanks Steven!

Wei Lu

""Steven Cheng"" <(E-Mail Removed)> дϢ
news:ZHtOlB$(E-Mail Removed)...
> Hi Wei,
>
> As for the sybase connectionstring, are you using the .NET AseConnection
> provider? If so, I think you can use the following two parameters in your
> connectionstring:
>
> ** "max pool size";
> ** "min pool size";
>
> e.g.
>
> Data Source='myASEserver';Port=5000;Database=myDataBase ; min pool size=50;
> max pool size=100; Uid=myUsername;Pwd=myPassword;
>
> Actually, you can get more parameters info by inspect the
> "AseConnectoinPoolManager" class in reflector:
>
> ===========================================
> internal AseConnectionPool(string connectionString)
> {
> this._connectionString = new ConnectionProperties();
> this._database = null;
> this._isolationLevel = IsolationLevel.Unspecified;
> this._min = 20;
> this._max = 100;
> this._count = 0;
> this._pooling = true;
> this._pool = ArrayList.Synchronized(new ArrayList());
> this._connectionString.FullString = connectionString;
> string s =
> this._connectionString.GetValue(ConnectionProperti es._minPoolSizeParametersN
> ames);
> string str2 =
> this._connectionString.GetValue(ConnectionProperti es._maxPoolSizeParametersN
> ames);
> if (s != null)
> {
> this._min = int.Parse(s);
> }
> if (str2 != null)
> {
> this._max = int.Parse(str2);
> }
> string str3 =
> this._connectionString.GetValue(ConnectionProperti es._poolingParametersNames
> );
> if (str3 != null)
> {
> str3 = str3.ToLower();
> if (str3 == "false")
> {
> this._pooling = false;
> }
> if (str3 == "true")
> {
> this._pooling = true;
> }
> }
> }
>
> //and the name of parameters defined below
>
>
> static ConnectionProperties()
> {
> _tdsMapping = new Hashtable();
> _datasourceNames = "Server;Data Source;DataSource;Address;Addr;Network
> Address;Server Name";
> _portNames = "Port;Server Port";
> _secondaryDatasourceNames = "SecondaryServer;Secondary Data
> Source;Secondary DataSource;Secondary Server;Secondary Address;Secondary
> Addr;Secondary Network Address;Secondary Server Name";
> _secondaryPortNames = "SecondaryPort;Secondary Port;Secondary Server
> Port";
> _databaseNames = "Database;Initial Catalog";
> _timeoutNames = "Connect Timeout;Connection Timeout";
> _useridNames = "User ID;userid;uid;User";
> _passwordNames = "Password;pwd";
> _applicationNames = "Application Name";
> _languageNames = "Language";
> _charsetNames = "CharSet";
> _packetSizeNames = "Packet Size";
> _enableServerPacketSizeNames = "Enable Server Packet Size;
> EnableServerPacketSize";
> _restrictMaximumPacketSizeNames = "Restrict Maximum Packet Size;
> RestrictMaximumPacketSize";
> _bufferPoolSizeNames = "Buffer Pool Size";
> _isolationNames = "Isolation;Isolation Level";
> _useCursorNames = "UseCursor;Use Cursor";
> _namedParametersNames = "NamedParameters";
> _poolingParametersNames = "pooling";
> _maxPoolSizeParametersNames = "max pool size";
> _minPoolSizeParametersNames = "min pool size";
> _pingServerNames = "Ping Server";
> _dsurl = "DSURL;Directory Service URL";
> _dsUserName = "DSPrincipal;Directory Service Principal";
> _dsPassword = "DSPassword;Directory Service Password";
> _dsDomain = "DSDomain;Directory Service Domain";
> _dsAuthMethod = "DSAuthMethod;Directory Service Authentication Method";
> _encryption = "Encryption";
> _trustedFile = "TrustedFile";
> _cumulativeRecordCountNames = "CumulativeRecordCount;Cumulative Record
> Count;CRC";
> _encryptPwd = "EncryptPassword;EncryptPwd;Encrypt Password";
> _haSession = "HASession";
> _idleTimeout = "ConnectionIdleTimeout;Connection IdleTimeout;
> Connection Idle Timeout;";
> _lifetime = "Connection Lifetime";
> _datasourceName = "Data Source";
> _portName = "Port";
> _secondaryDatasourceName = "Secondary Data Source";
> _secondaryPortName = "SecondaryPort";
> _tdsMapping.Add(_useridNames, "UserID");
> _tdsMapping.Add(_passwordNames, "Password");
> _tdsMapping.Add(_datasourceNames, "Server");
> _tdsMapping.Add(_portNames, "Port");
> _tdsMapping.Add(_applicationNames, "ApplicationName");
> _tdsMapping.Add(_languageNames, "Language");
> _tdsMapping.Add(_charsetNames, "CharSet");
> _tdsMapping.Add(_packetSizeNames, "PacketSize");
> _tdsMapping.Add(_bufferPoolSizeNames, "BufferCacheSize");
> _tdsMapping.Add(_databaseNames, "Database");
> _tdsMapping.Add(_isolationNames, "Isolation");
> _tdsMapping.Add(_timeoutNames, "LoginTimeOut");
> _tdsMapping.Add(_useCursorNames, "UseCursor");
> _tdsMapping.Add(_encryptPwd, "EncryptPassword");
> _tdsMapping.Add(_haSession, "HASession");
> _tdsMapping.Add(_secondaryDatasourceNames, "SecondaryServer");
> _tdsMapping.Add(_secondaryPortNames, "SecondaryPort");
> _tdsMapping.Add(_dsurl, "DSURL");
> _tdsMapping.Add(_dsUserName, "DSPrincipal");
> _tdsMapping.Add(_dsPassword, "DSPassword");
> _tdsMapping.Add(_dsDomain, "DSDomain");
> _tdsMapping.Add(_dsAuthMethod, "DSAuthMethod");
> _tdsMapping.Add(_encryption, _encryption);
> _tdsMapping.Add(_trustedFile, _trustedFile);
> _tdsMapping.Add(_cumulativeRecordCountNames, "CRC");
> _tdsMapping.Add(_idleTimeout, "ConnectionIdleTimeout");
> _tdsMapping.Add(_lifetime, "Connection Lifetime");
> _tdsMapping.Add(_enableServerPacketSizeNames,
> "EnableServerPacketSize");
> _tdsMapping.Add(_restrictMaximumPacketSizeNames,
> "RestrictMaximumPacketSize");
> }
>
> ==========================================
>
> for more info on the ASE provider, we suggest you have a look at the
> sybase
> ASE ADO.NET document:
>
> http://infocenter.sybase.com/help/in...help.os_15.0.a
> donet/html/adonet/title.htm&
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 2 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions. Issues of this
> nature are best handled working with a dedicated Microsoft Support
> Engineer
> by contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>
> --------------------
>>From: "Wei Lu" <(E-Mail Removed)>
>>Subject: How to set the connection pool size in the Sybase connection

> string?
>>Date: Sun, 15 Feb 2009 16:46:53 +0800

>
>>
>>Hi all,
>>
>>Does anyone know how to set the connection pool size in the Sybase
>>connection string?
>>
>>Wei Lu
>>
>>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Dynamic NAT pool doesn't report full when pool contains interface IP tom Cisco 0 10-09-2009 02:22 AM
does python have a generic object pool like commons-pool in Java Rick Lawson Python 8 07-16-2009 11:25 PM
PIX 501 issue routing between VPN pool and local pool eostrike Cisco 3 10-24-2008 09:43 PM
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Guoqi Zheng ASP .Net 4 06-03-2004 06:39 PM



Advertisments