Using OQL queries in scripts

You can launch the service provider in a special mode that executes a single specified query and disconnects from the service provider.

This allows OQL queries to be used in scripts.

The following example shows the -query option in use.

ncp_oql -domain NCOMS -service Disco -query "select * from disco.status;"

The above example performs a single query on the disco.status database table and disconnects from the OQL Service Provider. In order to perform this query, the ncp_disco process would have to be running in the NCOMS domain, and the specified user name and password combination would have to be valid.

Any acceptable OQL query can be specified with the -query option. The query must be terminated with a semi-colon but not the go keyword.