PL/SQL :: Using Temp Table In Real Time

Nov 16, 2012

What is the need of Temp table in Oracle ? what is the advantage of Temp table over normal table ? Is temp table a log operation one. What is the scenario of using temp table in real time ?

View 4 Replies


ADVERTISEMENT

Real Time Data Migration

Sep 13, 2013

we have a requirement for migrating data real time from source db to target db as well as to a queue.

achieve this using any custom technique?

we tried exploring Streams with CDC but Streams being depricated and CDC removed in Oracle 12 c, we are kind of stuck.

View 1 Replies View Related

SQL & PL/SQL :: Where To Implement ANSI JOIN In Real Time

Dec 9, 2010

I want to know about ANSI JOIN in Oracle 9i and how to use this ANSI JOINS and where we have to implement this ANSI JOIN in real time.

View 2 Replies View Related

SQL & PL/SQL :: Use Of Regular Expression In Real Time Scenario

Jul 24, 2012

Regular Expression in oracle??Especially the use of this in real time scenario.

View 4 Replies View Related

Real Time Apply For Logical Standby

Nov 15, 2012

Oracle 11.2.0.3.0

I have a primary database orcl and logical standby database orcl_std.

Real time apply is enabled. I have standby redologs in both primary and standby sides and I`ve started recovery with below command:

ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

When I create a new table in primary database, I am unable to see it on standby database (Although real time apply is enabled) However, when I switch log in primary, I can see the new table in standby database.

My question is, why realtime apply is not working in my scenerio ? I was expecting to see the new table immediately in standby database once it is created in primary database. Why am I supposed to wait for log switch in real time apply ?

View 5 Replies View Related

SQL & PL/SQL :: Real Time Scenario For When Object Type Used In Block?

May 16, 2013

When we use this kind of code in PL/SQL block.

CREATE OR REPLACE TYPE sample_object IS OBJECT
(id NUMBER
,name VARCHAR2(30));
/
CREATE OR REPLACE TYPE sample_table IS TABLE OF sample_object;

I have read some docs ,but I didn't get any information where exactly we use this.provide one real time scenario with an example.How this is different from record.

View 1 Replies View Related

Best Tool / Method - Move Data In Real Time?

Sep 22, 2010

We have oracle 9i database named A with 2 schema A1 and A2.User enters data at A1 schema and the incremental data moved to A2 schema after some verfications performed by some scheduled job on A1 schema.

we want to move this incremental data to B1 schema of another oracle 9i database B at the real time when data gets entered to A2 schema of A oracle 9i database. We have access to A2 schema of A database and B1 schema of B database.way to do it or best practice to do this activity or if there is any third party tool or any available oracle utility to perform it?

Note: A2 schema of A database and B1 schema of B database has one to one mapping.We want to avoid using trigger on A2 schema, how data gets populated from A1 to A2 schema .

View 2 Replies View Related

Application Express :: Change Read Only Condition From Always To None On Real Time

Sep 4, 2012

Can we change the condition of an item from always to none on the real time ? How ?

View 3 Replies View Related

Data Guard :: How To Disable REAL TIME QUERY In DG 11gr2

Dec 11, 2012

With 11gr2, by default, on STARTUP, the standby database is open
-> in READ ONLY mode
-> with Intended State: APPLY-ON

so the ACTIVE DATAGUARD option is in use ....

is there a way to deactivate REAL TIME QUERY permanently, so whether on STARTUP or STARTUP MOUNT, the standby stay only mounted with Intended State: APPLY-ON

The only way i found is to do the following :

SQL> startup
DGMGRL> edit database 'PHNXENT' set state='APPLY-OFF';
then
SQL> startup mount
DGMGRL> edit database 'PHNXENT' set state='APPLY-ON';

View 10 Replies View Related

Performance Tuning :: Real Time Speed Improvements And Auto-trace Results

Feb 4, 2011

I've got a query running a select count (*) over a table. The default plan takes in the order of 15 minutes to return, a hinted plan to use a different index takes 3 minutes to return.

Unfortunately I cant get at the index stats and a few other areas which I suspect may be key here.When running autotrace against the two queries I see fairly different values as one would expect.

Query

select count (*) from fulfilmentitem bfi where created >= sysdate-30 AND bfi.status = 'FA' AND bfi.fulfilmentmethod = 'D'
Slow run
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 15 | 33119 (1)|
| 1 | SORT AGGREGATE | | 1 | 15 | |
|* 2 | TABLE ACCESS BY INDEX ROWID| FULFILMENTITEM | 12525 | 183K| 33119 (1)|
|* 3 | INDEX RANGE SCAN | IDX_FULFIL_METHODSTATUS | 250K| | 1786 (1)|
----------------------------------------------------------------------------------------------
[code]....

IDX_FULFIL_METHODSTATUS is across FULFILMENTMETHOD & STATUS in that order.
IDX_BFI_CREATED is on CREATED and is approx 70% of the size of the other index

The row counts estimated in the explain plan are out, the count(*) comes in at 32.8k rows.As you will have seen, the fast run shows a pretty significant consistent get increase compared to the slow run and a decent though not dramatic physical read drop.

My uncertainty is around if these changes in consistent get/phys read values would typically be enough to suggest the real time improvements I'm observing or if other (albeit perhaps temporary) factors are involved. It is a prod OLTP environment so the data will be rapidly changing and that may be a factor.

I know it can never be an exact science without intimately knowing the hardware/current loads etc but I also know that there's enough experience on these boards to have a loose handle on if the time shifts between queries are likely (or not) to be reflective of the stat changes or if those differences alone shouldn't (or typically wouldn't account) for it.

I'm thinking about instructing the query to ignore its original plan but am hesitant to do so without being a little more confident that it's not just a timing thing or something other than the change of index approach which may be causing the improvement. the autotrace stat changes observed I couldn't put my hand on heart say "yup - that change is good, ignore the default index all the time for this job".

View 11 Replies View Related

Performance Tuning :: ORA-01652 - Unable To Extend Temp Segment By 128 In Tablespace TEMP

Jul 25, 2012

One of our customer have problem with following sql statement:

SELECT c.table_name, c.column_name
FROM user_tab_columns c, user_tables t
WHERE c.table_name = t.table_name
AND c.data_type IN ('CLOB', 'BLOB');

During execution it takes all the TEMP tablespace size(8GB).

I gather system stats (dbms_stats.gather_dictionary_stats(estimate_percent=>null)) but it doesn't resolve problem.Above sql statement works fine with RULE hint but I want to know what is the reason of problem with temporary tablespace.

View 10 Replies View Related

Reports & Discoverer :: ORA-01652 / Unable To Extend Temp Segment By 128 In Tablespace TEMP

Mar 7, 2011

I am trying to run on Oracle report via Oracle Application Concurrent job. Concurrent job is completing normal but I don't get anything on print out page. In log file of this request I see message 'MSG-01003: Errors =>ORA-01652: unable to extend temp segment by 128 in tablespace TEMP'. I almost doubled the TEMP tablespace in size but still I am not able to get rid of this error message.

View 1 Replies View Related

SQL & PL/SQL :: ORA-01652 / Unable To Extend Temp Segment By 128 In Tablespace TEMP

Apr 19, 2010

The below query throws an error as mention below

My PGA_AGREGATOR_TARGET = 2GB

below query is given below.

RowsPlan

1SELECT STATEMENT
1 HASH JOIN
1 MERGE JOIN CARTESIAN
1 TABLE ACCESS BY INDEX ROWID WAT_SOURCE_DATA
BITMAP CONVERSION TO ROWIDS
BITMAP INDEX SINGLE VALUE INDX_WAT_SRC_DATA_BIT

[code]....

Error Message : ORA-01652:unable to extend temp segment by 128 in tablespace TEMP

Query :

SELECT OR004.wat_id "WAT_ID",
SYSDATE "DATE_FIRST_IDENTIFIED",
SYSDATE "DATE_LAST_IDENTIFIED",
'OR-004' "RULE_REFNO",
'RISK' "RULE_TYPE",
OR004.workspace_id "WORKSPACE_ID",
OR004.workspace_name "WORKSPACE_NAME",

[code]....

View 6 Replies View Related

Unable To Extend Temp Segment By 128 In Tablespace TEMP

Apr 6, 2009

this huge report that uses inline views. I keep getting the following error message when running the script through toad. I was thinking about using the USE_HASH hints. The sql optimizer we use is very buggy in Toad. I'm using oracle database version 10.2.0.3.

I can upload explain plan if needed.

SELECT 'Project Number^Project Start Date^Project End Date^Status^Project Manager^Task Number^'||
'Task Start Date^Task Completion Date^Task Manager^Award Number^Award Short Name^Project Organization^'||
'Task Organization^Expense Code^OMB Code^Revenue Line^Burden Rate^Burden Structure^Site^Sponsor^Type^Customer^'||
'Award Type^Award Purpose^Federal Flow Thru Code^IDC Schedule Name^Total Expenditure^Direct Charges^'||
'Indirect Charges^Cost Share Charges^Total Commitments^Direct Commitments^Indirect Commitments^Cost Share Commitments^'||

[Code]...

View 5 Replies View Related

TEMP - Unable To Extend Temp Segment By 128 In Tablespace

Jul 16, 2013

I have a TEMP tablespace with autoextend on next 10M and maxsize 5120M, now my tablespace is 99.98% full. Am getting ORA-1652: unable to extend temp segment by 128 in tablespace temp error, can i use the method to increase the maxsize value to 10240M.

View 2 Replies View Related

Backup & Recovery :: Possible To Maintain Real Time Backup Using RMAN?

Mar 16, 2011

Is it Possible to Maintain real Time Backup using RMAN ?

View 39 Replies View Related

Create Temp Table From Existing Table

Sep 2, 2010

I want to create temp table, for this i am using:

CODEcreate global temporary table help_temp
as
select * from help;

but this is creating only the table structure, not copying the table data.

View 5 Replies View Related

SQL & PL/SQL :: Option For Temp Table?

Feb 18, 2010

What is the Best option for SQL/sybase server Temp table to use/for data manipulation (Insert/update/delete) inside the procedure in oracle Other then global temporary table.

Since we are porting from SQL/Sybase to Oracle we don't want to Create too many global temporary table.

View 3 Replies View Related

SQL & PL/SQL :: Global Temp Table

Sep 2, 2010

what are minimum privilege required to create GTT (Global Temp Table)?

View 7 Replies View Related

Temp Table Within A Stored Procedure

Jul 15, 2013

I'm trying to create a stored procedure that has two temporary tables within it, and then queries both them tables and inserts the results into a table. I created the script but when they try to run in on the server it wont run.

CREATE OR REPLACE PROCEDURE UpdateFIDB_SP
IS
BEGIN
CREATE GLOBAL TEMPORARY TABLE myAAAA
AS
(SELECT AAAA.1111, AAAA.2222, BBBB.3333_EXT, CCCC.4444, DDDD.5555, DDDD.6666, DDDD.7777,
DDDD.8888, AAAA.9999, EEEE.1010, EEEE.1A1A, EEEE.1B1B, FFFF.3333_LO, FFFF.1C1C,
[code]........

View 1 Replies View Related

SQL & PL/SQL :: Create Temp Table From A File

Aug 22, 2011

I'm having some trouble dealing with the PL/SQL coding. At the moment, I have a file (set of data) that is read using java. An array is created (line by line) and is passed into a temp. table, which is then called by the plsql (call PKG_xxx.PRC_xxx...) script/command for processing. Is there any way I could directly get the file loaded into plsql (into a temp. table maybe?)

The data are just numbers and letters. I already got the PL/SQL part to select the set I want for different cases. All I need is to get the file (directly or indirectly) for the procedure without going through java.

View 11 Replies View Related

SQL & PL/SQL :: Creation Of Temp Table Within Procedure

Aug 17, 2010

I need to create a temp table within a stored procedure. I want to apply some logic on the table, and then delete it when it is completed in runtime -- all inside the stored procedure.

View 13 Replies View Related

SQL & PL/SQL :: Change The Temp Table Status?

Jun 21, 2011

In one of the databases, we have created more temp tables as on commit preserve rows. but i want to change the on commit preserve rows to on commit delete rows as per application requirements.I have searched the google but i didnt find any alter scripts for it.?

View 1 Replies View Related

SQL & PL/SQL :: Temp Table Within Stored Procedure

Jul 15, 2013

I have been developing in MS SQL for about 15. So I'm still getting use to the syntax and features within Oracle.I'm trying to create a stored procedure that has two temporary tables within it, and then queries both them tables and inserts the results into a table.I created the script but when they try to run in on the server it wont run.

CREATE OR REPLACE PROCEDURE UpdateFIDB_SP
IS
BEGIN
CREATE GLOBAL TEMPORARY TABLE myAAAA
AS
(SELECT AAAA.1111, AAAA.2222, BBBB.3333_EXT, CCCC.4444, DDDD.5555, DDDD.6666, DDDD.7777,
DDDD.8888, AAAA.9999, EEEE.1010, EEEE.1A1A, EEEE.1B1B, FFFF.3333_LO, FFFF.1C1C,
AAAA.1D1D
[code].....

View 7 Replies View Related

SQL & PL/SQL :: Can Use Temp Table In Function Which Uses Ref Cursor

Dec 6, 2012

example to use temp table in function with only ref cursor.

I need to use for the reporting purpose.

View 1 Replies View Related

SQL & PL/SQL :: Replace Temp Table With Collection?

Nov 4, 2011

how I can replace gtt in the following procedure with an Oracle Collection?

gtt or Collection is more efficient?
PROCEDURE report_gen (
i_table IN NUMBER
)
IS
BEGIN
create global temporary table test_gtt (tid NUMBER(15));

[code].....

View 6 Replies View Related

SQL & PL/SQL :: Make A Trigger On Temp Table?

Dec 27, 2011

i am trying to make a trigger on temp table(emp_rec_temp), whose data will be insert into master(emp_rec) table. But not yet get the success.

create or replace trigger trig_emp_find after insert
on emp_rec_temp for each row
declare
V_STR VARCHAR2(25);
j number;

[code]....

View 5 Replies View Related

PL/SQL :: Temp Tablespace Space Due To GTT Table

Sep 3, 2012

We are using a GTT table to store the summarize data and display it on same screen(10g 10.2.0.5). Now we are facing temporary tablespace space issue very frequently as our client do not enable the auto extend on for temp table space. We have analyzed the AWR and came to know that there are 900000 inserts per hour on an average. Client DBA Claims that there are sessions(1or 2) which inserts the data in temporary table continuously for 2-3 days.

According to him one session is running from 28th Aug and problem comes on 2nd Sep and after killing the problematic session the application will work fine. Generally this problems come on weekend. I have discussed with our dev team and as per them there is no session leakage issue.

following is the insert statement:
INSERT INTO DT_CA_STNDALN_DETAILS_TMP (ORG_ID,BA_PRODTYPE_ID,MAX
TENOR,GROSSLIMIT,GROSS_UTILISATION,HAS_MDR,HAS_CLUSTER,SIGN_IN
D,GROSS_AVAILABILITY,COLLATERAL,NET_UTILISATION,DT_CA_STNDALN_DE
TAILS_TMP_VER,DM_LSTUPDDT,NET_AVAILABILITY) VALUES (:1,:2,:3,:4,
:5,:6,:7,:8,:9,:10,:11,:12,sysdate,:13) ;

View 9 Replies View Related

PL/SQL :: Temp Table Within Stored Procedure

Jul 15, 2013

I'm still getting use to the syntax and features within Oracle. I'm trying to create a stored procedure that has two temporary tables within it, and then queries both them tables and inserts the results into a table.I created the script but when they try to run in on the server it wont run.

CREATE OR REPLACE PROCEDURE UpdateFIDB_SP IS BEGIN  CREATE GLOBAL TEMPORARY TABLE myAAAA    AS  (SELECT  AAAA.1111, AAAA.2222, BBBB.3333_EXT, CCCC.4444, DDDD.5555, DDDD.6666, DDDD.7777,                       DDDD.8888, AAAA.9999, EEEE.1010, EEEE.1A1A, EEEE.1B1B, FFFF.3333_LO, FFFF.1C1C,                       AAAA.1D1D               FROM mySchema.FFFF_07 FFFF               RIGHT OUTER JOIN mySchema.EEEE EEEE ON FFFF.9999 = EEEE.1B1B               RIGHT OUTER JOIN
[code].........

View 10 Replies View Related

Cursor Versus Global Temp Table

Jan 16, 2013

We had an issue with a PL/SQL package taking hours to run as a concurrent program. Database version is 10.2.0.4.0, running on Linux x86 64-bit. A tkprof'd trace file revealed the problem SQL statement to be a cursor. This one SQL statement would run for 3+ hours. I copied the SQL statement and ran it in TOAD and it completed in seconds, returning the exact same result set. To resolve the issue in the PL/SQL package I created a global temp table and ran the exact same SQL statement as an INSERT into the global temp table.

Again, instead of hours, the SQL statement completes in seconds. If I revert the change, it goes back to taking hours. I've attached the relevant sections of the tkprof showing the two SQL statements (identical other than the insert in front of one) and the resulting explain plans and performance data. I've always been under the impression that a cursor was a better option than a temp table and I've never run into a situation where the same SQL statement runs so much longer when executed as a cursor.

Attached File(s)

SQL_As_Cursor.jpg ( 274.02K )
Number of downloads: 7

Explain_for_SQL_As_Cursor.jpg ( 189.43K )
Number of downloads: 4

SQL_as_Insert.jpg ( 277.38K )
Number of downloads: 4

Explain_for_SQL_As_Insert.jpg ( 180.66K )
Number of downloads: 2

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved