Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Small bug: Database configuration -> Initialization parameters

dz_rApr 26 2013 — edited Apr 26 2013
Hi!

SQLDeveloper version: 3.2.20.09

View -> DBA -> Database configuration -> Initialization Parameters -> right click "Open" -> editor with "Parameter" and "Value" (inter alia) columns appears

Changing value for parameter "optimizer_features_enable" isn't working:

Example:

Parameter: optimizer_features_enable
Changing value from 11.2.0.1 to 9.2.0 -> commiting changes -> ORA-02017 error appears ("integer value required")
In "Messages - Log" window appears the following statement: ALTER SYSTEM SET optimizer_features_enable=9.2.0 COMMENT='' SCOPE=MEMORY
I think rather it should be: ALTER SYSTEM SET optimizer_features_enable='9.2.0' COMMENT='' SCOPE=MEMORY

It looks like a small bug.

Comments

807557
It depends on which shell the script is using.: sh, ksh, bash...
You should find plenty of examples in /etc/init.d
807557
Hi,
Actually i want to set the variable in crontab and use the same variable in the script that is located else where. I have to run 5-6 scripts which uses this variable. So i want to define it in the Crontab file and use the same in the shell script.
Eg : I edited the crontab file of root as follows
NEW_HOME=/export/home/general
DB_SETUP=user/user@user
59 17 * * * /export/home/general/executeScript1.sh


executeScript1.sh is located in /export/home/general, which is as follows :
#!/bin/bash
echo "$NEW_HOME"
if [ -r "$NEW_HOME"/cron.log ]; then
echo "file is listed in the Directory"
else
echo " file is not listed"
exit 2
fi

when i execute the script under /export/home/general it works fine : it echos "file is listed in the Directory" since NEW_HOME is set in the env.
But when i excute the same in cron it doesnt. the var that is echo "$NEW_HOME" is blank. So how do i set the variable so that it can be picked when the script is being execute from cron

thanks
user4994457
Hi,
Actually i want to set the variable in crontab and
use the same variable in the script that is located
else where. I have to run 5-6 scripts which uses this
variable. So i want to define it in the Crontab file
and use the same in the shell script.
The crontab format doesn't allow that.
Eg : I edited the crontab file of root as follows
NEW_HOME=/export/home/general
DB_SETUP=user/user@user
59 17 * * * /export/home/general/executeScript1.sh
I would assume you got an error about invalid lines in the crontab.
when i execute the script under /export/home/general
it works fine : it echos "file is listed in the
Directory" since NEW_HOME is set in the env.
But when i excute the same in cron it doesnt. the var
that is echo "$NEW_HOME" is blank. So how do i set
the variable so that it can be picked when the script
is being execute from cron
Set the environment prior to each line. You mention 5-6 scripts. That's not too many to just cut&paste the environment in your favorite editor.

59 17 * * * NEW_HOME=/export/home/general DB_SETUP=user/user@user /export/home/general/executeScript1.sh

--
Darren
807557
Thanks Darren, that works. Can you plz help me on one more issue.
In the scripts i was mentioning, i am actaully picking a few .xls files converting them into .txt files husning JXCEL. After the successfull conversion we call a java program which connects to the DB ( thats what theDB_SETUP variable is for) which executes a set of procedures fro storing the content from the .txt file into the DB. On successfull execution of the procedure i call a mailer program which send mail to the respective uses. All the above process i automate it using Cron. As i already mentioned the above set up works fine in linux where we set the vaibales intially in itself unlike in solaris where you mentioned its has to be set along with the scheduled script. Now For the above process of calling java program, connecting to DB, then excuting a mail i need to set a few jars in the class path as follows :
CLASSPATH=/DataConversion/DataConversionMail/ogi_ims/lib/activation.jar:/DataConversion/DataConversionMail/ogi_ims/lib/classes12.jar:/DataConversion/DataConversionMail/ogi_ims/lib/log4j-1.2.8.jar:/DataConversion/DataConversionMail/ogi_ims/lib/mail.jar:/DataConversion/DataConversionMail:.
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/j2sdk_nb/j2sdk1.4.2/bin:$ORACLE_HOME/bin

The above 2 lines i set in the beginning in the crontab file in Linux. But I dont think i can do the same in Solaris crontab file. But my java programs embedded within the shell script will be pointing to these jars, so how i do put these jars in class path of the cron env when the script executes from the crontab file.
Please let me know if you need any other info.

Thanks in advance
rgds
Vijay Kumar Yenne
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 24 2013
Added on Apr 26 2013
1 comment
284 views