Skip to main content
Participant
November 10, 2010
Answered

Controlling packet size from 32K to 4K for SQL DSN

  • November 10, 2010
  • 2 replies
  • 1778 views

I've been engaged by my SQL administrator to find out how the packet size can be reduced from 32K to 4K in the CF9 Enterprise environment in a multi-server configuration. Although it's not likely related to the version rather than the JDBC Drivers provided in the product, none the less there is no clear way of identifying where this could be changed within the ColdFusion DSN's.  Does anybody have any insight on how to control the packet sizes in a SQL DSN i Coldfusion 9 or 9.0.1?  Would be greatly appreciated.

    This topic has been closed for replies.
    Correct answer Avatar

    If you are using MSSQL, open the CF administrator, goto the datasource, click the "Advanced Settings" button and enter in:

    packetSize=8

    within the Connection String textarea box then hit submit, there should be no need to restart anything

    Connection details for the PacketSize property:

    Valid Values

    -1 | 0 | x

    where x is an integer from 1 to 128 that represents a number of bytes.

    If set to -1, the driver uses the maximum packet size that the database server accepts.

    If set to 0, the driver uses the default packet size configured on the database server.

    If set to x, the driver uses a packet size that is calculated using the specified value multiplied by 512.

    Example

    If PacketSize=8, the packet size is set to 8 * 512 bytes (4096 bytes).

    Default

    -1

    Data Type

    int

    Microsoft recommends (4096 bytes)

    2 replies

    AvatarCorrect answer
    Participating Frequently
    November 10, 2010

    If you are using MSSQL, open the CF administrator, goto the datasource, click the "Advanced Settings" button and enter in:

    packetSize=8

    within the Connection String textarea box then hit submit, there should be no need to restart anything

    Connection details for the PacketSize property:

    Valid Values

    -1 | 0 | x

    where x is an integer from 1 to 128 that represents a number of bytes.

    If set to -1, the driver uses the maximum packet size that the database server accepts.

    If set to 0, the driver uses the default packet size configured on the database server.

    If set to x, the driver uses a packet size that is calculated using the specified value multiplied by 512.

    Example

    If PacketSize=8, the packet size is set to 8 * 512 bytes (4096 bytes).

    Default

    -1

    Data Type

    int

    Microsoft recommends (4096 bytes)

    jdbrady67Author
    Participant
    November 10, 2010

    That was exactly what I was looking for, thanks. Consider this thread answered.

    Jerald D. Brady

    Computer Systems Analyst, Sr

    Lockheed Martin Information Technology

    2261 Stevens Drive, Room 260H, MS G3-35

    Richland, WA 99352

    Phone:  (509) 372-0705

    Fax:  (509) 376-8620

    E-mail: Jerald_D_Brady@rl.gov

    Participating Frequently
    November 10, 2010

    Assuming you just want to change that for specific DSN's, you should be able to specify the packet size in the connection string area.

    You didn't mention what database server you're using, but you can find the parameters for SQL Server here: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28VS.71%29.aspx