Using stored packages in report triggers
Hi,
-- Among other things, my stored packages "per7x" is
-- capable of creating a rather complex cross-table.
-- A particular function returns this as a pl/sql table
-- of integers (index by binary_integer).
-- Another sub-program of the package creates a persistent
-- pl/sql table representing the cross-table. This is the
-- procedure "init_main" that has some parameters with
-- default values. The function "get_main_value" returns
-- a particular row/column value. (Of course, the table
-- persists only for the duration of the database session.
-- The following code runs fine from SQL*Plus
-- (per7x.init_main takes a few seconds to complete, then,
-- the next statement delivers the expected result):
set serveroutput on;
begin
per7x.init_main;
dbms_output.put_line(per7x.get_main_value(1,1));
end;
-- But now for some serious business. I want to retrieve
-- these values from within a Developer/2000 Reports
-- application. I figured calling "per7x.init_main" at
-- the BeforeReport trigger and I would call
-- "per7x.get_main_value" at the FormatTrigger level.
-- But... calling the initialization procedure, as in:
function BeforeReport return boolean is
begin
per7x.init_main;
return (TRUE);
end;
-- results in:
-- R30DES32 caused an invalid page fault in
-- module PLS234.DLL at 0137:0050827c.
-- and Reports will be shut down.
-- the message:
-- REP-1401: 'beforereport'. Fatal PL/SQL error occured.
-- occurs when attempting to make a local copy of the
-- pl/sql table instead of using the persistent structure.
-- What goes wrong here??
-- I am connected to: Oracle Workgroup Server 7.3.2.3.1
-- with the Distributed Option, PL/SQL version 2.3.2.3.0
-- (Windows NT 4.0)
-- I use Developer/2000 version 2.0 (Reports 3.0.4.6.3)
-- on Windows 95,
-- SQL-Plus is version 3.3.4.0.0
Any help would be very much appreciated,
Paul Ramsteijn,
Renal Replacement Registry of the Netherlands (RENINE).
E-mail: [email protected]
null
hi,
i'm back.. :)
i attempted to use the following pl/sql code in a pl/sql process.
begin
for i in 1..apex_application.g_f01.count
loop
apc_user_pkg.update_user_role ( p_user_role_id => apex_application.g_f02(i)
,p_start_on => apex_application.g_f05(i)
,p_end_on => apex_application.g_f06(i)
,x_last_updated_on => apex_application.g_f09(i)
,x_last_updated_by => apex_application.g_f10(i) );
end loop;
end;however, it doesn't seem to be working properly.. it doesn't update the table.. after the page refreshes, the old data comes back and not the new one.
what am i doing wrong?
regards,
allen
Similar Messages
-
Error when useing DBMS_CRYPTO package in reports 10g
hi all,
i wrote a package which use dbms_crypto, there are functions to crypto userid and decrypo userid.
in report 6i it work fine it cryptos and decrpts. when i use in reports 10g it gives this error.
-28817 ORA-28817: PL/SQL function returned an error.
ora-06512: at "SYS.DBMS_CRYPTO_FFI", line 67
ORA-06512: at "SYS.DBMS_CRYPTO", line 41
ora-06512: at "YBS.SIFRELE", line 26
the packege like this;
PACKAGE BODY SIFRELE
IS
function sicil_sifrele (p_sicil_no IN varchar2) RETURN varchar2
IS
p_key RAW(128);
p_sicil_raw RAW(128);
p_encrypted_raw RAW(128);
BEGIN
p_key := utl_raw.cast_to_raw(to_char(sysdate,'mmyyyydd'));
p_sicil_raw := utl_raw.cast_to_raw(p_sicil_no);
p_encrypted_raw := dbms_crypto.encrypt(src => p_sicil_raw,
typ => dbms_crypto.des_cbc_pkcs5, key => p_key);
return (utl_raw.cast_to_varchar2(p_encrypted_raw));
END;
FUNCTION sicil_coz ( p_encrypted_raw IN RAW) RETURN varchar2
IS
p_key RAW(128);
p_decrypted_raw RAW(128);
sicil_donen VARCHAR2(250);
BEGIN
p_key := utl_raw.cast_to_raw(to_char(sysdate,'mmyyyydd'));
p_decrypted_raw := dbms_crypto.decrypt(src => p_encrypted_raw,
typ => dbms_crypto.des_cbc_pkcs5, key => p_key);
sicil_donen := utl_raw.cast_to_varchar2(p_decrypted_raw);
return (sicil_donen);
END;
END;
thanks.
eserHello,
You should create a "wrapper function"
Create a function in the database that will call dbms_crypto.encrypt / dbms_crypto.decrypt and call this function in Reports.
(The problem here seems to be the reference to dbms_crypto.des_cbc_pkcs5)
Regards -
Using DBMS_CRYPTO package in reports
hi all,
i want to encrypt & decrypt user parameter in report.
to encrypt i use;
l_encrypted_raw := dbms_crypto.encrypt(src => my_parameter,
typ => dbms_crypto.des_cbc_pkcs5, key => l_key);
to decrypt;
l_decrypted_raw := dbms_crypto.decrypt(src => l_encrypted_raw,
typ => dbms_crypto.des_cbc_pkcs5, key => l_key);
in sql developer these codes are running. i can encrypt & decrypt
but when i want to decrypt in reports it gives an error like this:
implementation restriction: 'DBMS_CRYPTO.DES_CBC_PKCS5': Cannot directly access remote package variable or cursor
how can i pass this?
thanks...Hello,
You should create a "wrapper function"
Create a function in the database that will call dbms_crypto.encrypt / dbms_crypto.decrypt and call this function in Reports.
(The problem here seems to be the reference to dbms_crypto.des_cbc_pkcs5)
Regards -
Error when using DBMS_CRYPTO package in reports 10g
hi all,
i wrote a package which use dbms_crypto, there are functions to crypto userid and decrypo userid.
the packege like this;
PACKAGE BODY SIFRELE
IS
function sicil_sifrele (p_sicil_no IN varchar2) RETURN varchar2
IS
p_key RAW(128);
p_sicil_raw RAW(128);
p_encrypted_raw RAW(128);
BEGIN
p_key := utl_raw.cast_to_raw(to_char(sysdate,'mmyyyydd'));
p_sicil_raw := utl_raw.cast_to_raw(p_sicil_no);
p_encrypted_raw := dbms_crypto.encrypt(src => p_sicil_raw,
typ => dbms_crypto.des_cbc_pkcs5, key => p_key);
return (utl_raw.cast_to_varchar2(p_encrypted_raw));
END;
FUNCTION sicil_coz ( p_encrypted_raw IN RAW) RETURN varchar2
IS
p_key RAW(128);
p_decrypted_raw RAW(128);
sicil_donen VARCHAR2(250);
BEGIN
p_key := utl_raw.cast_to_raw(to_char(sysdate,'mmyyyydd'));
p_decrypted_raw := dbms_crypto.decrypt(src => p_encrypted_raw,
typ => dbms_crypto.des_cbc_pkcs5, key => p_key);
sicil_donen := utl_raw.cast_to_varchar2(p_decrypted_raw);
return (sicil_donen);
END;
END;
in report 6i it work fine cryptos and decrpts. when i use in reports 10g it gives this error.
-28817 ORA-28817: PL/SQL function returned an error.
ora-06512: at "SYS.DBMS_CRYPTO_FFI", line 67
ORA-06512: at "SYS.DBMS_CRYPTO", line 41
ora-06512: at "YBS.SIFRELE", line 26
thanks...Hello,
You should create a "wrapper function"
Create a function in the database that will call dbms_crypto.encrypt / dbms_crypto.decrypt and call this function in Reports.
(The problem here seems to be the reference to dbms_crypto.des_cbc_pkcs5)
Regards -
How to use stored package in form.
hi
i created the following package but now i want to use the following code in form
how could i use?.
create or replace package body mahi
is
-- Write a MIME header
procedure write_mime_header (
p_conn in out nocopy utl_smtp.connection
, p_name in varchar2
, p_value in varchar2
is
begin
utl_smtp.write_data ( p_conn
, p_name || ': ' || p_value || utl_tcp.crlf
end;
procedure mail (
p_sender in varchar2
, p_recipient in varchar2
, p_subject in varchar2
, p_message in varchar2
is
v_nls_charset VARCHAR2(50);
/*LOB operation related varriables */
v_src_loc BFILE := BFILENAME('BACKUP', 'Logon.jpg');
l_buffer RAW(54);
l_amount BINARY_INTEGER := 54;
l_pos INTEGER := 1;
l_blob BLOB := EMPTY_BLOB;
l_blob_len INTEGER;
v_amount INTEGER;
/*UTL_SMTP related varriavles. */
v_connection_handle UTL_SMTP.CONNECTION;
v_from_email_address VARCHAR2(30) := [email protected]';
v_to_email_address VARCHAR2(30) := '[email protected]';
I have used stunnel to send mail using smtp.gmail.com
To get stunnel see http://stunnel.org/.
The ORIGINAL idea is here :
http://monkeyonoracle.blogspot.com/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
v_smtp_host VARCHAR2(30) := 'localhost.localdomain';
v_subject VARCHAR2(30) := 'Your Test Mail';
l_message VARCHAR2(200) := 'This is test mail using UTL_SMTP';
/* This send_header procedure is written in the documentation */
PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
BEGIN
UTL_SMTP.WRITE_DATA(v_connection_handle,
pi_name || ': ' || pi_header || UTL_TCP.CRLF);
END;
BEGIN
SELECT value
INTO v_nls_charset
FROM nls_database_parameters
WHERE parameter = 'NLS_CHARACTERSET';
/*Preparing the LOB from file for attachment. */
DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
l_blob_len := DBMS_LOB.getlength(l_blob);
/*UTL_SMTP related coding. */
v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host,
port => 1925);
UTL_SMTP.EHLO(v_connection_handle, 'gmail.com');
UTL_SMTP.COMMAND(v_connection_handle, 'auth login');
UTL_SMTP.COMMAND(v_connection_handle,
UTL_ENCODE.TEXT_ENCODE('[email protected]',
v_nls_charset,
1));
UTL_SMTP.COMMAND(v_connection_handle,
UTL_ENCODE.TEXT_ENCODE('xxxxx', v_nls_charset, 1));
--UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
--UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
UTL_SMTP.COMMAND(v_connection_handle,
'MAIL FROM: <'>');
UTL_SMTP.COMMAND(v_connection_handle,
'RCPT TO: <'>');
UTL_SMTP.OPEN_DATA(v_connection_handle);
send_header('From', '"Sender" <'>');
send_header('To', '"Recipient" <'>');
send_header('Subject', v_subject);
--MIME header.
UTL_SMTP.WRITE_DATA(v_connection_handle,
'MIME-Version: 1.0' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' boundary= "' || 'BACKUP.SECBOUND' || '"' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Body
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: text/plain;' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' charset=US-ASCII' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Attachment
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: application/octet-stream' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' filename="' || 'Logon.jpg' || '"' || --My filename
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
/* Writing the BLOL in chunks */
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
UTL_SMTP.write_raw_data(v_connection_handle,
UTL_ENCODE.BASE64_ENCODE(l_buffer));
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
l_buffer := NULL;
l_pos := l_pos + l_amount;
END LOOP;
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Close Email
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BACKUP.SECBOUND' || '--' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
UTL_SMTP.CLOSE_DATA(v_connection_handle);
UTL_SMTP.QUIT(v_connection_handle);
DBMS_LOB.FREETEMPORARY(l_blob);
DBMS_LOB.FILECLOSE(v_src_loc);
EXCEPTION
WHEN OTHERS THEN
UTL_SMTP.QUIT(v_connection_handle);
DBMS_LOB.FREETEMPORARY(l_blob);
DBMS_LOB.FILECLOSE(v_src_loc);
RAISE;
END;
end;
sarah helped me to create the above package but i am not able to use in form
i sent email to her but no reply.hi
mehwish............just do for attachment.......
u can also use something like this...
Execute send_mail;and also.
try something like this..
example:
begin
mahi.mail('email address','subject','message','attachment');
end;Edited by: Sarah on Apr 18, 2011 10:25 AM -
Using DDE package in report builder 10g
Hi,
I use this code in form 10g to edit a ms word and its work properly:
DECLARE
APPID PLS_INTEGER;
CONVID PLS_INTEGER;
DOCID PLS_INTEGER;
SYS_DATE CHAR(8);
BEGIN
SELECT TO_CHAR(SYSDATE,'MM/DD/YY') INTO SYS_DATE FROM DUAL;
APPID := DDE.APP_BEGIN('C:\Program Files\Microsoft Office\Office12\WINWORD.EXE',
DDE.APP_MODE_MINIMIZED);
CONVID := DDE.INITIATE('WINWORD','SYSTEM');
DDE.EXECUTE(CONVID,'[FileOpen "c:\bin_test\exp.dotx"]', 10000);
DOCID := DDE.INITIATE('WINWORD','c:\bin_test\exp.dotx');
DDE.POKE(DOCID,'BOOKMARK1', SYS_DATE,DDE.CF_TEXT,10000);
DDE.EXECUTE(DOCID,'[FileSaveAs "c:\bin_test\output.doc"]', 10000);
DDE.TERMINATE(CONVID);
END;
when I put this code in the afterreport trigger in report builder 10g and call the report from form;
a blank document word is opened withoud any changes as well as the report result in pdf format.
what can i do to let this code work in report builder??
best regards,
AhmadI use this code in form 10g to edit a ms word and its work properlyI very much doubt that. Calling DDE from Forms this way would result in trying to open Word on the <b>server</b>.
the report result in pdf formatThe report result format is determined by how it is called. Looks like you call it with desformat=pdf. -
How to use stored procedure in crystal report for eclipse
Hi;
I am working on crystal report for eclipse 2.0 and trying to use stored procedure in report .It is created from Oracle but it is not showing any dependencies
CREATE OR REPLACE procedure ACT_DB.getCostTransferDetails
p_In_Contract_ID varchar2 DEFAULT '*',
p_In_Status_ID varchar2 DEFAULT '*',
p_In_COST_TRAN_DATE varchar2 DEFAULT '*',
p_In_DEPT_ID varchar2 DEFAULT '*',
p_In_PROJECT_ID varchar2 DEFAULT '*',
p_In_EMPLOYEE_ID varchar2 DEFAULT '*',
p_Out_CostTransfer_Cusor OUT COST_TRANSFER_PACKAGE.COST_TRANSFER_TYPE
AS
BEGIN
OPEN p_Out_CostTransfer_Cusor FOR
SELECT
header.cost_tran_id,
header.cost_tran_date,
header.total_credit_amount,
header.total_debit_amount,
header.transfer_status,
header.updated_by,
header.added_by,
header.trf_over_ninety_days,
header.business_unit_id,
header.equip_approval,
header.batch_desc,
details.opr_unit_id,
status.status_id,
details.fund_code_id,
details.prgm_code_id,
details.class_id,
details.activity_id,
details.product_id,
details.status_id,
details.transaction_amount,
details.jrnl_date,
details.adjust_prcnt,
details.adjust_amnt,
details.details_equip_approval,
details.detail_desc,
details.account_id,
details.project_id,
details.dept_id,
details.contract_id,
details.reason_code_id,
details.jrnl_id,
employee.f_name,
employee.l_name,
employee.employee_id,
project.project_id,
project.project_status,
--header.transfer_status,
contracts.contract_desc
FROM header, details, status, employee, department, project, contracts
WHERE (header.cost_tran_id = details.cost_tran_id)
AND (header.cost_tran_date = details.cost_tran_date)
AND (header.transfer_status = status.status_id)
AND (department.dept_id = details.dept_id)
AND (department.dept_id = employee.dept_id)
AND (project.project_id = details.project_id)
AND (contracts.contract_id = details.contract_id)
AND (details.Contract_ID = p_In_Contract_ID OR p_In_Contract_ID ='*' )
AND (header.TRANSFER_STATUS = p_In_Status_ID OR p_In_Status_ID ='*' )
AND (TO_CHAR(details.COST_TRAN_DATE, 'MM/DD/YYYY') = p_In_COST_TRAN_DATE OR p_In_COST_TRAN_DATE ='*' )
AND (details.DEPT_ID = p_In_DEPT_ID OR p_In_DEPT_ID ='*' )
AND (details.PROJECT_ID = p_In_PROJECT_ID OR p_In_PROJECT_ID ='*' )
AND (header.ADDED_BY = p_In_EMPLOYEE_ID OR '*'=p_In_EMPLOYEE_ID )
Can any another way to make procedure
Thanx
Regards ,
AmolHi Amol,
Are you able to execute your stored procedure from oracle?.
- If "Yes" then use the Crystal Report XIR2 Designer to create the report.
- Import this report in the Crystal Report For Eclipse Workbench.
- The latest version for Crystal Report For Eclipse is SP1.
Please let me know the results.
Thanks,
Neeraj -
can the same webUtil be used for the report?
What i'm trying to do is that I have a link within the report as a hyperlink, when
user clicks on that, it opens a file(stored on the client's terminal) from client's machine.
ThanksU can use Text_io package in Reports 9i which reads & writes on Application server .I have never used webutil in reports but guess it can be used in Reports as well.
-
To use Entity Bean or Oracle stored Package?
Currently, in my project, Weblogic8.1 and Oracle is used, but lots of business logic is implemented using Oracle stored Packages, many of these packages have a package level readonly lookup table(like index-by table or nested table), which is populated with data from database, once the package is called, and is accessed very often in subsequent calls of stored procedures.
Since, in Weblogic server, a connection pool is maintained, and those package level lookup tables would be stored as session data in oracle PGA, I'm afraid this might cause oracle database server to be overloaded.
to fully take advantage of middleware cache service that weblogic provide, should I move those business logic out of oracle and implement them using like read only entity bean?
any help appreciated!Its very hard to say without knowing the usage patterns of the data. It sounds like you have a lot of read-only entities. These could be spread around a WLS cluster, therefore there is more scalability and performance with this option. However, I would not neccessarily rewrite business logic from SP into EJB just for middle-tier caching.
If its a DB intensive app with lots of SQL, then if the calls are within SP's, there is only 1 call from WLS and the DBA ought o be able to tune the DB usin read-ahead and other DBA semantics. If there is locality of reference in the data, again, DB can use read-ahead better than WLS, although RO cache in middle is more scalable than DBMS.
I wouldnt rewrite business logic from SP to EJB/Entity beans to take advantage of cache, especially if there is no locality of read-only reference to data. Oracle could do this better in my opinion, especially if SP's already exist
Need for information on the usage patterns of the data - how is it CRUD'd.
I would use-case the steel threads and put them under test load to see if the SP's really are an issue, since this is an architecture decision. What state is the project at? Live/Dev? Inception? -
Why Dynamic Parameter is not working, when i create report using stored procedure ?
Post Author: Shashi Kant
CA Forum: General
Hi all
Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
is not shown to me when i referesh the report for viewing the results.
I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
============================================================================================
1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
Dynamic Parameters in Action
My question is that whether dynamic parameter is working with storedprocedure or not.
When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
Please reply soon , it's urgent
Regards
shashi kantHi Kishore,
I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
=lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
As to the second issue, please try to use the following expression:
=Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl file with all the size properties to us by the following E-mail address? It is benefit for us to do further analysis.
E-mail: [email protected]
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to build a report in webi XIr2 using stored procedure
Post Author: vijay123
CA Forum: WebIntelligence Reporting
hi,
Is anybody can help me out how to creat a report using stored procedure in webiXir2
thanks
vijayPost Author: amr_foci
CA Forum: WebIntelligence Reporting
this has been posted twice.. i think -
Unable to run SSIS Package using Stored Procedure
Hi Guys,
I have create one simple SSIS Package(Move the first table record to second table).It will execute fine in locally.
But, If i'm going call/execute .dtsx file using stored procedure. I'm getting Error. so please let me know the valuable solution.
My Package Path : D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx
Stored Procedure
================
CREATE PROCEDURE SPEXECUTESSISPACKAGE
@FILEPATH VARCHAR(8000)
,@STATUS VARCHAR(500) = NULL OUTPUT
AS
BEGIN
DECLARE @SQLQUERY VARCHAR(8000)
DECLARE @STATUSCODE INT
SET @SQLQUERY = 'DTEXEC /FILE "'+ @FILEPATH +'"'
SELECT @SQLQUERY AS 'SSIS FULL PATH'
EXEC @STATUSCODE = master..xp_cmdshell @SQLQUERY
SELECT @STATUSCODE AS 'STATUSCODE'
IF @STATUSCODE <> 0
BEGIN
SET @STATUS = 'PACAKGE EXECUTE FAILED'
PRINT @STATUS
END
ELSE
BEGIN
SET @STATUS = 'PACAKGE EXECUTE SUCCESS'
PRINT @STATUS
END
END
GO
RUN
============================================================================
EXEC SPEXECUTESSISPACKAGE 'D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx', NULL
Error
=============================================================================
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.4035.00 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
NULL
Started: 5:06:26 AM
Error: 2014-11-14 05:06:26.07
Code: 0xC0011007
Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.
End Error
Error: 2014-11-14 05:06:26.07
Code: 0xC0011002
Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
Description: Failed to open package file "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot
be opened or loaded correctly
into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
End Error
Could not load package "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" because of error 0xC0011002.
Description: Failed to open package file "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened
or loaded correctly int
o the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
Started: 5:06:26 AM
Finished: 5:06:26 AM
Elapsed: 0.047 seconds
NULL
I'm getting Execte SSIS Package Status : 4
===================================
4Two things to check
1. The account executing the package has access to the path. If package is stored in different server you need to pass the UNC path (ie like \\machinename\...)
2. Make sure the version of SSIS service is the same in both the servers ie where package is created/stored and where its getting executed. A lower version SSIS service will not be able to load and execute higher version package and it will throw you similar
error messages as you posted above.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How to call a stored procedure using its package name in Oracle
hi
we're doing a JDBC scenario where we call a stored procedure(a.prc) using its package name(b)The stored procedure has In /Out/IN-OUT parameter.
i have got 2 queries:
1- How to call the stored procedure using it's package.
2- How to capture the In/Out parameter in the response.hi Prateek
thanks for the reply.
However when i tried mapping it to Package.procedure, communication channel throws the error saying that Package.proceudre needs to be declared.
As i said , the procedure has IN-OUT parameter too.In oracle we need to write a block if we want to read the IN-OUT parameter.
How to get the IN-OUT parameter in XI? -
Using Stored Procedure Universe in Reports
Hi Friends,
I got some issues using SP's in Universe and WebI Report.
Case #1:
Can we execute dynamic SQL using stored procedure universe..?
I use SQL server as the DB for my reports.I created a SP which will execute on getting a input value from the user.This input value will frame the SQL dynamically in the SP.for executing the dynamic SQL i use sp_executesql inside the SP.The SP wexecutes successfuly in the DB but when i try executing it in the Universe i get a error message as follows: "Exception : DBD,[Microsoft][SQL SErver Native Client 10.0][SQL Server]Incorrect syntax nesr 'FROM'.State:42000"
The script i used for creating SP for your reference:
CREATE PROCEDURE P_S_GetCodeValueList
@s_table nvarchar(75)
as
begin
declare @s_sqlCommand nvarchar(1000)
declare @s_tablename nvarchar(75)
declare @s_code nvarchar(75)
set @s_tablename=@s_table
set @s_code = '*'
set @s_sqlCommand= 'SELECT ' + @s_code + ' FROM ' + @s_tablename
exec sp_executesql @s_sqlCommand
end
Case #2:
AIl also tried creating reports using the SP Universe which needs to get the parameter when the user refesh the report.
But every time the report is refreshed the report fetches the data which was produced when the SP is executed in the Universe for the first time.
I need to get the prompt in the report , to which the user could give a value and the SP gets executed for that value.
Is there any option in BO to do this?
It will be very helpful if you could give me some work arounds on this.
Regards,
SugumarHi Sugumar,
I can answer you for your 2nd question:
When you create the Stored procedure in the Universe and test it on retreiving data by inserting variable input you can check if the user could insert new value for the SP parameters.
Hope this helps!
Regards
Giuseppe -
Hello, I need to run ssis package by stored proc(pass parameters inside and get result using stored procedures [SSISDB].[catalog].[create_execution]) etc. Do not suggest me to use SQL Agent here as this is not the case. or by pass this using configuration
for SSIS, I need to know what permission I'm missing if those stored proc run by AD account, with rights described from BOL and I'm having "The current security
context cannot be reverted. Please switch to the original database where 'Execute As' was called and try it again." If I schedule stored proc to run by Agent and specify parameters - will work, from remote PC - does not. I have sysdamin
rights on the server where SSIS and stored proc which is call it exists. I was digging around and have ugly solution to make it working, I want to use elegant solution using those stored proc from [SSISDB].[catalog] ...
Any help especially from Microsoft guys here...?
Vladimir>>>>If I schedule stored proc to run by Agent and specify parameters - will work,
from remote PC - does not.
Vova
If you schedule the job it will be running under SQL Server Agent account security.... What error
do you get when you run the SP from remote PC?
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence
Maybe you are looking for
-
How to attached a file to email?
I want to send an email with an attachment but do not see icon for attachment.
-
Please a little help thank you
-
Dear Workflow Expert, I notice in the tcode "SWIA" i can see there is an agent column. For some task it is showing the workflow admin while some task it is showing the user ID that store in infotypr 105 and some even show no agent available. I notice
-
Buy macbook pro from japan to singapore - tax?
Macbook pro 13inch with retina display is sold for 144600 yen in japan (less than S$2000). it is sold at S$2388 in singapore. thats a $388 savings. I am intending to buy it in Japan to use it during my trip there and bring the macbook pro back home.
-
Nokia C3-00 - Cant set up my Yahoo email account? ...
Hi I recently bought the Nokia C3-00 on Vodafone but asked them to unlock it so that I could use my exisitng O2 contract. I want to set up my Yahoo email account, but Im having great difficulty! When I initially put my O2 sim card in, they sent me t