www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
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
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
vad_check
vad_check_installabi...
vad_check_uninstalla...
vad_fail_check
vad_install
vad_load_file
vad_load_sql_file
vad_pack
vad_safe_exec
vad_uninstall
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

VAD_LOAD_SQL_FILE

Loads SQL file and executes its content's statements.
DB.DBA.VAD_LOAD_SQL_FILE (in sql_file_name varchar, in grouping integer, in report_errors varchar, in is_dav integer);
Description

Loads SQL file ( can be regular file or DAV resource ) and then splits its content into single statements and executes them one by one. Along the process, the function makes needed reports and changes 'VAD_errcount' registry variable.

Parameters
sql_file_name – For files, this parameter is either absolute or relative to server's working directory. The directory should be readable according to the virtuoso.ini settings. For DAV resources, the sql_file_name is always absolute: ('/DAV/<folder-name>...').
grouping – Always set this parameter to 1.
grouping – The supported values for this parameter are:
  • 'report' - to log errors and continue or:
  • 'signal' - at the very first error, break the loading and resignal it.
is_dav – This parameter is 0 for plain file and 1 for resource loaded in DAV.
Examples

DB.DBA.VAD_LOAD_SQL_FILE ('./conductor/vdir_helper.sql', 1, 'report', 0);