www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
db.dba.vacuum
user_change_password
user_create
user_drop
user_get_option
user_grant_role
user_revoke_role
user_role_create
user_role_drop
user_set_option
user_set_qualifier
cfg_item_count
cfg_item_name
cfg_item_value
cfg_section_count
cfg_section_name
cfg_write
checkpoint_interval
disconnect_user
fk_check_input_value...
log_enable
log_text
prof_enable
prof_sample
status
sys_lockdown
sys_stat
system
trace_status
user_set_password
virtuoso_ini_path
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY

Functions Index

disconnect_user

Disconnect client connections of a given user
disconnect_user (in username_patternstring);
Description

disconnect_user disconnects clients whose username matches the username_pattern string given as an argument, and returns an integer value giving the number of clients disconnected. This can be used after DELETE USER or REVOKE statement to make sure that the affected user has no open connections.

Parameters
username_pattern – A string pattern to match users to be disconnected. SQL wildcards including Virtuoso extensions may be used:
  • 'smith' - discconnections user Smith's clients.
  • '@smith' - disconnects all users whose name resembles 'smith'.
  • '%' - disconnects all users including the current dba session.
Return Values

The number of clients disconnected is returned.

Errors

Parameter data type checking errors

Examples
Disconnect users

This is how the DBA can close all sessions for all users who name starts with db, including 'dba' which is the DBA itself.

SQL> disconnect_user ('db*');

*** Error 08S01: [Virtuoso Driver]CL065: Lost connection to server
at line 7 (7) of Top-Level: disconnect_user ('db*')
bash$
See Also:

username