After you have installed your driver and defined it on the CLASSPATH, you can use the driver to access your data with Interactive SQL for JDBC (JDBCISQL). JDBCISQL supports a command line interface that allows you to connect to a data source, execute SQL statements and retrieve results for display on a terminal.

To execute commands with JDBCISQL:

  1. Start the ISQL tool. Do one of the following:
    • On Windows, double-click thejdbcisql.bat file in the install_dir\jdbcisql folder. Or, from a command prompt, navigate to the install_dir\jdbcisql directory and run the jdbcisql.bat file.
    • On Linux and UNIX, change to the install_dir\isql directory and run jdbcisql.sh.
    The Interactive SQL prompt appears.
  2. Type the driver name class; then, press Enter:
    com.ddtek.jdbc.sharepoint.SharePointDriver
  3. Type connect followed by the connection URL for the driver; then, press Enter. For example:

    OAuth 2.0 refresh token grant example

    connect jdbc:datadirect:sharepoint:
    ServiceURL=https://mycorp.sharepoint.com/sites/marketing/global;
    ClientID=client_id;ClientSecret=client_secret;TokenURI=token_uri;
    RefreshToken=refresh_token;
    If successful, the tool will return the time required to connect.
  4. At the ISQL> prompt, issue a SQL command to query or modify the data source; then, press Enter. For example:
    SELECT * FROM FEATURES;
    Note: SQL commands must be terminated by a semi-colon.
    Note: In addition to SQL commands, JDBCISQL supports a set of proprietary commands. Type Help at the prompt for a list of supported commands and syntax.
    The results of the command are displayed in the terminal.
  5. After you are finished executing queries and commands, you can disconnect from the data source by typing the following; then, pressing Enter:
    DISCONNECT;
  6. Press any key to end the session.