Hide new/old value of bind variable in SQL*Plus
Hi,
I have a SQL*Plus script to create a new user. It asks for username & password and then passes these values to a SP to do some checks and finally create the user.
The output is currently the following :
New user will be created in ORCL LAB
Enter the requested username : fleet2
Enter the password for fleet2 : *****
Re-enter the password for fleet2 : *****
old 2: labadmin_cr_user('&username', '&pswd', '&pswd2');
new 2: labadmin_cr_user('fleet2', 'fleet', 'fleet');
The requested username is already in use in the database. Please choose another username.
As you can see the passwords are now exposed when the procedure is called. This is not what I want off course. I cannot do termout off as the serveroutput is not shown as well in that case. I use dbms_output to show error messages to users. (see example above in case of an existing user).
Can anybody tell me how to hide these 2 lines (old 2, new 2) without hiding my dbms_output.
Thanks!
Kris
set verify offhttp://download-uk.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013382
Similar Messages
-
Using Bind variables in SQL PLUS Report
using Bind variables in SQL PLUS Report. This report gets the arguments from the application concurrent program. Now my need is to convert the start_date and end_date to bind Variables to improve the performance. I have commented the original code in 'prompt List of Unapproved Adjustments' and used my Bind Variable but it is giving an error
error: Bind Variable "ENDING_DATE" not declared
Report Date and Time:
26-OCT-2010 15:44:13
List of Unapproved Adjustments
Bind Variable 'ENDING_DATE" not declared
Please see below the code for the sql plus report:
define p_org_id = '&1'
define p_fy_begin_date = '&2'
define p_start_date = '&3'
define p_end_date = '&4'
define p_conversion = '&5'
declare
variable begin_date date;
exec :begin_date := p_start_date;
variable ending_date date;
exec :ending_date := p_end_date;
/* Begin
:begin_date := to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS');
:ending_date := to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS');
End; */
set newpage none
set termout off
set pagesize 55
set linesize 180
set heading on
set feedback off
set wrap off
set space 1
set heading on
begin
dbms_application_info.set_client_info('&p_org_id');
end;
prompt
prompt Report Date and Time:
prompt ----------------------
select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
from dual ;
prompt
prompt List of Unapproved Adjustments
prompt -------------------------------
select b.trx_number,
a.adjustment_number,
f.user_name created_by
from apps.ar_adjustments a,
apps.ra_customer_trx b,
apps.fnd_user f
where a.customer_trx_id = b.customer_trx_id
and a.status <> 'A'
and a.created_by = f.user_id
and a.creation_date between :begin_date
and :ending_date
-- and a.creation_Date between to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS')
-- and to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS')
order by
b.trx_number ;Hi
Please go to customization part of the report and verify..You have set a default value out there ..And also verify your lov and look at the values ..If it is again giving you the problem ..pl delete the report and develop it again from the scratch it will be solved...
vishnu
null -
Passing values in a vector list as bind variables in sql query.
Hi,
I have a vector list containing values 12,13,14.
vector<string> v;
v has values 12,13 and 14.
Here the number of values in vector list are not fixed.
I want to pass these values as bind variables to sql query.
Can anyone suggest me how to do this.
Thanks in advance!!Ah, the it's the classic 'Varying In-List' again
See:
The Tom Kyte Blog: Varying in lists...
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061 (started more than a decade ago, so scroll down for more recent examples) -
Bind variables in SQL Editor - not remembering datatypes, values
When you execute a query with bind variables, the dialogue appears to specify value and type of bind variable. It would be a nice feature if when you re-ran the query Raptor remembered the type and previous value of the bind variable.
Mike.I would like it if there was only one window with a list of all bind variables so I can edit them in one go instead of a new window for each bind variable.
kind regards
Leon Parren -
Dynamically assign value to bind variable in a view object before pageload
I found that it is extreamely hard to find an example to assign the bind variable in View object at runtime using a data attribute defined in Human task activity. Most of the available samples use a Literal value to do the assignment. In my case, I want to dynamically display the content by assigning the data attribute in Human task to the bind variable in view object before a pageload.
I do not want to bind the view object to some command component to click a button or link in order to make it work (Unnecessary components in my page).
The issue is how to access the data attribute in Human task in the java code of client interface in AppModule? or is there a way that I can access the data attribute in Groovy script expression of the bind variable? or if I can access the process data object defined in my BPM process to do the assignment at runtime?
Really need help on the issue, and I cannot believe that it is so hard to accomplish.
Thank you very much,chk this
Passing default value to bind variable on page load.
http://adfcodebits.blogspot.com/2010/03/bit-2-setting-bind-variable-value.html -
Passing value to bind variable of another table from one table
hi,
I have a multi select table. When one row is selected from this table (no button is clicked, only selection is done), an attribute from that selected row (say userid) should be passed to the bind variable of another table and the corresponding details of that particular userid should be displayed in the other table. When more than one row is selected, the other table should display no rows.
My main problem is what code has to be written to pass value to bind variable and where it should be written.
Please give me a detailed explaination as soon as possible.
Thank you.Sorry, didnot add this. The table is multi select table.
-
How to pass pageFlowScope variable value as bind variable for VO
Hi,
I have one fixed lov (not based on datasource), if i select any value in that lov i want to pass this value to a pageFlowScope variable.
After this i want to use this value as bind variable for VO. whenever the vo executes thereafter this bind variable should filter that vo results.
My jdev version: 11.1.0.0
Thanks in advance,
SANsan-717,
can you elaborate on the use case instead of the implementation you don't get done? I understand you have data displayed in a tree: so lets assume the tree structure is Locations, Departments and Employees according to the Oracle HR sample schema.
1. What is the LOV supposed to do ?
2. Where is the LOV located ?
3. What values does the LOV show ?
4. Is the LOV a select choice component or a real LOV (with search dialog)
5. Where is the bind variable used ?
To me it sounds like you want to filter the tree data based on the select choice value. However, you wont do this by passing the bind parameter to all View Objects involved as they may not have the attribute in their query. So your use case is important to answer the question
Frank -
Bind variables in SQL query of DBAdapter
Hi,
Can we add bind variables to SQL query when we define DB adapter...?No, not in the Wizard.
I do not know if it is possible with the TopLink in combination with BPEL.
But can you use a Pl/SQL procudere/package that performs the dynamic SQL? -
Windows System Environment Variables in "Sql * plus"
Can i use/reference Windows System Environment variables in "Sql * plus"?
For example, i want to create sql-script to run in database server computer that asks variable "ORA_HOME" and uses this value to execute some sql/plsql sentences.
Oracle 10g Personal, Windows 7.
Edited by: CharlesRoos on 12.11.2010 17:28CharlesRoos wrote:
Business problem:
I have created 2 databases in my computer. Both databases needs tablespaces created by a script. Tablespaces' datafiles (.dbf files) names are same for both database. Both database has it's own directory where it holds datafiles at the moment. At the moment the datafiles for Database1 are in folder something like "%ORACLE_HOME%"\oradata\%databasename1%\*.dbf, and second database has its datafiles in other folder, somewhere ""%ORACLE_HOME%"\oradata\%databasename1%\*.dbf". I want now the script to create tablespace called "INDX" with same datafile name "indx1.dbf" into both database. So into both mentioned folder the file "indx1.dbf" must be created by script. I think the script should do following:
1. get ORACLE_HOME.
2. connect to database "databasename1"
3. EXECUTE IMMEDIATE "Create TableSpace INDX....file=%ORACLE_HOME% || databasename1 || indx1.dbf"
4. connect to database "databasename2"
5. EXECUTE IMMEDIATE "Create TableSpace INDX....file=%ORACLE_HOME% || databasename2 || indx1.dbf"I don't have Oracle database near by anymore, so the code was pseudocode.
I don't understand how to use ?-shortcut.OK, my first impression is "why does this even NEED to be scripted? Creation of new tablespaces is usually a one-off operation.
But that aside how about this sqlplus command-line substitution variables. This example is in linux, but will work as well in Windows with the change of the way environment variables are referenced:
*nix - echo $myvariable
Windows - echo %myvariable%
First, the sqlscript to create the TS. Note the use of the substitution variable "&1"
{code}
[oracle@vmlnx01 ~]$ cat cat makets.sql
set echo on feedback on verify on trimsp on
prompt &1
CREATE SMALLFILE TABLESPACE EDSTEST
DATAFILE '/ora01/oradata/&1/edstest.dbf'
SIZE 5M
REUSE
AUTOEXTEND ON
NEXT 1280K
MAXSIZE 32767M
LOGGING
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
drop tablespace edstest
including contents and datafiles
exit
{code}
So, at the OS prompt: Notice that the @ is separated by a space, makeing it a command line parm instead of part of the connect string
{code}
[oracle@vmlnx01 ~]$ export myparm=vlnxora1
[oracle@vmlnx01 ~]$ sqlplus system/pswd @makets $myparm
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Nov 12 13:18:05 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> prompt &1
vlnxora1
SQL> --
SQL> CREATE SMALLFILE TABLESPACE EDSTEST
2 DATAFILE '/ora01/oradata/&1/edstest.dbf'
3 SIZE 5M
4 REUSE
5 AUTOEXTEND ON
6 NEXT 1280K
7 MAXSIZE 32767M
8 LOGGING
9 EXTENT MANAGEMENT LOCAL
10 SEGMENT SPACE MANAGEMENT AUTO
11 ;
old 2: DATAFILE '/ora01/oradata/&1/edstest.dbf'
new 2: DATAFILE '/ora01/oradata/vlnxora1/edstest.dbf'
Tablespace created.
SQL> --
SQL> drop tablespace edstest
2 including contents and datafiles
3 ;
Tablespace dropped.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@vmlnx01 ~]$
{code} -
The new value of bind variable does not show up after changed by PL/SQL
Hi,
I am running APEX 3.2. I use PL/SQL process to assign a new value to a bind variable, say, :P2_TEST := 123. The new value does not show up on the page although I can see it in the Session status.
How can I make the new value to be displayed on the page immediately after the process is run?
Kind regards,
TeeMaybe you could use an ajax routine to refresh the item in your pl/sql routine?
Thank you,
Tony Miller
Webster, TX -
How to use List of values with bind variables on item?
Hi
I made a dynamic list of values with a bind variable as a provider. I tried to run the list, and it worked fine - i filled inn the bind variable when asked for, and i got a list of values to choose from.
I would very much like to use this list of values as an attribute on a custom made item. My wish is that when creating the item you someplace write the bind variable, and the list will then turn up as wanted. (I could f.ex add the variable as an attribute on the page type)
I tried to create a custom attribute and assign the list of values to it. It created an error when I then tried to add the attribute to the item.
Does anyone have any idea on how to solve this?
Any help appreciated!
Maja R. AnjerHi
i am getting error as
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT meaning, lookup_code,lookup_type
FROM fnd_lookup_values
WHERE view_application_id = 200) QRSLT WHERE (lookup_type=:1 AND ( UPPER(MEANING) like :2 AND (MEANING like :3 OR MEANING like :4 OR MEANING like :5 OR MEANING like :6)))
Thanks
Mateti -
Reading value of bind variable
Hi,
I have been debugging a java application and in the process I wanted to know which values the application passed as bind variables. So i checked v$sql_bind_capture and enabled trace on the session. Unfortunately the datatype was TIMESTAMP, so the view did not show a value and all I got from the trace was a memory dump that is not of much use to me:
Bind#1
oacdty=180 mxl=11(11) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1000000 frm=01 csi=873 siz=0 off=24
kxsbbbfp=fffffd7ffdb6fbd0 bln=11 avl=07 flg=01
value=
Dump of memory from 0xFFFFFD7FFDB6FBD0 to 0xFFFFFD7FFDB6FBD7
FFFFFD7FFDB6FBD0 0D0B6C78 00010101 [xl......]Is there a function/way to convert this into a timestamp or at least the other way around?Just ran this little test:
SQL> CREATE TABLE t (c1 TIMESTAMP);
Table created.
SQL> INSERT INTO t VALUES (TRUNC(SYSTIMESTAMP));
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SELECT TO_CHAR(c1) FROM t
2 UNION
3 SELECT DUMP(c1) FROM t;
TO_CHAR(C1)
13-NOV-08 00.00.00.000000
Typ=180 Len=7: 120,108,11,13,1,1,1Converting those decimals to hex gives you 78,6C,0B,0D,01,01,01 which accounting for reverse byte order is the same as your memory dump. So I think the bind value is 13-NOV-2008 00:00:00:000000.
Not quite sure how to get from the hex directly back to the date/time, but I'm sure someone knows!
Actually, Google was quite useful... take 100 off the first two decimal values: 120-100 = 20; 108-100 = 08, to give you the year: 2008. Then the 11 and 13 are the month and day. The remainder are hour + 1, minute + 1, second + 1. So just convert your hex to decimal and you should be able to see the value clearly!
Edited by: Mike Pargeter on 13-Nov-2008 16:54 -
Hi All
I got the SQL text from the v$_SQL etc view, now i want to know th values of th bind variables that was submitted alongwith the query.
How do I query to get those values.
Regards
AbhinavHi
There is a view V$SQL_BIND_DATA which have a column VALUE.
Else, try the following select statement to obtain your bind values.
select
sql.sql_text line,
sqlbd.cursor_num,
sqlbd.position,
sqlbd.datatype,
'xx' || sqlbd.value || 'xx'
from
v$sql sql,
v$sql_cursor sqlc ,
v$sql_bind_data sqlbd
where
sql.address=sqlc.parent_handle and
sqlbd.cursor_num = sqlc.curno;
Firstly, v$sql includes all cursors on the database.
Secondly, v$sql_cursor is just those cursors for the current session.
Thirdly, v$sql_bind_data relates to all bind positions for all cursors on the database.
Since we are joining v$sql_cursor (just the current session cursors) with the v$sql and v$sql_bind_data we get the sql statement and bind position, type, value for each of the bind variables as well.
-Priya -
How to see values for bind variables in statspack output
Hi all.
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Solaris: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production
Running sprepsql.sql to get full sql and explain plan from hash value...
SQL comes back with bind variables :1, :2, :3 etc.
How can I find out what the values are for the bind variables so i can plug them in and run them in test db?
Thanks for all your help.I don't have a trace file...
I need to know what the values are and if there is anyway to see them from the output of the sprepsql...
currently looks like:
select
r.status,
NVL(r.required_date, to_date('12/31/3999', 'MM/DD/YYYY')),
r.calc_qty,
r.issued_qty,
r.workorder_type,
r.workorder_base_id,
r.workorder_lot_id,
r.workorder_split_id,
r.workorder_sub_id,
r.operation_seq_no,
r.piece_no,
r.warehouse_id,
0,
wbs_code
from
REQUIREMENT r
where r.part_id = *:1*
and r.workorder_type = 'W'
and r.calc_qty > r.issued_qty
and r.subord_wo_sub_id is null
AND STATUS IN ('R', 'S','U','H','F')
AND WAREHOUSE_ID = *:2*
Thanks for your help. -
Error when Setting value to Bind variable in View Link used in HGrid
Hi
I have requirement to pass profile id as bind variable, I have created a VO based on below Query.
select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
where a.child_id = b.child_id(+)
and b.profile_id(+) = :1
View Link Query that is being generated is
SELECT * FROM (select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
where a.child_id = b.child_id(+)
and b.profile_id(+) = :1) QRSLT WHERE PARENT_ID = :Bind_ChildId
it Shows Errors as
## Detail 0 ##
java.sql.SQLException: Missing IN or OUT parameter at index:: 1
could anyone tell what could be the wrong. Do we need to set bind variable in view link Explicitly? or any other alternative.
Its very Urgent.
Regards
VimalHi,
I have faced similar problem some time ago. I could not find any solution except removing bind parameters in where clause. I tried to change binding style but it also didn't work. I think the problem is caused by view link's where clause.
Maybe you are looking for
-
Trying to get SSO working: Integration of OBIEE, Apache 2.0.52, Weblogic10, Webgate 7.0.4 on Windows I installed the following for this integration. 1. OBIEE (10.1.3.4.x) Installed on JAVA OC4J Container (but deployed to Weblogic) 2. Installed Weblog
-
What is the user exit for message type BENREP, IDoc BENEFIT3?
Hello, We are looking for a user exit to use with IDoc BENEFIT3. Our benefits provider requires information which is not stored in any infotype in SAP, but can be calculated based on 3 existing infotypes. We need a user exit for this. We thought w
-
hi sappians, when i maintain the source list ( assign with scheduling agreement for MRP, even i maintained 2 for MRP), i am facing the following error " Please enter the document number and item togethere" . pls help me....it is urgent..... Thanks to
-
When I view my ipohotos on my mac air that have been uploaded from my iphone, sometimes my computer just shuts down. It is when I have the iphoto open. I'm not sure which version this is...I bought the computer about four months ago.
-
Is it legal to use NiModbus under linux?
Hi, situation is: National Instruments provides the Instaler for NiModbus Library only for Windows-OS... but the Library itselv also runs on Linux-OS. So the Question is: Is it legal to copy the ni.modbusllb out of an installation on Windows-OS and