GENERATE DDL FOR SERVER

Returns a create statement for a named server.

Syntax

SYS_BOOT.MGMT.generate-ddl-for-server(server_name);

where server_name is the name of the server.

Example

SELECT * FROM TABLE(SYS_BOOT.MGMT.generate_ddl_for_server('FileReaderServer'));

Returns:

'STATEMENT'
'CREATE OR REPLACE SERVER "FileReaderServer"'
'FOREIGN DATA WRAPPER ECDA'
'OPTIONS ('
'  CHARACTER_ENCODING 'UTF-8','
'  CLASSNAME 'com.sqlstream.aspen.namespace.common.FileSetColumnSet','
'  DIRECTORY '/tmp','
'  FILENAME_PATTERN 'buses\.log','
'  PARSER 'CSV','
'  SEPARATOR ',','
'  SKIP_HEADER 'false''
');'

In a case when a server was created with the following code:

CREATE OR REPLACE SERVER FileReaderServer
FOREIGN DATA WRAPPER ECDA
OPTIONS (classname 'com.sqlstream.aspen.namespace.common.FileSetColumnSet',
parser 'CSV',
character_encoding 'UTF-8',
separator ',',
skip_header 'false',
directory '/tmp',
filename_pattern 'buses\.log');