Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: backup script

RE: backup script

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Wed, 30 Mar 2005 14:15:11 -0500
Message-ID: <001a01c5355c$cb3d9040$2004a8c0@development.perceptron.com>


I guess it depends on OS/Oracle version. I checked NT/Oracle8.1.5, and you are right - ORACLE_HOME is not set.

On the other hand, on XP/Oracle10 it is set:

C:\temp>set ORACLE_HOME
ORACLE_HOME=C:\oracle\EM

C:\temp>

It was set during oracle installation.

Igor Neyman, OCP DBA
ineyman_at_perceptron.com

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Niall Litchfield Sent: Wednesday, March 30, 2005 2:01 PM
To: ineyman_at_perceptron.com
Cc: ora_forum_at_yahoo.com; oracle-l_at_freelists.org Subject: Re: backup script

On Wed, 30 Mar 2005 13:37:08 -0500, Igor Neyman <ineyman_at_perceptron.com> wrote:
> Why reading the registry?
> You could just use %ORACLE_HOME% system variable in your script.

I think you are thinking of a sqlplus script, the chances are that this environment variable isn't available directly from a command prompt.

C:\TEMP>SET ORA
Environment variable ORA not defined

C:\TEMP>SQLPLUS / SQL*Plus: Release 10.1.0.2.0 - Production on Wed Mar 30 19:54:21 2005

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options

SQL> @%ORACLE_HOME%\RDBMS\ADMIN\DEMO User created.

Grant succeeded.

Grant succeeded.

User altered.

User altered.

Connected.

etc etc

Me, I'd go with the sqlplus version. I don't see why the ORACLE_HOME directory is required in an NT backup script anyway.

actually I'd also go with vbscript and not dos scripting (unless Jared is watching - in which case of course there is no alternative to perl :) )

-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 30 2005 - 14:18:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US