Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Remote data access » Directory access servers


Creating directory access servers (SQL)

Administrators can create directory access servers using the CREATE SERVER statement in Interactive SQL.


You must have the SERVER OPERATOR and MANAGE ANY USER system privileges.

You must have the CREATE PROXY TABLE system privilege to create proxy tables owned by you. You must have the CREATE ANY TABLE or CREATE ANY OBJECT system privilege to create proxy tables owned by others.

  1. Create a remote server by using the CREATE SERVER statement.

    CREATE SERVER my_dir_server
    USING 'ROOT=c:\Program Files;SUBDIRS=3';
  2. Create an external login by using the CREATE EXTERNLOGIN statement.

    CREATE EXTERNLOGIN DBA TO my_dir_server;
  3. Create a proxy table for the directory by using the CREATE EXISTING TABLE statement.

    CREATE EXISTING TABLE my_program_files AT 'my_dir_server;;;.';

    In this example, my_program_files is the name of the proxy table, and my_dir_server is the name of the directory access server.

  4. Display rows in the proxy table.

    SELECT * FROM my_program_files ORDER BY file_name;
  5. Using the sp_remote_tables system procedure, you can see all the subdirectories located in c:\mydir on the computer running the database server:

    CALL sp_remote_tables( 'my_dir_server' );


The directory access server is created and configured.

 See also