CUCM 7.x Custom SQL
Hi,
We are currently testing CUCM 7.x and are using LDAP. We also have a CRM application were we have all our customers. Is it possible to query this database from CUCM so we can find this contact information on the IP phone or CUPC?
You can query any LDAP directory and display the results on an IP phone. There is a sample app in the SDK.
However, you can go beyond that. We wrote a custom application for a customer that uses Oracle's Siebel CRM and they want to display customer info on the phone screen based on the caller ID of the incoming call. We use JTAPI to read the caller ID and then did a CRM look up to find customer info (last called, account manager, etc.) and display the information on service rep's IP phone.
Similar Messages
-
Discoverer Custom SQL Report with Group By,Having
Hi all,
I'm working with Discoverer 4.1.41.05 and retrieve data from Oracle HRMS.
I want to create a report based on a custom SQL Folder in Discoverer Administration to solve the following scenario:
SELECT EMPLOYEE_NUMBER FROM PER_ALL_PEOPLE_F
MINUS
SELECT EMPLOYEE_NUMBER FROM PER_ALL_PEOPLE_F,PER_EVENTS, PER_BOOKINGS
GROUP BY EMPLOYEE_NUMBER
HAVING SUM(PER_EVENTS.ATTRIBUTE1) >= 10)
The problem is when I run the sql from SQL*Plus is working fine producing the correct result.
When I create the Custom Folder and create a Discoverer report based on it I retrieve all employees since the second select statement retrieve no rows!
Does anyone has any idea how I can solve this problem or if there is another way to create this scenario?
Any feedback is much appreciated.
Thanking you in advance.
ElenaHi Elena,
I think you are missing some joins, you could try something like:
SELECT EMPLOYEE_NUMBER FROM PER_ALL_PEOPLE_F p
WHERE NOT EXISTS
(SELECT NULL
FROM PER_EVENTS e, PER_BOOKINGS b
WHERE b.person_id = p.person_id
AND e.event_id = b.event_id
GROUP BY b.person_id
HAVING SUM(e.ATTRIBUTE1) >= 10)
Rod West -
How can I use the Rownum/Customized SQL query in a Mapping?
Hi,
* I need to use a Rownum for populating one of the target field? How to create a mapping with Rownum?
* How can I use an Dual table in OWB mapping?
* Can I write Customized SQL query in OWB? How can I achieve this in a Mapping?
Thanks in Advance
KishanHi Niels,
As I'm sure you know, the conundrum is that Reports doesn't know how many total pages there will be in the report until it is all done formatting, which is too late for your needs. So, one classical solution to this problem is to run the report twice, storing the total number of pages in the database using a format trigger, and throwing away the output from the first run when you don't know the total number of pages.
Alternatively, you could define a report layout so that the number of pages in the output is completely predictable based upon, say, the number of rows in the main query. E.g., set a limit of one, two, ... rows per page, and then you'll know how many pages there will be simply because you can count the rows in a separate query.
Hope this helps...
regards,
Stewart -
DB polling using custom SQL in SOA Suite 11g
Hi,
We are trying to poll records from a database using custom sql. But all the records in the table are being picked up at the same time and not as per the polling frequency set in the adapter.
Below is the configuration from the .jca file:
<endpoint-activation portType="II_ptt" operation="receive">
<activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
<property name="DescriptorName" value="II.OrderRequest"/>
<property name="QueryName" value="IISelect"/>
<property name="MappingsMetaDataURL" value="II-or-mappings.xml"/>
<property name="PollingStrategy" value="DeletePollingStrategy"/>
<property name="PollingInterval" value="60"/>
<property name="MaxRaiseSize" value="10"/>
<property name="MaxTransactionSize" value="10"/>
<property name="SequencingColumn" value="REQUEST_SAK"/>
<property name="NumberOfThreads" value="1"/>
<property name="ReturnSingleResultSet" value="false"/>
<property name="DeleteDetailRows" value="false"/>
</activation-spec>
</endpoint-activation>
Please let us know if anything else needs to be set to enable the polling as per the frequency in the adapter.
Thanks.As the link from Anuj said, you need to also configure 'Distributed Polling' in the wizard. This speed limit trick will no longer work out of the box in 11.1.1.3 on, you will also have to set usesSkipLocking="false" in your DbAdapter connection pool definition. Skip locking eliminates the locking contention issue, so this primitive kind of load balancing is no longer needed in that case.
Thanks
Steve -
Error While Polling Database changes using Custom SQL
Hi,
I am using Oralce SOA Suite 11g DbAdapter for polling Database changes.
My source database is DB2,I am using custom query for polling the changes in source database.
I am using "Update an External Sequencing Table on a Different Database" polling Strategy
Query section of the Mapping file is as follows.
<querying xsi:type="query-policy">
<queries>
<query name="ReceiveF554102TXEDataSelect" xsi:type="read-all-query">
<call xsi:type="sql-call">
<sql><![CDATA[SELECT FILE_NAME, LIBRARY_NAME,
USER_NAME, SEQUENCE_NUM,
JOURNAL_CODE, ENTRY_TYPE, TIME_STAMP, JOB_NAME, JOB_USER,
JOB_NUMBER, PROGRAM_NAME, ARM_NUMBER, ADDRESS_FAMILY, RMT_ADDRESS,
REMOTE_PORT, SYSTEM_NAME, REL_RECORD, OTRCLN, IBMCU, IBITM, IBLITM,
IBAITM, IBY55ETAFR, IBY55ETATH, IBY55NUM01, IBY55NUM02, IBY55NUM03,
IBY55NUM04, IBY55NUM05, IBY55NUM06, IBY55NUM07, IBY55NUM08,
IBY55NUM09, IBY55NUM10, IBELM01, IBELM02, IBELM03, IBELM04, IBELM05, IBY55STR01,
IBY55STR02, IBY55STR03, IBY55STR04, IBY55STR05, IBY55CHA01,
IBY55CHA02, IBY55CHA03, IBY55CHA04, IBY55CHA05, IBY55DAT01, IBY55DAT02,
IBY55DAT03, IBY55DAT04, IBY55DAT05, IBUSER, IBPID, IBJOBN, IBUPMT,
IBUPMJ FROM PY_JRNMON.F554102T WHERE ((TIME_STAMP > (SELECT LAST_READ_DATE FROM SOALIB.SOASEQHDR WHERE (TABLE_NAME = 'F554102T'))) AND (TIME_STAMP < SYSDATE)) ORDER BY TIME_STAMP ASC]]> </sql>
</call>
<reference-class>ReceiveF554102TXEData.F554102T</reference-class>
<lock-mode>none</lock-mode>
<container xsi:type="list-container-policy">
<collection-type>java.util.Vector</collection-type>
</container>
</query>
</queries>
<delete-query xsi:type="delete-object-query">
<call xsi:type="sql-call">
<sql>UPDATE SOALIB.SOASEQHDR SET LAST_READ_DATE = #LAST_READ_DATE WHERE (TABLE_NAME = 'F554102T')</sql>
</call>
</delete-query>
</querying>
I am getting following Error after defining the custom SQL in my mapping.xml file. (After executing the Created Process)
Caused by: BINDING.JCA-11622
Could not create/access the TopLink Session.
This session is used to connect to the datastore.
Caused by BINDING.JCA-11626
Query Not Found Exception.
Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake. This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:653)
at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:619)
at oracle.tip.adapter.db.exceptions.DBResourceException.couldNotCreateTopLinkSessionException(DBResourceException.java:291)
at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:883)
at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:375)
at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:266)
at oracle.tip.adapter.db.InboundWork.init(InboundWork.java:322)
at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:526)
... 4 more
Caused by: BINDING.JCA-11626
Query Not Found Exception.
Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
at oracle.tip.adapter.db.exceptions.DBResourceException.queryNotFoundException(DBResourceException.java:694)
at oracle.tip.adapter.db.ox.TopLinkXMLProjectInitializer.initializeQuery(TopLinkXMLProjectInitializer.java:1238)
at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:728)
... 8 more
Help required to fit custom SQL in mapping.xml file for complex queries.
Thanks,
Arun Jadhav."Execuite Custom SQL" in DB adapter and you'l get it.
But in this case you'll have to implement your own polling strategy (if you need one).
If you want to use one of the predefined polling strategy you should use "Poll for New or Changed records" and import all the tables you use and connect them in wizard. -
How to specify custom SQL in polling db adapter with logical delete option
Hi all,
I am writing a SOA composite app using JDeveloper SOA Suite 11.1.1.4 connecting to a SQL Server db using a polling DB Adapter with the logical delete option to send data to a BPEL process.
I have requirements which go beyond what is supported in the JDeveloper UI for DB Adapter polling options, namely:
* update more than one column to mark each row read, and
* specify different SQL for the logical delete operation based on whether bpel processing of the data polled was successful or not.
A complicating factor is that the polling involves two tables. Here is my full use-case:
1) Polling will select data derived from two tables: e.g. 'headers' and 'details' simplified for this example:
table: headers
hid - primary key
name - data label
status - 'unprocessed', 'processed', or 'error'
processedDate - null when data is loaded, set to current datetime when row is processed
table: details
hid - foreign key pointed at header.hid
attr - data attribute name
value - value of data attribute
2) There is a many:1 relationship between detail and header rows through the hid columns. The db adapter polling SELECT shall return results from an outer join consisting of one header row and the associated detail rows where header.status = 'unprocessed' and header.hid = details.hid. (This is supported by the Jdeveloper UI)
3) The polled data will be sent to be processed by a bpel process:
3.1) If the bpel processing succeeds, the logical delete (UPDATE) operation shall set header.status = 'processed', and header.processedDate = 'getdate()'.
3.2) If bpel processing fails (e.g. hits a data error while processing the selected data) the logical delete (UPDATE) operation shall set header.status = 'failed', header.processedDate = 'getdate()', and header.errorMsg = '{some text returned from bpel}'.
Several parts of #3 are not supported by the JDeveloper UI: updating multiple columns to mark the row processed, using getdate() to populate a value of one of those column updates, doing different update operations based on the results of the BPEL processing of the data (success or error), and using data obtained from BPEL processing as a value of those column updates (error message).
I have found examples which describe specifying custom SQL using the polling delete option to create a template then modifying the toplink file(s) to specify custom select and update SQL to implement a logical delete. (e.g. http://dlimiter.wordpress.com/2009/11/05/advanced-logic-in-oracle-bpel-polling-database-adapter/ and http://myexperienceswithsoa.blogspot.com/2010/06/db-adapter-polling-tricks.html). But none of them match what I've got in my project, in the first case because maybe because I'm using a higher version of JDeveloper, and in the second I think because in my case two tables are involved.
Any suggestions would be appreciated. Thanks, JohnHi John,
You've raised a good scenario.
First of all let me say that the purpose of the DB polling transaction, is to have an option to initiate a process from a DB table/view and not to update multiple fields in a table (or have other complex manipulation on the table).
So, when choose to update a field in a record, after reading it, you are "telling" the engine not to poll this record again. Sure, i guess you can find a solution/workaround for it, but I don't think this is the way....
The question now is what to do?
You can have another DB adapter where you can update the data after finishing the process. In that case, after reading the data (on polling transaction) - update the header.status = 'processed' for example, and after processing the selected data update the rest of the fields.
Hope it make some sense to you.
Arik -
Using information from ItResource for executing custom sql in OIM 11g
I need executing a custom sql query using a connection of a ItResource. How can I get the instance of connection for to execute the sql query ? Someone have a idea of how i make this ? Help me ...
TksHashMap itAttribute = new HashMap();
itAttribute.put("IT Resources.Name","IT-DB01");
tcITResourceInstanceOperationsIntf itResource=null;
tcResultSet resItResKey;
resItResKey = itResource.findITResourceInstances(itAttribute);
long iTesourceKey = resItResKey.getLongValue("IT Resource.Key");
tcResultSet resItRes = itResource.getITResourceInstanceParameters(iTesourceKey);
Append following lines:-
HashMap<String, String> hashMap = new HashMap<String, String>();
int countResultGetITResourceInstanceParameters = resItRes .getRowCount();
for(int i = 0; i < countResultGetITResourceInstanceParameters; i++) {
resultGetITResourceInstanceParameters.goToRow(i);
hashMap.put(
resItRes .getStringValue(ZAPConstants.IT_RESOURCES_TYPE_PARAMETER_NAME),
resItRes .getStringValue(ZAPConstants.IT_RESOURCES_TYPE_PARAMETER_VALUE)
return hashMap; -
Hello,
Queries
1. Is it possible to use Batch Reading in conjunction with Custom Stored Procs/ SQL?
2. Is it possible to map an attribute to a SQL expression (like in Hibernate we have formula columns mapped using the formula* property)?
Background
1. We use Toplink 11g (11.1.1.0.1) (not EclipseLink) in our application and are controlling mapping using XML files (not annotations).
2. We are migrating a legacy application with most of its data retreival logic present in stored procedures to Java.
3. I am effectively a newbie to Toplink.
Scenario
1. We have a deep class heirarchy with ClassA+ at the following having a one-to-many relation with ClassB+ and ClassB+ having a one-to-many relation with ClassC+ and so on and so forth.
2. For each of these classes the data retreival logic is present in stored procedures (coming from the legacy application) containing not so simple queries.
3. Also there are a quite a few attributes that actually represent computed values (computed and returned from the stored procedure). Also the logic for computing the values are not simple either.
4. So to make things easy we configured toplink to use the stored procedures to retreive data for objects of ClassA+, ClassB+ and ClassC+.
5. But since the class heirarchy was deep, we ended up firing too many stored procedure calls to the database.
6. We thought we could use the Batch Reading feature to help with this, but I have come across documentation that says that it wont work if you override toplink's queries with stored procedures.
7. I wrote some sample code to determine this and for the heirarchy shown above it uses the speicifed Custom procedure (I also tried replacing the stored procs with custom SQL, but the behavior is the same) for ClassA+ and ClassB+, but for ClassC+ and below it resorts to its own generated SQL.
8. This is a problem because the generated SQL contains the names of the computed columns which is not present in the underlying source tables.
Thanks
ArvindBatch reading is not supported with custom SQL or stored procedures.
Join fetching is though, so you may wish to investigate that (you need to ensure you return the correct data from the stored procedure).
James : http://www.eclipselink.org -
How to submit custom SQL to the DB in SAP system
Hi
In the project in which I had participated before, there were CRM server and WAS which had IPC server (price decision tool). There was a requirement that IPC referred CRM data, but there was no suitable BAPI in CRM. So, at the UserExit in IPC I made the programs that submit custom SQL to CRM DB via JCo.
In a similar idea, Can I submit custom SQL to the DB of SAP environment (ERP, CRM and so on) from general WAS (don't have the IPC) ?
I already know the way that I make the function module which throw SQL in SAP and call it from WAS. Could you tell me other methods if it exists ?
Best regards,What's about RFC?
-
Hello,
We are encountering a problem with Toplink 11.1.1.0.1 when adding a custom sql statement within a ReadAllQuery on a parent class. The same code with the same descriptor works fine with 10.1.3.3 and 9.0.4.7.
ReadAllQuery query = new ReadAllQuery(Person.class);
ExpressionBuilder b = query.getExpressionBuilder();
query.addArgument("instId", Integer.class);
ReportQuery subQuery = new ReportQuery();
subQuery.setReferenceClass(Person.class); // dummy mapped class...
SQLCall selectIdsCall = new SQLCall();
String subSelect = "select inst.ID from PERSON inst where inst.ID = #instId"; // <= re-use bind variable in child query
selectIdsCall.setSQLString(subSelect);
subQuery.setCall(selectIdsCall);
Expression expr = b.get("id").in(subQuery);
query.setSelectionCriteria(expr);
Vector params = new Vector(1);
params.add(new Integer(1));
List res = (List) session.executeQuery(query, params);
SQL statements generated by Toplink 11.1.1.0.1_
SELECT DISTINCT t0.OBJECTTYPE_ID FROM PERSON t0
WHERE t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
SELECT t0.ID, t0.OBJECTTYPE_ID, t0.GENDER, t0.AGE, t0.FIRSTNAME, t0.LASTNAME, t0.ADDRESS_ID, t0.TITI_ID, t1.ID, t1.BONUS_ID
FROM PERSON t0, EMPLOYEE t1 WHERE ((t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
AND (t1.ID = t0.ID)) AND (t0.OBJECTTYPE_ID = NULL))
SQL statements generated by Toplink 10.1.3.3 and 9.0.4.7_
SELECT DISTINCT t0.OBJECTTYPE_ID FROM PERSON t0
WHERE t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
SELECT t0.ID, t0.OBJECTTYPE_ID, t0.GENDER, t0.AGE, t0.FIRSTNAME, t0.LASTNAME, t0.ADDRESS_ID, t0.TITI_ID, t1.ID, t1.BONUS_ID
FROM PERSON t0, EMPLOYEE t1 WHERE ((t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
AND (t1.ID = t0.ID)) AND (t0.OBJECTTYPE_ID = 'EM'))It looks like the arguments are shifted. You can see it when using bind variables in 11.1.1.0.1
Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.1) (Build 081030)): oracle.toplink.exceptio
ns.DatabaseException
Internal Exception: java.sql.SQLException: Invalid column index
Error Code: 17003
Call: SELECT t0.ID, t0.OBJECTTYPE_ID, t0.GENDER, t0.AGE, t0.FIRSTNAME, t0.LASTNAME, t0.ADDRESS_ID, t
0.TITI_ID, t1.ID, t1.BONUS_ID FROM PERSON t0, EMPLOYEE t1 WHERE ((t0.ID IN (select inst.ID from PERS
ON inst where inst.ID = ?) AND (t1.ID = t0.ID)) AND (t0.OBJECTTYPE_ID = ?))
bind => [1, null, EM]Has anyone already encountered this problem ?Hello,
We are encountering a problem with Toplink 11.1.1.0.1 when adding a custom sql statement within a ReadAllQuery on a parent class. The same code with the same descriptor works fine with 10.1.3.3 and 9.0.4.7.
ReadAllQuery query = new ReadAllQuery(Person.class);
ExpressionBuilder b = query.getExpressionBuilder();
query.addArgument("instId", Integer.class);
ReportQuery subQuery = new ReportQuery();
subQuery.setReferenceClass(Person.class); // dummy mapped class...
SQLCall selectIdsCall = new SQLCall();
String subSelect = "select inst.ID from PERSON inst where inst.ID = #instId"; // <= re-use bind variable in child query
selectIdsCall.setSQLString(subSelect);
subQuery.setCall(selectIdsCall);
Expression expr = b.get("id").in(subQuery);
query.setSelectionCriteria(expr);
Vector params = new Vector(1);
params.add(new Integer(1));
List res = (List) session.executeQuery(query, params);
SQL statements generated by Toplink 11.1.1.0.1_
SELECT DISTINCT t0.OBJECTTYPE_ID FROM PERSON t0
WHERE t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
SELECT t0.ID, t0.OBJECTTYPE_ID, t0.GENDER, t0.AGE, t0.FIRSTNAME, t0.LASTNAME, t0.ADDRESS_ID, t0.TITI_ID, t1.ID, t1.BONUS_ID
FROM PERSON t0, EMPLOYEE t1 WHERE ((t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
AND (t1.ID = t0.ID)) AND (t0.OBJECTTYPE_ID = NULL))
SQL statements generated by Toplink 10.1.3.3 and 9.0.4.7_
SELECT DISTINCT t0.OBJECTTYPE_ID FROM PERSON t0
WHERE t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
SELECT t0.ID, t0.OBJECTTYPE_ID, t0.GENDER, t0.AGE, t0.FIRSTNAME, t0.LASTNAME, t0.ADDRESS_ID, t0.TITI_ID, t1.ID, t1.BONUS_ID
FROM PERSON t0, EMPLOYEE t1 WHERE ((t0.ID IN (select inst.ID from PERSON inst where inst.ID = 1)
AND (t1.ID = t0.ID)) AND (t0.OBJECTTYPE_ID = 'EM'))It looks like the arguments are shifted. You can see it when using bind variables in 11.1.1.0.1
Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.1) (Build 081030)): oracle.toplink.exceptio
ns.DatabaseException
Internal Exception: java.sql.SQLException: Invalid column index
Error Code: 17003
Call: SELECT t0.ID, t0.OBJECTTYPE_ID, t0.GENDER, t0.AGE, t0.FIRSTNAME, t0.LASTNAME, t0.ADDRESS_ID, t
0.TITI_ID, t1.ID, t1.BONUS_ID FROM PERSON t0, EMPLOYEE t1 WHERE ((t0.ID IN (select inst.ID from PERS
ON inst where inst.ID = ?) AND (t1.ID = t0.ID)) AND (t0.OBJECTTYPE_ID = ?))
bind => [1, null, EM]Has anyone already encountered this problem ? -
Can we implement the custom sql query in CR for joining the two tables
Hi All,
Is there anyway to implement the custom sql query in CR for joining the two tables?
My requirement here is I need to write sql logics for joining the two tables...
Thanks,
GanaIn the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
Log on to your data source if necessary.
Under your data source, double-click the Add Command node.
In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
For example:
SELECT
Customer.`Customer ID`,
Customer.`Customer Name`,
Customer.`Last Year's Sales`,
Customer.`Region`,
Customer.`Country`,
Orders.`Order Amount`,
Orders.`Customer ID`,
Orders.`Order Date`
FROM
Customer Customer INNER JOIN Orders Orders ON
Customer.`Customer ID` = Orders.`Customer ID`
WHERE
(Customer.`Country` = 'USA' OR
Customer.`Country` = 'Canada') AND
Customer.`Last Year's Sales` < 10000.
ORDER BY
Customer.`Country` ASC,
Customer.`Region` ASC
Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
For more information about creating parameters, see To create a parameter for a command object.
Click OK.
You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
Note:
To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
By default, your command is called Command. You can change its alias by selecting it and pressing F2. -
How to update flag in multiple tables using custom sql DB adapter
hi all,
I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
Regards
RichaDear SeánMacGC thanks for reply,
But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
type custRec is record
n_cust_ref_no dbms_sql.number_table,
v_name dbms_sql.varchar2_table,
v_name_chg dbms_sql.varchar2_table,
rowid rowidArray,
*changed dbms_sql.varchar2_table*
i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
to run this procedure:
execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
Thanks... -
Execute custom SQL in DB Adpater errors out in Production - urgent please.
Hi,
I get this error when running the process in PROD at invoking delete operation that I'm doing by selecting the execute custom SQL option while defining the DB adapter. It worked fine in TEST environment but errors out in PROD env.
Any suggestions on why? Its urgent.
Thanks
-Prapoorna
The state of this instance is Faulted
<messages><input><InvokeDelete_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="DeleteDataInput_msg"><DeleteDataInput xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DeleteData"/>
</part></InvokeDelete_InputVariable></input><fault><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>17410</code>
</part><part name="summary"><summary>file:/prod/app/bpel/as/bpel/domains/verint/tmp/.bpel_SynchOTLLoad_1.0_0259c5f142631959ec0fb067d23fe98e.tmp/DeleteData.wsdl [ DeleteData_ptt::DeleteData(DeleteDataInput_msg) ] - WSIF JCA Execute of operation 'DeleteData' failed due to: Pure SQL Exception.
Pure SQL Execute of delete from xxhxc_timeattend_to_otl where report_date >= TRUNC(ADD_MONTHS(sysdate, -1),'MM') failed. Caused by java.sql.SQLException: No more data to read from socket.
; nested exception is:
ORABPEL-11633
Pure SQL Exception.
Pure SQL Execute of delete from xxhxc_timeattend_to_otl where report_date >= TRUNC(ADD_MONTHS(sysdate, -1),'MM') failed. Caused by java.sql.SQLException: No more data to read from socket.
The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
</summary>
</part><part name="detail"><detail>No more data to read from socket</detail>
</part></remoteFault></fault></messages>Looks like in production you have much more data than you do in your test environments.
It could be something wrong with your rollback segments. Is there any other activity happening when this is running?
What happens when you run this command inside SQLPlus?
cheers
James -
Interactive Reporting and Custom SQL
I have SQL that works in TOAD and I'd like to copy it directly into IR; however, it appears that the custom SQL feature only allows you to "customize" the FROM, WHERE, etc parts of the SELECT statement and not the database fields that are directly after the SELECT. For example, the code below works in TOAD:
SELECT cr_type,
LPAD(SUBSTR(CR_NUM,1,5),5) CR,
TITLE,
nvl(sum(decode(a.employee_Id,1234,hours)),0) DL,
nvl(sum(decode(a.employee_Id,5678,hours)),0) MF,
nvl(sum(decode(a.employee_Id,9101,hours)),0) HM, etc
I am having a hard time re-creating this code in IR. I finally did manage to come close to what TOAD gives me; however, is there an easier way to use the custom SQL to just cut and paste the entire SQL statement that works in TOAD and put it into IR?
Thanks.
Terri T.You can Import the complete SQL String into IR, but you will not be able to modify it once it is in IR.
You can create Computed Items in the Request Line for each of the SQL segments, i know it is labor some but it works. Just make sure that the Data Type is as you want it - Options Tab.
Another Option is to have the SQL String you have turned into a view on the database and query it that way.
Wayne Van Sluys
TopDown Consulting -
How to operate multiple querys using DB Adapter and 'Execute Custom SQL'
I have a requirment that I need to create database adapter in your BPEL process with 'Execute Custom SQL' to operate multiple query in DB in one atomic
here are the details:
inbound request:
<ns1:Query_bpelProcessRequest>
<ns1:input>
<ns1:ItemDetail>
<ns1:ItemID>1123DDDS</ns1:ItemID>
</ns1:ItemDetail>
<ns1:ItemDetail>
<ns1:ItemID>1126EWWA</ns1:ItemID>
</ns1:ItemDetail>
<ns1:ItemDetail>
<ns1:ItemID>11208FSAA</ns1:ItemID>
</ns1:ItemDetail>
</ns1:input>
</ns1:Query_bpelProcessRequest>
I use for-each fuction in XSLT to mapping the all ItemID value:
<xsl:template match="/">
<xsl:for-each select="/tns:Query_bpelProcessRequest/tns:input/tns:ItemDetail">
<ns1:QueryFromDB_Input>
<ns1:ItemID>
<xsl:value-of select="tns:ItemID"/>
</ns1:ItemID>
</ns1:QueryFromDB_Input>
</xsl:for-each>
</xsl:template>
and in DB Adapter I use the 'Execute Custom SQL' to query the CONTENT value according the ItemID value:
select distinct CONTENT from agile.item where ITEM_NUMBER=’<ItemID>’
However, in the result, It only query the first item value for <ns1:ItemID>1123DDDS</ns1:ItemID>
<<QueryFromDB_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_Input_msg">
<QueryFromDB_Input xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
<ns1:ItemID>1123DDDS</ns1:ItemID>
</QueryFromDB_Input>
</part></QueryFromDB_InputVariable>
<QueryFromDB_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_OutputCollection">
<QueryFromDB_OutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
<QueryFromDB_Output>
<ITEM_NUMBER>1123DDDS</ITEM_NUMBER>
<CONTENT >SJIFESSFFJ</CONTENT >
</QueryFromDB_Output>
</QueryFromDB_OutputCollection>
</part></QueryFromDB_OutputVariable>
the other two querys are not operated.
what can I do to operate multiple querys??
ThanksHi Rod,
I are using while loop and assign array inputvalue to the inputvarable of DBadapter now, but actually it doesn't work.
Throw expection
<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"] should not return multipe nodes.
Please check the BPEL source at line number "89" and verify the part and xpath query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"].
Possible reasons behind this problems are: some xml elements has maxOccurs > 1 or the xml data is invalid according to XML Schema.
To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
</summary>
</part></selectionFailure>
my inbound XSD:
<element name="ItemsQuery_bpelProcessRequest">
<complexType>
<sequence>
<element name="input" type="tns:inputType"/>
</sequence>
</complexType>
</element>
<complexType name="inputType">
<sequence>
<element name="inputDetail" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="ProductID" type="string" minOccurs="0"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="ItemsQuery_bpelProcessResponse">
<complexType>
<sequence>
<element name="result" type="tns:outputType"/>
</sequence>
</complexType>
</element>
<complexType name="outputType">
<sequence>
<element name="ItemOutput" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="item_id" type="string" minOccurs="0"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
DB Adapter XSD:
<xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="QueryItem_Input" type="QueryItem_Input"/>
<xs:complexType name="QueryFrom_Input">
<xs:sequence>
<xs:element name="ProductID" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
<xs:element name="QueryItem_OutputCollection" type="QueryItem_OutputCollection"/>
<xs:complexType name="QueryItem_OutputCollection">
<xs:sequence>
<xs:element name="QueryItem_Output" type="QueryItem_Output" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="QueryItem_Output">
<xs:sequence>
<xs:element name="item_id" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
the bpel assign:
<assign name="Initial_Index">
<copy>
<from expression="0"/>
<to variable="ItemIndex"/>
</copy>
</assign>
<while name="While_1"
condition="bpws:getVariableData('ItemIndex')<ora:countNodes('inputVariable','payload','/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID)">
<sequence name="Sequence_1">
<assign name="Assign_QueryInput">
<copy>
<from variable="inputVariable" part="payload"
query='/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID{bpws:getVariableData('ItemIndex')}'/>
<to variable="QueryItem_InputVariable"
part="QueryItem_nput_msg"
query="/ns2:QueryItem_Input/ns2:ProductID"/>
</copy>
</assign>
<invoke name="Invoke_QueryDB" partnerLink="QueryItem"
portType="ns1:QueryItem_ptt"
operation="QueryItem_PSFT"
inputVariable="QueryItem_InputVariable"
outputVariable="QueryItem_OutputVariable"/>
<assign name="Assign_Output">
<copy>
<from variable="QueryItem_OutputVariable"
part="QueryItem_OutputCollection"
query="/ns2:QueryItem_OutputCollection/ns2:QueryItem_Output/ns2:item_id"/>
<to variable="outputVariable" part="payload"
query='/client:ItemsQuery_bpelProcessResponse/client:result/client:ItemOutput/client:item_id{bpws:getVariableData('ItemIndex')}'/>
</copy>
<copy>
<from expression="bpws:getVariableData('ItemIndex')+1"/>
<to variable="ItemIndex"/>
</copy>
</assign>
</sequence>
</while>
I use {} instead of [] for array, because [] seams not reveal in this message board
seems I can't assign array values to the DB inputvalue, Are there any solutions for this ?
I still haven't found any way for operating multiple querys using DB Adapter.
Thanks
Edited by: user1065212 on 07-Jan-2010 19:39
Edited by: user1065212 on 07-Jan-2010 19:41
Edited by: user1065212 on 07-Jan-2010 19:44
Edited by: user1065212 on 07-Jan-2010 19:45
Maybe you are looking for
-
Can't save photos from Mail to Camera Roll
How do I save a photo from Mail to my camera roll? Before iOS7 I would tap on the photo and get the option save it. Now all i get is a copy or select all option.
-
Can i get my money back after someone hacked into my account and bought something with it?
I got an email telling me that someone in another country used my Appstore account to purchase something. I checked my bank statement to see if this was a hoax message but it is true as I can see the same amount from the same country withdrawn from m
-
How to install CS5 on my new iMAC 27" 5K. Adobe CS5 Web Premium
Hello, I just bought a brand new iMAC 27" i5 5K computer and wanted to install my CS5 suite I bought a few years back. But there is no DVD reader on this iMAC. Please help I cannot spend another amount of money on new SW tools in view I have the seri
-
Wait Events "log file parallel write" / "log file sync" during CREATE INDEX
Hello guys, at my current project i am performing some performance tests for oracle data guard. The question is "How does a LGWR SYNC transfer influences the system performance?" To get some performance values, that i can compare i just built up a no
-
Dear Friends, client wants to restrict the attachment list changing, deletion after the user status sets to close in PS Claims for transaction clm2 and clm3. Currently any one can attach documents as GOS and delete even the claim is completed and sta