RE: login.sql equivalent for RMAN
- From: William Wagman <wjwagman@xxxxxxxxxxx>
- To: Niall Litchfield <niall.litchfield@xxxxxxxxx>, "jkstill@xxxxxxxxx" <jkstill@xxxxxxxxx>, Oracle-L Freelists <oracle-l@xxxxxxxxxxxxx>
- Date: Thu, 30 Apr 2009 08:44:14 -0700
Niall et al,
The problem is not so much platform as much as wanting to separate the
passwords from the script. Indeed, Jared's suggestion will work but I still
have the passwords in the RMAN script which is what I am trying to get away
from.
Thanks.
Bill Wagman
Univ. of California at Davis
IET Campus Data Center
wjwagman@xxxxxxxxxxx
(530) 754-6208
-----Original Message-----
From: Niall Litchfield [mailto:niall.litchfield@xxxxxxxxx]
Sent: Thursday, April 30, 2009 1:22 AM
To: jkstill@xxxxxxxxx; William Wagman; Oracle-L Freelists
Subject: Re: login.sql equivalent for RMAN
If memory serves Bill is on windows rather than *nix and so that form
of shell script won't work. It's perfectly possible to do the
equivalent in a cmd file or my current favourite powershell. I believe
there's a script language called perl that might be used as well;-)
On 4/30/09, Jared Still <jkstill@xxxxxxxxx> wrote:
> On Wed, Apr 29, 2009 at 2:25 PM, William Wagman <wjwagman@xxxxxxxxxxx>wrote:
>
>> Greetings,
>>
>> I am running Oracle 9.2.0.8.0 EE. Is there an equivalent to login.sql for
>> RMAN such that I don't have to store passwords in my scripts? I have
>> looked
>> but am unable to find a solution. What I would like to be able to do, as I
>> can do with SQL is something like create a file like RMAN_LOGIN.SQL -
>>
>>
> This works.
>
> === script ====
> export RCAT=rcat
> export DB=orcl
> export RCAT_USERNAME=rman
> export DB_USERNAME=bkup
>
> export RCAT_PASSWORD=password
> export DB_PASSWORD=password
>
> $ORACLE_HOME/bin/rman <<-EOF
> connect target $DB_USERNAME/$DB_PASSWORD@$DB
> connect catalog $RCAT_USERNAME/$RCAT_PASSWORD@$RCAT
> show all;
> EOF
> ====================
>
> Recovery Manager: Release 10.2.0.4.0 - Production on Wed Apr 29 16:04:36
> 2009
>
> Copyright (c) 1982, 2007, Oracle. All rights reserved.
>
> RMAN>
> connected to target database: ORCL (DBID=57145378)
>
> RMAN>
> connected to recovery catalog database
>
> RMAN>
> RMAN configuration parameters are:
> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS;
> CONFIGURE BACKUP OPTIMIZATION OFF; # default
> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
> CONFIGURE CONTROLFILE AUTOBACKUP ON;
> ...
>
>
> RMAN>
>
> Jared Still
> Certifiable Oracle DBA and Part Time Perl Evangelist
>
--
Sent from Google Mail for mobile | mobile.google.com
Niall Litchfield
Oracle DBA
http://www.orawin.info
--
http://www.freelists.org/webpage/oracle-l
Other related posts: