Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Basics for OPEN VMS

Stephanie Gonos
Occasional Contributor

Oracle Basics for OPEN VMS

I am really new to VMS all my background is
Solaris.

I am trying real hard to set up Oracle on our Alpha V8.3 system.

I've looked over HP and oracle documentation
and still can't get a complete picture of how
VMS is set up for an install.

Can anyone provide some additional information? I have an ORADBA account setup.
the directories are there. how do I set up
the environment variables as in Unix ?

My utlimate goal is to have a user on VMS be able to connect to another server (windows)
in oracle.

Does VMS have a host file ? when I try to
do SQLPLUS sys/doggie99@walkway...
TNS 12145 TNS could resolve the connect identifer specified.

walkway is in the tnsnames file and it's the other server I want to connect to.


URLs and reference documents are appreciated.

I get a tnsnames errror about identify the
resource. Does VMS have a grep or find command to see if I have two tnsnames.ora files ?

Thanks.
7 REPLIES
John Gillings
Honored Contributor

Re: Oracle Basics for OPEN VMS

Stephanie,

OpenVMS isn't Unix. Sorry. You've got a learning curve ahead. The best advice is to try to avoid attempting to force fit your Unix knowledge in OpenVMS. That's a recipe for frustration. (I'm in the process of going the other way...)

Hopefully someone with Oracle skills can comment on environment stuff, but VMS doesn't have an exact equivalent to Unix environment variables.

VMS does have a host file, but typically you don't edit it directly. If you're running TCPIP services use:

$ TCPIP SHOW HOST walkway...

to see if it's defined somewhere (local host file or DNS). To define a local host

$ TCPIP SET HOST walkway/ADDRESS=10.1.2.3

If you're running a different TCPIP stack, the commands will be different.

You can get versions of grep which run under OpenVMS, look on the freeware cd or website. The native OpenVMS command is SEARCH

$ SEARCH file "string","string"

it's not as flexible as grep - the strings are not regular expressions.

There's no OpenVMS equivalent of Unix find, you use the DIRECTORY command (like ls) to locate files.

$ DIRECTORY disk:[000000...]tsnames.ora

that says to search an entire disk for the filename. [000000] is the top of the disk and "..." means to recurse down the directory tree. VMS doesn't have the concept of a single filesystem root, so you have to search each physical disk in turn.

File specifications under OpenVMS are probably the place you'll get most confused. On OpenVMS they seem rather clumsy to a Unix mindset, with a separation between devices, directories and file names.

Apart from the OpenVMS document set, there are numerous references for Unix people to learn OpenVMS, but not having been through it, I can't give you a recommendation. Of the OpenVMS document set (or rather "mountain" :-), I'd suggest you start with "OpenVMS User's Manual" http://h71000.www7.hp.com/doc/731final/6489/6489pro.html#starting_ch and "Guide to OpenVMS File Applications" (but start at Chapter 5) http://h71000.www7.hp.com/doc/731final/4506/4506pro_014.html#apps_locating_naming_files
A crucible of informative mistakes
Willem Grooters
Honored Contributor

Re: Oracle Basics for OPEN VMS

As John already stated: you need to be think different. Apart from the (shelf-size) openVMS documentation on the openVMS site @ HP, a lot of information can be obtained from several locations (take a look at http://www.openvms.org/pages.php?page=Beginner fro a number of links). Free (!) training is availabe at http://plato.ccsscorp.com/index.html
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: Oracle Basics for OPEN VMS

Installing Oracle on OpenVMS can be little tedious at times, but not much harder than on any other platform that is not familiar to you. Prepare to do it twice... because you will :-).

Just get yourself the platform specific installation guide, and follow the steps ?! Did you ? The question gives no indication which is 'suspect'.

Once you are in the Oracle Universal Installer it feels much like any other platform, with oracle making the native OpenVMS style file addressing ( dev:[dir.subdir]file.ext ) look and feel like Unix ( /dev/dir/subdir/file.ext ).

Environment variable are LOGICAL NAMES.
$ SHOW LOGICAL ORA_*
You should have to didle with those, as ORAUSER will eventually set those up (by putting an Oracle provided table in the processes lookup list)

Sounds like you want to do the CLIENT install. Be sure to select the optional untilities if you need IMPORT / EXPORT and friend, otherwise you end up with just SQLplus.

If it gets too tricky, hire professional help either from Oracle or a consulting firm.

Best regards,
Hein van den Heuvel
HvdH Performance Consulting.

Stephanie Gonos
Occasional Contributor

Re: Oracle Basics for OPEN VMS

Appreciate all the comments... It gives me a direction to go in. I'll try to divest myself of the unix "mentality".. but let me ask one more question ...

I was able to get my connection working, I had problems using the editor and must have messed up my tnsnames.ora file with bad characters. I redid it from scratch and it worked. Oracle has gotten pretty detailed about how to do an linux/unix install .. type this command etc... but not as detailed with VMS. They refer you to do things... and don't tell you how, assuming that you "know". I am looking over some
older Oracle docs .. like 7 or 8 since they
seem to have some VMS basics in them.

Since I have a personal and oracle account on VMS, Would the login file would hold the directory information for the oracle directory location or not ? I am attempting to cross the concept with the environment variables assigned to a user account in unix. Does VMS have the same same ? Oracle account accesses oracle directories, personal account accesses my home directory.

I did get the Michael Duffy .. Getting started with OpenVMS book. Any others you all can/would recommend?

Thanks again.
Steven Schweda
Honored Contributor

Re: Oracle Basics for OPEN VMS

> [...] I had problems using the editor [...]

Vim is available for VMS.

> [...] They refer you to do things... [...]

Without an example, it's not easy to say much
about that.

> [...] I am attempting to cross the concept
> with the environment variables assigned to
> a user account in unix. [...]

I'm not sure that I know what that means,
even in Unix. If you are setting environment
variables in your shell start-up file
("~/.profile", "~/.cshrc", or whatever) on
Unix, and if what you need on VMS is some
logical names, then yes, you can define
logical names in SYS$LOGIN:LOGIN.COM.

> [...] book [...] Any others you all
> can/would recommend?

Have you looked at the real VMS
documentation? It's plentiful, and some of
it is directed at a new user.

http://h71000.www7.hp.com/doc/index.html
http://h71000.www7.hp.com/doc/os83_index.html
http://h71000.www7.hp.com/doc/731final/6489/6489pro.html

Unlike some operating systems, VMS was
created as a commercial product in the days
when a product without decent documentation
was not likely to succeed. Hence, it has
some. (And some of it even explains how to
use the editors.)
Hein van den Heuvel
Honored Contributor

Re: Oracle Basics for OPEN VMS

Stephanie,

I like your further explanations. You seem to be on the rigt track.

>> I was able to get my connection working, I had problems using the editor and must have messed up my tnsnames.ora file with bad characters.

OpenVMS has 'flavors' of text files, the default being 'variable length' where records are stored with a hidden length counter.
Oracle requires 'stream-LF' for most files, which is much like a Unix files. A stream of bytes with a line-feed as record seperator.
$ DIRECTORY/FULL shows the details for a file.
GOOGLE will find more explanations and conversions.

>> I redid it from scratch and it worked.

Sweet.

>> Since I have a personal and oracle account on VMS, Would the login file would hold the directory information for the oracle directory location or not ?

It could, and I often do by defining a SYMBOL for 'orauser' to execute '@ ... orauser ' from the target location.
That location can be stashed into a SYSTEM WIDE LOGICAL NAME. Read on.


>> I am attempting to cross the concept with the environment variables assigned to a user account in unix. Does VMS have the same same ?

OpenVMS has TWO namespaces which behave slightly different: SYMBOLS and LOGICALS
SYMBOLS are typically used for shell (DCL) variables (string or integer) and 'alias' commands. Do $ SHOW SYMB ORA*
LOGICALS are typically used to point to files or directories and can only be strings. There are many SCOPEs avaiable for logicals through logical name tables. The SYSTEM logicals are in table LNM$SYSTEM and are visible to each process. ORACLE typically uses LOGICAL to stash variables and files names alike. When you start Oracle, it creates a TABLE ORA_xxxxxxx and loads that with logicals When you run ORAUSER, that table is brought into your scope (your table of tables). Use: $ SHOW LOGICAL ORA*

>> Oracle account accesses oracle directories, personal account accesses my home directory.

Sure. That's what most folks do to stay sane.

Be sure to use the HELP command on OpenVMS a lot!

Enjoy!
Hein.

Richard W Hunt
Valued Contributor

Re: Oracle Basics for OPEN VMS

Welcome to the wonderful world of VMS and ORACLE.

We have ORACLE 10g client running on OpenVMS 8.3, but we have come to this point through versions starting with OpenVMS 6.2 and ORACLE 6.? (or something like that - it has been too long ago to be certain of the exact versions.) We've gone through ORACLE 7.1, 7.3, 8.3, and 9.2, and VMS versions 7.1, 7.2, 7.3-2, and we are moving to 8.3 now. So I've seen most of the configurations including clustered using earlier shared ORACLE and for 9.2, Real Application Cluster software.

Basically, if you are trying to set up ORACLE explicitly, you are working way too hard. You say you want to talk to another machine that holds your database. This is using the ORACLE Client s/w. When you have ORACLE client, you want to be able to do two or three simple things. (Simple conceptually, anyway.)

First, verify that you can access the target box, which means your TCP stack needs to be able to resolve that name. For TCPIP Services for OpenVMS, use $ TCPIP SHOW HOST xxxx and see if it resolves. If it does, that is the first step. If your protocol stack is another product, you need to find out how to manipulate the SET/SHOW HOST equivalents.

But you would VERY STRONGLY PREFER that your name server can resolve the name of your ORACLE server. To do that with the TCPIP stack, this is a SET NAME_SERVICE command to define the servers that are your local DNS boxes. (Be sure the definitions are /SYSTEM if it is the TCPIP Services product.) Only if you can't use DNS, create a local definition of that host on your VMS box.

Second, once your ORACLE is correctly installed, you need to run some ORACLE-authored scripts. WARNING: Next sequence contains multi-valued word INSTALL, which has more than one meaning to OpenVMS.

To prepare the system at reboot time, you need a startup instruction stream to execute @ORAUSER, not qualified by an instance name. Then you must run @INSORACLE to install (make known) the files you installed (loaded and relinked) during the installation. Both files are in the directory in which the product was originally installed, or not more than two levels deeper. The startup instruction stream could be triggered by editing the file SYS$MANAGER:SYSTARTUP.COM or by running a separate script triggered from SYSTARTUP.

Now, each user of the DB should execute the @ORAUSER script to define all the logical name infrastructure that ORACLE wants. Do that before trying to run everything.

I'm not sure how you actually specify a default instance there, but you need to define the instance that SQLplus or other ORACLE utilities will try to use to get to the server in question. For us, the logical name is SITE_DBNAME, which we redefine in a little script we run when we want to change from one instance to another. But our interface might be different than yours.

The thing you need to edit within ORACLE is the TNSNAMES.ORA file, which contains "formulas" for the connection you will need. TNSNAMES has one entry for each of our (four) instances where it defines the host name, protocol, port, and SID name as it appears on the ORACLE server.)

We use a unix server, so our instances have UX in their name on our end. An example is

ntdux = ( description = ( address = ( protocol = tcp) (port=1521) (host=xxxdbsrv)) (connect_data=(SID=ntd)))

You should only have one tnsnames.ora file that counts, in the [oracle.network.admin] directory which should be selected by the ORA_NETWORK_ADMIN logical name (if you run @INSORACLE and @ORAUSER appropriately).

You appear to be trying to do too much on your own when in fact a lot of the definitions are available as a result of running the ORACLE environmental tailoring scripts. Unless I misread everything entirely and misunderstood what is going on.
Sr. Systems Janitor