Connection Pooling | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Connection Pooling

Hi…
Can anybody tell me when the connection pool is created ?
What is the max and min pool size ?
Can we do connection pooling using ADO in pure C++ code… I have written a simple code … int main()
{
CoInitialize(NULL);
_ConnectionPtr m_pConnection1;
_ConnectionPtr m_pConnection2; m_pConnection1.CreateInstance(__uuidof(Connection)); m_pConnection1->Open( "Provider=’sqloledb’;Data Source=’localhost’;Initial Catalog=’Pubs’;Integrated Security=’SSPI’;Min Pool Size=1;Max Pool Size=10;OLE DB Services=-1", "", "", adConnectUnspecified );
m_pConnection1->Close();
m_pConnection1->Open( "Provider=’sqloledb’;Data Source=’localhost’;Initial Catalog=’Pubs’;Integrated Security=’SSPI’;Min Pool Size=1;Max Pool Size=10;OLE DB Services=-1", "", "", adConnectUnspecified );
m_pConnection1->Close(); CoUninitialize();
return 0;
}
Is the above code correct ?

http://www.sql-server-performance.com/fernando_guerrero_interview.asp
http://www.sql-server-performance.com/sk_connection_pooling_myths.asp
for your reference… Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>