Neoview Command Interface (NCI) Guide (R2.5)
Running a Command When Launching NCI
To execute an SQL statement or an NCI command when launching the Neoview Command
Interface, use the -q or -sql command-line parameter. This parameter enables you to run a
single command on the command line without having to enter commands in NCI.
NOTE: You cannot specify this parameter at the same time as the -s or -script parameter.
When using -q or -sql, you must enclose the command in double quotes. The SQL terminator
is not required at the end of an SQL statement and is disallowed after an NCI command.
Although you can run any of the NCI commands with -q or -sql, the @, OBEY, and PRUN
commands are the most useful.
Example of Running an SQL Statement With -q or -sql
Use -q or -sql with the CREATE SCHEMA statement to create a schema when launching NCI:
• On Windows, in the Command Prompt window, enter:
cd hpnci-installation-directory\Neoview Command Interface\bin
hpnci.cmd -q "create schema persnl"
• On Linux or UNIX, in the terminal window, enter:
cd hpnci-installation-directory/nci/bin
./hpnci.sh -q "create schema persnl"
NOTE:
Schema names that begin with HP_ are reserved for use by HP. For more information about
reserved schema names, see the Neoview SQL Reference Manual.
After you enter the SQL statement, NCI launches and prompts you to log in by default (if you
did not specify -h, -u, -p, and -dsn on the command line), runs the SQL statement, and then
returns to the command prompt:
Host Name/IP Address: neo0101.mylab.mycorp.net:18650
User Name: dba1
Password:
DataSource Name [Admin_Load_DataSource]:
--- SQL operation complete.
C:\install\Neoview Command Interface\bin>_
Example of Running an NCI Command With -q or -sql
Use -q or -sql with the PRUN command to run multiple script files simultaneously from the
command line:
• On Windows, in the Command Prompt window, enter:
cd hpnci-installation-directory\Neoview Command Interface\bin
hpnci.cmd -q "prun"
• On Linux or UNIX, in the terminal window, enter:
cd hpnci-installation-directory/nci/bin
./hpnci.sh -q "prun"
After you enter the NCI command, the Neoview Command Interface launches and prompts you
to log in by default (if you did not specify -h, -u, -p, and -dsn on the command line), and runs
the command. The parallel run (PRUN) operation prompts you to enter settings and then executes
the script files. At the end of the PRUN operation, NCI returns to the command prompt. For
more information about the PRUN operation, see “PRUN Command” (page 100).
40 Launching NCI