Secures features for databases running on this database server.
{ dbsrv10 | dbeng10 } -sf feature-list ...
All operating systems and servers.
This option allows you to enable and disable features for a database server. These settings affect all databases running on the database server. You can enable all disabled (secured) features for a connection by setting the secure_feature_key option to the key specified by the -sk option. Any connection that sets the secure_feature_key option to the key specified by -sk can also change the set of secured features for a database server using the sa_server_option system procedure.
The feature-list is a comma-separated list of feature names or feature sets to secure for the database server. Use feature-name to indicate that the feature should be disabled, and -feature-name to indicate that the feature should be removed from the disabled features list. For example, the following command indicates that only dbspace features are enabled:
dbeng10 -n secure_server -sf all,-dbspace
The following feature-name values are supported (values enclosed in parentheses are the short forms of feature names that can also be specified):
Feature name | Description |
---|---|
backup | Disables the use of the BACKUP statement, and therefore, the ability to run server-side backups. This does not restrict the ability to perform client-side backups using dbbackup. See BACKUP statement. |
database | Disables the use of the CREATE DATABASE, ALTER DATABASE, DROP DATABASE, CREATE ENCRYPTED FILE, and CREATE DECRYPTED FILE statements. |
db_delete_file (delete_file) | Disables the use of the db_delete_file DBLib function, which deletes database files. db_delete_file is used by the dbbackup -x and -xo options, so securing db_delete_file causes dbbackup to fail if the -x or -xo options are specified. See db_delete_file function. |
dbspace | Disables the use of the CREATE DBSPACE, ALTER DBSPACE, and DROP DBSPACE statements. |
directory (dir) | Disables the use of directory class proxy tables. This feature is also disabled when remote_data_access is disabled. |
external_procedure (ext_proc) | Disables the use of external stored procedures. This does not disable the use of the xp_* system procedures (such as xp_cmdshell, xp_readfile, and so on) that are built into the database server. See Calling external libraries from procedures. |
java | Disables the use of Java-related features, such as Java procedures. See Tutorial: Using Java in the Database. |
load_table (load) | Disables the use of the LOAD TABLE statement. See LOAD TABLE statement. |
log_file (log) | Disables the ability to change the log file and disables the ability to increase the maximum size of the log file. You can specify a server log file and its size when starting the database server. |
remote_data_access (proxy) | Disables the use of any remote data access services, such as proxy tables. |
request_log (rll) | Disables the ability to change the request log file and also disables the ability to increase the limits of the request log file size or number of files. You can specify the request log file, as well as limits on this file, in the command to start the database server; however, they cannot be changed once the server is started. When request log features are disabled, you can still turn request logging on and off, and reduce the maximum file size and number of request logging files. See Request logging. |
restore | Disables the use of the RESTORE DATABASE statement. See RESTORE DATABASE statement. |
unload | Disables the use of the UNLOAD TABLE and UNLOAD statements. See UNLOAD TABLE statement and UNLOAD statement. |
web_service_client (web_client) | Disables the use of stored procedures defined to be a remote call to an external HTTP or SOAP web service. |
xp_cmdshell (cmdshell) | Disables the use of the xp_cmdshell procedure. See xp_cmdshell system procedure. |
xp_read_file (read_file) | Disables the use of the xp_read_file procedure. See xp_read_file system procedure. |
xp_write_file (write_file) | Disables the use of the xp_write_file procedure. See xp_write_file system procedure. |
The following feature sets let you disable groups of related features. The following values are supported:
Feature set | Description |
---|---|
all | Disables all features that can be disabled (all features in the above list). |
local_call | Disables all features that provide the ability to execute code that is not directly part of the server and is not controlled by the server. This set consists of the cmdshell, external_procedure, and java features. |
local_db | Disables all features related to database files. This set consists of the backup, restore, database, and dbspace features. |
local_io | Disables all features that allow direct access to files and their contents. This set consists of the db_delete_file, xp_read_file, xp_write_file, directory, load_table, and unload features. |
local_log | Disables all logging features that result in creating or writing data directly to a file on disk. This set consists of the request_log and log_file features. |
local | Disables all local-related features. This set consists of the local_call, local_db, local_io, and local_log features. |
none | Specifies that no features are disabled. |
remote | Disables all features that allow remote access or communication with remote processes. This set consists of the web_service_client and remote_data_access features. |
The following command starts a database server named secure_server with access to the request log and with all remote data access features disabled. The key specified by the -sk option can be used later with the secure_feature_key database option to enable these features for a specific connection.
dbsrv10 -n secure_server -sf request_log,remote -sk j978kls12
If a user connected to a database running on the secure_server database server sets the secure_feature_key option to the value specified by -sk, that connection has access to the request log and remote data access features:
SET TEMPORARY OPTION secure_feature_key = 'j978kls12';
The following command disables all features, with the exception of local database features:
dbeng10 -n secure_server -sf all,-local_db