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

Multiple default directories for an ID

 
Gregory Pagan
Occasional Advisor

Multiple default directories for an ID

I have a mixed alpha and itanium node cluster. The alpha nodes are running 8.3 and the itanium nodes are 8.3 1h1. The alpha nodes share a system disk and the itanium nodes share a different system disk but we also have a common disk that we run cluster wide stuff from.

I have a new need to have the default directory set in the authorize record changed depending on whether the ID is logging onto an Alpha or an Itanium node. I am trying to avoid creating another application ID if I can avoid it. The idea is to have the ID run a differnt login.com file depending on whether it is on an alpha node or an itanium node.

I tried puting this commonad in the sylogin.com file on the alpha nodes:

$ if f$extract(0,8,f$getjpi("","USERNAME")) .eqs. "ORACLE10"
$ then set default ora_appl:[oracle10]
$ ws ""
$ ws "Oracle10 default directory changed to ora_appl:[oracle10]
$ ws ""
$ endif

But it is not working, as when I get a command prompt and do a show default it still shows what is set in the authorize record.

Is there another way to accomplish this or am I going to have to set up and maintain a seperate account?

Any help would be greatly appreciated.

Greg
Why does this always happen to me?
15 REPLIES 15
John Gillings
Honored Contributor

Re: Multiple default directories for an ID

Greg,

Trust me, this is NOT a good idea! You'll have all kinds of issues from stuff which expects one user to have ONE login directory.

Just one example, MAIL. Where it gets delivered will depend on which node it's received on, but the new mail count is kept in a cluster common area. Net result is your newmail count will NEVER be correct on any node. Perhaps a minor and trivial issue, but just illustrating the kinds of things that can happen.

If you really want to, it's fairly easy to setup. On each node create yourself a concealed device, like this:

$ DEFINE/SYSTEM/EXEC USERS physdev:[USERDIR.]/TRANSLATION_ATTRIBUTES=(CONCEALED,TERMINAL)

(note that physdev MUST be a physical device name, like $1$DGA123:). Make the device different on each node if you want. Add the definitions to SYLOGICALS.COM

Now, define your UAF record with:

/DEVICE=USERS: /DIRECTORY=[YOURUSER]

So, SYS$LOGIN will be defined as USERS:[YOURUSER] which will map to different directories, depending on which node you login to. No need for any code in SYLOGIN or LOGIN.

(though, I repeat, most of the time people want to ELIMINATE this kind of difference)

If all you want to do is have a particular user SET DEFAULT to a different directory when they login to a particular node, I'd put it in the user's LOGIN.COM rather than SYLOGIN. Suppose your nodes are called ALPHA and IA64, try this:

$ node=F$GETSYI("NODENAME")
$ 'node'def="SYS$LOGIN"
$ ALPHAdef="ora_appl:[oracle10]"
$ IA64def="SYS$LOGIN"
$ OTHERdef="somedev:[OTHER]"
$ def='node'def
$ SET DEFAULT 'def'

Note that this code will do something sensible regardless of the node name, and is very easy to add additional nodes in future (like the example above OTHER).
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: Multiple default directories for an ID

> I have a new need to have the default
> directory set in the authorize record
> changed depending on whether the ID is
> logging onto an Alpha or an Itanium node.

Why? What, exactly, will this do for you?
(Besides causing trouble, that is.)

As is often true, asking how to solve the
underlying problem can be more useful than
asking how to implement some particular
sub-ideal "solution" to that problem.
P Muralidhar Kini
Honored Contributor

Re: Multiple default directories for an ID

Hi Greg,

>> I have a new need to have the default directory set in the authorize record
>> changed depending on whether the ID is logging onto an Alpha or an
>> Itanium node.
>> The idea is to have the ID run a differnt login.com file depending on whether
>> it is on an alpha node or an itanium node.

If the need is only for Alpha and Itanium nodes to execute different LOGIN.COM
procedures, you can have a only one LOGIN.COM file per ID but then have that
LOGIN.COM file check whether the current node is Alpha or Ia64 and then
based on this execute different set of code.

Something like -
LOGIN.COM
...
$ IF F$GETSYI("ARCH_NAME") .EQS. "Alpha"
$ THEN
$ ! Alpha Code
$ ELSE
$ ! IA64 Code
$ ENDIF
...

Hope this helps.

Regards,
Murali
Let There Be Rock - AC/DC
John Gillings
Honored Contributor

Re: Multiple default directories for an ID

re: Murali,

$ IF F$GETSYI("ARCH_NAME") .EQS. "Alpha"
$ THEN
$ ! Alpha Code
$ ELSE
$ ! IA64 Code
$ ENDIF

ah, not quite... you could be on a VAX, or some future architecture. Since this kind of potentially incorrect assumption was probably THE biggest issue when migrating to IA64, I'd have hoped that everyone would be more vigilant about not committing it again.

$ arch=$GETSYI("ARCH_NAME")
$ IF arch.EQS. "Alpha"
$ THEN
$ ! Alpha Code
$ ELSE IF arch.EQS."IA64"
$ THEN
$ ! IA64 Code
$ ELSE IF arch.EQS."VAX"
$ THEN
$ ! VAX code
$ ELSE
$ ! Error - unexpected architecture
$ ENDIF
$ ENDIF
$ ENDIF

(assumption is the mother of all stuff ups)
A crucible of informative mistakes
Bob Blunt
Respected Contributor

Re: Multiple default directories for an ID

Greg, what's the real requirement here? Are you using separate databases or unique database versions on the different architectures? Trying to make sure that you only use Alpha executables on the Alpha and Itanium images on Itanium? One main reason for mixed architecture clusters is being able to share data so... it seems counter-productive to try and circumvent that feature.

bob
P Muralidhar Kini
Honored Contributor

Re: Multiple default directories for an ID

Hi John,

>> ah, not quite... you could be on a VAX, or some future architecture
Yes, thats a very good point.

The code that you have put up looks very neat especially the following part
>> $ ELSE
>> $ ! Error - unexpected architecture

I will keep that in mind. Thanks for pointing that out.

Regards,
Murali
Let There Be Rock - AC/DC
Jeremy Begg
Trusted Contributor

Re: Multiple default directories for an ID

Greg, bearing in mind all the warnings others have given you -- there is a way to do this.

What you need is a logical name which identifies the VMS disk and/or root directory for each architecture.

Then, in the SYSUAF, use that logical name as the default device for the user.

For example, if you want user JBLOGGS to log into DSA1:[ALPHA_USER.JBLOGGS] when logging into an AlphaServer, and DSA1:[IA64_USER.JBLOGGS] when logging into an Integrity server, you could set it up as follows:

1. In SYS$MANAGER:SYLOGICALS.COM or SYSTARTUP_VMS.COM, define a logical

$ define/sys/exec ORA_APPL -
DSA1:['f$getsyi("ARCH_NAME")'_USER.] -
/trans=(conc,term)

2. In AUTHORIZE set up the user:

$ mcr authorize modify JBLOGGS -
/dev=ORA_APPL:/dir=[JBLOGGS]

3. Create the two top-level directories.
4. Create the user's directory under each.

This arrangement will correctly set the user's login directory, SYS$LOGIN logical name, etc. at each login (batch, interactive or network).

As others have said, you need to think very carefully before going down this route.

Regards,
Jeremy Begg
abrsvc
Respected Contributor

Re: Multiple default directories for an ID

If the intent is to have a different "working" directory for each architecture, thena a variant on what has been described can work. Using logical names, insert into the login.com file a "set default working_dev" where working_dev is defined on each machine as a concealed device. This will mean that you have duplicate named directories on the "login" device and the "working" device.

An alternative would be to set up the environment based upon logical names that are contained in 2 different tables, one for each architecture. In this fashion the only change would be to determine which tables to use based upon the architecture. We use a similar idea where I am working now to create both production and test environments.

In order to determine which method would work, please describe exactly what the issues are that make you require 2 "login" directories.

Thanks,
Dan
Gregory Pagan
Occasional Advisor

Re: Multiple default directories for an ID

To all:

Thank you for all your replies and important reasons to not do what I proposed as well as ways to do it if I persist. Well, after reading through all the posts and giving more consideration to the ends I am trying to achieve I am going to go the two ID route.

I now see that as a much cleaner and easier to maintain path. I do appreaciate all your replies and your questions which lead me to what seems to be a better result.

Thanks again

Greg
Why does this always happen to me?
Steven Schweda
Honored Contributor

Re: Multiple default directories for an ID

> [...] the ends I am trying to achieve [...]

Disclosing those might have avoided
considerable wasted time and effort.
Robert Gezelter
Honored Contributor

Re: Multiple default directories for an ID

Greg,

I agree with Jeremy: Use a common login, and invoke an architecture-specific set of definitions. Typically, this is done using a logical name (e.g., HOST_ARCHITECTURE:DEFINE.COM). The logical name is defined in the system wide logical name table when the node is started.

There is no need to embed IF statements that check architecture in the user's login, merely an invocation of a file whose logical name differs on each architecture.

What goal are you attempting?

References:

"Strategies for Migrating from Alpha and VAX systems to HP Integrity Servers on OpenVMS", see http://www.rlgsc.com/publications/vmstechjournal/migrationstrategies.html

"Inheritance Based Environments in Stand-alone OpenVMS Systems and OpenVMS Clusters", see http://www.rlgsc.com/publications/vmstechjournal/inheritance.html

- Bob Gezelter, http://www.rlgsc.com
Gregory Pagan
Occasional Advisor

Re: Multiple default directories for an ID

All,

The ID in question is used to control Oracle. Right now we have Oracle version 10 only on our Itanium node but we are upgrading our Oracle version 9 on Alpha to Oracle version 10 on Alpha.

Currently the Oracle10 default device is a drive that houses the Itanium code for Oracle. The Alpha code for Oracle will be on another device to keep them totally separate.

That is why I was interested if I could have one id that I could have go to two home devices. I do appoligize that I did not provide this information from the begging as some of you pointed out.

I am gratefull to you all for taking the time to share your experience and knowledge and I have decidied that the best alternative is to go with two ID's one for each version of Oracle10. It end up being much easier to keep things straight going forward.

Greg
Why does this always happen to me?
Robert Gezelter
Honored Contributor

Re: Multiple default directories for an ID

Greg,

How about defining a system logical name "ORACLE_HOME" which is defined based upon the architecture?

Arguably, this definition could be used as part of the UAF entry for the ORACLE DBA account.

The above is based upon your last description of the specifics of the situation.

- Bob Gezelter, http://www.rlgsc.com
abrsvc
Respected Contributor

Re: Multiple default directories for an ID

With 2 versions of Oracle running in the cluster, do you also want 2 environments? If so, use the "system" level logicals defined during startup to point to the correct version/directory_tree and have the logical names the same. Log into the Alpha and the alpha system table points you to the V9 area, similarly the system table for the Itanium points to the V10 area.

With the logical name being the same on each system, there are no changes required in login.com or any other common procedure.

Dan
Gregory Pagan
Occasional Advisor

Re: Multiple default directories for an ID

We actually have 3 versions of Oracle running in the cluter now. We have oracle 9 for rman running on 1 alpha node, we have oracle 9 for our normal work on another alpha node, and then Oracle 10 on an itanium node. We the values for Oracle_Home get created at the node level not the cluster level. If if logon onto alpha1 you get out ACTOEM intall. If you logon onto alpha2 you get our oracle9 install, etc.

Is that what you are asking about?

Greg
Why does this always happen to me?