Exports (from shell script) without password given explicitly in script
Hi All,
I have Oracle 10g2 on SLES 10 64-bit. I would like to do export the database using data pump from shell scripts. Is there any method to hide the password in the script file.
Currently in doing by command:
expdp system/password@database ....
So any user who see the script will know the passowrd.
Regards
Groxy
Hi,
Have you considered the "Secure External Password Store" feature that was added in 10gR2? It uses the Oracle Wallet to store a database_alias with username/password credentials in encrypted format. Then you can enter your expdp command like this:
expdp /@database_alias ...
Take a look at the 10gR2 Security Guide. There's a chapter there on how to set this up.
John
Similar Messages
-
For some reason, an old iD is stuck on my phone. My iPhone 4s is nearly filled with documents and data, to the point where I cannot take pictures, and I can't reset it without using this old iD. I don't know why this is now popping up instead of the one I am registered with. I gained access to the old email the iD is under, but none of the iTunes emails are coming in so I assume it is set up under a different email. For the security question of birthdays, I tried every household member's birthday, and none worked. I have tried the password we used on that account when it was active, along with every other possiblility. I don't know what to do anymore and I have very limited use of my phone if I don't get this sorted out and deleted from my phone.
Thank you for any help!Not without password.
-
Remove icloud account from my ipad without password
how to remove icloud account from my ipad without password
You cannot remove an iCloud account from an iOS device without a password.
Forgot your password? -
How to export from iMovie HD without losing quality?
I created a movie in iMovie HD made from clips from my camera which records great quality HD video, and now I want to export it and save as a movie file so that I can import it into iMovie '09 as part of a larger project. However, every time I try to export it, the resulting file has noticeably worse quality than when I view it in iMovie HD. I have tried the "full quality" option which exports as a .mov file, but the quality is much worse. I have also tried "Expert settings" choosing DV, AVI and MPEG-4 and have changed the settings to the best options I could find, but still the quality is worsened every time. How can I export my video without losing quality??
Do you mean import what I have in iMovie 09 into iMovie HD/06 instead? I suppose I could but I wanted to add some of iMovie 09's titles and adjustment effects to my iMovie HD/06 project, so it could get quite complicated trying to piece it all together. I may have to do that as a last resort, but does anyone know any way I can get around this?
I would think there must be some way to save my iMovie 06 file as something other than an iMovie file without losing quality... but things aren't always that easy are they? -
How do I get iCloud to delete from iPhone 4 without password
I Don't know my password to iCloud and I just found my phone last week and i keep getting a messege from icloud to sign in but I don't know what it is how do I delete it
well if they can reset the ******* phone then they will wish they could after i'm done with them they can send all they want for death threats but i will make sure they are no longer around just like disney ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
dont ever say apple support again and i know that they have done **** in the past well im not affraid -
Exporting from flash movies without quicktime
I used to convert flash movies in dv (for further editing in imovie or Final cut express). With the latest QT update this is not possible anymore (and a lot of my projects are unreadable...). Anyone knows an (possibly inexpensive) way to convert a .swf file in dv or something else digestible from QT or visualhub? (visualhub relyes on QT support for converting flash movies, so this is not doable...)
Thanks in advance.Buy a cheap external HD and install an older version of Tiger (and QuickTime) on it. Use http://perian.org and QuickTime Pro to make the conversion.
QuickTime 7.3.1 no longer supports Flash media formats. -
I'm working on my homework problem which is:
Design and code a new method to be exported from ArrayStringLog (the file is given to me) called isEmpty with the following signature public boolean isEmpty()
I created a new class and named it homework2, here is the method:
public class homework2
public boolean isEmpty()
// Returns true if this StringLog is empty, otherwise returns false.
if (lastIndex == (- 1))
return true;
else
return false;
}now how can i get it exported from ArrayStringLog? that's the part that I didn't understand
Edited by: memee4eva on Sep 30, 2009 11:53 PMI think your isEmpty() method should go into the ArrayStringLog class. That way the method will be exposed by the altered ArrayStringLog class.
Am I right in thinking that an ArrayStringLog instance has a lastIndex member?
You might like to compare what you have with this:
/** Returns true iff this StringLog is empty. */
public boolean isEmpty()
return lastIndex == -1;
} -
Call a host script from concurrent program without exposing APPS password?
My understanding is as of now I need to link $FND_TOP/bin/fndcpesr in order to launch a unix script as concurrent program. This implies that there will be 4 standard input parameters when a certain unix script is called including oracle schema and password. As I see it now APPS password is provided to such scripts.
Is there a way to execute a unix script from under 11i without exposing APPS password?Many thanks.
Protecting Your Oracle User Password
In some cases, there are security concerns with passing your Oracle username and
password directly to your HOST program. If you do not want the concurrent manager
to pass your username/password to your program, you can have the manager pass it as
an environment variable instead. Or you can pass an Oracle Applications
username/password for a user with the System Administrator responsibility.
Alternatively, you can not pass it at all.
First, define your concurrent program executable as a HOST program in the Concurrent
Program Executable form.
To have the username/password passed as an environment variable, enter the term
'ENCRYPT' in the Execution Options field of the Concurrent Programs window when
defining a concurrent program using this executable. 'ENCRYPT' signals the concurrent
manager to pass the username/password in the environment variable fcp_login. The
argument $1 is left blank.
If you do not want the username/password passed to the program at all, enter
+'SECURE' in the Execution Options field. The concurrent manager will not pass the+
username/password to the program. -
Problem while calling concsub from shell script
Hi All,
I am facing problem when I am trying to run CONCSUB utility from shell script.The same works well when I try it from command line.The only prob I am facing from shell script is assigning values to temporary variables.
This is how my script looks
#!/bin/bash
export PARM5="$5"
export PARM6="$6"
export PARM7="$7"
echo "INTPARM5=\"$PARM5\""
echo "INTPARM6=\"$PARM6\""
echo "INTPARM7=\"$PARM7\""
echo $FND_TOP/bin/CONCSUB $1 ONT 'Order Management Super User, Vision Operations (USA)' $3 WAIT=Y CONCURRENT ONT $PROGRAM "$INTPARM5" "$INTPARM6" "$INTPARM7"When I try to run the above shell based concurrent program it doesn't pass the parameters as expected and it errors out saying "Wrong number of arguments to call the procedure"
I tried my luck from some of the previous posts ({thread:id=2360776} ),but to vain
If anyone has any ideas,please suggest!!
Thanks in advance!!
Edited by: sandy on May 4, 2013 12:54 PMHere are your proofs
Proocedure
PROCEDURE abc(--p_errbuf OUT VARCHAR2,
--p_errcode OUT VARCHAR2,
p_order_no IN NUMBER DEFAULT NULL,
p_customer_id IN NUMBER DEFAULT NULL,
p_name IN VARCHAR2 DEFAULT NULL
IS
v_cname VARCHAR2(200);
v_ordered_date DATE;
v_order_number NUMBER;
v_order_type VARCHAR2(200);
BEGIN
fnd_file.put_line(fnd_file.output, 'Begin Execution');
SELECT DISTINCT ac.customer_name,
d.ordered_date ordered_date,
d.order_number order_number,
x.NAME order_type
INTO v_cname
,v_ordered_date
,v_order_number
,v_order_type
FROM oe_order_headers_all d,
oe_transaction_types_tl x,
wsh_delivery_details b,
wsh_delivery_assignments c
,ar_customers ac
WHERE 1 = 1
AND ac.customer_id = b.customer_id
AND d.order_type_id = x.transaction_type_id
AND x.LANGUAGE = 'US'
AND b.released_status = 'B'
AND b.source_header_id = d.header_id
AND c.delivery_detail_id = b.delivery_detail_id
AND d.order_number=NVL(p_order_no,d.order_number)
AND ac.customer_id = NVL(p_customer_id,ac.customer_id)
AND x.name=NVL(p_name,x.name)
AND NOT EXISTS (SELECT 1
FROM wsh_delivery_details b
WHERE 1 = 1
AND b.released_status != 'B'
AND b.source_header_id = d.header_id)
--BETWEEN ('1213794') and ('1213797'))
AND rownum<2;
INSERT INTO xxc_temp(customer_name,ordered_date,order_number,order_type) VALUES(v_cname,v_ordered_date,v_order_number,v_order_type);
COMMIT;
fnd_file.put_line(fnd_file.output, 'Order Number is' || v_order_number);
fnd_file.put_line(fnd_file.output, 'Order Type is' || v_order_type);
END;Script
#!/bin/bash
set -x
export PARM5="$5"
export PARM6="$6"
export PARM7="$7"
sqlplus -s $1 <<EOF
set head off feed off serverout on size 1000000
exec abc('$PARM5','$PARM6','$PARM7');
exit
EOFNow when I run the 'XX Order Detail CSV Report' I get the below log and no Output
+---------------------------------------------------------------------------+
Application Object Library: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XXKES_PDF_TRANSFER module: XX Order Detail CSV Report
+---------------------------------------------------------------------------+
Current system time is 06-MAY-2013 05:05:56
+---------------------------------------------------------------------------+
+ export PARM5=66432
+ PARM5=66432
+ export PARM6=
+ PARM6=
+ export PARM7=Mixed
+ PARM7=Mixed
+ sqlplus -s APPS/APPS
+---------------------------------------------------------------------------+
Executing request completion options...
Output file size:
0
+------------- 1) PRINT -------------+
Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
+--------------------------------------+
Finished executing request completion options.
+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 06-MAY-2013 05:05:56
+---------------------------------------------------------------------------+After the concurrent program executed I queried the table xxc_temp and here you see the data
SQL> select * from xxc_temp;
CUSTOMER_NAME
ORDERED_D ORDER_NUMBER ORDER_TYPE
A. C. Networks
18-FEB-13 66432 MixedMy procedure fetches the data fro given set of i/p parameters but it doesn't give o/p coz it's a host based conc program.Please advise if there's a way to get the o/p in a host based conc program
Thanks!! -
Please help to call oracle procedure with out paramter from shell script
Hi
I want to call a process with out parameter from shell script. I am calling process in shell script in below way
function Process_loads {
( echo 'set serveroutput on size 1000000 arraysize 1'
echo "set pagesize 0 term on verify off feedback off echo off"
echo "BEGIN"
echo " dbms_output.put_line('Before Calling The package'); "
echo " x ( '$1', '$2', '$2', '$4', '$5', '$error_code'); "
echo " dbms_output.put_line('After Calling The package'); "
echo "EXCEPTION "
echo " WHEN OTHERS THEN "
echo " dbms_output.put_line('BIN_LOAD_ERROR' || SQLERRM); "
echo " ROLLBACK;"
echo "END;"
echo "/" ) | sqlplus -s $USER/$PASSWORD@$SID
Here $error_code is out paramter. All varaibles passed in process are declared with export command.
When executing .sh it gives below error
"sh ERROR at line 3: ORA-06550: line 3, column 99: PLS-00363: expression '' cannot be used as an assignment target ORA-06550: line 3, column 3: PL/SQL: Statement ignored".
Please help to get rid from this error or please suggest how to call a oracle procedure with out paramter from unix shell script.
Thanks in advanceYou can try this:
From sql*plus
SQL> ed
1 create or replace procedure my_proc(p_id in int, p_result out int)
2 as
3 begin
4 select 10 * p_id
5 into p_result
6 from dual;
7* end my_proc;
SQL> /
Procedure created.
SQL> set serveroutput on
SQL> declare
2 v_r int;
3 begin
4 my_proc(10,v_r);
5 dbms_output.put_line(v_r);
6 end;
7 /
100
PL/SQL procedure successfully completed.
from bash:
testproc.sh:
#!/bin/bash
(echo 'set serveroutput on';
echo 'declare';
echo 'v_r int;';
echo 'begin';
echo 'my_proc(10,v_r);';
echo 'dbms_output.put_line(v_r);'
echo 'end;';
echo '/';) | sqlplus -s u1/u1
Console:
oracle@mob-ubuntu:~$ chmod u+x testproc.sh
oracle@mob-ubuntu:~$ ./testproc.sh
100
PL/SQL procedure successfully completed.With kind regards
Krystian Zieja -
Urgent Problem in Executing perl script from shell script
Hello,
I've a shell script on one server (source) and a perl script on another (target).
My perl script will check whether the directoryname, filename provided by shell script exists on the target server or not.
My shell script is as follows:
#! bin/bash
cmd=`ssh user@target "perl /home/user/test_dir/validate_file.pl"`
echo $cmd
And my perl script uses a package CU_Functions.pm, which is in the same directory as the perl script on the target server.
But when I invoke the perl script from shell script, I get the following error:
Source:user> (db:ias10g12_mid_db) /home/user/perl
$ sh /home/user/arcs/arcs_conn.sh
user@target's password:
Can't locate CU_Functions.pm in @INC (@INC contains: /local/perl-5.6.1/lib/5.6.1/i686-linux /local/perl-5.6.1/lib/5.6.1 /local/perl-5.6.1/lib/site_perl/5.6.1/i686-linux /local/perl-5.6.1/lib/site_perl/5.6.1 /local/perl-5.6.1/lib/site_perl .) at /home/user/test_dir/validate_file.pl line 13.
BEGIN failed--compilation aborted at /home/user/test_dir/validate_file.pl line 13.
Please let me know if I need to do any configurations prior to call the perl script.As for the Perl INC, I cannot recall the environment variable that sets that but the following example should work:
ssh user@host "export ENV_VAR=/path/to/include/files:$ENV_VAR ; /full/path/to/script" -
Error in calling SQL plus program with parameter from Shell script
This is my Shell script. I am trying to call in the SQL plus program with the parameter and the shell script is registered as a concurrent program.
PARAMETERS=`echo $1 |tr -d '\"'`
DB_USER_ID=`echo $PARAMETERS|cut -d" " -f3|cut -d"=" -f2`
CONN_STRING=$DB_USER_ID
REQ_DATE=`echo $PARAMETERS|cut -d" " -f9|cut -d"=" -f2`
timestamp=`date +%m-%d-%y-%H:%M:%S-%Z`
timestam=`date +%y-%m-%d`
sqlplus -s $CONN_STRING @ar_statement.sql $REQ_DATE
chmod 755 statement.sh
. statement.sh
My Sql plus program is like this.
set pagesize 0
set heading off
set feedback off
spool $GEC_TOP/log/ge_ar_statement.sh
select output_file_name
from fnd_concurrent_requests
where trunc(actual_completion_date) = '&2';
spool off;
exit;
When i run the concurrent program, i am getting the following error:
ar_statement: line 14: REQ_DATE: command not found
Enter value for 2:
User requested Interrupt or EOF detected.
ar_statement.sh: line 1: Enter: command not found
ar_statement.sh: line 2: User: command not found
ar_statement
Program exited with status 127
I am not strong at Unix Porgamming and i would request someone who can
help me out as soon as possible.
I need this solution quickly and thank everyone in advance.
Thanks.Can you put your coding between code statements, like shown in the FAQ. It will be easier to read.
Looking at your script, my first guess is that crontab will not find your sqlplus since your script does not have $HOME/bin in the $PATH. From what I understand, running .profile in your script will not work either because variables are exported to sub-shells, not to the shell above. You can call your script with a dot like . ./script which means that the script will run like it was typed at the command prompt. But it will be less confusing to define appropriate variables in the script. eg.
ORACLE_SID=my_instance_name
ORACLE_HOME=/my_path_to_oracle_home_directory
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$ORACLE_HOME/bin:$PATH
I remember some slightly different way of coding to handle the sqlplus return codes.
For instance:
sqlplus -s /nolog > /dev/null <<-EOF
connect system/manager
@ssm.sql
whenever oserror exit failure
whenever sqlerror exit failure
EOF
sql_err=$?
if [ $sql_err -ne 0 ]; then
echo "FAILURE"
else
echo "SUCCESS"
fiThe - in -EOF supresses tab's
Using connect will prevent ps from showing your login credentials
In some versions of bash the ending EOF needs to be at the beginning of the line to work.
Edited by: waldorfm on Jul 14, 2010 7:05 PM
complaining about putting code between code delimiters and forgot myself ;-)
Edited by: waldorfm on Jul 14, 2010 7:08 PM
Btw, if you "source" a script running it like . .script, than an exit in that script will log you out. -
Passing params from SQL file to Shell Script and then from Shell to SQL Fil
Afternoon guys,
Have a fun question for all you gurus in shell scripting out there. I have a shell script that is calling 2
different SQL programs. My objective is to pass a variable called request_number from one sql program
to the shell script and then from the shell script back to another SQL program. I will explain why I
need this to happen.
Here is what the shell script looks like which calls sql programs student_load_a.sql and
student_load_b.sql. Student_load_a.sql basically creates the control file (.ctl) which is needed for the
SQL*Loader and then student_load_b.sql reads the table that was just loaded and does the main
processing. My main objective here is to be passing the request_number which is being generated
using an Oracle Sequence in student_load_a.sql and using this generated number in my main
processing in student_load_b.sql to select records from the table based on request_number.
Any ideas ?Any help or recommendations is welcome and appreciated.
*1. Shell Script*
# Accept system input parameters
p_user_id=$1
p_job_id=$2
# Create control files for sqlload
sqlplus.exe -s $p_user_id @$STUDENT_PATH/student_load_a.sql $p_job_id
exit_status=$?
# Do sqlloads
sdesqlldr.exe userid=$p_user_id control=student_load-$p_job_id.ctl \
log=student_load-$p_job_id.log \
bad=student_load-$p_job_id.bad
exit_status=$?
# Main processing
# sqlplus.exe -s $p_user_id @$STUDENT_PATH/student_load_b.sql $p_user_id $p_job_id $p_request_number
sqlplus.exe -s $p_user_id @$STUDENT_PATH/student_load_b.sql $p_user_id $p_job_id
exit_status=$?
exit 0*2. student_load_a.sql (Would like to pass back the Sequence Number back to shell script and then use in student_load_b.sql*
-- Accept system input parameters
define p_job_id = &1
spool student_load-$p_job_id.ctl
select
'append into table TMP_STUDENT_LOAD
FIELDS TERMINATED BY '','' optionally enclosed by ''"''
trailing nullcols
(request_number CONSTANT ' || '''' || request_number_seq.nextval || ''',
student_id)'
from dual
spool off;
exit 0;
{code}
*3. student_load_b.sql (This is a big file so I am only adding code that is relevant for the SQL)*
{code}
declare
v_request_number number(6);
v_student_id number(7);
cursor cur_student_load is
select student_id
from TMP_STUDENT_LOAD
where request_number = v_request_number
order by 1;
begin
v_user_id := '&1';
v_job_id := &2;
-- This is the variable I would like to be be passing from shell script to student_load_b.sql
-- v_request_number = '&3';
open cur_student_load;
fetch cur_student_load into v_student_id;
exit when cur_student_load%notfound;
.... more logic of if then else in here
close cur_student_load;
end;
{code}
Edited by: RDonASnowyDay on Jan 29, 2010 4:03 PMHow come you are mixing WinDoze script (*.exe) with Unix?
You are aware that you will be passing the password along with the user id to the second sql script?
I will assume Unix ksh:
# Accept system input parameters
p_user_id=$1
p_job_id=$2
# Create control files for sqlload
p_seqno=`sqlplus -s $p_user_id @$STUDENT_PATH/student_load_a.sql $p_job_id`
exit_status=$?
# Do sqlloads
sqlldr userid=$p_user_id control=student_load-$p_job_id.ctl \
log=student_load-$p_job_id.log \
bad=student_load-$p_job_id.bad
exit_status=$?
# Main processing
# sqlplus -s $p_user_id @$STUDENT_PATH/student_load_b.sql $p_user_id $p_job_id $p_request_number
sqlplus -s $p_user_id @$STUDENT_PATH/student_load_b.sql \
$p_user_id $p_job_id $p_seqno
exit_status=$?
exit 0And the first sql script would look like this:
-- student_load_a.sql
-- Accept system input parameters
set echo off pages 0 feed off lin 80 trims on ver off
def p_job_id = &1
col seqno NEW_VALUE seqno
select request_number_seq.nextval seqno from dual;
set term off
spool student_load-$p_job_id.ctl
select
'append into table TMP_STUDENT_LOAD
FIELDS TERMINATED BY '','' optionally enclosed by ''"''
trailing nullcols
(request_number CONSTANT ''&&seqno'',
student_id)'
from dual
spool off;
exit 0;
{code}
:p -
How can I disconnect from iCloud without password.
Hi,
I have lost my Apple ID password, So I have lost my iCloud password too. I am unable to login on iCloud service. I was unable to Off option "Find my iPhone"
I tried everything but nothing is happen, i cant logout from iCloud, The mail ID which registered with apple that is also blocked. So nothing is option balance, then I reset device to Factory Restore option. But now again iPhone is asking the same icloud account and password. Now this iPhone is useless.
Actually one of my colleague bought this iPhone 4 from second hand market one year back, he took the same apple ID what seller has given him and he is using it since 1 year, Now that guy may change his password and this guy is unable to use appstore. To put new ID we need to log out from old ID and to log out from old ID phone is asking password, so there is the problem started.
Can anyone help me to log out from iCloud without password, please...
Thanks
PramodFrom what you say the phone has been 'Activation Locked' by a previous owner - who presumably either sold it to the second-hand market or had it stolen and it landed up there.
If this is the case, only the person who set the lock can unlock it. If you can't get hold of them to do this then the phone is permanently unusable.
Even if you had set up a new Apple ID and logged into that the Activation Lock would have kicked in when you reset or updated the phone. -
Update Symbol and Symbol Script without removing from Document library
Is there a way in fireworks CS5.1 to update a symbol and the corresponding symbol script without removing it from the document library like it suggests in the below article
http://www.adobe.com/designcenter/fireworks/articles/frwcs3_richsymbol_print.htmlI have done some more research on this question and there appears to be no way to update a symbol script without removing it from the document library, hopefully this bug will be patched in the near future
Maybe you are looking for
-
Oracle Application server 10.1.3.1 Installation error
I am facing a problem while installing OAS 10.1.3.1, i can't able to move forward, its showing copying files for HTTP server files 1.3.31.0.0 and copying 'owm-3_0.jar' and not moving.... Please look at the below log and please suggest the alternative
-
What is the concept of view in material master?
Hello sap gurus Some quetions regarding Material Master what is the concept of views in material master ? what is determined by specifying industry sector in material master ? To sell material which views are material are maintened in Material maste
-
I cannot get my iPhone 4S to show up in iTunes. (tried EVERYTHING!!)
Well, I've read countless threads about this. However, NONE (and I repeat NONE) of those other options (ie: UpperFilter, reinstall, restart service, et al) are working for me. I am on my 6th reinstall of iTunes, and I cannot get the thing to recogni
-
How to download a specific previous version (10.3.1)?
One of our customers has been asked by the office of state revenue to run a specific version of Adobe reader for viewing documents on their site (10.3.1) but do not provide it. 10.4.1 (the latest at time of writing) does not work with their site. Is
-
Strange colorful vertical lines when opening vlc or skype (video)
Well, this is my first post, and I am writing it because of a problem i encountered with my iMac (late 2008 model 20'', 2.4 GHz). The problem is: When I am video-calling on Skype, after a while the top left corner of my dock icons disappears... After