Wednesday, May 15, 2013

Virtuoso - Interactive SQL Query

Native Virtuoso Interactive SQL Query (ISQL)

To assist you with the use of Virtuoso an interactive SQL interpreter utility called "ISQL" is bundled with all Virtuoso installations. This utility allows you to enter and execute SQL statements from a command line prompt against a local or remote Virtuoso server.
The command line format for executing this utility is:
isql [<hostname>][:<port#>]
The steps that follow guide you through the process of using ISQL to verify your Virtuoso installation:
  1. Open up a DOS shell
  2. Move into the "bin" sub-directory of your Virtuoso installation
  3. Type the following command: isql
    This will connect you to the default Virtuoso server at port "1111", if you want to connect to your demonstration Virtuoso database (which listens at port 1112 by default) then enter: isql 1112
  4. At the ISQL command line prompt type in the following command:
    tables ;
    This will produce a list of tables in the current Virtuoso database, you can also enter other SQL statements e.g.:
    select * from Customers
    This will produce a listing of records in the "Customers" table.
  5. If you are not able to perform these task that it implies that your Virtuoso database server is not running or that it has not been installed properly.

ODBC based Interactive SQL Query Utility (ISQLO)

In addition to a Native ISQL utility, your Virtuoso installation includes an ODBC based version of "ISQL" called "ISQLO", this enable you to connect to ODBC DSN's rather than Virtuoso only. To use this program perform the following steps:
  1. Open up a DOS shell
  2. Move into the "bin" sub-directory of your Virtuoso installation
  3. Type the following command :
    isqlo <enter a valid ODBC Data Source Name>
    Note:
    If your DSN contains spaces you will need to enclose it within double quotes when passing it as a parameter to ISQLO
  4. Enter any valid SQL at the ISQLO command line prompt.
  5. You can also use this utility from within the Virtuoso Conductor

 

10 comments: