Where to see generated SQL statement from jdbc adapter?
Hi everybody,
where can I see the generated SQL statement from JDBC adapter?
Regards Mario
Yes and True lterally means the same, but alas XI does not understand literature..
Just checked the note as well, as you are correct!
Regards
Bhavesh
Similar Messages
-
Hi all,
how can I see the SQL Statement which is made by the JDBC Adapter.
I have createt the XML Structure, but I want to know how PI (7.11) transformed the XML to SQL.
How can I trace the JDBC Adapter? Which configuration is neccessary? Where can I find the trace?
Thanks very much for your help!
JürgenHi,
this is my Auditlog
Audit-Protokoll für Message: caded0e4-b287-1def-92a9-907432c01001
Zeitstempel Typ Beschreibung
2010-04-16 13:38:02 Information The message was successfully received by the messaging system. Protocol: XI URL: http://serv3709:52800/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
2010-04-16 13:38:02 Information Using connection JDBC_http://sap.com/xi/XI/System. Trying to put the message into the request queue.
2010-04-16 13:38:02 Information Message successfully put into the queue.
2010-04-16 13:38:02 Information The message was successfully retrieved from the request queue.
2010-04-16 13:38:02 Information The message status was set to DLNG.
2010-04-16 13:38:02 Information Delivering to channel: test_etl
2010-04-16 13:38:02 Information JDBC Adapter Receiver processing started, required QoS BestEffort
2010-04-16 13:38:02 Information JDBC Adapter Receiver Channel test_etl: processing started; party / service E_DWH.
2010-04-16 13:38:02 Information IS_RUN.MAP_SYS_LADELAUF_START.MAIN
2010-04-16 13:38:02 Information Database request processed successfully.
2010-04-16 13:38:02 Information The message was successfully delivered to the application using connection JDBC_http://sap.com/xi/XI/System.
2010-04-16 13:38:02 Information The message status was set to DLVD. -
Multiple SQL statements from JDBC
Dear All,
We are working on R/3- >XI->JDBC scenario. We have sender as Proxy which sends some data to XI which needs to be Updated in multiple database tables in oracle. We have few Insert,Update and Delete Query to beHi
yes this can be done by using the concept IDOC to JDBC
ALe settings for thi s are :
Steps for XI
Step 1)
Goto SM59.
Create new RFC destination of type 3(Abap connection).
Give a suitable name and description.
Give the Ip address of the R3 system.
Give the system number.
Give the gateway host name and gateway service (3300 + system number).
Go to the logon security tab.
Give the lang, client, username and password.
Test connection and remote logon.
Step 2)
Goto IDX1.
Create a new port.
Give the port name.
Give the client number for the R3 system.
Select the created Rfc Destination.
Step 3)
Goto IDX2
Create a new Meta data.
Give the Idoc type.
Select the created port.
Steps for R3.
Step 1)
Goto SM59.
Create new RFC destination of type 3(Abap connection).
Give a suitable name and description.
Give the Ip address of the XI system.
Give the system number.
Give the gateway host name and gateway service (3300 + system number).
Go to the logon security tab.
Give the lang, client, username and password.
Test connection and remote logon.
Step 2)
Goto WE21.
Create a port under transactional RFC.(R3->XI)
Designate the RFC destination created in prev step.
Step 3)
Goto SALE.
Basic settings->Logical Systems->Define logical system.
Create two logical systems(one for XI and the other for R3)
Basic settings->Logical Systems->Assign logical system.
Assign the R3 logical system to respective client.
Step 4)
Goto WE20.
Partner type LS.
Create two partner profile(one for XI the other for R3).
Give the outbound or inbound message type based on the direction.
Step 5)
Not mandatory.
Goto BD64.
Click on Create model view.
Add message type.
Step 6)
Goto WE19
Give the basic type and execute.
fill in the required fields.
Goto IDOC->edit control records.
Give the following values.(Receiver port,partner no.,part type and sender Partner no. and type)
Click outbound processing.
Step 7)
Go to SM58
if there are any messages then there is some error in execution.
Goto WE02.
Check the status of the IDOC.
Goto WE47.
TO decode the status code.
BD87 to check the status of IDOC.
In case if not authorized then go to the target system and check in SU53, see for the missing object
and assign it to the user.
for scenario reffer link
Configuring JDBC Connector Service To Perform Database Lookups
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1246926,00.html
Configuration of JDBC Adapter for SQL Server
JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
UserID and Password
Configuring the Receiver JDBC Adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
hope this helps you
Regard's
Chetan Ahuja -
Execute stored-prozedure in sql-statement in jdbc-adapter for sender
Hello,
in the sql-statement i call a stored procedure which makes following:
- doing a selcet
- update one field
- give a recordset back
In the update-field i write:
But in the adapter monitoring i become a sql-exception:
Error: SQLException during query 'EXECUTE st_enum_EAI_lokation': java.sql.SQLException: [SQLServer 2000 Driver for JDBC]No ResultSet set was produced.
I´m using sql-server.
So there is no resultset coming back...
The reason for the stored-procedure is that it is not allowed to make changes in a productive data-base directly by an update.
What´s the problem?
Thanks in advance,
FrankCurrently, the jdbc sender adapter cannot execute Oracle's stored procedure. Oracle's stored procedure cannot return a resultset, which is required by the jdbc sender adapter.
An adapter user-module is available for a sender adapter to execute Oracle's stored procedure.
If you are interested, I can send it to you.
Regards -
Where to see the SQL statement that CMP Entity bean excuted?
hi, I'm wondering where I can find the SQL that a CMP entity bean executed in a transaction?
thank you!You can do it in many ways. If you are using eclipse then using eclipse
plugins for weblogic you van do it. I have heard that in weblogic workshop
also you can do it. If the above do doesn;t solves your problem then check
this out.
http://www.p6spy.com/documentation/install.htm
Hope that helps.
<Xin Zhuang> wrote in message news:[email protected]..
hi, I'm wondering where I can find the SQL that a CMP entity bean executed
in a transaction?
thank you! -
How to examine the generated SQL statement in Receiver JDBC Adapter
I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
The only suggestion is to use RWB, but I was unable to find any details about how to do so.
Any help is appreciatedHi,
To add, u can see the SQL Statements in Audit log of RWB.
Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
Regards,
Sudharshan
Message was edited by:
Sudharshan Aravamudan -
Extracting SQL statement from a Webi document's data provider using SDK.
Hi all,
Is it possible to extract the SQL statement from an existing Webi document's data provider using BO SDK? I've searched through the class library but haven't found any information on this yet. If you have done it, could you provide some guidance. Many thanks.I found the following Java code that might be of some help to you. I realize you are using .NET but this might push you down the right path.
The trick here is to use the Report Engine SDK to get the DataProvider of the DocumentInstance. Then, look at the SQLDataProvider to get your SQLContainer.
My apologies for the poor formatting. This didn't copy and paste over to the forums very well. I've cleaned up as much as I could.
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.businessobjects.rebean.wi.*" %>
<%
boolean loginSuccessful = false;
IEnterpriseSession oEnterpriseSession = null;
String username = "username";
String password = "password";
String cmsname = "cms_name";
String authenticationType = "secEnterprise";
try
//Log in. oEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsname, authenticationType);
if (oEnterpriseSession == null)
out.print("<FONT COLOR=RED><B>Unable to login.</B></FONT>");
else
{ loginSuccessful = true;
catch (SDKException sdkEx)
{ out.print("<FONT COLOR=RED><B>ERROR ENCOUNTERED</B><BR>" + sdkEx + "</FONT>");}
if (loginSuccessful) { IInfoObject oInfoObject = null;
String docname = "WebI document name";
//Grab the InfoStore from the httpsession IInfoStore oInfoStore = (IInfoStore) oEnterpriseSession.getService("", "InfoStore"); //Query for the report object in the CMS. See the Developer Reference guide for more information the query language. String query = "SELECT TOP 1 * " + "FROM CI_INFOOBJECTS " + "WHERE SI_INSTANCE = 0 And SI_Kind = 'Webi' " + "AND SI_NAME='" + docname + "'";
IInfoObjects oInfoObjects = (IInfoObjects) oInfoStore.query(query);
if (oInfoObjects.size() > 0)
//Retrieve the latest instance of the report oInfoObject = (IInfoObject) oInfoObjects.get(0);
// Initialize the Report Engine ReportEngines oReportEngines = (ReportEngines)
oEnterpriseSession.getService("ReportEngines");
ReportEngine oReportEngine = (ReportEngine) oReportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
// Openning the document DocumentInstance oDocumentInstance = oReportEngine.openDocument(oInfoObject.getID());
DataProvider oDataProvider = null;
SQLDataProvider oSQLDataProvider = null;
SQLContainer oSQLContainer_root = null;
SQLNode oSQLNode = null;
SQLSelectStatement oSQLSelectStatement = null;
String sqlStatement = null;
out.print("<TABLE BORDER=1>");
for (int i=0; i<oDocumentInstance.getDataProviders().getCount(); i++)
oDataProvider = oDocumentInstance.getDataProviders().getItem(i);
out.print("<TR><TD COLSPAN=2 BGCOLOR=KHAKI>Data Provider Name: " + oDataProvider.getName() + "</TD></TR>");
if (oDataProvider instanceof SQLDataProvider)
oSQLDataProvider = (SQLDataProvider) oDataProvider;
oSQLContainer_root = oSQLDataProvider.getSQLContainer();
if (oSQLContainer_root != null)
for (int j=0; j<oSQLContainer_root.getChildCount(); j++)
oSQLNode = (SQLNode) oSQLContainer_root.getChildAt(j);
oSQLSelectStatement = (SQLSelectStatement) oSQLNode;
sqlStatement = oSQLSelectStatement.getSQL();
out.print("<TR><TD>" + (j+1) + "</TD><TD>" + sqlStatement + "</TD></TR>");
else
out.print("<TR><TD COLSPAN=2>Data Provider is not a SQLDataProvider. SQL Statement can not be retrieved.</TD></TR>"); } } out.print("</TABLE>");
oDocumentInstance.closeDocument(); }
oEnterpriseSession.logoff();}%> -
Update SQL statement in JDBC sender (system fields)
All,
Is it possible to update more than 1 field via the update sql statement ?
Also, is it possible to use system fields ?
Something like this
UPDATE database.table SET processed='Y', date = sy-datum
Regards, MichelHi
use sysdate as suggested above
Check your generated SQL query format is correct
At runtime you can find the genereated sql statements by doing configuraitons in Receiver JDBC adapter.
In the JDBC Receiver adapter you have the Advanced Properties .
Over there enter the following
left column logSQLStatement
right column true
To see the query created ..
Login to adapter monitoring ..select the relevant jdbc adapter.
Now when any message is processed by the jdbc adapter in adapter monitoring at that time you will see a message link. When you click on that link a new window will open. In that window if you click on page down you will get to see the sql statement generated by the jdbc adapter. -
How Can I Retrieve SQL Statement From The User ?
Hi
I want to know, how can I make the user can enter the SQL statement from himself ?? in this code he can't enter it. Only he can display the SQL that i wrote it...
this is my Code:
import java.sql.*;
public class db_testing {
static final String DRIVER = "com.mysql.jdbc.Driver";
static final String DATABASE_URL = "jdbc:mysql://localhost/S204111933";
public static void main(String[] args) {
Connection cn=null;
Statement st= null;
ResultSet rset=null;
try{
Class.forName(DRIVER);
cn=DriverManager.getConnection(DATABASE_URL, "root", "admin");
st=cn.createStatement();
rset=st.executeQuery("select * from employee");
ResultSetMetaData metadata=rset.getMetaData();
System.out.println("The begining: ");
for(int i=1;i<=metadata.getColumnCount();i++)
System.out.print(metadata.getColumnName(i)+"\t");
System.out.println();
System.out.println();
while(rset.next()){
for(int i=1;i<=metadata.getColumnCount();i++)
System.out.print(rset.getObject(i)+"\t\t");
System.out.println();}
catch(Exception e){
e.printStackTrace();
finally{
try{
cn.close();
st.close();
rset.close();
catch(Exception e1){
e1.printStackTrace();
}The following changes in the code will make the user to give the input
import java.sql.*;
public class db_testing {
static final String DRIVER = "com.mysql.jdbc.Driver";
static final String DATABASE_URL = "jdbc:mysql://localhost/S204111933";
public static void main(String[] args) {
Connection cn=null;
Statement st= null;
ResultSet rset=null;
try{
Class.forName(DRIVER);
cn=DriverManager.getConnection(DATABASE_URL, "root", "admin");
// st=cn.createStatement();
// rset=st.executeQuery("select * from employee");
PreparedStatement pstmt=null;
pstmt=cn.prepareStatement("select * from employee where id=?");
pstmt.setInt(1,Integer.parseInt(args[0]));
rset=pstmt.executeQuery();
ResultSetMetaData metadata=rset.getMetaData();
System.out.println("The begining: ");
for(int i=1;i<=metadata.getColumnCount();i++)
System.out.print(metadata.getColumnName(i)+"\t");
System.out.println();
System.out.println();
while(rset.next()){
for(int i=1;i<=metadata.getColumnCount();i++)
System.out.print(rset.getObject(i)+"\t\t");
System.out.println();}
catch(Exception e){
e.printStackTrace();
finally{
try{
cn.close();
st.close();
rset.close();
catch(Exception e1){
e1.printStackTrace();
} -
Not able to View generated SQL statement
Hi,
In order to view the generated SQL statement in Receiver JDBC Adapter,
i have done logSQLStatement as true in CC still not able to view in RWB,
also mesg protocol i m using in CC is "xml sql format", is it bcos of this i am not able to ?
If yes, then how can i see that sql string?
Regards,
PratibhaPratibha,
In our JDBC scenario the message protocol is also set to XML SQL Format
The Integration Process has a mapping step of type XSL that uses an Imported Archive to create the SQL select statement. Then there is a synchronous Send step for the JDBC component
Both this SQL statement and the returned SQL result are available in the XML message monitor SXMB_MONI
Regards,
Mike -
How to see all sql statements on sql commands under history link
Hi All,
How to see the all the sql history on sql commands tab.
I want see all sql statements.
Where to set if we need to store more sql statments in history.
We are using Apex3.2 and 10g database(EE).
Thanks,
NrI just checked the source code of the SQL commands history region and that report fetches a maximum of 1000 records. I don't know if you change the setting somewhere in the builder, but seeing the code it looks as though 1000 is hard-coded in the report definition(apex 4.0).
If you need to see all the command history,you can query the original table: APEX_040000.WWV_FLOW_SW_SQL_CMDS
Note that is an internal table used by apex and hence you might not find any documentation about it(google got me one valid hit: Identifying Inactive Workspaces which seem to confirm the table's use).
Anyway, here's what you need to do, ask your dba to grant your workspace user select access on this table
Connect as dba user and run
GRANT SELECT ON APEX_040000.wwv_flow_sw_sql_cmds to '<WORKSPACE SCHEMA>'Now you can run the following command from your workspace to see the entire command history using
select * from APEX_040000.WWV_FLOW_SW_SQL_CMDS where parsed_schema = '<WORKSPACE SCHEMA>';You might want to revoke the grant once you have seen the data/taken out an export due to security issues. -
Building up dymanic SQL statement from user entered fields on a jsp
Hi guys.
I'm building up a sql statement from a bunch of input fields that the users can type in on a .jsp page. No real problem there, but I get a problem when they type in words with ' character in it Eg: Don't, I'll etc.
This confuses the java code totally and usually results in a spectacular crash of the system.
Any ideas/thought/wild speculations would be most appreciated.
Regards
Elmar Matthee
University of Stellenbosch
South AfricaEven in pure read-only databases SQL injection can be a problem, as the user might be able to read data he should not be able to see.
You can also create dynamically created sql statements using PreparedStatements, that's not a problem, I'm doing it pretty often myself.
List<Object> arguments = new ArrayList<Object>();
StringBuilder sql = new StringBuilder("SELECT foo FROM bar WHERE");
if (someCondition) {
sql.append(" foobar = ? ");
arguments.add(someValue);
if (someOtherCondition) {
sql.append(" AND barfoo = ?");
arguments.add(someOtherValue);
// later on use setObject() to fill in the parametersObviously you'll have to handle putting the correct ANDs and ORs there, but you probably has solved that already, as it isn't any different if you don't use a PreparedStatement. -
How to store data into database by reading sql statements from text file
how to write java program for storing data into database by reading sql statements from text file
Step 1: Create a property file to add various queries.
Step 2: Read the properties file using ResourceBundle
Step 3: Use the jdbc to execute the query read from the property file.
So in future if you need to change query no need do any modifications in java program. But depends on how you use the property file. -
How to see generated SQL when execute JPQL query using entity manager?
I want to see generated SQL query in console or in a log file. How do I do that?
I'm using GlassFish if it mattersIf you want to see SQL query that is generated from JPQL in GlassFish console you should do following:
Log on admin console.
Select 'Application Server' from tree, then select Logging tab and Log Levels sub-tab.
Log level for 'Persistence' must be set to FINE or level with more verbosity. -
TopLink does not generate SQL statements for inserting new objects
TopLink does not generate SQL statements for inserting new objects. Why?
Thanks in advance...Please see the response in
Why does not unitofwork.commit write data to the database?
Regards,
Chris
Maybe you are looking for
-
The above. When I opened a new tab in the past, before the new update, firefox would automatically highlight the text in the address bar, and I could simply start typing from there the address of the site I wanted. I could quickly get to anywhere I w
-
Cisco VPN server internal connection
I have a cisco 1841 router which I use as VPN server. This is the configuration: Cisco#show running-config Building configuration...Current configuration : 6382 bytes!version 15.1service tcp-keepalives-inservice tcp-keepalives-outservice timestamps d
-
Create .kml based google map in iWeb
Using iWeb 08, I can easily and successfully insert google maps into my pages using the web widget. I am then limited to an address though for the base map. Does anyone know whether it is possible to insert a google earth based .kml file in iWeb so t
-
Why do circles rotated 45 degrees in PowerPoint slides not appearing in PDF?
I am using Acrobat XI Professional and PowerPoint 2013 in Windows 8. I have two PowerPoint slides. One slide is a filled-in circle. The other slide has another filled-in cirlce that is rotated 45 degrees. When I convert the PowerPoint presentation wi
-
I have one email account on the iPad. I can't seem to delete emails from my iPad that then get deleted on the server so that when i open up my inbox on my MAC the email has gone - this is also true the other way around. If i delete my emails on my MA