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

Home -> Community -> Usenet -> c.d.o.server -> Re: ALTER DATABASE RENAME FILE errors when executed from inside a shell script

Re: ALTER DATABASE RENAME FILE errors when executed from inside a shell script

From: Brian Peasland <dba_at_remove_spam.peasland.com>
Date: Fri, 15 Aug 2003 17:22:45 GMT
Message-ID: <3F3D16E5.DA37B4B4@remove_spam.peasland.com>


ORA-12545 is as follows:

Connect failed because target host or object does not exist

Your script did not make the initial connection to the database. As a result, the other commands in your script came up with ORA-3114, not connect to Oracle.

> /opt/PlexView/Oracle/ora01/app/oracle/product/8.1.7/bin/svrmgrl <<

Why not use "$ORACLE_HOME/svrmgrl"?

> EOSQL
> connect internal
> startup mount plxdb3;

Why not use "startup mount" instead? Or use "startup mount $ORACLE_SID".

> alter database rename file $2 TO $3;
> alter database open;
>
> exit
> EOSQL

> Error while trying to retrieve text for error ORA-12545

The above error message is your problem. You'll have to resolve that. You'll need to know why your target db does not exist. Is it on the same server? If you want more messages, try invoking the shell script as "sh -x scriptname". This can give you more information about each command in the script as it is run.

But I agree with Daniel in that it is easy just to do this in SQL*Plus. Why script this when this is a seldom-performed operation?

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Fri Aug 15 2003 - 12:22:45 CDT

Original text of this message

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