Compartir a través de


setPacketSize Method (SQLServerDataSource)

Sets the current network packet size used to communicate with SQL Server, specified in bytes.

public void setPacketSize(int packetSize)

Parámetros

packetSize

An int value containing the network packet size.

Notas

The acceptable range of values of this property is [-1 | 0 | 512..32767]. If this property is set to a value outside the acceptable range, an exception will occur.

The application might want to set the packetSize property while connecting with SSL (Secure Sockets Layer) encryption. The Microsoft SQL Server 2005 JDBC Driver negotiates the packet size with the server. If the encrypt property is set to "true" and the negotiated packet size is larger than the Java Virtual Machine (JVM)'s default security provider's SSL record size, the driver will raise an error and terminate the connection.

In addition, the application might want to set the packetSize property without requesting the SSL encryption. In this case, if the server requires the client to support SSL encryption, the driver checks the JVM's default security provider's SSL record size. If the packetSize property is larger than the JVM's default security provider's SSL record size, the driver will raise an error and terminate the connection.

For more information about using SSL, see Usar el cifrado SSL.

Vea también

Referencia

SQLServerDataSource Class

Conceptos

SQLServerDataSource Methods
SQLServerDataSource Members