You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Current »

Note there is also a script at  /afs/slac/package/pinger/guthrie/node.pl that provides some read and write access to the NODEDETAILS database.

To update the NODEDETAILS database directly with SQLPlus, the Oracle SQL interpreter, log onto a SLAC Taylored host cottrell@pinger-test.slac.stanford.edu. Set the ORACLE_HOME environment variable to /usr/oracle, e.g. setenv ORACLE_HOME /usr/oracle (csh) or export ORACLE_HOME=/usr/oracle (sh/bash/etc.).

Get the Guthrie NODEDETAILS IEPM password from escrow (escrow edit -c iepm iepmacct), then run sqlplus from the command prompt. Unless you have defined ORACLE_HOME in your shells configuration file, e.g. in cshrc, then you will need to define it first:

pinger@pinger $ setenv ORACLE_HOME /usr/oracle  

pinger@pinger $ cd $ORACLE_HOME/bin
pinger@pinger $ sqlplus iepm@slacprod

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Jun 13 16:49:59 2014

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning option

SQL> 

Invoking sqlplus is done with the name of the command, a space, the database username, currently iepm, an at sign, and then the database connect string, currently slacprod.

SQL statements can then be entered at the SQL> prompt. Punctuation is important in sqlplus. Always end insert, update, delete, select, create, and alter statements with a semicolon. By default, Oracle does all work in a transaction, so you must execute the commit; command to save any changes you've made to the database or the rollback; command to revert them after you have completed a set of changes. When finished use exit; to leave SQLPlus.

  • No labels