Operating System - OpenVMS
1830168 Members
5073 Online
109999 Solutions
New Discussion

Re: Automating Oracle Installations

 
James Quillen_1
New Member

Automating Oracle Installations

Hello,

Actually this isn't Oracle specific even tho that's the intended use. We're packaging up an Oracle instance for distribution and want to automate the ORACLEINS.COM file to be executed without any user input. This has never been actually done at my location. The command stream requires over 10 inputs from the user which includes many carriage-returns. My recollections would be the following

$ XXXXX
$ @ora_install:oracleins.com
1



2
1
vf
..........................
The XXXXX would be a define or deassign statement but I'm at a loss at the moment.

Any help would be appreciated.

Thanks Much,
James
5 REPLIES 5
Robert Gezelter
Honored Contributor

Re: Automating Oracle Installations

James,

In theory, you can do this in a variety of ways, using batch jobs, KERMIT, and other tools.

That said, I try to dissuade people from this particular approach in all but the most controlled of circumstances. Such scripts are like the "witches spells of yore", they work, if they are EXACTLY correct. And there are many opportunities for them to slip and become incorrect for the particular circumstances.

A far, FAR, better solution is to identify the mechanisms used and pre-set the parameters automatically. Then a unexpected question will not derail the entire process.
Depending upon your situation, it may also be possible to package up the needed files using Polycenter INSTALL, and then do the node specific customizations after the files have been migrated. Polycenter INSTALL contains a very sophisticated set of tools for constructing environments on destination machines, which I have used to good advantage on quite a few projects.

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com

James Quillen_1
New Member

Re: Automating Oracle Installations

I pondered more about exactly the scenario I believe is necessary. Our proposed installation kit would not be installing the Oracle software. To me it can be the most simple of procedures in that it would be a dcl command file which starts with the execution of the oracleins.com with the answers to the prompts be included in the command file itself. Then addition sql scripts would create the tablespaces & users, import the data, and compile the application. All of this would be in one simple command procedure.

So my 'need' is how to have the oracleins.com accept the answers to the prompts from the command file that it running it rather than from the user input. It's running a command file from inside a command file, but the inner command file needs input. Our goal is to have as little user input as possible where the installer only runs the command file to create everything necessary for the application.

My command file would look similar to this....


$ set def ora_install
$ define sys$input ??????????
$ @oracleins.com
1



2
1
VF
.....continuation of additional variables
Exit
$ sqlplus XXX/XXX
@create_tablespace.sql
@create_users.sql
exit
$ imp xxx/xxx
$..........and so forth and so on
Bojan Nemec
Honored Contributor

Re: Automating Oracle Installations

James,

If ora_install:oracleins.com reads the variables from sys$input you have no need to define any logical name. Sys$input is already defined to the command procedure itself when you run the procedure. The first line which starts with a $ will send an end of file (CTRL/Z) character. If you need to include lines which start with $ you can add a $ DECK as a first line and end the data with an $ EOD line:

$ @ora_install:oracleins.com
$ deck
1



2
1
vf
......
$ eod

But if you have no $ in yours data, this is not required.

Bojan
Robert Gezelter
Honored Contributor

Re: Automating Oracle Installations

James,

That is precisely the problem. SYS$INPUT is set to read from the CURRENT command file, not an outer command file. Thus, the trick of embedding information following the invocation works for programs, but not for command files.

Creating a simple example of two related command files illustrates the problem well:

x.com

$ @y.com
this is a test
$ write sys$output "Back at X.COM"
$ EXIT

y.com

$ show logical sys$input
$ show logical sys$error
$ show logical sys$command
$ read/prompt xxx text
$ write sys$output text
$ exit

Identifying how to do this requires examining the Oracle installation scripts, and determining how the obtain their input, and see if it can be faked.

If you really want to fake a terminal session, C-KERMIT has some good scripting tools.

I can say, that were I looking at this problem, I would either look at the ORACLEINS files, or I would, as I mentioned, look at kitting up the files and re-customizing. Your comments about SQL work would fit nicely into that scheme.

- Bob Gezelter, http://www.rlgsc.com
Peter Quodling
Trusted Contributor

Re: Automating Oracle Installations

Of course, there is no reason why you can't go whole hog and build a PCSI kit... It has it's merits (consistency, rollback etc...)

I have seen way too many sites where new application version installations are ftp's...

q
Leave the Money on the Fridge.