Index Search Add FAQ Ask Question |
---|
$Date: 07-Apr-1999 $
$Revision: 1.1 $
$Author: Ade Bullock $
Topics
A quick overview of the VMS environment for a new user.
DIRECTORY | - to list contents of a directory |
SHOW DEFAULT | - to show current working directory |
SET DEFAULT | - to change current working directory |
EDIT filename | - to edit a file! |
TYPE filename | - to list a file's contents on screen |
HELP | - to get on-line help |
SEARCH | - to search a set of files for a string |
DELETE filename | - deletes the file |
PURGE filename | - delete old versions of the file |
RENAME | - rename the file |
RUN filename | - runs a program - all programs have an extension .EXE |
@filename | - runs a command procedure (has a .COM extension) |
File specifications are a little different in VMS from other operating systems. For instance the windows file specification c:\windows\system\readme.txt would look a little like the following in VMS:
DUA0:[WINDOWS.SYSTEM]README.TXT;1
The ;1 indicates version 1 of the file. VMS creates a new version of a file when it is changed (don't you wish DOS did this). You can however start eating large amounts of disk space with multiple versions of the file so regular use of the PURGE command is recommended.
One very useful feature of logical names is it permits location independence for files. In the above example the directory can be renamed or moved to a different disk and provided the logical name is changed any commands or programs using the directory will still work. I would recommend that wherever a directory specification is required (either in a program or command file) a logical name is used instead. ORACLE on VMS makes extensive use of logical names.
There is no real equivalent of a path in VMS. Logical names provide a much more flexible and manageable architecture than Unix or Dos paths. (It is actually possible to set up a logical name to point to several directories which performs a similar function to setting up a path).
The Oracle environment for a VMS user is set up by running the appropriate ORAUSER_dbname.COM file. This sets up the necessary command symbols and logical names to access the various ORACLE utilities. Each database created on a VMS system will have an ORAUSER file in it's home directory and will be named ORAUSER_dbname.COM, e.g. for a database SALES the file specification could be:
ORA_ROOT:[DB_SALES]ORAUSER_SALES.COMTo have the environment set up automatically on login, run this command file in your login.com file.
To access SQLPLUS use the following command with a valid username and password:
$ SQLPLUS username/passwordSQLDBA is also available on VMS and can be invoked similarly:
$ SQLDBA username/passwordCTRL/K can be used to show the various key mappings required to drive the menu system of SQLDBA.
When Oracle is installed a root directory is chosen which is pointed to by the logical name ORA_ROOT. This directory can be placed anywhere on the VMS system. The majority of code, configuration files and command procedures are found below this root directory.
When a new database is created a new directory is created in the root directory to store database specific configuration files. This directory is called [.DB_dbname]. This directory will normally hold the system tablespace data file as well as the database specific startup, shutdown and orauser files.
There are several methods available for database startup and shutdown. ORACLEINS (the Oracle install program) and SQLDBA both have menu driven methods to start or stop a database.
Alternatively use command files. The following commands will start a database called SALES (the command INSORACLE will install various shared images which improve Oracle performance):
$ @ORA_ROOT:[DB_SALES]ORAUSER_SALES $ INSORACLE $ @ORA_ROOT:[DB_SALES]STARTUP_EXCLUSIVE_SALESTo start this database automatically when the VMS system is rebooted place these commands in a command procedure, e.g. DUA0:[ORACLE7]START_SALES.COM. Then edit the system startup file SYS$MANAGER:SYSTARTUP_VMS.COM and add the following command at the end of the file:
$ SUBMIT/USER=ORACLE7 DUA0:[ORACLE7]START_SALESThis will start a batch job running under the Oracle7 user account which will start up the database instance SALES.
A database can be shut down by running the command procedure SHUTDOWN_dbname.COM which is found in the database's home directory.
The easiest method is to use ORACLEINS and follow the menu driven commands to create a new database instance. The utility will ask for the database root directory, an instance name and a database name. ORACLEINS will present a set of default parameters for the database. These can be individually modified, in particular the database control files should be placed on different disks.
There is no utility to delete a database however Oracle recommends the following procedure:
First, set up the LISTENER.ORA configuration file which defines the databases for which the listener will serve. The format of this file is well documented elsewhere and will look something like :
#LISTENER.ORA LISTENER= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=LIVE) (PORT=1526) ) ) SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (SID_NAME=SALES) PROGRAM='DUA0:[ORACLE7.NETWORK. ADMIN]SRV_SALES.COM') ) )When a server connection is initiated, the commands specified in the program file pointed at by the PROGRAM qualifier are executed. This file must set up the Oracle environment and start the server process. It is important to keep this file as small as possible to reduce initial connection time when connecting from clients.
An example program file is shown below:
$ PID=F$GETJPI("","PID") $ TAB="TNS_"+PID $ ON ERROR GOTO FINISH $! $ DEFINE ORA_SID SALES ! The database name $! $ DEFINE ORA_SYSTEM DUA0:[ORACLE7.RDBMS] $ DEFINE ORA_RDBMS DUA0:[ORACLE7.RDBMS] $ DEFINE ORA_COMMON DUA0:[ORACLE7.RDBMS] $ DEFINE ORA_DUMP DUA0:[ORACLE7.TRACE] $ DEFINE TNS_ADMIN DUA0:[ORACLE7.NETWORK.ADMIN] $! $ ORASRV := $ORA_SYSTEM:SRV.EXE $ ORASRV "(LOCAL=NO)" $! $FINISH: $ STAT = $STATUS $ ON ERROR THEN CONTINUE $ DEASSIGN/USER/TABLE=LNM$SYSTEM_DIRECTORY 'TAB' $ EXIT STATThere are three commands to control the listener process:
$ LSNRCTL START - start the listener $ LSNRCTL STATUS - return listener status $ LSNRCTL STOP - close the listenerThe LSNRCTL START command should be included in the system startup file if you require SQL/NET to be started automatically on VMS startup.
General: |
Home |
Index |
Preamble |
Glossary |
OraCorp |
Papers |
Fun |
News |
Events |
Y2000 |
Books |
Links |
Forums
Products: |
SQL |
Plus |
Loader |
PL/SQL |
PreComp |
OPO |
OMO |
OO4OLE |
DBA |
PQO |
PSO |
OCO |
Net |
ODBC |
WebServer |
Des2k |
Dev2k
| Systems: |
MVS |
Unix |
Windows |
WindowsNT |
NetWare |
VMS
| |