fitzjarrell_at_cox.net wrote:
> amerar_at_iwc.net wrote:
>> Hi,
>>
>> This may seem like an easy thing, but I am having issues.
>>
>> We are running 9i. I need to write a script that will log into some
>> remote databases and perform some maintenance.
>>
>> The basic connect in the script looks like this:
>>
>>
>> sqlplus /@MDO <<EOF
>> connect / as sysdba;
>> .
>> .
>> .
>>
>>
>> But that is not working............any suggestions?
>
>
> Obviously it won't work; you're not connected to the remote server
> through the O/S. Therefore O/S authentication is not available to you.
> Several other options do come to mind, however:
>
> -- You could configure ssh between the servers, set up your scripts on
> each server then, through ssh, login and execute these 'locally',
> whereby your 'connect / as sysdba' would function as expected. You
> could also use cron (or some other scheduler local to the remote
> server) to run these scripts at preset times.
>
> -- You could also, possibly, write these tasks into a stored procedure,
> install this procedure in all of your remote databases then use
> dbms_job/dbms_scheduler to run it periodically.
>
> -- You could visit each and every server personally, log in, run your
> script, then travel to the next server in your list. Your O/S
> authentication should work in that case. You might even get a mileage
> allowance.
>
> Others may report additional options you may have, however any of those
> listed above will suffice to solve your dilemma.
>
> I am at a loss, however, to explain why you think O/S authentication
> would work through a remote SQL*Net connection....
>
>
> David Fitzjarrell
>
It _will_ work if remote_os_authent is turned on, but that's a really
bad idea.
--
To reply by email remove "_nospam"
Received on Fri Jan 13 2006 - 14:34:53 CST