Timeout not working when calling stored procedure
Hi,
We have a Win32 application connected to ORACLE using ODBC API.
A stored procedure (doing INSERT into 3 tables) is called via
SQLPrepare and SQLExecute("{CALL SP(IN param...) ...}"), but
Oracle never time out the statement.
There are 2 types of modified timeouts:
SQL_ATTR_QUERY_TIMEOUT = 20
SQL_ATTR_CONNECTION_TIMEOUT = 60
Even if I set LockTimeOut parameter in ORAODBC.ini file, it
still doesn't work.
I tried with SQLExecDirect("INSERT...") and it works fine.
- Does time out works with oracle Stored Procedure ?
- If not, how can I avoid application hangs when calling
SQLExecute ?
- I use "lock table MY_TABLE in exclusive mode" to simulate
query timing out. Is the better way to do this ?
Please, any help would be GREATLY appreciated :-)
Thanks.
-Dario Efine
[email protected]
Infos:
- Application running on WinNT4 SP6a,
- Oracle ODBC for Oracle 8.01.76.00,
- Stored procedure has 10 IN parameters, it also uses 2 inner
small functions.
HiTopp wrote:
I get a "Login Failed for user _____" error if I attempt to use incorrect credentials.
That message is very likely coming from the database. To be sure, turn debugging on in the ColdFusion Administrator. Also check out the logs. We have to narrow this down, otherwise we could end up running circles.
If the attribute pairs [username="valid_name", password="valid_password"] and [username="", password=""] work, but [username="valid_name", password="invalid_password"] fails, then the cause of the problem is most probably your code, and how it connects to the database(s). Could you show us all (or at least more) of the code?
My first suggestion to you was to omit the line variables.storedProcService.clear();. Invoking clear() only makes sense when it occurs after addProcResults() or addParam(). Did you omit the line? What was the effect, with and without credentials?
Could you please describe your infrastructure a bit more. From what I understand, there are at least 2 servers, S1 and S2. Let's say, ColdFusion is installed on S1. I am assuming from what has gone before that SQL Server, which runs the stored procedure, is on the second server S2.
Go to the 'Client Variables' page in the ColdFusion Administrator. Verify that ColdFusion is indeed configured to use a database for client storage. What is the name of the datasource used as client store? Now, proceed to the datasource page and check out the settings for the client datasource. To which machine/database server does this datasource point?
Jot down the server settings and credentials of the other datasources configured in the Administrator. To which machine/database server do these datasources point?
Similar Messages
-
Array data sporadically lost when calling stored procedure
We have weird problem with stored procedures for which I have not been able to find an explanation so far.
Our app has a bunch of stored procedures which process arrays of integers or strings.
From time to time (maybe 1 in a 1000) array data gets lost when calling stored procedures. From the logs we know that the data gets sent to the stored procedure, but on the DB side the procedure throws an exception because arrays are empty.
We are using (modified) OracleConnectionCacheImp (thus PooledConnections, etc.). My latest guess is that maybe somehow ArrayDescriptors on the (pooled)connection used to call the stored procedure are somehow affected when another pooled connection from OracleConnectionCacheImp gets removed by parallel thread. Is that possible? Or are the PooledConnections internally (in pooled connection data source) completely isolated from each other ?We have weird problem with stored procedures for which I have not been able to find an explanation so far.
Our app has a bunch of stored procedures which process arrays of integers or strings.
From time to time (maybe 1 in a 1000) array data gets lost when calling stored procedures. From the logs we know that the data gets sent to the stored procedure, but on the DB side the procedure throws an exception because arrays are empty.
We are using (modified) OracleConnectionCacheImp (thus PooledConnections, etc.). My latest guess is that maybe somehow ArrayDescriptors on the (pooled)connection used to call the stored procedure are somehow affected when another pooled connection from OracleConnectionCacheImp gets removed by parallel thread. Is that possible? Or are the PooledConnections internally (in pooled connection data source) completely isolated from each other ? -
Hi. please solve my problem.
.call information such as call waiting,call forwarding, call holding is not working when caller the call me or im wait for my call i cant see any title by iphon , and also holding is the same.2. there is not any option for call baring.3.playback music is not hearing by second partner during the call.4.i cant select ringing ton from saving tons.
thank you in advance.Hi Ersin,
Exception 1 would seem to be FORMATTING_ERROR, which suggests something in the design of the Smartform. However, that doesn't fit with the form being generated from a report, but only erroring when called from a function module. I can think of no reason why the different calling method would be a factor.
When FORMATTING_ERROR is raise it should also set a message ID and number, are you able to determine what they are?
Regards,
Nick -
64bit OraOLEDB failed when calling stored procedure with Ref Cursor
Hi everyone,
I used the ADO VB sample provided with the Oracle 10g provider installation.
But I compiled it in 64bit Visual Studio 2005 and ran on Windows 2003 x64 server.
The function call "cmd.Execute" when it is trying to call a stored procedure which has an Out Ref Cursor parameter. The exception is
"PLS-00306: wrong number or types arguments in call"
I already set the property "PLSQLRSet" to true. But it doesn't help.
The same code works if I compiled in 32 bit.
It also works if the stored procedure does not have Ref Cursor parameter.
I am guessing this is a bug in the 64bit Oracle provider. Anyone can confirm this please? or am I missing anything?
WilsonIt appears to work with 11.1.0.6.20 OLEDB provider but only for ExecuteNonQuery, I'm not able to work with Fill, and yes... in x86 works perfectly, but in x64 we are still having the ORA-06550 and PLS-00306 error.
Our Connection string is as follows:
"Provider=OraOLEDB.Oracle.1;OLEDB.NET=true;Password=xxxxx;Persist Security Info=True;User ID=exxxxx;Data Source=ECOR; PLSQLRSet=True"
We are not using ODP.NET.
Can you confirm that Fill method works with such update? -
SetQueryTimeout when calling stored procedures
I cannot seem to get a query to timeout when calling a stored procedure in Oracle 8i. I have set the query timeout to 1 (sec.) and the query takes a few minutes to return. I get no exception and the query returns normally. When I use a prepared statement the query times out as expected and I get an exception. Should this work?
Hi,
The issue: I want a timeout on database locks, without doing
a select for update wait x/ or nowait for every row concerned.
Once the thread called java.net.SocketInputStream.socketread0() (unfortunatelly
without a timeout), I currently only see 2 ways to get my thread out of there:
- The lock is resolved (by the blocking instance) resp. the db server
- By calling System.exit() (which I do not wish to do)
So I want the Oracle Driver to call socketRead with a timeout, or if
i can't do so. I'd like to set the timeout to the Socket myself.
Or if I can't do so either, I plan to give a new SocketImplFactory
to my client VM, which will implement a Socket with a fixed timeout
on reads.
Hint's (what I found out so far):
- Calling interrupt on the invoking Thread wan't help
- Calling statement.setQueryTimeout() wan't help, because the SqlException
will be thrown at the time the statement leaves the socketRead(), which is
when to lock is resolved, which is too late
- The timeout used is defined by the used SocketImpl, which
is by default the java.net.PlainSocketImpl, which is by default 0, which means
'wait forever'
- I did not found a way to set a timeout on the db server side, to resolve
this problem
Details:
I am using Oracles JDBC Thin Driver 9i 9.2.0.3
So far I did not specify any additional properties to the ConnectionFactory
than user/pwd -
SSIS - Failure when calling stored procedure using sp_executesql
Hi
Newbie here so if it doesn't make sense I apologise.
I have an SSIS (Visual Studio 2012) package that basically gets data from tables and inserts them into staging tables.
There are 2 containers each having 20 Execute SQL Tasks running in parallel inside and the 2nd one is failing when I try to call a stored procedure that is using sp_executesql.
All the connections are fine as I can change the call of sp_executesql to an insert statement and it works ok.
Property Settings for the container have TransactionOption = Required. Inside the Execute SQL's have Supported.
Settings for the Execute SQL Tasks have the isStoredprocedure = TRUE and the procedure name is correct.
I have tried to change the procedure name to pass in parameters etc but it seems that every time the calls hit the sp_executesql it falls over if more than 3 are called at the same time.
Anybody got any ideas?
Thanks in advanceThanks for the quick reply the error is
failed with the following error: "The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly,
or connection not established correctly.
The parameters getting passed are correct as I'm using them in the Insert statement that I substituted for the sp_executesql. It looks like as soon as there is a lot of connections then it falls over. It works fine with 1 or 2 execute sql tasks but not any
more than that. -
Setting some QoS params when calling stored procedures
Hi All,
Can I set some QoS params when calling a stored procedure like Timeout, Connection Timeout, Retry Count, etc?
Thanks,
DanielSince anything between your client and your data can fail(including connectivity to the ALDSP server), we recommend that you exercise retries and timeouts from the client. If you attempt to implement retries and timeouts within the XQuery - you open up several cans of worms.(mentioned later) There is a Query Attribute (in RequestConfig) that you can use to specify a timeout on the query. And you can implement retries with a loop (for, while etc).
If you use timeout/fail-over in your query - a number of things happen. First, if something happens outside your timeout or retry - you'll miss it (i.e. if someone unplugs one of your ALDSP servers, the fail-over in your xquery is not going to help). Second, adding timeout/fail-over function calls into your XQuery blocks query optimizations - if you put a fail-over around access to a CUSTOMER table in a database, the optimizer cannot combine that with an access to the ORDER table in the same database). Third, in ALDSP 2.5, the database connections within a query are cached, so if you have Oracle RAC, and one instance goes down - the fail-over function will fail-over to the same instance (unless you create a duplicate data source for the same RAC, but with a different name).
ALDSP does not provide means to configure retries (like ALSB does).
You can explicitly attempt to call a stored procedure mutliple times using the fn-bea:fail-over function.
You can also retry (in case of timeout) by using the fn-bea:timeout function.
Note that during a single query execution, if an instance of fail-over actually fails-over - it will not bother to evaluate the primary expression again during that query execution - it will simply evaluate the secondary expression. (The idea being that if a web service is down, then it will still be down a few milliseconds later). You can contact Customer Support if you need different functionality (there is a fail-over-retry function available in a patch).
If you are calling a replicated web-service, you can implement round-robin in a web-service handler for that web service. Ask if you want an example. -
Different session used when calling stored procedure from form
after commiting data in a form to a table, a stored procedure is called that inserts the data written to the table into several other tables. Some columns in the original table are updated - no commit is issued in the procedure. On returning from the procedure the form is re-queried but the updated columns don't contain the updates. This seems to imply that the stored procedure is running as a different session to the one of the form.
Is this the case? Can we make the form and the stored procedure use the same session so that the data is available in both without having to commit in the procedure?No. They should be within one session unless you explicitly open a new session.
The reason why you dont see updates of the data block when you requery is probably the changes on the form never go to the back end. I think first you have to make sure data changes go to db table. You can do a commit_form before calling the stored procedure and open up another session (e.g. sqlplus) to check the data in the table changed or not. -
Issue when calling Stored procedure from application
Dear all,
Oracle DB version: 11.2.0.3
OS : RHEL 5.9 64-bit version
We are trying to execute one of the stored procedure (belonging to oracle DB schema) from our Dotnet application(recites in application server) but it takes more than 30 seconds to fetch the records. The stored procedure is called from application. When we try the same procedure from SQL developer or TOAD it completes within a second. Could anyone suggest on the issue?
Note: we are calling a remote DB view from our DB.
No. of records in the view : 49484929 rows
Thanks in advance,
Imran KhanThanks Billy for the reply. The following is the function of the .net application which calls the procedure:
public DataSet ResourceMonitor(String Date, String DateTime, String starttime, String endtime, String Assstarttime, String Assendtime)
try
cLog.StartMethod(this, System.Reflection.MethodInfo.GetCurrentMethod().Name);
Database dbResourceMonitor = null;
DataSet Resourceset = new DataSet();
dbResourceMonitor = DatabaseFactory.CreateDatabase();
DbCommand dbCommand = dbResourceMonitor.GetStoredProcCommand("SP_RESOURCEMONITOR1");
dbResourceMonitor.AddInParameter(dbCommand, "P_Date", DbType.String, Date);
dbResourceMonitor.AddInParameter(dbCommand, "P_DateTime", DbType.String, DateTime);
dbResourceMonitor.AddInParameter(dbCommand, "P_Starttime", DbType.String, starttime);
dbResourceMonitor.AddInParameter(dbCommand, "P_Endtime", DbType.String, endtime);
dbResourceMonitor.AddInParameter(dbCommand, "P_AssStarttime", DbType.String, Assstarttime);
dbResourceMonitor.AddInParameter(dbCommand, "P_AssEndtime", DbType.String, Assendtime);
//dbCommand.Parameters.Add(BuildRefCursorParameter("DEPRECSET"));
dbCommand.Parameters.Add(BuildRefCursorParameter("RECORDSET1"));
dbCommand.Parameters.Add(BuildRefCursorParameter("RECORDSET2"));
dbCommand.Parameters.Add(BuildRefCursorParameter("RECORDSET3"));
dbCommand.Parameters.Add(BuildRefCursorParameter("RECORDSET4"));
return Resourceset;
catch (Exception ex)
cLog.LogMessages(this, ex.Message, cLog.eWiproMessageTypes.ErrorType);
throw ex;
finally
cLog.EndMethod(this, System.Reflection.MethodInfo.GetCurrentMethod().Name);
The stored procedure SP_RESOURCEMONITOR1 has the following DDL:
CREATE OR REPLACE PROCEDURE SP_RESOURCEMONITOR1
( P_Date IN VARCHAR2,
P_DateTime IN VARCHAR2,
P_Starttime IN VARCHAR2,
P_Endtime IN VARCHAR2,
P_AssStarttime IN VARCHAR2,
P_AssEndtime IN VARCHAR2,
P_Mode IN NUMBER,
RECORDSET1 OUT SYS_REFCURSOR,
RECORDSET2 OUT SYS_REFCURSOR,
RECORDSET3 OUT SYS_REFCURSOR,
RECORDSET4 OUT SYS_REFCURSOR
)AS
BEGIN
OPEN RECORDSET1 FOR
Select ROLEMASTER.ROLEID,ROLEMASTER.ROLENAME as ResourceGroup,departmentmaster.DEPARTMENTNAME,departmentmaster.departmentid from Rolemaster
INNER JOIN departmentmaster ON Rolemaster.DEPTID=departmentmaster.DEPARTMENTID
WHERE 1=1 AND sysdate >=Rolemaster.START_DATE AND sysdate<=Rolemaster.END_DATE AND Upper(RoleMaster.Rolename) not like '%HIGHLOADER%' AND displayinlist=1
ORDER BY ROLENAME;
OPEN RECORDSET2 FOR
select ROM.ROLENAME as ResourceGroup, fn_get_resource_status(p_starttime, p_endtime,RM.Resourceid,RM.DeptID) AS Status,upper(RM.Resourceid)as Resourceid,RM.RoleID,RM.DeptID,TRIM(RM.RESOURCENAME) AS RESOURCENAME,'Detail'As Details,'ResChng'As ResChng,'Calender' As Calender FROM ResourceMaster RM
--INNER JOIN DEPARTMENTMASTER DM ON RM.DEPTID = DM.DEPARTMENTID
INNER JOIN ROLEMASTER ROM ON RM.ROLEID = ROM.ROLEID
where --UPPER (DM.DEPARTMENTNAME) IN ('DISPATCH','TRANSPORT','TRANSPORT RAMP')
RM.DEPTID in (select DEPARTMENTID from DEPARTMENTMASTER where displayinadmin=1 and active=1) ;
if (P_Mode =2) THEN
OPEN RECORDSET3 FOR
select * from mobility_attendance_info_v where TRANSACTIONDATE >= TO_DATE(Substr(p_starttime,1, 9) ,'dd-MON-rr') - 1 order by staffno,TRANSACTIONDATETIME Desc;
END IF;
OPEN RECORDSET4 FOR
select rsa.*,planning.flightno,'' As StTime,SUBSTR(rsa.depdt,11,5) as EndTime from resourceallocation rsa inner join planning ON rsa.planningid = planning.planningid
where TO_TIMESTAMP(rsa.DEPDT,'dd-MON-rr HH24:MI')>=TO_TIMESTAMP(P_DateTime,'dd-MON-rr HH24:MI') ;
END SP_RESOURCEMONITOR1;
The view mobility_attendance_info_v is a called from a remote DB. Hope it's quite clear.
Regards,
Imran Khan -
Web service not working when called remotely
Hi there!
I built a simple web service to generate a sequence number to be cosumed by PDF forms.
It works perfecly when I run PDFs on my machine, using localhost, etc.
Whem deployed on the client's servers it does not work. The only difference is the client is running LiveCycle on Linux over their inhouse corporate network.
When the web service is added to forms in LC Designer, the ws structure is built correctly and if called from a web browser the XML response is ok too.
I've checked LiveCycle log file - there's nothing there, the ws is not even being called.
Where should I look for error messages or other resources to aid me in identifying the problem?
Thank you very much for any hints!
MarcosHi there!
I built a simple web service to generate a sequence number to be cosumed by PDF forms.
It works perfecly when I run PDFs on my machine, using localhost, etc.
Whem deployed on the client's servers it does not work. The only difference is the client is running LiveCycle on Linux over their inhouse corporate network.
When the web service is added to forms in LC Designer, the ws structure is built correctly and if called from a web browser the XML response is ok too.
I've checked LiveCycle log file - there's nothing there, the ws is not even being called.
Where should I look for error messages or other resources to aid me in identifying the problem?
Thank you very much for any hints!
Marcos -
HR_INFOTYPE_OPERATION not working when called from Dynamic action
Hi ,
Senario : I would like to execute a form from dynamic action which
creates a record in 0015 (Additional payment IT) .
I have writen the code as shown below am using FM HR_INFOTYPE_OPERATION
. When i execute the program from se38 it is creating a record, however it is
not created when it is called from dynamic action..when i debugged the code in
inside the FM HR_INFOTYPE_OPERATION there is a FM HR_MAINTAIN_MASTERDATA where
they are using call dialog (statement) and
sy-oncom = 'N' when called from Dynamic action and
sy-oncom = 'S' when called executed directly.
I tried to change the sy-oncom to S while run from Dynamic action it created
the record.
So Can anyone explain me abt sy-oncom and how can i resolve the issue..
code..
REPORT ZHRPYENH01 .
perFORM TERMIATION_9000.
INCLUDE DBPNPMAC.
FORM Termiation_9000 *
FORM TERMIATION_9000.
INFOTYPES : 0015.
*data : i .
*i ='c'.
*break-point.
*message i000(000) with i.
TABLES : PRELP.
DATA : P9000 TYPE PA9000." with header line.
DATA : P0000 TYPE STANDARD TABLE OF P0000 WITH HEADER LINE.
DATA : P0015 TYPE STANDARD TABLE OF P0015 WITH HEADER LINE.
DATA : HIRE_DATE LIKE SY-DATUM,
TERM_DATE LIKE SY-DATUM.
DATA : MOLGA LIKE T500L-MOLGA VALUE '25',
SEQNR LIKE PC261-SEQNR.
DATA : RGDIR TYPE STANDARD TABLE OF PC261 WITH HEADER LINE.
DATA : ACTUAL_PERIOD LIKE PA9000-RETENTION.
DATA : PNP-SW-FOUND TYPE SY-SUBRC ,
PNP-SY-TABIX TYPE SY-TABIX.
DATA : TER_PERNR LIKE PA0001-PERNR.
DATA : REF_PERNR LIKE PA0001-PERNR.
data : key type BAPIPAKEY.
data : payed_amount type p0015-BETRG.
data : future_payment_amount type p0015-BETRG.
data : p0002 like pa0002.
types : begin of t_deduction ,
deducation_date like p0015-begda,
future_payment_amount type p0015-BETRG.
types : end of t_deduction.
data : future_deduction type standard table of t_deduction with
*header line.
data : future_deduction type t_deduction .
data : RETURN type BAPIRETURN1.
*data : deduction_p0015 like standard table of p0015 with header line.
data : deduction_p0015 like p0015 .
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
****Prepare 0015 data for deduction
*deduction for payed amount
clear deduction_p0015.
*refresh deduction_p0015.
deduction_p0015-pernr = REF_PERNR.
*deduction_p0015-pernr = TER_PERNR.
deduction_p0015-lgart = 'M120'.
deduction_p0015-begda = sy-datum + 1 .
deduction_p0015-endda = sy-datum + 1 .
deduction_p0015-BETRG = payed_amount.
deduction_p0015-WAERS = 'SGD'.
deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
**deduction for future payment amount
*loop at future_deduction.
*clear deduction_p0015.
*deduction_p0015-pernr = REF_PERNR.
**deduction_p0015-pernr = TER_PERNR.
*deduction_p0015-lgart = 'M120'.
*deduction_p0015-begda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-endda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-BETRG = future_deduction-future_payment_amount.
*deduction_p0015-WAERS = 'SGD'.
*deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
*endloop.
Create a deduction wage type in 0015 for the employee
break-point.
CLEAR RETURN.
CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
if not return is initial.
message E000(000) with
'Referred Employee could not be locked for referal payment deducation,
please try after some time'.
endif.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = REF_PERNR
SUBTYPE = 'M120'
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = SY-DATUM
VALIDITYBEGIN = SY-DATUM
RECORDNUMBER =
RECORD = deduction_p0015
OPERATION = 'COPY'
TCLAS = 'A'
DIALOG_MODE = '2'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN = return
KEY = key
break-point.
COMMIT WORK.
if not return is initial.
*return-TYPE
*ID
*NUMBER
*MESSAGE
message I000(000) with return-MESSAGE.
endif.
CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
Thanks and regards
-Senthil Bala
Message was edited by: senthil balaHi Senthil
Why at all U want a subroutine to create a record in IT0015 through Dynamic action.There are some standard codes available to update infotypes.
Let me give U an example
14 9CON BETRG 4 2 I INS,0015 This will create a record in IT0015 when IT0014 is updated with Wagetype 9CON
14 9CON BETRG 4 3 W P0015-LGART='5400' Set wagetype for IT0015(Here U can use a subroutine call to set the wagetype)
14 9CON BETRG 4 4 W P0015-BETRG=P0014-BETRG set amount for IT0015(Here U can use a subroutine call to get the amount)
14 9CON BETRG 4 5 W P0015-BEGDA=P0014-ENDDA set the dates(Here U can use a subroutine call to set the dates)
Hope this will help U.
Please award points if helpful -
Getting error when calling stored procedure
I have created 2 stored procedures as follows
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[REAL_PUSH_UPDATE_REPORTS] AS
BEGIN TRANSACTION
DECLARE @cursor_contact_id bigint;
DECLARE cursorContactId Cursor FOR SELECT distinct(contact_id) FROM [dbo].credit_reports WHERE loan_id IS NULL;
OPEN cursorContactId;
Fetch NEXT FROM cursorContactId INTO @cursor_contact_id;
IF(@@FETCH_STATUS <> 0)
PRINT 'There are no LOAN contacts are there with loan ID null, May be you have already executed this procedure'
WHILE(@@FETCH_STATUS =0)
BEGIN
PRINT @cursor_contact_id;
EXECUTE REAL_UPDATE_REPORTS @cursor_contact_id;
Fetch NEXT FROM cursorContactId INTO @cursor_contact_id
END
CLOSE cursorContactId;
DEALLOCATE cursorContactId;
IF (@@Error = 0)
BEGIN
COMMIT TRANSACTION;
END
ELSE
BEGIN
ROLLBACK TRANSACTION;
END
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[REAL_UPDATE_REPORTS] @initial_contact_id bigint AS
BEGIN TRANSACTION
DECLARE @loan_count bigint;
DECLARE cursorLoanID Cursor FOR (SELECT l.loan_id loanIDList FROM (([dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
ON lr.loan_id=l.loan_id
AND lr.contact_id = l.primary_borrower_id)
LEFT OUTER JOIN [dbo].loan_codes lc
ON l.loan_code_id = lc.loan_code_id)
WHERE (l.primary_borrower_id=@initial_contact_id)
AND l.active=1 UNION SELECT l.loan_id
FROM [dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
ON lr.loan_id=l.loan_id LEFT OUTER JOIN [dbo].contacts c
ON c.contact_id =l.primary_borrower_id
WHERE (l.loan_id IN
(SELECT cb.loan_id FROM coborrowers cb where contact_id =@initial_contact_id and active = 1))
UNION
SELECT l.loan_id
FROM [dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
ON lr.loan_id=l.loan_id LEFT OUTER JOIN [dbo].contacts c
ON c.contact_id =l.primary_borrower_id
WHERE (l.loan_id IN (SELECT cs.loan_id
FROM cosigners cs where contact_id =@initial_contact_id and active = 1)) UNION
SELECT g.loan_id FROM [dbo].groups g, [dbo].group_members gm,
[dbo].loan_requests lr WHERE gm.group_id = g.group_id
AND lr.loan_id = g.loan_id
AND lr.contact_id = gm.secondary_borrower_id
AND gm.secondary_borrower_id=@initial_contact_id and gm.active = 1)
ORDER BY loanIDList DESC;
OPEN cursorLoanID;
SET @loan_count = @@CURSOR_ROWS;
PRINT @loan_count;
IF(@loan_count > 0) BEGIN
DECLARE @loans_loan_id bigint;
Fetch NEXT FROM cursorLoanID INTO @loans_loan_id;
DECLARE @my_count bigint;
SET @my_count=1;
WHILE(@@FETCH_STATUS =0)
BEGIN
DECLARE @temp_contact_id bigint;
DECLARE @temp_loan_id bigint;
SET @temp_contact_id = @initial_contact_id;
SET @temp_loan_id = @loans_loan_id;
IF(@my_count=@loan_count)
BEGIN
UPDATE [dbo].credit_reports SET loan_id = @temp_loan_id WHERE
loan_id IS NULL AND contact_id = @initial_contact_id
AND NOT EXISTS (SELECT * FROM [dbo].credit_reports
WHERE contact_id = @initial_contact_id AND
loan_id=@temp_loan_id);
END
ELSE
BEGIN
INSERT INTO [dbo].credit_reports(contact_id,credit_bureau_id, credit_score, thirty_days_late,
sixty_days_late, ninety_days_late, currently_negative, amount_past_due,
inquiries_six_mos, public_records, collections, total_accounts_balance,
total_mthly_pymts, report_file, report_gu_id, data_entry_by, data_entry_date,
loan_id) SELECT contact_id,credit_bureau_id, credit_score, thirty_days_late,
sixty_days_late, ninety_days_late, currently_negative, amount_past_due,
inquiries_six_mos, public_records, collections, total_accounts_balance,
total_mthly_pymts, report_file, report_gu_id, data_entry_by,
data_entry_date,@temp_loan_id FROM [dbo].credit_reports WHERE contact_id
= @initial_contact_id AND loan_id IS NULL
AND NOT EXISTS (SELECT * FROM
[dbo].credit_reports WHERE contact_id=@initial_contact_id AND
loan_id=@temp_loan_id);
END
Fetch NEXT FROM cursorLoanID INTO @loans_loan_id;
SET @my_count = @my_count + 1;
END
close cursorLoanID
deallocate cursorLoanID
IF (@@Error = 0)
BEGIN
COMMIT TRANSACTION;
PRINT 'Success for contactID :'+CONVERT(varchar(50),@initial_contact_id);
END
ELSE
BEGIN
ROLLBACK TRANSACTION;
PRINT 'Failed for contactID :'+CONVERT(varchar(50),@initial_contact_id);
END
END
ELSE
BEGIN
ROLLBACK;
PRINT 'NO Loans For the contactID :'+CONVERT(varchar(50),@initial_contact_id);
ENDnow the problem is
i have executed 2 procedures saperately thn its ok while im calling im getting
Msg 16915, Level 16, State 1, Procedure REAL_UPDATE_REPORTS, Line 5
A cursor with the name 'cursorLoanID' already exists.
Msg 16905, Level 16, State 1, Procedure REAL_UPDATE_REPORTS, Line 6
The cursor is already open.Please let me know the reason...
Thank you.
Message was edited by:
User71408What the heck, that's fun..
I for one, have never seen T-sql or whatever it's called.
Looking at it, it seems that a
close cursorLoanID
deallocate cursorLoanID
is missing from the ELSE section doing the rollback.
But, only guessing
Fun, fun, fun -
Ringback not working when call is offered
When a call is offered to an agent the caller hears dead silence on their end. I have the Call Control Group configured to use the correct MOH source. I have verified that the file will work by changing my MOH for my device to it and it plays. I have also changed all of the CTI ports to use this file for MOH and restarted the CUCM IP Media Voice Streaming Service still without any luck. Anyone know of something I am missing? I am running CUCM 9.1.2 and UCCX 9.0.2
One common cause of silent MoH is multicast not working. CUCM sends SDP with a multicast address (because the audio source, moh server, and mrg all are set to allow it) but either the router doesn't have multicast enabled or the group isn't being propegated from CUCM to the router.
Turn off multicast on those three places, reset the moh server, and see if you get audio. If you do, you may still want to fix multicast and turn it back on since it provides far better scale.
Please remember to rate helpful responses and identify helpful or correct answers. -
Managed Attachments - I/PM is not working when called from EBS
Hi.
When we click on "Managed Attachments" I/PM login screen should be populated. It was working fine before... Today, it is not working as expected. The following exception is coming in I/PM console logs...
*<Dec 18, 2011 5:00:23 PM GMT+04:00> <Error> <oracle.wsm.policymanager.bean.util.PolicySetBuilder> <BEA-000000> <The policy referenced by URI "oracle/wss_username_token_ service_policy" could not be retrieved since Policy Manager is not deployed. oracle.wsm.policymanager.PolicyManagerException: WSM-02054 : Failure in looking up EJB component DocumentManager#oracle.wsm.policymanager.bean.ejb.IRemoteDocumentManager.*
Caused By: javax.naming.NameNotFoundException: While trying to lookup 'DocumentManager#oracle.wsm.policymanager.bean.ejb.IRemoteDocumentManager' didn't find subcontext 'DocumentManager#oracle'. Resolved ''; remaining name 'DocumentManager#oracle/wsm/policymanager/bean/ejb/IRemoteDocumentManager'
I think its the problem with Security Providers... We are using the default only... not using any LDAP etc... when we check in Enterprise Manager it is showing the store type as FILE for "Policy Store", "Credential Store", and "Key Store"....
The same exception is coming when we test the webservices under Imaging deployment in Weblogic Console...
Not sure how to crack it...
Anybody please help!!The issue has been resolved by configuring Oracle Web Service Manager security policy as per the doucment 1332250.1
Oracle Web Services Manager (OWSM) is necessary for applying WS-Security headers to UCM web services. The WebLogic domain that UCM/IPM runs in must have OWSM installed in order for this to work. OWSM can be selected upon domain creation, or added to a domain by extending the domain. -
Open Form not working when called from When-Mouse-Click
In our application to navigate to other forms we have created a feature where user selects the Forms from a LOV, the form id is returned to the text item and user needs to click the text item.....In the text item the Open form command is given
This is not working
The form builder throws an error
Frm 92100 Connection interupted
what could be the reasonCode written in When-Mouse-click
for item :boo_toolblk.nbt_nxtscr which contains the form id
DECLARE
p_name_id PARAMLIST;
lv_param_name VARCHAR2(8):= :boo_toolblk.nbt_nxtscr;
lf_next_form_id FORMMODULE;
BEGIN
Clear_Item;
/*Create a parameter list named 'TEMPLT_PARAM'. First
** make sure the list does not already exist, then
** attempt to create a new list*/
IF not Id_Null(Get_Parameter_List('TEMPLT_PARAM'))/*Returns a BOOLEAN value if the object ID is available*/
THEN Destroy_Parameter_List('TEMPLT_PARAM');
END IF;
p_name_id:= Create_Parameter_List('TEMPLT_PARAM');
/*Add a value parameter to an existing Parameter
** List */
Add_Parameter(p_name_id,'templt_nxtscr',TEXT_PARAMETER,lv_param_name);
Go_Block(Get_Form_Property(:system.current_form,FIRST_NAVIGATION_BLOCK));
lf_next_form_id := FIND_FORM(lv_param_name);
:PARAMETER.next_form := lv_param_name;
IF lf_next_form_id.id is not null
THEN
Close_form(lf_next_form_id);
END IF;
Add_parameter(p_name_id,'previous_form',TEXT_PARAMETER,:SYSTEM.CURRENT_FORM);
/* opens another form*/
Open_Form(lv_param_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA,p_name_id);
EXCEPTION
WHEN FORM_TRIGGER_FAILURE
THEN RAISE FORM_TRIGGER_FAILURE;
WHEN OTHERS
THEN RAISE FORM_TRIGGER_FAILURE;
END;
Error :-
Frm-92100 : Your Connection to the Server was Interrupted
This may be the result of a networn error or a failure on the server.
You will need to re-establish
Maybe you are looking for
-
Toshiba external hard drive is not seen by my time capsule
I am trying to connect an external hard drive to my time capsule, I am doing this with other hard drives and it work perfectly, but I just got a toshiba 1,5 tb drive with external power supply and my time capsule simply ignore it, it is not shown in
-
How to Install oracle 10g in a gues OS?
Hello All, I have installed Oracle Linus 5 using the template. Since Oracle Linux Template does not have the X server, how would one install Oracle 10g using GUI. Should i go for the 'un attended' installation ? Also, can i use the same 10201_databas
-
Please Help!! I was given an MP3 player for my birthday and it only worked for 2 days!!! it keeps saying '<EM>hardware problem</EM>' and after looking through the manual and trying that way (press reset and press play!) it still doesn't work, Could a
-
Sales order:allow partial delivery
please explain the concept of partial delivery in the sales order.
-
Hi, I created some tests which run perfectly if I use my IDE (FlashDevelop) to run them. I've been trying to create a Nant script to automate my tests and have the results written into an xml file. The entire build system where I work uses Nant inste