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(ConnectionProperties._minPoolSizeParametersN
ames);
string str2 =
this._connectionString.GetValue(ConnectionProperties._maxPoolSizeParametersN
ames);
if (s != null)
{
this._min = int.Parse(s);
}
if (str2 != null)
{
this._max = int.Parse(str2);
}
string str3 =
this._connectionString.GetValue(ConnectionProperties._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/index.jsp?topic=/com.sybase.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 address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#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/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.