I am working on a legacy application where connection details are stored in an external file in an encrypted format. The application creates connection string at run time based on certain keywords that are passed to the function "GetConnectionString" that returns the connection string.
In one of the modules, I want to create a connection with a different application pool size. At the same time, I want to different the connection originating from this module with a different application name.
However, in SQL Server profiler the application name of the connection made by this module is the same as the rest of the application.
Does ADO.NET exclude connection pool size and application name while identifying a unique connection?
Nothing is technically excluded. If Min Pool Size or Max Pool Size are not explicitly set in the connection string, the defaults are used:
To be clear, pools are created based on unique connection strings.
Per the Docs:
Pool Creation and Assignment
When a connection is first opened, a connection pool is created based on an exact matching algorithm that associates the pool with the connection string in the connection. Each connection pool is associated with a distinct connection string. When a new connection is opened, if the connection string is not an exact match to an existing pool, a new pool is created. Connections are pooled per process, per application domain, per connection string and when integrated security is used, per Windows identity. Connection strings must also be an exact match; keywords supplied in a different order for the same connection will be pooled separately.
Adding Connections
A connection pool is created for each unique connection string