Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Implicitly get the database connection
bzbzzb_at_hotmail.com (MATHEW KING) wrote in message news:<528c8daf.0403040122.4690916d_at_posting.google.com>...
> Hi,
>
> I am using Oracle Version 8.1.7 for making backup via RMAN.
> First I connect to SQLPLUS via:
>
> SQL> Connect SYSTEM/MANAGER_at_TEST
>
> Then I issue the following command on SQL prompt:
>
> SQL> host rman target user/pw nocatalog
>
> RMAN-06005: connected to target database: TEST (DBID=1817902599)
> RMAN-06009: using target database controlfile instead of recovery
> catalog
>
>
> So, I connected to RMAN.
> As far as my knowledge, it’s implicitly got the target username
> and password from the first connection, which I gave to connect to
> database in the beginning.(system/manager).
> With regards to this, if I want to give the database alias implicitly,
> what syntax I add in the command.
>
> For Example:
>
> SQL> host rman target user/pw_at_dbname nocatalog
>
> I like to remind you that I wanted to use the database connection
> implicitly.
>
> Could someone suggest?
>
> Regards
>
> Martin
There is no need at all to misuse sql*plus to connect to RMAN. You should write a shell script, set ORACLE_SID appropiately and you won't need the horrible scenario you outlined above.
Try to learn to do things properly instead of resorting to hacking from day 1.
Sybrand Bakker
Senior Oracle DBA
Received on Thu Mar 04 2004 - 09:28:36 CST