Using SQL Server 2000 JDBC on a Java 2 Platform


When using on a Java 2 Platform with the standard security manager enabled, you must give the driver some additional permissions. Refer to your Java 2 Platform documentation for more information about the Java 2 Platform security model and permissions.

You can run an application on a Java 2 Platform with the standard security manager using:

"java -Djava.security.manager application_class_name" 

where application_class_name is the class name of the application.

Web browser applets running in the Java 2 plug-in are always running in a Java Virtual Machine with the standard security manager enabled. To enable the necessary permissions, you must add them to the security policy file of the Java 2 Platform. This security policy file can be found in the jre/lib/security subdirectory of the Java 2 Platform installation directory.

To use JDBC data sources, all code bases must have the following permissions:

// permissions granted to all domains 
grant { 
// DataSource access 
permission java.util.PropertyPermission "java.naming.*", "read,write"; 
// Adjust the server host specification for your environment 
permission java.net.socketPermission "*.microsoft.com:0-65535", "connect"; 
}; 

To use insensitive scrollable cursors, and perform client-side sorting of some DatabaseMetaData ResultSets, all code bases must have access to temporary files.

For JDK 1.1 environments, access to "current working directory" must be granted.

For Java 2 environments, access to the temporary directory specified by the VM configuration must be granted.

The following is an example of permissions being granted for the C:\TEMP directory:

// permissions granted to all domains 
grant { 
// Permission to create and delete temporary files. 
// Adjust the temporary directory for your environment. 
permission java.io.FilePermission "C:\\TEMP\\-", "read,write,delete"; 
}; 

Previous Document Previous Page Next Document Next Page Synchronize TOC Synchronize with Contents