1752794 Members
6017 Online
108789 Solutions
New Discussion юеВ

how to configure cron

 
SOLVED
Go to solution
Jose Mosquera
Honored Contributor

Re: how to configure cron

Hi Rustam,

The pipe file is the key to perform the process "on the fly". As you remember, cron processes need commands with full path. To know the "mknod" placement:
#whence mknod

Now to be a more realistic scenario, using the oracle user tries to manually create a pipe file for test (dummy_pipe):
#/fullpath/mknod /u02/dump/dummy_pipe p

Does the dummy_pipe file is created without problems?
Yes:
Check file permissions and ownership (must belong to oracle's user and group).
Delete /u02/dump/dummy_pipe (rm /u02/dump/dummy_pipe).
Then modify your current script file including this full path at mknod command.

No:
Does the command "mknod" can only be executed by the root user?
So you should return to the root user to run the command "mknod"
#mknod /u02/dump/my_sidexp_pipe -p
Important to use the pipe final name (my_sidexp_pipe) that your script expects to find during execution. This file pipe must always be in /u02/dump/. It must not be deleted.
You must change the ownership of the file /u02/dump/my_sidexp_pipe to belonging to the oracle user and group (chown oracleuser:oraclegroup /u02/dump/my_sidexp_pipe)
Also ensure that be enough owner/group privileges (chmod 770 /u02/dump/my_sidexp_pipe)
Only in this scenario you must adapt your script as shown in the attachment. Note that if the pipe file does not exist, it generates an error file containing a message relating to the absence of the pipe file.

Rgds.
rustam_2
Super Advisor

Re: how to configure cron

Hi Jose,
sorry for my silly questions :(.

I created test pump file then changed script by adding full path for mknod. Everything is ok except Data Pump Utility syntax. Script cant determine file=/u02/dump....
i guess you configured script for exp utility and not for expdp. Data Pump utility syntax includes datafile parameter, i changed file parameter to dumpfile and got error that dumpfile cant use path.. then deleted path and got ordinary dump file with huge space size. So i'm thinking, is it possible to use on fly technology? all other parameters are ok, i need to reconfigure pipe and gzip to data pump syntax.

regards and thanks,
rustam
Jose Mosquera
Honored Contributor

Re: how to configure cron

Hi Rustam,

I guess that expdp utility not accept path syntax inside "dumpfile=" and "logfile=" options, for this exists the option named "directory=". I've adapted the attached script acording with the expdp utility syntax. Just try again...

Rgds.
rustam_2
Super Advisor

Re: how to configure cron

Hi Jose,
I tested last version but script couldnt create zipped file. The script created dump file but didnt zipped. I made several version but couldnt get zip file.
From monday i have business trip and in 4 weeks will come back.
So for now. i created 2 several scripts. One creates dump file and log files with timestamp and another one zippes, makes archive and deletes my_files_timestamp. I know it takes big resources of server but it is only way i can use.
Hope in 4 weeks we could make correct script and use on fly compress.
Thanks a lot, Jose.

Talk to you later.
Regards,
rustam