Sunday, March 25, 2012
calling reports from forms
declare
report_id Report_Object;
report_job_id VARCHAR2(100);
BEGIN
report_id:= find_report_object('REPORT5');
report_JOB_ID:=run_report_object(report_id);
END;
Comm Mode : async
desctype : screen
Ex mode: runtime
file name : F:\Docs\Forms\vivek.rdf
report5 is the name of report object in the navigator.
What could be the problem??Hi,
Does Your report works fine? Is it fetching the required records ?|||Yep perfectly !
Originally posted by satish_ct
Hi,
Does Your report works fine? Is it fetching the required records ?|||Try using RUN_REPORT(<<filename>>)|||Originally posted by shelva
Try using RUN_REPORT(<<filename>>)
RUN_REPORT runs only from report as SRW.RUN_REPORT and not from form.|||Hey sorry u r right
its ALL_REPORT(<<FIILE NAME>>) from forms
Or in ur method, just give full path of the reports file name|||Originally posted by shelva
Hey sorry u r right
its ALL_REPORT(<<FIILE NAME>>) from forms
Or in ur method, just give full path of the reports file name
Never heard of it and neither it works.|||Oye again typing mistake
its CALL_REPORT.. sorry again
Thursday, March 22, 2012
Calling Java Application from PL/SQL code
I am not an expert in PL/SQL neither Java, so I require a help here:
What I am planning to do is to use PL/SQL to call a Java application (pass 3 arguments).
The Java application is used to make call to an API that resides on a Bea Weblogic application/web server (its not used to access database).
I got already the PL/SQL Trigger, but I need to add to it the call to the Java application (the Java application already exists)
Simply, would any one provide an example of how to make that call.
Do I need to load Java classes into the Oracle database or not?
I am using Oracle 9i database, and the Java application is compiled using Java SDK 1.4.2
Many thanksHi,
To call java class from a pl/sql, you need to follow the steps.
1. First create a java file and compile it.
2. Load the java class file to the database using 'loadjava' utility.
Ex: loadjava -u scott/tiger abc.class
3. Create a pl/sql wrapper aroung the java class like
CREATE OR REPLACE PROCEDURE test (a1 VARCHAR2) AS LANGUAGE JAVA name 'abc.main(java.lang.String[])';
4. Then execute the stored procedure
exec test(<input>);|||HI,
Invoking the java stored procedures from any PL/SQL block or stored module works the same way it would for any other PL/SQL stored function.
For example:
SQLPLUS> set serveroutput on size 5000;
SQLPLUS> declare
2> temp varchar2(100);
3> begin
4> temp := ConcatTwo('Hello','World');
5> DBMS_OUTPUT.PUT_LINE(temp);
6> end;
7> /|||Thanks... suneel.kumar and satish_ct
you realy give me some ideas...|||These examples provide the capability to load specific "classes" to the
database and most will work however Oracle will have problems with
classes that import from GUI packages such as AWT or Swing.|||HI,
Did U come across any such error?|||My class is only initiate a request or call to another system API (my class doesn't import from any GUI Packages).
Many thanks to you all|||when I've tried to load the java class, but I got the following error:
ORA-04031: unable to allocate 4032 bytes of shared memory ("shared pool","unknown object","joxs heap init","ioc_allocate_pal")
would some one told me what I should do.
I think that the shared pool is out of memory so should I consult the DBA, system Admin or is it from my PC, where I am making a conection to the server/Database.
Tuesday, March 20, 2012
Calling an SSIS package from a Service Broker Queue
I would like to call an SSIS package from a Service Broker Queue.
There is one way that I am aware of -
Using xp_cmdshell from within an activation stored procedure and using DTEXEC.
Is there a more elegant way of executing an SSIS package from within SSB?
Also, I am not interested in writing a .NET external activator to process my messages in the queue. I would like this operation to be strictly database oriented. Having said this, I am also trying to avoid triggers processing the messages in the queue.
Thank you!You can schedule an SSIS package in SQL Server Agent, and then you can kick off that job via a system stored procedure.|||Not the solution I was looking for. I am aware of using sp_start_job system sp to do the job. There's gotto be a more elegant way to kick off an SSIS package from within a Service Broker Activation process.
|||
yosonu wrote:
...There's gotto be a more elegant way...
It's better than xm_cmdshell... And why must there be a more elegant way?
What do you envision as the "best" way to do this if in a perfect world?|||It hardly makes any sense for me to store SSIS packages as disabled jobs on the SQL Server Agent level.
But I do agree that this solution is still better than using xp_cmdshell for security reasons.
Thanks
sql