Which view contains the exact sql statement
Dear All,
Developers have used bind variables in their sql inside their applications (for example: SELECT Name FROM Employee WHERE EmployeeID =:empno)
This bind variable is supplied a value within the application. I wanted to know which data dictionary view will give me the exact sql statement which gets executed.
For example SELECT Name FROM Employee WHERE EmployeeID = 100;
When I query V$SQL, V$SQLAREA, V$SQLTEXT, I get the same query with the bind variables (SELECT Name FROM Employee WHERE EmployeeID =:empno), instead can i get the query which actually holds the value for the bind variable.
Regards,
qA
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4254158186083#75306330816538
Similar Messages
-
JDBC Receiver: exact SQL statement
Hi,
I'm in an IDoc-JDBC scenario, using XML-SQL messages to feed a JDBC Receiver and I am getting <i>weird messages</i> returned by Oracle.
Question: is there a way to log/trace/audit <b>the exact SQL statement</b> that my channel is sending to Oracle??
Thanks.
Alexhi Alessandro,
try: logSQLStatement
from SAP note: 801367
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a> -
View the reports sql statement before execution
Hi
I am developing reports with dynamic sql statements.
How can I view the complete reports sql statement which is sent to the database?
Thanks
JuergYou can turn on the trace functionality. That will display the actual SQL statements sent to the database in the trace file.
-
SSIS The parameterized sql statement yields metadata which does not match the main SQL statement
Hi all,
I'm getting the above error when trying to execute a custom lookup. What I'm trying to do is lookup the minimum promotional price between date ranges. The SQL executes fine in SSMS
SELECT refTable.PRICE
FROM ( SELECT MIN(PRICE) AS PRICE ,
NAME ,
ITEMRELATION ,
FROMDATE ,
TODATE
FROM [dbo].[AllCustPrices]
GROUP BY NAME ,
ITEMRELATION ,
FROMDATE ,
TODATE
) [refTable]
WHERE [refTable].[NAME] = ?
AND [refTable].[ITEMRELATION] = ?
AND ? BETWEEN [refTable].[FROMDATE]
AND [refTable].[TODATE]
but errors in SSIS?Apologies, totally forgot i posted a question on here. I still haven't resolved this. full error text is TITLE: Package Validation Error
Package Validation Error
ADDITIONAL INFORMATION:
Error at Data Flow Task [Lookup MIN Price [440]]: The parameterized SQL statement yields metadata which does not match the main SQL statement.
Error at Data Flow Task [SSIS.Pipeline]: "Lookup MIN Price" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
BUTTONS:
OK
If I take off the MIN function and just put * SSIS is quite happy, it does not like MIN for some reason?
I'm really stumped with this... checked metadata for third parameter which is W/C Date DT_DBTIMESTAMP which is same as FROMDATE, TODATE where i'm using BETWEEN... -
How to tune the following sql statements which has two unions in oracle 10g
It takes a long time to run the following sql statement in 10g. Each select brings back about 4 million rows and there will be about 12 million rows. When I run each select statements seprately in sqlplus I can see the data immedaitely but when I run it as whole with two unions in the select it just takes very very long time? I want to know how to make this run faster? Can we add hints? or is it because of any table space? Any help is appreciated.
select
D.EMPLID
,D.COMPANY
,'CY'
,D.CALENDAR_YEAR
,D.QTRCD
,D.ERNCD
,D.MONTHCD
,D.MONTHCD
,D.GRS_MTD
,D.GRS_QTD
,D.GRS_YTD
,D.HRS_MTD
,D.HRS_QTD
,D.HRS_YTD
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'
union
select
D.EMPLID
,D.COMPANY
,'FY'
,(case when D.MONTHCD > '06' then D.CALENDAR_YEAR + 1 else D.CALENDAR_YEAR end)
,ltrim(to_char(to_number(D.QTRCD) + decode(sign(3-to_number(D.QTRCD)),1,2,-2),'9'))
,D.ERNCD
,ltrim(to_char(to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6),'09'))
,D.MONTHCD
,D.GRS_MTD
,D.GRS_QTD
,(select sum(F.GRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '07' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '07' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD) + decode(sign(7-to_number(F.MONTHCD)),1,6,-6)
<= to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6))
,D.HRS_MTD
,D.HRS_QTD
,(select sum(F.HRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '07' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '07' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD) + decode(sign(7-to_number(F.MONTHCD)),1,6,-6)
<= to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6))
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'
union
select
D.EMPLID
,D.COMPANY
,'FF'
,(case when D.MONTHCD > '09' then D.CALENDAR_YEAR + 1 else D.CALENDAR_YEAR end)
,ltrim(to_char(to_number(D.QTRCD)+decode(sign(4-to_number(D.QTRCD)),1,1,-3),'9'))
,D.ERNCD
,ltrim(to_char(to_number(D.MONTHCD)+decode(sign(10-to_number(D.MONTHCD)),1,3,-9),'09'))
,D.MONTHCD
,D.GRS_MTD
,D.GRS_QTD
,(select sum(F.GRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '10' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '10' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD)+decode(sign(4-to_number(F.MONTHCD)),1,9,-3)
<= to_number(D.MONTHCD)+decode(sign(4-to_number(D.MONTHCD)),1,9,-3))
,D.HRS_MTD
,D.HRS_QTD
,(select sum(F.HRS_MTD) from PS_EARNINGS_BAL F where
F.EMPLID = D.EMPLID and
F.COMPANY = D.COMPANY and
F.ERNCD = D.ERNCD and
F.SPCL_BALANCE = D.SPCL_BALANCE and
(case when F.MONTHCD < '10' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
= (case when D.MONTHCD < '10' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
and to_number(F.MONTHCD)+decode(sign(4-to_number(F.MONTHCD)),1,9,-3)
<= to_number(D.MONTHCD)+decode(sign(4-to_number(D.MONTHCD)),1,9,-3))
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'
Edited by: user5846372 on Mar 11, 2009 8:55 AMHi,
What i observed is that your table name and where clause is same in all the thress SELECTs whereas columns having some manipulations that is not going to be unique. I guess you can easily replace UNION with UNION ALL.
from PS_EARNINGS_BAL D
where D.SPCL_BALANCE = 'N'Note: I am not aware of your data and business requirement. Please test the result before removing. It is just a suggetion
Cheers,
Avinash -
Dear Group
Can any one suggest how can i see the Exact sql which was fired from the application.
SELECT SQL_TEXT
FROM V$SQLAREA
WHERE (ADDRESS, HASH_VALUE) IN
(SELECT SQL_ADDRESS, SQL_HASH_VALUE
FROM V$SESSION
WHERE SID = &sid_number)
I mean with out "SYS_B_0" in the sql statement
Thank you
Message was edited by:
Paddy01Hi,
The value you are looking for is called as bind value.
If you are on 8i, I am not sute how you will find the value. You can certainly it in the trace file.
In 9i onwards, there is a view, v$sql_bind_data, which shows the bind value. But, still it is tricky.
Regards
Rahul -
Which CD contains the EP Installation for SAP R/3 470-620 ?
Hi,
I want to know which CD contains the EP installation for SAP R/3 47- 620, windows ,MS SQL server ?
I have gone through SAP documentation for EP 6.0 installation.
According to it, says that
<i>1. To navigate to the J2EE Engine folder, on NetWeaver DVD, choose SAPINST > NT > I386.
Double-click sapinst.exe.
2. Navigate to SAP NetWeaver 04 Java System (J2EE only) > MS SQL Server > Central System > Custom Installation Java System and choose Next.</i>
But I am unable to find the directory J2EE on my CD ?
Further my CD does have SAPINST.EXE, after excuting it the installation does not show option for <i>Central System > Custom Installation Java System </i> only matching option available is <b>Central Instance</b> .
If you have any experience , please share .
Regards
Gurpreet Singh SidhuHello Gurpreet,
For JAVA installationyou need to use Netweaver DVDs and not 4.7 CDs. You need to install JAVA through Master Installation DVD ( in which you will find SAPINST.exe) and also make use of the JAVA DVD. Further for EP installation you will have to again make use of Master Installation DVD as well as JAVA DVD since the JAVA DVD has Netweaver Components also in it. Check you collection. You must have these DVDs in order to install EP 6.0. I hope you already have required JDK version on your installation machine.
Regards.
Ruchit. -
Multiple Executions Plans for the same SQL statement
Dear experts,
awrsqrpt.sql is showing multiple executions plans for a single SQL statement. How is it possible that one SQL statement will have multiple Executions Plans within the same AWR report.
Below is the awrsqrpt's output for your reference.
WORKLOAD REPOSITORY SQL Report
Snapshot Period Summary
DB Name DB Id Instance Inst Num Release RAC Host
TESTDB 2157605839 TESTDB1 1 10.2.0.3.0 YES testhost1
Snap Id Snap Time Sessions Curs/Sess
Begin Snap: 32541 11-Oct-08 21:00:13 248 141.1
End Snap: 32542 11-Oct-08 21:15:06 245 143.4
Elapsed: 14.88 (mins)
DB Time: 12.18 (mins)
SQL Summary DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542
Elapsed
SQL Id Time (ms)
51szt7b736bmg 25,131
Module: SQL*Plus
UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(ACCT_DR_BAL,
0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND TEST_ACC_NB = ACCT_ACC_NB(+)) WHERE
TEST_BATCH_DT = (:B1 )
SQL ID: 51szt7b736bmg DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542
-> 1st Capture and Last Capture Snap IDs
refer to Snapshot IDs witin the snapshot range
-> UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(AC...
Plan Hash Total Elapsed 1st Capture Last Capture
# Value Time(ms) Executions Snap ID Snap ID
1 2960830398 25,131 1 32542 32542
2 3834848140 0 0 32542 32542
Plan 1(PHV: 2960830398)
Plan Statistics DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Stat Name Statement Per Execution % Snap
Elapsed Time (ms) 25,131 25,130.7 3.4
CPU Time (ms) 23,270 23,270.2 3.9
Executions 1 N/A N/A
Buffer Gets 2,626,166 2,626,166.0 14.6
Disk Reads 305 305.0 0.3
Parse Calls 1 1.0 0.0
Rows 371,735 371,735.0 N/A
User I/O Wait Time (ms) 564 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 0 N/A N/A
Invalidations 0 N/A N/A
Version Count 2 N/A N/A
Sharable Mem(KB) 26 N/A N/A
Execution Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | UPDATE STATEMENT | | | | 1110 (100)| |
| 1 | UPDATE | TEST | | | | |
| 2 | TABLE ACCESS FULL | TEST | 116K| 2740K| 1110 (2)| 00:00:14 |
| 3 | TABLE ACCESS BY INDEX ROWID| ACCT | 1 | 26 | 5 (0)| 00:00:01 |
| 4 | INDEX RANGE SCAN | ACCT_DT_ACC_IDX | 1 | | 4 (0)| 00:00:01 |
Plan 2(PHV: 3834848140)
Plan Statistics DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Stat Name Statement Per Execution % Snap
Elapsed Time (ms) 0 N/A 0.0
CPU Time (ms) 0 N/A 0.0
Executions 0 N/A N/A
Buffer Gets 0 N/A 0.0
Disk Reads 0 N/A 0.0
Parse Calls 0 N/A 0.0
Rows 0 N/A N/A
User I/O Wait Time (ms) 0 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 0 N/A N/A
Invalidations 0 N/A N/A
Version Count 2 N/A N/A
Sharable Mem(KB) 26 N/A N/A
Execution Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | UPDATE STATEMENT | | | | 2 (100)| |
| 1 | UPDATE | TEST | | | | |
| 2 | TABLE ACCESS BY INDEX ROWID| TEST | 1 | 28 | 2 (0)| 00:00:01 |
| 3 | INDEX RANGE SCAN | TEST_DT_IND | 1 | | 1 (0)| 00:00:01 |
| 4 | TABLE ACCESS BY INDEX ROWID| ACCT | 1 | 26 | 4 (0)| 00:00:01 |
| 5 | INDEX RANGE SCAN | INDX_ACCT_DT | 1 | | 3 (0)| 00:00:01 |
Full SQL Text
SQL ID SQL Text
51szt7b736bm UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL, 0) +
NVL(ACCT_DR_BAL, 0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND PB
RN_ACC_NB = ACCT_ACC_NB(+)) WHERE TEST_BATCH_DT = (:B1 )Your input is highly appreciated.
Thanks for taking your time in answering my question.
RegardsOracle Lover3 wrote:
Dear experts,
awrsqrpt.sql is showing multiple executions plans for a single SQL statement. How is it possible that one SQL statement will have multiple Executions Plans within the same AWR report.If you're using bind variables and you've histograms on your columns which can be created by default in 10g due to the "SIZE AUTO" default "method_opt" parameter of DBMS_STATS.GATHER__STATS it is quite normal that you get different execution plans for the same SQL statement. Depending on the values passed when the statement is hard parsed (this feature is called "bind variable peeking" and enabled by default since 9i) an execution plan is determined and re-used for all further executions of the same "shared" SQL statement.
If now your statement ages out of the shared pool or is invalidated due to some DDL or statistics gathering activity it will be re-parsed and again the values passed in that particular moment will determine the execution plan. If you have skewed data distribution and a histogram in place that reflects that skewness you might get different execution plans depending on the actual values used.
Since this "flip-flop" behaviour can sometimes be counter-productive if you're unlucky and the values used to hard parse the statement leading to a plan that is unsuitable for the majority of values used afterwards, 11g introduced the "adaptive" cursor sharing that attempts to detect such a situation and can automatically re-evaluate the execution plan of the statement.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Which views are the most important for a dba admin?
Hi I am new to oracle, and I am wondering which views are the most important to monitore.
Can someone give me a usefull link?
I know the views depend of wich kind of information you wanna retrieve.
But I think about space left on tablespaces, segment information, backup information, status of the database.....
So any help would be appreciated.For example I am wonering which views would an admin taking a new job and database would look?I would recommend you (if not already done):
- first read the Concepts manual:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/toc.htm
- then the Administration Guide:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/toc.htm
At the end of each chapter of this document, there is a section named "Viewing Information About ..." such as http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref482
that contains the related views. -
How do I Pass a parameter to a SQL Component Task where the source SQL statement is also a variable
Hi,
I have been tasked with making a complex package more generic.
To achieve this I need to pass a parameter to a SQL Component Task where the source SQL statement is also a variable.
So to help articulate my question further I have create a package and database as follows; -
USE [KWPlay]
GO
/****** Object: Table [dbo].[tblTest] Script Date: 05/14/2014 17:08:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblTest](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[Description] [nvarchar](50) NULL,
CONSTRAINT [PK_tblTest] PRIMARY KEY CLUSTERED
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
I populated this table with a single record.
I unit tested the SQL within SSMS as follows;
SELECT * FROM dbo.tblTest
Result; -
ID
Description
1
Happy
DECLARE @myParam NVARCHAR(100)
SET @myParam = 'Sad'
UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
SELECT * FROM dbo.tblTest
Result; -
ID
Description
1
Sad
Within the package I created two variables as follows; -
Name: strSQL
Scope: Package
Data Type: String
Value: UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
Name: strStatus
Scope: Package
Data Type: String
Value: Happy
I then created a single ‘Execute SQL Task’ component within the control flow as follows; -
However when I run the above package I get the following error; -
SSIS package "Package.dtsx" starting.
Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = @myParam FR..." failed with the following error:
"Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.
The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the
errors.
SSIS package "Package.dtsx" finished: Failure.
I also tried; -
Name: strSQL
Scope: Package
Data Type: String
Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
However I received the error; -
SSIS package "Package.dtsx" starting.
Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = ? FROM dbo...." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with
the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
Kind Regards,
Kieran.
Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/Tried; -
Name: strSQL
Scope: Package
Data Type: String
Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
and; -
Result; -
SSIS package "Package.dtsx" starting.
SSIS package "Package.dtsx" finished: Success.
Therefore the answer was to put the parameter number rather than the parameter name under the parameter mapping tab-> parameter name column.
Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/ -
Where to do the abap sql statement in sapscript (PO)
Hi, all.
Hope anybody can guide me to find a solution.
My situation now is i have to do a purchase order in SAPSCRIPT starting from a standard po. I already found out all the related details as below:
Program SAPFM06P
FORM routine ENTRY_NEU
Form MEDRUCK
So, now the problem now is I have to add some more data on my print out PO. After figure out for some time, I don't know where to do my abap sql statement. Like example, I want to retriece some data from the ADRC table. I opened the standard program SAPFM06P to add in the some sql statement, but i dun know where should i add in. Bcz if we straight away put the related ADRC field in our sapscript, it is useless, right?
Thanks in advance.Thanks a lot.
So, how should i add in code in order to fetch the data frm ADRC by using that routine. Because i only the codes like below. I don't where should i start add in.
Form entry_neu using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
exporting
ix_nast = nast
ix_screen = ent_screen
importing
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
changing
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
importing
ex_retco = ent_retco.
endform.
Or i come wrong place to add in any coding. Plz guide me.
Thanks in advance. -
How to get the real SQL statement from a preparedstatement?
Hi,
I am trying to log the actual SQL sent to database by the preparedStatement. Since the original SQL I used to prepare the statement has a lot of "?" in it, after setting all the parameters in the preparedStatement, I want to get the final SQL statement executed. Is there a way to get it? Probably the SQL will depend on different drivers.
Thanks in advance.Thanks, changhsu. I tried the tracing technique. But it only prints out the original SQL statement sent to the preparedStatement. The following is part of the log file:
======================================================================
--------NetDirect JSQLConnect Version:2.2708--------
2002-04-10 14:23:54.818 (1) Connection attempt number 1 Connection ID:1 for host:perseus
2002-04-10 14:23:55.429 (1) JSQLConnect(2.2708) Trial license - expires on:Thu Apr 25 17:47:32 CDT 2002, unlimited connections
2002-04-10 14:23:55.449 (2) Connection allocated from pool ID:2
2002-04-10 14:23:55.72 (2) [Thread[Thread-6,5,main], IO:88cb4, Dbc:1346]] SELECT SHARED_DRIVES FROM EPM_PREFS WHERE PRODUCT='PE'
2002-04-10 14:23:57.913 (2) Connection closed and returned to connection pool ID:2
2002-04-10 14:23:58.193 (3) Connection attempt number 2 Connection ID:3 for host:perseus database:epm20 SQL6.5:false
2002-04-10 14:23:58.203 (3) [Thread[Thread-6,5,main], IO:88cb3, Dbc:1347]] use epm20 set quoted_identifier,ansi_null_dflt_on,ansi_padding on set textsize 2147483647 set transaction isolation level read committed set implicit_transactions off
2002-04-10 14:24:00.356 (4) Connection allocated from pool ID:4
2002-04-10 14:24:01.168 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] PreparedStatement::prepare stmt:SELECT PASSWD FROM RESOURCE_INFO WHERE USER_ID=? AND DELETE_FLG IS NULL
2002-04-10 14:24:01.448 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] RPC:sp_prepare
2002-04-10 14:24:01.488 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] RPC:sp_execute
=======================================================================
I did not try to trace in SQL Server 7. I will have to find out how to do that first.
Thanks again. -
Which table contains the field CNTRC(Counter Reading)?
Hi Guys,
1) Can anybody tell me which table contains the field CNTRC (short description is Counter Reading) ?
2) CNTRC is available in the structure RIMR0. In a situation like this, how do we identify the table name?
Thanks in Advance,
VijayDear Vijay
The counter reading is available in IMRG table in field CNTRR. It is available in exponential form. you need to convert to decimal from using the FM FLTP_CHAR_CONVERSION_FROM_SI
Please go through the below link for the
same
Link: [Re: Counter reading in IK11]
Regards
gajesh -
Which table stores the valid City/State/Country combination for Customers
Hi,
I would like to know which table stores the valid city/state/country/county/provinces for Customer Address validation
Any helps please?
Thanks,
GenooHi,
Please ensure to include your EBS version, so as to better provide assistance..
Please have a look at the doc as its explained in-depth:
Projects Uptake of the TCA Architecture in Release 12 [ID 417511.1]
Hope this helps,
Best Regards, -
Database Control - Dynamically setting the @jc.sql statement 'attribute' ?
Hi,
I have a JCX file that extends a database control. I wan't to be able to set the
@jc.sql statement 'attribute' value dynamically. There does not seem to be a setProperty()
api in the
DatabaseControl (interface) like there is in some other types of control (e.g.,
FileControl).
The code extract below sets the value statically, however I wan't to be able to
set this for the method dynamically (say at runtime) and not necessary at design
time...
I would really appreciate, if someone knows any way that this is possible ...
Thanks very much,
Vishwa
CODE EXTRACT >>>>>>..public interface PointBaseCustomersControl extends DatabaseControl, com.bea.control.ControlExtension
// Sample database function. Uncomment to use
// static public class Customer
// public int id;
// public String name;
// * @jc:sql statement="SELECT ID, NAME FROM CUSTOMERS WHERE ID = {id}"
// Customer findCustomer(int id);
// Add "throws SQLException" to request that SQLExeptions be thrown on errors.
static final long serialVersionUID = 1L;
* @jc:sql statement="SELECT * FROM CUSTOMER"
PointBaseCustomersDocument getCustomers();Hello again,
I need some help. I recreated the SQL Inserts with VS 2005
and am not doing something right. I got this from MSDN on how to
insert records using the SQLdataSource Control. Here's what I got,
but I get an exception error Message: ORA-01036: illegal variable
name/number. I know this is an Adobe forum, but this is a basic
ASP.NET question. I'm queying WMI to retrieve computer information
that I send to the TextBoxes. Any help would be appreciated.
protected void bnSubmit_click(object sender, EventArgs e)
SqlDataSource1.Insert();
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:CAT %>"
ProviderName="<%$ ConnectionStrings:CAT.ProviderName
%>" SelectCommand='SELECT * FROM "HARDWARE"'
InsertCommand="INSERT INTO HARDWARE(SERVICE_TAG, MANUFACTURER,
MODEL, OS, SERVICE_PACK, PROC, RAM, HDD, LAN, LAN_MAC, WIFI,
WIFI_MAC, HDD_SIZE) VALUES
(@SERVICE_TAG,@MANUFACTURER,@MODEL,@OS,@SERVICE_PACK,@PROC,@RAM,@HDD,@LAN,@LAN_MAC,@WIFI, @WIFI_MAC,@HDD_SIZE)">
<insertparameters>
<asp:formparameter name="SERVICE_TAG" formfield="txtSt"
Type="String" />
<asp:formparameter name="MANUFACTURER" formfield="txtMf"
Type="String" />
<asp:formparameter name="MODEL" formfield="txtMd"
Type="String" />
<asp:formparameter name="OS" formfield="txtOs"
Type="String"/>
<asp:formparameter name="SERVICE_PACK" formfield="txtSp"
Type="String" />
<asp:formparameter name="PROC" formfield="txtProc"
Type="String"/>
<asp:formparameter name="RAM" formfield="txtMem"
Type="String"/>
<asp:formparameter name="HDD" formfield="txtHdd"
Type="String"/>
<asp:formparameter name="LAN" formfield="txtLan"
Type="String"/>
<asp:formparameter name="LAN_MAC" formfield="txtLmac"
Type="String"/>
<asp:formparameter name="WIFI" formfield="txtWlan"
Type="String"/>
<asp:formparameter name="WIFI_MAC" formfield="txtLmac"
Type="String"/>
<asp:formparameter name="HDD_SIZE" formfield="txtHds"
Type="String"/>
</insertparameters>
</asp:SqlDataSource>
Maybe you are looking for
-
Can you use one PC for 2 different Ipods, with out erasing the others music from Itunes?
Can you use one PC for different Ipod touch's , with out erasing the other persons Itunes music?
-
IPhone no longer syncing with iCal since purchasing new Macbook Pro
I've searched other posts and some were exhaustively long complaints about iCloud and I really don't want to read through 600 posts to get to what should be a simple answer to a really obnoxious problem that never used to be a problem before Maverick
-
Can't get ch2 to work with tktds1k2k for Tek TDS 1002.
Why won't the tktds1k2k "Getting Started vi" display ch2? I modified it so that the Vertical.vi gets the same channel source as the "Read wvfrm to array vi". I am using a tds1002. When I set the source to ch2, the Read waveform to array vi times out.
-
Using MAC with DW CS4. Sometime back it was possible to view the css code behind a webpage from within Firefox, is that still possible and how with Firefox on a MAC? Or is there another way within Safari. Thank you.
-
HT204382 I can't open .flv files and I have OS X Lion 10.7.5
I need to open .flv files and store on my computer for presentations. How can I do that? The message when I try to open from Safari "The document "GetClean_400.flv" could not be opened. The movies' file format isn't recognized." I have Adobe Player