Global Temp Table, always return zero records
I call the procedure which uses glbal temp Table, after executing the Proc which populates the Global temp table, i then run select query retrieve the result, but it alway return zero record. I am using transaction in order to avoid deletion of records in global temp table.
whereas if i do the same thing in SQL navigator, it works
Cn.ConnectionString = Constr
Cn.Open()
If FGC Is Nothing Then
Multiple = True
'Search by desc
'packaging.pkg_msds.processavfg(null, ActiveInActive, BrandCode, Desc, Itemtype)
SQL = "BEGIN packaging.pkg_msds.processavfg(null,'" & _
ActiveInActive & "','" & _
BrandCode & "','" & _
Desc & "','" & _
Itemtype & "'); end;"
'Here it will return multiple FGC
'need to combine them
Else
'search by FGC
SQL = "BEGIN packaging.pkg_msds.processavfg('" & FGC & "','" & _
ActiveInActive & "','" & _
BrandCode & "',null,null); end;"
'will alway return one FGC
End If
' SQL = " DECLARE BEGIN rguo.pkg_msds.processAvedaFG('" & FGC & "'); end;"
Stepp = 1
Cmd.Connection = Cn
Cmd.CommandType = Data.CommandType.Text
Cmd.CommandText = SQL
Dim Trans As System.Data.OracleClient.OracleTransaction
Trans = Cn.BeginTransaction()
Cmd.Transaction = Trans
Dim Cnt As Integer
Cnt = Cmd.ExecuteNonQuery
'SQL = "SELECT rguo.pkg_msds.getPDSFGMass FROM dual"
SQL = "select * from packaging.aveda_mass_XML"
Cmd.CommandType = Data.CommandType.Text
Cmd.CommandText = SQL
Adp.SelectCommand = Cmd
Stepp = 2
Adp.Fill(Ds)
If Ds.Tables(0).Rows.Count = 0 Then
blError = True
BlComposeXml = True
Throw New Exception("No Record found for FGC(Finished Good Code=)" & FGC)
End If
'First Row, First Column contains Data as XML
Stepp = 0
Trans.Commit()
Hi,
This forum is for Oracle's Data Provider and you're using Microsoft's, but I was curious so I went ahead and tried it. It works fine for me. Here's the complete code I used, could you point out what are you doing differently?
Cheers,
Greg
create global temporary table abc_tab(col1 varchar2(10));
create or replace procedure ins_abc_tab(v1 varchar2) as
begin
insert into abc_tab values(v1);
end;
using System;
using System.Data;
using System.Data.OracleClient;
class Program
static void Main(string[] args)
OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger");
con.Open();
OracleTransaction txn = con.BeginTransaction();
OracleCommand cmd = new OracleCommand("begin ins_abc_tab('foo');end;", con);
cmd.Transaction = txn;
cmd.ExecuteNonQuery();
cmd.CommandText = "select * from abc_tab";
OracleDataAdapter da = new OracleDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
Console.WriteLine("rows found: {0}", ds.Tables[0].Rows.Count);
// commit, cleanup, etc ommitted for clarity
}
Similar Messages
-
Global Temp Table or PL/SQL Table
I am trying to determine if this can be done only using PL/SQL table. If not, will the usage of the global temp table affects the performance.
Here is the situation,
I have a data block that is based on a stored procedure. This stored procedure will return table of records from different database tables with join conditions. Some of the fields within the table of records will not have data returned from database tables. They will be the fields displayed on the form and the data will be entered by user.
For example:
Records will look like:
Id (will be populated by procedure)
Hist_avg (will be populated by procedure)
My_avg (will be used as field on the form so that user can enter their own avg)
Cheked (will be populated by procedure)
My questions are:
1. Is this doable in form using a data block based on PL/SQL table?
2. Will users be able to manipulate (update) the data that based on the PL/SQL table in the memory as they wish and invoke the procedure to update the underlying table when clicking on a button (Update Avg)?
3. What is the advantage of using PL/SQL table and global temp table from database and form point of views?
Any info is appreciated.Hi there...
Here is the Reference...
http://asktom.oracle.com/pls/ask/f?p=4950:8:2939484874961025998::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:604830985638
Best Regards...
Muhammad Waseem Haroon -
Global Temp Table Not found - SSIS
I am facing below error while using global temp table in SSIS.
[OLE DB Destination [78]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E37 Description: "Table/view either does not exist or contains errors.".
[OLE DB Destination [78]] Error: Failed to open a fastload rowset for " ##AGENTDTLS". Check that the object exists in the database.
[SSIS.Pipeline] Error: component "OLE DB Destination" (78) failed the pre-execute phase and returned error code 0xC0202040.
1) For data connection manager - Retain same connection is set to True
2) Data Flow task - Delay Validation is set to True
3) Destination Task - Using Temp Table - ValidateExternalMetadata is set to false.
4) I am just using one data connection.
5) before using the temp file I am checking if its exits and if yes drp it first and create it.
Not able to understand the reason for failure.Why don't you use permanent table in tempdb?
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Global temp table problem w/ODP?
I'm using the current version of the ODP .NET data adapter to access a global temporary table on an Oracle
9.2.0.4.0 server created with -
CREATE GLOBAL TEMPORARY TABLE euik_dex_open_tasks_temp1
(resource_id NUMBER,
task_assignment_id NUMBER,
task_id NUMBER,
incident_id NUMBER,
customer_product_id NUMBER,
inventory_item_id NUMBER,
contract_service_id NUMBER)
ON COMMIT DELETE ROWS
(See below for what is returned from the data dictionary for this table)
If I use SQLPlus to insert a row into this table, then query the table immediately, I see the inserted row.
If I use the same exact SQL through the ODP adapter, the ExecuteNonQuery statement returns the fact the 1 row was inserted. However, doing a SELECT from the table immediately after the INSERT, no rows are returned. See the .NET test ap, below.
Also, note that if I use a global temp table made with ON COMMIT PRESERVE ROWS, the ODP adapter works fine.
What am I doing wrong? Thanks in advance...
Pat
Private Sub TestTempTable()
Dim Str1 As New System.Text.StringBuilder
Dim Strx As New System.Text.StringBuilder
Dim StrOut As New System.Text.StringBuilder
Dim nInsert As Integer
Dim nRow As Integer
'Insert into the global temp table
Str1.Append("INSERT INTO euik_dex_open_tasks_temp1(resource_id, " & vbCrLf)
Str1.Append(" task_Assignment_id, " & vbCrLf)
Str1.Append(" task_id, " & vbCrLf)
Str1.Append(" incident_id, " & vbCrLf)
Str1.Append(" customer_product_id, " & vbCrLf)
Str1.Append(" inventory_item_id, " & vbCrLf)
Str1.Append(" contract_service_id) " & vbCrLf)
Str1.Append(" VALUES(1,2,3,4,5,6,7)" & vbCrLf)
Dim cn As New Oracle.DataAccess.Client.OracleConnection
Dim dr As Oracle.DataAccess.Client.OracleDataReader
Dim cd As New Oracle.DataAccess.Client.OracleCommand
Try
cn.ConnectionString = "Data Source=XXX;User ID=mickey;Password=mouse;"
cd.CommandType = CommandType.Text
cd.Connection = cn
cn.Open()
'Run the query to load data in the temp table
cd.CommandText = Str1.ToString()
nInsert = cd.ExecuteNonQuery()
MessageBox.Show(nInsert & " row(s) inserted.")
'See if there are rows in the temp table
Strx.Append("Select * from euik_dex_open_tasks_temp1")
cd.CommandText = Strx.ToString()
dr = cd.ExecuteReader
nRow = 0
While dr.Read
StrOut.Append(dr(0) & vbCrLf)
nRow = nRow + 1
End While
MessageBox.Show(nRow & " row(s) selected.")
Catch ex As OracleClient.OracleException
MessageBox.Show(ex.Message)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
cn.Close()
End Try
End Sub
OWNER TABLE_NAME TABLESPACE_NAME CLUSTER_NAME IOT_NAME PCT_FREE PCT_USED
INI_TRANS MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE
FREELISTS FREELIST_GROUPS LOGGING BACKED_UP NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_SPACE
CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE INSTANCES
CACHE TABLE_LOCK SAMPLE_SIZE LAST_ANALYZED PARTITIONED IOT_TYPE TEMPORARY
SECONDARY NESTED BUFFER_POOL ROW_MOVEMENT GLOBAL_STATS USER_STATS DURATION
SKIP_CORRUPT MONITORING CLUSTER_OWNER DEPENDENCIES COMPRESSION
APPS EUIK_DEX_OPEN_TASKS_TEMP1 10 40 1 255
1 1 NO N
1 1 N ENABLED NO Y N NO
DEFAULT DISABLED NO NO SYS$TRANSACTION DISABLED NO DISABLED
DISABLEDAndrew,
As David indicated if you do not wish to have "auto commit mode" you just need to use a transaction object to manually control the transaction.
I'm just nervous at the idea of ODP.NET initiating interactions I am not aware of.I think it would be more fair to say "finishing interactions" in this case rather than "initiating interactions" but you could always just run a SQL trace from the database to see exactly what is happening if you are concerned.
HTH,
- Mark
=======================================
Mark A. Williams
Oracle DBA
Author, Professional .NET Oracle Programming
http://www.apress.com/book/bookDisplay.html?bID=378 -
How can I get rid of Global Temp Table
Hello,
I've been writing PL/SQL stored proc for creating reports on VB.NET front end. Until now, I've been using session specific global temp table to store intermediate results and at the end I pass the result set to .NET via reference cursor. The reports are created by simply binding the ref cursor result sets to .NET grids. It's been working fine, but I am kind of bothered by the temp tables. I looked on other options, but couldn't really come up with one.
Can somebody suggest me how I can get rid of those temp tables? Thanks,Tubby, that's exactly I was trying to do. I think that table type has to be defined in database, not within PL/SQL. How can I create that table of user defined record type? I tried that, but it doesn't allow me. I think I am missing something. For example,
create type group_t is record
(A varchar2,
B number,
C number)
now inside sp, i have something like:
type my_group is table of group_t index by binary_integer
now I have sp cursor as
cursor cur_test IS 'ABC' as A, 1 as B, 5 as C
now i do something like this. My original queries are longer and much more complicated so please don't suggest you can directly open ref cursor for this query.
FETCH cur_test BULK COLLECT INTO my_group;
Then I do all the processing, calculations, totals, sub-totals, and insert into temp table and return via ref cursor.
My problem is I can't directly fetch into the above table you mentioned. How should I go about in this situation?
Maybe I should STOP thinking about this approach and just do whatever I've been doing or solve it through pure SQL. However, there are tons of problems with pure SQL approach. -
Popularity Trends report always returns zero
Hello,
I have a SharePoint installed on “Windows server 2008 -R2”.
I have a SQL Data base installed on the same machine.
I create a new web application with port “2020”. Then I create w new site collection “Publishing”.
I activate the feature “Reporting” in the site collection level.
I Open central admin “Monitoring >> Configure usage and health data collection”. I checked “Enable usage data collection” Check box. And I Checked All “Events to Log” check boxes.
I have configures the following services applications :
-Business Connectivity Service
-Excel Services Application
-Search Service Application
-Security Token Service Application
-Application Discovery and Load Balancer Service Application
-WSS_UsageApplication.
I run the crawl search. And it is completed successfully.
The search service account is member of “WSS_WPG” group.
I have checked the following values from SharePoint PowerShell:
AppEventTypeId : 00000000-0000-0000-0000-000000000000
EventTypeId : 1
EventName : Views
LifeTimeManagedPropertyName : ViewsLifeTime
RecentManagedPropertyName : ViewsRecent
ApplicationName :
RecommendationWeight : 1
RelevanceWeight : 1
RecentPopularityTimeframe : 14
AggregationType : Count, UniqueUsers
Rollups : SiteSubscriptionId, SiteId, ScopeId
TailTrimming : 2
Options : AllowAnonymousWrite
IsReadOnly : False
I open the “default.aspx” page on the portal (I have opened it more than 10 times in different browser window).
Next day I open “popularity Trends” report, I found that it returns zero.
I open the “Analytics Report” data base. Then I open “AnalyticsItemData” table. There are already items in the table.
So I need to know why the “popularity Trends” excel sheet report returns zeros all the time.
ASkHi,
According to your description, the popularity Trends report always returns no records.
Please check the status of the 3 timer jobs: Microsoft SharePoint Foundation Usage Data Import, Microsoft SharePoint Foundation Usage Data Processing and Web Analytics
Trigger Workflows to see if they are configured to run at regular intervals.
Also you can take a look at the two links about the similar issue for more information:
http://www.myriadtech.com.au/blog/Ben/Lists/Posts/Post.aspx?ID=7
http://sharepoint.stackexchange.com/questions/66476/whats-popular-webpart-is-empty
Feel free to reply if there any progress.
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
Inserting data in global temp table?
Hello experts,
i have a form having base table master and detail. i can insert upadate the records.
requirement: creating the global temp table for same form. sothat data save only form session.
for this i created 2 global temp table having same structure required for same form.
i changes the property for block as base table to global temp table.
now i am trying to save the records but not going in the temp table. as i changes the block base table property to temp tables
as well as advance data block properties also .
please tell me the reason? where can be the problem.
thanks yash
Edited by: yash_08031983 on Apr 16, 2012 1:27 AMi am trying to save the records but not going in the temp table.How do you check that? You cannot go to sqlplus and check if there are any records in the GTT. Data in a GTT is only visible in the current session (= only in the form).
What is the use of a GTT here? What are you trying to achieve? -
Hi all,
Can someone tell me why when I create a GTT and insert the data like the followijng ,I get insert 14 rows msg. But when I do a select statement from sqlwork shop , sometimes i get the data sometimes I don't. my understanding is this data is supposed to stay during my logon session then got cleaned out when I exit session.
I am developing a screen in apex and will use this temp table for user to do some editing work. Once ithe editing is done then I save the data into a static table. Can this be done ? So far my every attempt to update the temp table always result to 0 rows updated and the temp table reversed back to 0 rows. CAn you help me ?
CREATE GLOBAL TEMPORARY TABLE "EMP_SESSION"
( "EMPNO" NUMBER NOT NULL ENABLE,
"ENAME" VARCHAR2(10),
"JOB" VARCHAR2(9),
"MGR" NUMBER,
"HIREDATE" DATE,
"SAL" NUMBER,
"COMM" NUMBER,
"DEPTNO" NUMBER
) ON COMMIT PRESERVE ROWS
insert into emp_session( EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
select * from emp
select * from emp_session
-- sometimes I get 14 rows, sometimes 0 rows
Thanks.
TaiTai,
To say that Apex doesn't support GTT's is not quite correct. In order to understand why it is not working for you and how they may be of use in an Apex application, you have to understand the concept of a session in Apex as opposed to a conventional database session.
In a conventional database session, as when you are connected with sqlplus then you have what is known as a dedicated session, or a synchronous connection. Temporary objects such as GTTs and packaged variables can persist across calls to the database. A session in Apex however is asynchronous by nature and a connection to the database is done through some sort of a server such as the Oracle HTTP server or the Apex Listener, which in effect maintains a pool of connections to the database and calls by your application aren't guaranteed to get the same connection for each call.
To get over this, the guys who developed Apex came up with various methods to maintain session state and global objects that are persistent within the context of an Apex session. One of these is Apex collections, which are a device for maintaining collection like (array like) data that is persistent within an Apex session. These are Apex session specific objects in that they are local to the session that creates and maintains them.
With this knowledge, you can then see why the GTT is not working for you and also how a GTT may be of use in an Apex application, provided you don't expect the data to persist across a call, as in a PL/SQL procedure. You should note though, that unless you are dealing with very large datasets, then a regular Oracle collection is preferable.
I hope this explains your issue.
Regards
Andre -
Global temp table in Oracle EBS
hi gurus,
i have a GTT with "ON COMMIT PRESERVE ROWS".
i am populating this table through an OAF page and displaying the data.
as per the documentation it should delete the data from the table once user logs out from the Oracle EBS but it's not happening.
the user still sees the records from the previous session.
please throw some light here.
thanks,i was wondering if there is any sysadmin level setup/profile setup which can end the session (JDBC) once user logs out?No such profile option exists.
Behavior of Global Temp Table in JDBC
Behavior of Global Temp Table in JDBC
Global temp tables with connection pooling
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4444273995237
Make global temporary tables transaction specific
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:868691300346807468
Thanks,
Hussein -
Can a tabular form be created/used against a GLOBAL TEMP TABLE?
We are trying to simplify our apex applications. In doing so, we are examing the many collections we use to create tablular forms. These collections currently are tricky to manage and we are considering moving them to either VIEWS or GLOBAL TEMPORARY TABLES (GTT).
I have created a test app against a GLOBAL TEMP TABLE....it looks great, but when I add a row and SUBMIT I recieve a message indicating record is inserted....but where did it go? I am unable to retrieve...I cannot see it in the underlying GLOBAL TEMP TABLE (as expected)....
should I be creating an ON INSERT table on the GTT to automatically insert the data into a regular table?Now you know why you have to use collections :) Answered here:
working with global temp table and apex
Has to do with the session management and how APEX handles it.
Create a view on your collection using the column names from the source table. Use packages to write an update, delete and insert process. This can be written automatically if there are multiple collections to handle.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
A better way than a global temp table to reuse a distinct select?
I get the impression from other threads that global temp tables are frowned upon so I'm wondering if there is a better way to simplify what I need to do. I have some values scattered about a table with a relatively large number of records. I need to distinct them out and delete from 21 other tables where those values also occur. The values have a really low cardinality to the number of rows. Out of 500K+ rows there might be a dozen distinct values.
I thought that rather than 21 cases of:
DELETE FROM x1..21 WHERE value IN (SELECT DISTINCT value FROM Y)
It would be better for performance to populate a global temp table with the distinct first:
INSERT INTO gtt SELECT DISTINCT value FROM Y
DELETE FROM x1..21 WHERE value IN (SELECT value FROM GTT)
People asking questions about GTT's seem to get blasted so is this another case where there's a better way to do this? Should I just have the system bite the bullet on the DISTINCT 21 times? The big table truncates and reloads and needs to do so quickly so I was hoping not to have to index it and meddle with disable/rebuild index but if that's better than a temp table, I'll have to make do.
As far as I understand WITH ... USING can't be used to delete from multiple tables or can it?Almost, but not quite, as efficient as using a temporary table would be to use a PL/SQL collection and FORALL statements and/or referencing the collection in your subsequent statements). Something like
DECLARE
TYPE value_nt IS TABLE OF y.value%type;
l_values value_nt;
BEGIN
SELECT distinct value
BULK COLLECT INTO l_values
FROM y;
FORALL i IN 1 .. l_values.count
DELETE FROM x1
WHERE value = l_values(i);
FORALL i IN 1 .. l_values.count
DELETE FROM x2
WHERE value = l_values(i);
END;or
CREATE TYPE value_nt
IS TABLE OF varchar2(100); -- Guessing at the type of y.value
DECLARE
l_values value_nt;
BEGIN
SELECT distinct value
BULK COLLECT INTO l_values
FROM y;
DELETE FROM x1
WHERE value = (SELECT /*+ cardinality(v 10) */ column_value from table( l_values ) v );
DELETE FROM x2
WHERE value = (SELECT /*+ cardinality(v 10) */ column_value from table( l_values ) v );
END;Justin -
Error while creating Global temp table
Hi,
I am very new to PL/SQL so please excuse my question. I have the below query . I have to get a count between the source table and various target tables. I am creating a global temp table to store the counts. I am getting the below error for my following query :
Thanks for the help,
Petronas
----Query----
set serveroutput on
Declare
nm1 varchar2(200);
nm2 varchar2(200);
cnt1 number;
cnt2 number;
diff number;
totdiff number;
Begin
nm1 := null;
nm2:= null;
cnt1:= 0;
cnt2 := 0;
diff := 0;
totdiff := 0;
create GLOBAL TEMPORARY TABLE diff ( name1 varchar(200), name2 varchar2(200), diff number);
select count(*) into cnt1
from users_staging;
select count(*) into cnt2
from PROD.users;
nm1 := 'users_staging';
nm2 := 'PROD.users';
diff := cnt1 - cnt2;
insert into diff values (nm1,nm2,diff);
select count(*) into totdiff
from diff
where diff> 0 ;
dbms_output.enable(10000);
dbms_output.put_line('# of tables where difference is > 0 ' ||totdiff);
end;
Encountered the symbol "CREATE" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipeHi,
"CREATE GLOBAL TEPORARY TABLE ..." is not a PL/SQL command; it is a SQL command only.
Create the table, using that statement, before running the PL/SQL block.
You can issue SQL statements from within PL/SQL using the EXECUTE IMMEDIATE command, but this is rarely a good idea.
I assume the PL/SQL code is meant to create the table and then populate it.
You should split those into two separate pieces of code. You'll only want to create the table once, no matter how many times you use it. I assume you'll want to populate it the same way many times. Remember, the "TEMPORARY" in "GLOBAL TEMPORARY TABLE" refers to the data, not the table. When you end a transaction (or a session, depending on whther you want "ON COMMIT DELETE ROWS" or "ON COMMIT PRESERVE ROWS"), the data disappears, but the now-empty stays, ready to be populated for the next transaction (or session).
Edited by: Frank Kulash on Aug 4, 2010 2:25 PM -
Global temp tables for GeoRaster mosaicing
Hi,
Although this question involves the GeoRaster capability contained in the Spatial package, it has more to do with global temp tables, so it's in this forum group.
The mosaicing function requires all the individual images (there is an image in each record) to be in their own table before they can be mosaiced, as there is no way to stipulate only certain images in a table should be used.
So the best idea I've had so far is to use a global temp table where the images I need can be selected and put in the temp table - then mosaiced. It is important that the temp table contain only the images needed for a given mosaic. However, I will be doing the mosaic operation many times in a given session (possibly even more than 1 mosaic at the same time) and am worried that there will be old or unrelated records in the temp table.
Does this mean I have to make a new session every time I need to mosaic an image? This doesn't sound very efficient. Can I have just one session but have a "new" temp table each time?
Thanks,
MHI have very limited experience with Spatial, and have never done anything like a mosaic
But regarding Global Temp... If you want to make sure the GTT is empty every time, just end your transaction (commit or rollback). This will remove all data from the GTT (if you had it made with ON COMMIT DELETE ROWS - the default) -
Global Temp Tables in a Stored Proc
Hi All,
I'm trying to create a procedure that creates some tables and then creates global temporoay tables. This runs fine in a scrupt but when I place it in a proc, it fails with the following error
Error(172,10): PLS-00103: Encountered the symbol "TABLE" when expecting one of the following: := . ( @ % ;
I'm using the code below to create the global temp tables but I don't think you can do this in a procedure????
TRUNCATE TABLE TMP_table;
DROP TABLE TMP_table;
CREATE GLOBAL TEMPORARY TMP_table
ON COMMIT PRESERVE ROWS
AS SELECT
Thanks for any help givenWhy are you trying to create a temporary table in a stored procedure?
In Oracle, you almost certainly want to create the temporary table once at compile time just like any other table. The difference is that the data in a temporary table is local to the session.
If you really wanted to execute DDL in a stored procedure, you'd need to use dynamic SQL. But it's almost always a bad idea to do so.
Justin -
Global Temp tables in standy-by db
Hi All,
Can i use Global temp tables in a stand by database?
The temp tables will be used for dml purpose.
oracle version is 10g R2
RHEL 5
Thanks,
Ajay KumarPhysical standby :
No DMLs are allowed on the standby database and the most important things is that Standby databases can always be opened in READ-ONLY mode which won't allow DMLs.
Logical standby :
Logical standby database may have different structure from primary database. When it is in read-only mode SQL statements generated from redo are applied and queries may be run concurrently. When in read-write mode one can modify data in tables created in addition to primary schema. But this setting may be over written by specifying additional security options.
http://oracleonline.info/standby_database_type.html
http://download.oracle.com/docs/cd/B10500_01/server.920/a96653/manage_ls.htm
Thanks
Maybe you are looking for
-
Audio duplicate feature on hp pavilion-1247cl notebook using windows 7 not working
. i have a hp pavilion dv6-1247cl laptop.running on windows 7 initially i was able to use the duplicate feature-fn/f4 key to display and hear my web page on the tv screen using the hdmi cable connection. i am unsure if i have accidentally changed a s
-
How can I print and email a report with a logo?
How can I print and email a report with a logo? Is this possible??
-
I would like to be able to do the following 1) access different user's calendars 2) see their specific work schedule 3) possibly add appointments 4) Also some users have different schedules on different days. How can this be entered? Thank you. Aline
-
hii there i have seagate external hard drive i want to copy movies from my macbook pro to external hard drive in order to clean primary memory
-
Facetime and HotSpot features not available.
Got an iphone 4 as a gift from UAE. I cant find the facetime and hotspot features in settings. I am currently in Pakistan. I have read that UAE govt does not allow facetime so its not available there but there is no such restrictions in Pakistan. Wha