Good day Everyone,
I am fairly new to pl/sql stored procedure. I have a script that calls a stored procedure that will execute many stored procedures sequentially. Now my problem is one of my stored procedures writes to a different table instead to the table that it should write to. But when i run the stored procedure on its own it write to the correct table. Any ideas on why is this happening?
Related
I have a oracle view it returns 5 million records from different tables and i use this view to insert into different tables using a single procedure, inside this procedure i use this several times and this is affecting the performance, is there any way we can query the view once and later i can use it multiple places?
A view is a stored query; itself, it doesn't contain any data. If its code is complex and fetches data from several tables, using different conditions, aggregations, whatnot, it can take some time to access data.
In your situation, maybe a global (or private; depending on Oracle version you use) temporary table (GTT) would help.
you create it once
at the beginning of the procedure, insert data from the view into it
the rest of the procedure would work with those prepared data
once the session (or transaction; depending on how you set the GTT up) is over, data from the table is lost
the table can be reused next time you run the procedure
I want to create a mapping to update multiple records, more than 1000 records in DB2 using/calling a stored procedure. We will send the parameters to call the stored procedure. How to implement that?
Target is DB2 table
We should use DB2 stored procedure to update or insert records
How to create the mapping-target to execute stored procedure multiple times?
You can not use Informatica to run anything in loop. However you can put DC code into a stored procedure, setup and schedule a workflow to run at desired frequency.
Using a a stored procedure I want to generate insert scripts for all the tables available in database and the table name and the columns must be passed as a parameter, how to do this?
I have created a stored procedure without having synonym , because i don't know the importance of synonym. In my project we use two databases for development and another just to create synonyms.I had created stored proc with three input parameters and two output parameters in development database and also I executed my stored proc, it compiled successfully and got output. My question is can I create in this fashion? what happens if there isn't synonym created for a stored procedure. If it is a must then how did I get the output?. can we create synonym for a stored procedure which has input and output parameters. can any one help me out from this. Thanks in advance. :)
Generally speaking, you do not need to create synonyms for stored procedures.
However there might be cases when synonym is needed.
A synonym is an alternative name for objects such as tables, views,
sequences, stored procedures, and other database objects.
You generally use synonyms when you are granting access to an object
from another schema and you don't want the users to have to worry
about knowing which schema owns the object.
So just read on oracle synonyms and decide whether you need to use them or not.
(synonyms, create synonym)
Is there a way to call a stored procedure transformation which has no input and output parameters defined in the stored procedure? Please advise.
I think the easiest way is to create a dummy mapping (first create a dummy table in the source which has columns for different data types) and then call the stored procedure in the pre-sql or post-sql for the session.