Informix Store Procedure
Hi,
I executed a Store Procedure in Informix DB to started a process. This Procedure has the following return parameters:
CHAR,
SMALLINT,
CHAR,
CHAR;
My problem is in Inbound Message Payload that received the following error message, because it can´t use "(" as tag definition:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing resource 'http://xidev:50000/mdt/messagecontentservlet?attac...
<(expression)>01</(expression)>
---^
Does anyone knows another way to solve this problem?
Regards
Damian
People, i have the same problem, but solutuion is:
change in the declaration of procedure to return the result set
ex:
CREATE FUNCTION Nome_Arquivo ()
RETURNING CHAR(100) AS arquivo DEFINE vArq LIKE fs_full.nome_arquivo;;
select first 1 nome_arquivo INTO vArq
from fs_full;;
RETURN vArq;;
END FUNCTION
Routine created.
In RETURNING use "AS" enter field names your date types.
its work.
abs
Similar Messages
-
Informix Stored Procedure Response
Hi,
I'm executing a Store Procedure on Informix DB to started a process.
The Stored Procedure has just one return. But, my Inbound Message Payload has the following structure:
<?xml version="1.0" encoding="utf-8"?>
<ns1:MT_WMS_response xmlns:ns1="urn:interfaces:PI:SESI:WMS">
<Statement_response>
<response_1>
<row>
<(expression)>H2W0000476</(expression)>
</row>
</response_1>
</Statement_response>
</ns1:MT_WMS_response>
Because it can´t use "(" as tag definition and getting and Mapping Error.
Does anyone knows another way to solve this problem?
Regards,
Luis Diegorefer to others with the same problem
change in the declaration of procedure to return the result set
ex:
CREATE FUNCTION Nome_Arquivo ()
RETURNING CHAR(100) AS arquivo DEFINE vArq LIKE fs_full.nome_arquivo;;
select first 1 nome_arquivo INTO vArq
from fs_full;;
RETURN vArq;;
END FUNCTION
Routine created.
In RETURNING use "AS" enter field names your date types.
its work.
abs -
HOW TO EXECUTE A STORE PROCEDURE THAT RETURN MULTIPLE ROWS FROM A QUERY
I NEED TO CREATE AND USE A STORE PROCEDURE THAT IS GOING TO DO A SELECT STATEMENT AN THE RESULT OF THE SELECT STATEMENT IS RETURN IN SOME WAY TO THE REQUESTER.
THIS CALL IS MADE BY AN EXTERNAL LANGUAGE, NOT PL/SQL OR FORMS APPLICATION. USING FOR EXAMPLE ODBC AND VISUAL BASIC. WHAT I NEED TO DO IS ADD A DATA ACCESS LAYER TO MY APPLICATION AND I ALREADY HAVE IT DONE FOR MS SQL SERVER, BUT I NEED THE SAME FUNCTIONALITY ACCESSING AN ORACLE DATABASE.
FLOW:
1. VB CREATE A ODBC CONNECTION TO A ORACLE DATABASE
2. VB EXECUTE A STORE PROCEDURE
3. THE STORE PROCEDURE RETURNS TO THE VB APPLICATION THE RESULT OF THE QUERY THAT IS INSIDE OF THE STORE PROCEDURE.(I.E. THE STORE PROCEDURE IS A BASIC SELECT, NOTHING COMPLEX)
4. VB DISPLAY THE RESULT IN A GRID
FOR SURE I CAN DO THE SELECT DIRECTLY TO ORACLE, BUT FOR PERFORMANCE REASONS AND SCALABILITY, I'LL LIKE IT TO DO IT USING A STORE PROCUDURES
IS THIS POSIBLE?, HOW?
THANKSCertainly, it's possible. First, define a stored procedure that includes an OUT parameter which is a REF CURSOR. Then, call the stored procedure via ODBC omitting the OUT parameter from the list of parameters. IT will automatically be returned as a result set. Syntax for both is below...
CREATE PROCEDURE foo (inParam in varchar2, resultSet OUT REF CURSOR )
In ODBC:
{call foo( 'someData' )}
Justin -
UNABLE TO EXECUTE THE CMDSQL SCRIPT IN A STORE PROCEDURE.
I am trying to call a .sql file from sql cmd mode.
The requirement is to pass the .sql file as parameter value to the cmd script which I have able to achieve,here is the code which is working fine .
declare @x sysname
set @x = 'C:\Users\testuser\Desktop\testing.sql'
:OUT $(TEMP)\GetServerName1.sql
PRINT ':SETVAR FilePath'+ ' ' + @x
GO
:OUT stdout
:r $(TEMP)\GetServerName1.sql
GO
:r $(FilePath)
But when I try to wrap this code in store procedure it is giving the message fatal error but when I run it without wrapping it in store proc it is doing its job with no error . When I looked into the store proc I found the code as
ALTER proc [dbo].[testing]
as
declare @x sysname
set @x = 'C:\Users\testuser\Desktop\testing.sql'
PRINT ':SETVAR FilePath'+ ' ' + @x
It seems like the sqlcmd code disappears automatically. I have no clue why it is happening.
Can anyone help in letting me knw how to wrap the above code in store proc.
Thanks SauravIt is important to keep in mind that you have two entities in play here. One client and one server. The lines that start with a colon never sent to SQL Server, nor are the lines which reads "go". They are intercepted client-side. For instance :r
instructs SSMS to read a local file and out: redirects the output. And "go" breaks up the code in batches.
Erland Sommarskog, SQL Server MVP, [email protected] -
Front-End Service Starup Error: Store procedure to GET progress vector failed.
Hi,
We have a two front end servers in our Lync deployment and I'm getting an interesting error message on one of the servers when the "Lync Server Front-End Service" is starting up. All the services on that server will eventually start but I'm pretty
sure it's affecting users in some way.
Here is the error message in the Event Viewer:
Log Name: Lync Server
Source: LS User Services
Date: 2013-09-17 8:00:32 AM
Event ID: 32194
Task Category: (1006)
Level: Error
Keywords: Classic
User: N/A
Computer: BGC-VAN-LYNC2.domain.ca
Description:
Store procedure to GET progress vector failed.
Execution Error: 0x00000000(ERROR_SUCCESS).
Native Error: 8144.
Error Details: [# [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function SyncReplicationGetProgressVector has too many arguments specified. #].
Cause: This may indicate a problem with connectivity to local database or some unknown product issue.
Resolution:
Ensure that connectivity to local database is proper. If the error persists, please contact product support with server traces.
Event Xml:
<Event xmlns=>
<System>
<Provider Name="LS User Services" />
<EventID Qualifiers="50158">32194</EventID>
<Level>2</Level>
<Task>1006</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-09-17T15:00:32.000000000Z" />
<EventRecordID>16971</EventRecordID>
<Channel>Lync Server</Channel>
<Computer>BGC-VAN-LYNC2.domain.ca</Computer>
<Security />
</System>
<EventData>
<Data>0x00000000(ERROR_SUCCESS)</Data>
<Data>8144</Data>
<Data>[# [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function SyncReplicationGetProgressVector has too many arguments specified. #]</Data>
</EventData>
</Event>
The error happens 15 times every minute, following with this event:
Name: Lync Server
Source: LS User Services
Date: 2013-09-17 8:23:46 AM
Event ID: 32189
Task Category: (1006)
Level: Information
Keywords: Classic
User: N/A
Description:
The following Fabric service for routing groups have been closed:
{F515134C-71B7-52FD-B0C3-6A9DB39CF750}
{8A5D6B36-2A01-53DB-BC4E-3286C05E0836}
{B35AAFC9-F6BF-5FFE-8C31-4AA5C36B2065}
{69223418-78DC-5066-81A8-78E05914EC7B}
{80414C96-1137-5DDC-8387-C3EA7A54B078}
{641E6ABD-B862-55A1-B1B1-C83BC92D2F85}
{1EA68EA4-77F7-5CFC-B781-0093CBC18403}
{2FDE333D-FF7F-5D6A-B85B-93ADC1EAC12A}
{A43BBA3A-8963-51C4-BD7A-19E1EC3DDFDB}
{D3F4532F-61C8-5072-9B3B-3E2CCF15442F}
{4449243E-5E96-56AC-AB6B-C5E785543542}
{58B30261-65B6-5F6A-BC50-60F85782D052}
{DB4B76B0-2510-5BF8-A7B1-8B37BD3AA7B9}
{917CC217-966B-56AC-A912-97BA64BA13EB}
Anyone knows what this is about and how to resolve this?
Thanks,
VH.Hi,
Please try to reset registrar state:
http://tsoorad.blogspot.in/2013/04/lync-2013-ee-pool-wont-start.html
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
sure that you completely understand the risk before retrieving any suggestions from the above link.
Kent Huang
TechNet Community Support -
Select all values from Rule in Store Procedure
Hi
I have a rule like this
CREATE RULE [dbo].[Rle_Currency_Lst]
AS
@List IN
('PKR','USD')
GO
Now i want to make simple "Currency List" report for which i need to select values from above rule in Store Procedure which i will use in SSRS to fill my report.
Please help
Zubair Afridi | Please mark as answered or vote helpful if this post help resolved your issue. Thanks!One way to get the values.
declare @definition nvarchar(max);
select @definition = m.definition
from sys.objects o
inner join sys.sql_modules m on o.object_id = m.object_id
where schema_name(o.schema_id) = 'dbo' and o.name = 'Rle_Currency_Lst';
set @definition = SUBSTRING(@definition, CHARINDEX('''', @definition), LEN(@definition));
set @definition = LEFT(@definition, CHARINDEX(')', @definition) - 1);
declare @myXML AS XML;
set @myXML = N'<H><r>' + REPLACE(SUBSTRING(@definition, CHARINDEX('''', @definition), LEN(@definition)), ',', '</r><r>') + '</r></H>'
declare @result table(myvalues nvarchar(100));
insert @result(myvalues)
SELECT Vals.id.value('.', 'NVARCHAR(100)') AS val
FROM @myXML.nodes('/H/r') AS Vals(id)
update @result set myvalues = REPLACE(myvalues, '''', '');
select * from @result;
Note that rules is a deprecated feature and will be removed in a future version of SQL Server. The replacement for rules is CHECK CONSTRAINTS. You may well want to consider a plan to migrate your current rules to check constraints.
Tom -
How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000
Post Author: ltkin
CA Forum: WebIntelligence Reporting
Hi,
How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000 ?
Regards,Hi ltkin,
Unfortunately, it is not possible in Xir2 to create Webi reports from stored procedures.
Webi reports can only be created from Universe. So in Business Objects XIR3 we can create a special universe that enables Web Intelligence user's to access stored procedures residing in the database. This is the only way that Web Intelligence user's can access stored procedures.
Please let me know if the above information helps.
Regards,
Pavan -
How can i pass NULL value in Store Procedure?
Hi guys,
I am calling one store procedure from MS SQL Server 200, i had create the follow layout:
But i need pass to MSQL SEVER the CPF = NULL, when i execute the procedre the CPF send empty value (not null).
I already changed Communication Channel parammeter "Interpretation of Empty String Values" to "Null Value" value.
But the interface always send empty string instead of null.
How can anybody help me, please?
Edited by: João Noberto dos Santos Junior on Jun 24, 2009 5:00 PMHi,
To achieve this through "Interpretation of Empty String Value" in the cc, you will have to implement a patch which is sent to you by SAP when an OSS is raised. By default its not available, i mean you can configure it but it will actually not work.
As a temporary solution you can map your element with a constant/mapwithdefault field with value mentioned as NULL.
Regards,
Anshul -
How to get a recordset in vb to access a oracle store procedure.
I have a store procedure(sproc) that needs to be called from a VB Application. I was being told that I would have to create a PL/SQL table in my store procedure for the VB Developer to access information from my store procedure. This is beacasue he wants it as a record set. Is that the way to get info for a VB front end. My sproc is a very basic one
My sproc looks like
create or replace PROCEDURE SP_TBLINFO
(ID out TBLINFO.id%type,
ACCOUNT_NUMBER out TBLINFO.account_number%type)
AS
CURSOR TBLINFO_CURSOR IS
SELECT * FROM TBLINFO;
V_TBLINFO_CURSOR TBLINFO_CURSOR%ROWTYPE;
BEGIN
OPEN TBLINFO_CURSOR ;
Loop
FETCH TBLINFO_CURSOR INTO V_TBLINFO_CURSOR;
EXIT WHEN TBLINFO_CURSOR %NOTFOUND;
ID := V_TBLINFO_CURSOR.id;
ACCOUNT_NUMBER:= V_TBLINFO_CURSOR.account_number;
END LOOP;
CLOSE TBLINFO_CURSOR ;
END SP_TBLINFO;
Thanks.Use a REF_CURSOR, something like the following:
create or replace package SP_TBLINFO as
CURSOR TBLINFO_CURSOR IS SELECT * FROM TBLINFO;
create type TBLINFO_CURSOR_TYPE is TBLINFO_CURSOR%ROWTYPE;
procedure PROC_TBLINFO(Info out TBLINFO_CURSOR_TYPE);
end;
create or replace package body SP_TBLINFO as
PROCEDURE PROC_TBLINFO
(Info out TBLINFO_CURSOR_TYPE)
AS
BEGIN
OPEN ACCOUNT_NUMBER as SELECT * FROM TBLINFO ;
END SP_TBLINFO;
END;
Then bind it in OO4O as ORATYPE_CURSOR. -
Unable to run Store Procedure based deski report in Infoview
Hi All,
I have a Deski report which is created using Store Procedure. I am able to run report in Full Client Deski. But I am unable to run / schedule same report thorough infoview.
More details about report
- Report uses 3 store procedures. When I ran report in infovew I get error message as "SP2 Dataprovider did not refresh properly". -- SP2 is Dataprovider name.
- Same report I am able to run in Dev environment. After migration to Model, report fails to run in model infoview.
- I am able to Run report only for 1st. When I refresh and run with same parameter report shows error.
Any input will be great help.
Thanks,
NVHi,
Could you please test the following solutions to resolve the issue.
Solution1:
Test the issue by inserting the following parameter in .SBO file.
<Parameter Name="Force SQLExecute">Always</Parameter> .
Solution2
Just put SET NOCOUNT OFF in the end of the stored procedure SQL.
If the above doesnu2019t works then please try the following solution.
Solution3
Make the new connection from the scratch using ODBC connection and test the issue.
I hope this will help you.
Regards,
Sarbhjeet Kaur -
Error while executing store procedure
we are using JSQLConnect jdbc driver 3.0 verson.
When we trued to excute store procedures its giving error like
com.jnetdirect.jsql.w: Stored procedures called with static parameters cannot return output parameter values, please use CallableStatement.setXXX() to set the values of all input parameters.
we are using SQLServer2000.
Could anybody tell me why this is error is coming and how to solve this.
Thanks
HemanthObviously it doesn't like the stored procedure. If you posted the signature for that it might help.
You are using a CallableStatement right? -
Error when run crystal report with store procedure in JSP
I try to run report which is developed by crystal report XI and store procedure (SQL 2005) with JSP.
But it occurs error that is "com.crystaldecisions.reports.reportengineinterface.JPEReportSource - failed to process getPage request: No results were returned by the query."
How can I do for solving this problem? Pls, help me !!!!!
(In other report which is not used store procedure I can run fine.)
Message was edited by:
Bonds_IdentityWhat version of CR are you using?
What CR updates are you using?
See sample apps here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
in particular check out vbnet_win_pass_dataset_main_sub.zip
The [Crystal Reports for Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23] will also be good to look at.
Ludek
Follow us on Twitter
http://twitter.com/SAPCRNetSup -
Permission problem calling a java object from a store procedure
When I run my store procedure
CREATE OR REPLACE PACKAGE BODY confirms_write_to_file
AS
FUNCTION translate(in_en_var in VARCHAR2)
RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'translate.translatePath(java.lang.String) return java.lang.String';
PROCEDURE write_to_file(in_file_name IN VARCHAR, in_en_var IN VARCHAR)
IS
file_handle UTL_FILE.FILE_TYPE;
file_location VARCHAR2(50);
BEGIN
file_location := translate(in_en_var);
dbms_output.put_line ('opened file location' ||file_location);
END write_to_file;
END confirms_write_to_file;
I get the following error:
exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
SQL> exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
Exception java.security.AccessControlException: the Permission
(java.io.FilePermission <<ALL FILES>> execute) has not been granted by
dbms_java.grant_permission to
SchemaProtectionDomain(RIMS|PolicyTableProxy(RIMS))
opened file locationProcess problem
PL/SQL procedure successfully completed.
When I try to to grant myself the permissions
begin
dbms_java.grant_permission('rims','java.io.FilePermission','*','execute');
dbms_java.grant_permission('rims', 'java.lang.RuntimePermission', '*','writeFileDescriptor' );
end;
I get the following Error:
oracle.aurora.vm.IdNotFoundException: rims is not a user or role
at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
at
oracle.aurora.rdbms.security.PolicyTableManager.findAll(PolicyTableManager.java)
at oracle.aurora.rdbms.security.PolicyTableManager.find(PolicyTableManager.java)
at
oracle.aurora.rdbms.security.PolicyTableManager.activate(PolicyTableManager.java
at
oracle.aurora.rdbms.security.PolicyTableManager.grant(PolicyTableManager.java)
begin
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.aurora.vm.IdNotFoundException: rims is not a user or role
ORA-06512: at "SYS.DBMS_JAVA", line 0
ORA-06512: at line 2
My java code is as follows
import java.io.*;
import java.util.*;
class translate
public static String translatePath(String envar)
Runtime rt = Runtime.getRuntime();
int bufSize = 4096;
byte buffer[] = new byte[bufSize];
String path = null;
Process p = null;
int len = 0;
try
p = rt.exec("echo "+envar);
BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
while ((len = bis.read(buffer, 0, bufSize)) != -1)
System.out.write(buffer, 0, len);
path = new String(buffer);
p.waitFor();
catch(Exception e)
System.out.println("Exception "+e);
return "Process problem ";
return path;Tony,
I answered this very same question that you posted at the JavaRanch forum.
Good Luck,
Avi. -
Error message when issuing a COMMIT in a store procedure
Hello experts,
Please help.
I have a problem where i cannot specify a COMMIT in a store
procedure. I have the following error message:
=================================================================
00034, 00000, "cannot %s in current PL/SQL session"
// *Cause: An attempt was made to issue a commit or rollback
from a PL/SQL
// object (procedure, function, package) in a session
which has this
// disabled (by 'alter session disable commit in
procedure')
// *Action: enable commits from PL/SQL in this session, or don't
attempt
// to use commit or rollback in PL/SQL when they are
disabled
// in the current session.
=================================================================
Thanks very much for a reply
Kind regards
YogeerajThe solution is to issue the statement
alter session enable commit in procedure;
However, I'd think carefully about doing this. Procedures are
often called as part of a wider transaction. If the procedure
issues a commit ALL the preceding work is also commited. If
there is something subsequent in the transaction that fails and
issues a rollback, it will onlt rollback the work done after the
procedure. This may lead to your database being in an
inconsistent state.
rgds, APC -
Oracle JBDC error while calling the store procedure
HI All,
I am get one strange error while calling a store procedure which has two parameter in and out.
I am pass the correct XML file which reaches the RDB and then PI receives a exception error message saying:
oracle.rdb.jdbc.common.RdbException: Closed Resultset
where as no error log is availble in RBD for the same.
Can anybody tell me what can be the cause of the error.
Let me know if you requires more information on this.
-adiHi Kiran,
Thanks..
But I am not able to understand you. I am calling a store procedure not a table. and we not doing anything in the store procedure except return one constant value in Out parameter.
-Adi
Maybe you are looking for
-
My Macbook Pro is out of storage space, what should I do?
I take tons of pictures and that is what's sucking up all of my memory. I currently have a 2011 Macbook Pro OS X Lion Version 10.7.4. 4 GB memory 2 GHz processor. Now that I look at the "About This Mac" it says all of my storage is "Other" with 0 KB
-
Inserting row in the result set
Hi need to insert a row in resultset when previous row typ=c and next row typ=p then need to insert one row in between typ c and p with typ =s see the #temp_result table for result expected --drop table temp1 --drop table temp1_result --presently dat
-
I have three physical tables: GL_BALANCES (columns: corp_acct_id, amount) CORP_ACCOUNTS (columns: corp_acct_id) INTERFACE_DETAIL (columns: corp_acct_id, source_system_acct_id, source_system_sub_acct_id, amount) There is a one to many relationship bet
-
Hi Any idea where can I extract out the exchange rate other then EKKO, as I'm in the mid of creating my own PO report. I would like the exchange rate to be captured in the LIV instead of the PO. Any idea?
-
Reduced xsd file trnsport to QA??
HI XI Friends, in my Idoc to file, in message mapping i used reduced xsd for IDOC .i didnt created any external definition for this reduced xsd of IDOC. now i moving IDOC only to QA box. is this reduced xsd also transport to QA automatically ?? if n