Since we upgraded from Oracle 7.3.4 to 8.1.7 the backup script I have written will not work as a cron job under the oracle8 user (Tru 64 4.0f), yet if I run the script manually logged in as the oracle8 user it works fine ! I just cannot find a solution to this and hope somebody out there can shed some light.
I have spoken to a DBA colleague of mine and he has seen this error occur if the oracle8 environment variables are not specified in the backup script, but I have checked and checked the env variables and they are all thier.
Anyway when the backup script runs as a cron job I get the following error the first time I try to connect to the database using server manager:
EXP-00056: ORACLE error 12571 encountered
ORA-12571: TNSacket writer failure
I have written into the backup script to check to make sure that both the tns listener and the oracle instance are both up and they are ! so what am I missing ???? The only thing I can think of is that in my tnsnames.ora file I had specified the server name + domain suffix rather then an IP address, I have changed this but have not yet had a chance to shutdown and restart the listener and instances to test my theory out. Does anybody know if a cronjob can translate DNS names ?? Its a long shot but I am now shooting in the dark with this problem !!!!
Can u show me your bkp script???
Sorry took so long in replying, was supposed to recive and email when someone replied. How hum didnt work. Anywayz is it possible to have your email address as the script is quite big and I doubt it will fit into the space provided for forum message posts (if your shy mine is firstname.lastname@example.org just email me and Ill reply with the script).
have sussed out what the problem is, the following needs to be added to the backup script to get it working as a cron job for Oracle 8.1.7….. I sussed it out by looking at other peoples backup scripts in various Oracle forums (including this one) and the following appeared in one of them, why you need to do if for the new version or Oracle we have installed beats me (as the oraenv command just parses the oratab files as far as I know and lets you change the ORACLE_SID environment settings, which we had set anyway ???), but hey it works.
Anyway add the following environment setting to the script:
Then before you start any oracle management applications (i.e. listener control or server manager), issue the following command:
Click Here to Expand Forum to Full Width