Retrieve the DDL for temporary Table existing global
HI: I'm on 10.2.0.3.Anyone know how to recover the DDL for TWG? For an ordinary table, I select dbms_metadata.get_ddl ('TABLE', '< table_name >', '< OWNER >') of double;
Does not work for GTT! TIA.
Can you elaborate a bit on "does not work"? Are you an Oracle error, for example? If so, what is the error?
Seems to work for me on 10.2.0.1
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> create global temporary table gtt_foo (
2 col1 number
3 );
Table created.
SQL> select object_type from user_objects
2 where object_name = 'GTT_FOO';
OBJECT_TYPE
-------------------
TABLE
SQL> select dbms_metadata.get_ddl( 'TABLE', 'GTT_FOO' )
2 from dual;
DBMS_METADATA.GET_DDL('TABLE','GTT_FOO')
-----------------------------------------------------------
CREATE GLOBAL TEMPORARY TABLE "SCOTT"."GTT_FOO"
( "COL1" NUMBER
) ON C
Justin
Tags: Database
Similar Questions
-
Get the DDL for all tables in a schema;
Hello
I tried to get the DDL for all tables under my own diagram "A". Here are the steps I've tried, but in vain I
1. logged in as a user A 2. And the ran query SELECT DBMS_METADATA.get_ddl ('TABLE', 'XYZ') FROM user_tables o/p (HugecloB) {code} Any idea how i can get the DDL for all the tables under my own schema ? Thank you so much! Edited by: user642297 on Feb 4, 2011 12:05 PM Edited by: user642297 on Feb 4, 2011 12:05 PM Edited by: user642297 on Feb 4, 2011 12:05 PM Edited by: user642297 on Feb 4, 2011 12:07 PM
Your idea is good, you missed only to use the correct table name:
SELECT DBMS_METADATA.get_ddl ('TABLE', table_name) FROM user_tables;
Concerning
-
Why the blocks of temporary tables are placed in the buffer cache?
I read the following statement, which seems quite plausible to me: "Oracle7.3 and generates from close db file sequential reading of the events when a dedicated server process reads data from temporary segment of the disc." Older versions of Oracle would read temporary segment data in the database buffer cache using db file scattered reads. Releases latest exploit heuristics that data of temporary segment is not likely to be shareable or revisited, then reads it directly to a server process programs global (PGA). »
To verify this statement (and also for the pleasure of seeing one of these rare close db file sequential read events), I ran a little experiment on my Oracle 10.2 Linux (see below). Not only it seems that different this v above, the blocks of temporary tables are placed in the buffer cache, but also$ BH. OBJD for these blocks does not refer to an object in the database's existing (at least not one that is listed in DBA_OBJECTS). Either incidentally, I traced the session and have not seen any file db close sequential read events.
So, I have the following questions:
(1) is my experimental set-up and correct my conclusions (i.e. are blocks of temporary tables really placed in the buffer cache)?
(2) if so, what is the reason for placing blocks of temporary tables in the buffer cache? As these blocks contain private session data, the blocks in the buffer cache can be reused by another session. So why do all cache buffer management fees to the blocks in the buffer cache (and possibly remove) rather than their caching in a private in-memory session?
(3) what V$ BH. OBJD consult for blocks belonging to temporary tables?
Thanks for any help and information
Kind regards
Martin
Experience I ran (on 10.2 /Linux)
=============================
Edited by: user4530562 the 25.10.2010 01:12SQL*Plus: Release 10.2.0.1.0 - Production on Sun Oct 24 22:25:07 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> create global temporary table temp_tab_4 on commit preserve rows as select * from dba_objects; Table created. SQL> alter system flush buffer_cache; System altered. SQL> select count(*), status from v$bh group by status order by 1 desc; COUNT(*) STATUS ---------- ------- 4208 free 3 xcur SQL> select count(*) from temp_tab_4; COUNT(*) ---------- 11417 SQL> -- NOW THE BUFFER CACHE CONTAINS USED BLOCKS, THERE WAS NO OTHER ACTIVITY ON THE DATABASE select count(*), status from v$bh group by status order by 1 desc; SQL> COUNT(*) STATUS ---------- ------- 4060 free 151 xcur SQL> -- THE BLOCKS WITH THE "STRANGE" OBJD HAVE BLOCK# THAT CORRESPOND TO THE TEMPORARY SEGMENT DISPLAYED -- IN V$TEMPSEG_USAGE select count(*), status, objd from v$bh where status != 'free' group by status, objd order by 1 desc; SQL> SQL> COUNT(*) STATUS OBJD ---------- ------- ---------- 145 xcur 4220937 2 xcur 257 2 xcur 237 1 xcur 239 1 xcur 4294967295 SQL> -- THE OBJECT REFERENCED BY THE NEWLY USED BLOCKS IS NOT LISTED IN DBA_OBJECTS select * from dba_objects where object_id = 4220937 or data_object_id = 4220937; SQL> no rows selected SQL> SQL> -- THE BLOCKS WITH THE "STRANGE" OBJD ARE MARKED AS TEMP IN V$BH select distinct temp from v$bh where objd = 4220937; SQL> T - Y SQL>
Edited by: user4530562 the 25.10.2010 04:57The reason to put the blocks to the global temporary table in the buffer cache is the same thing why you put ordinary table blocks in the cache buffers-> you want some of them to be in memory.
If you ask why don't keep us somehow temporary tables in the PGA - well what happens if this temporary table will be 50 GB? 32-bit platforms cannot even handle this and you do not want a process of becoming uncontrollable so great.
Moreover, TWG will allow you to restore, back to a backup (or savepoint implied when an error occurs during a call DML), and this requires protection by the cancellation. Place lines / revenge in PGA would have complicated the implementation even further... now GTT is almost of the regular tables which just happened to reside in temporary files.
If you really want to put data in the PGA only, then you can create collections of PL/SQL and even access through the use of SQL (coll CAST AS xyz_type) where xyz_type is a TABLE of an object any.
--
Tanel Poder
New online seminars!
http://tech.e2sn.com/Oracle-training-seminars -
Need to retrieve the data for the current date.
Hello
I have a table which then retrieves information when using this command.
Select ta_acct, shift, created_on track_alerts;
Technicolor A 24 March 14
Technicolor A 24 March 14
Technicolor A 24 March 14
Technicolor A 24 March 14
Manitoba telecom a 24 March 14 system
Technicolor A 24 March 14
I used this statement to retrieve the data for the given date.
Select ta_acct, shift, created_on track_alerts where created_on = 24 March 14 ';
Its not data recovery.
Need help.
Kind regards
Prasad K T,.
984002170
Prasad K T wrote:
Yes the created data type is date.
CREATED_ON DATE Partha thanks it works now.
Select ta_acct, shift, created_on in track_alerts where to move is: Shift and TRUNC (created_on) = TO_DATE('24-MAR-2014','DD-MON-YYYY');
Still, I made a small change to my querry.
Select ta_acct, shift, created_on track_alerts where to move is: shft and TRUNC (created_on) = TO_DATE (select double sysdate,'MON-DD-YYYY "");
For this statement, it does not work.
of course not...
first: sysdate returns a date so no need of conversion here
and
second SYSDATE includes time, so your application should look like this:
Select ta_acct, shift, created_on in track_alerts where to move is: Shift and TRUNC (created_on) = trunc (sysdate)
or
Select ta_acct, shift, created_on in track_alerts where to move is: shft and created_on > = trunc (sysdate) and created_on<>
HTH
-
Install RMS 13.1 how to add limits given in the ddl for UK files?
Hello gurus, the retail
I installed RMS 13.1 without running the partition.ksh script during installation detail for RMS database and it has created some examples of data too, I saw the Guide installation and especially watched the stages of partitioning in the Guide, can someone give a hint, how the data limits are changed in the ddl for UK files? Since I'm a DBA, I'm a little confused, where to get this data? as the installation guide mentions that the RMS_partition_defintion.xls has modified and used for installation of production combined with partition_attributes.cfg for a production facility.
Thanks in advance
-VivekHi Vivek,
Let's see...UK means United Kingdom of great brittain? I think that there is no UK specific DDL instructions associated with RMS.
If you look at the Installer (unzip the zip to edelivery.oracle.com for example RMS 13.1), order folders
V16908-01\rms_13.1_install\rms13dbschema\rms\dbschema\dbscripts_rms\examples\part
V16908-01\rms_13.1_install\rms13dbschema\rms\dbschema\dbscripts_rms\ddl\partThis package contains a ksh script which is driven by a script configuration and some lists of specific partitions in the data_def folder.
This script partition.ksh can recreate DOF to other unpartitioned tables to partitioned.The XLS file mentioned also in this file and helps defining the number of partitions and make one or for example multidimensional (e.g. range/hash).
The whole process is explained in a lot of details in the last chapter of the guide to implementation of goods merch-131 - impg.pdf.
When your system already contains data, this should be saved and re-established.
Note that indexes on partitioned tables may need too many partitioning, it takes at least some reflection on this and AFAIK the RMS installation program tries to respond to this also.
Best regards
Erik YkemaPublished by: ErikYkema on October 29, 2010 08:05
-
ORA-31603 when you attempt to get the ddl for tablespace
Running Oracle 11 g 2 on Oracle's Linux
In my schema, I created a package that includes a procedure that will retrieve the DOF for a given tablespace. However, the line ' DBMS_METADATA. GET_DDL ('TABLESPACE', '< target tablespace >') returns an ORA-31603 complain the tablespace is not in my diagram. Specifically, "ORA-31603: object"< tablespace >"TABLESPACE type not found in the schema «< myschema >»»
It is confusing because I thought no tablespaces were related to patterns. I checked my pattern has all privileges such as SELECT_ANY_DICTIONARY and run it on DBMS_METADATA. I can run this command directly in SQL Developer without problem. It is only when I try to run the procedure that the error appears. The package belongs my diagram and I try to run it from a SQL Developer session open in my diagram.
I searched an ora-31603 and "tablespaces" in the center of knowledge and found nothing.
Jim Wolfe
Hello
Documentation:
Security model
The views of the subject of the Oracle metadata model implement the security as follows:
- Unprivileged users can see the metadata only their own items.
SYS
and users withSELECT_CATALOG_ROLE
can see all objects.- Unprivileged users can also retrieve public synonyms, privileges granted system their and object privileges granted to them or by them to others. It also includes the privileges granted to the
PUBLIC
. - If callers request objects they are not privileged to retrieve, no exception is raised; quite simply, the object is not found.
- If unprivileged users are granted some form of access to an object in another schema, they will be able to recover the grant through the metadata API specification, but not the actual metadata of the object.
- Stored in the roles of packages definers-rights, procedures and functions (such as
SELECT_CATALOG_ROLE
) are disabled. Therefore, such a PL/SQL program can only to search metadata for objects in its own schema. If you want to write a PL/SQL program that extracts the metadata for the objects in another schema (based on the possession of the appellant ofSELECT_CATALOG_ROLE
), you must bring the emission rights Summoners.
Kind regards
Juan M
-
How to extract the ddl for all databases of links?
DB: oracle11gr2
Friends,
I can get including db link the package DBMS ddl but could not able to find a way to extract the ddl for all the database link and the coil in a file recreate them in the future?
Tried searching on OTN but no luck, if someone shares how them spool or point me to a particular forum that will be great.
Thank you
We may also use something simple, select as below to extract the ddl
Select dbms_metadata.get_ddl ('DB_LINK', db_link, owner) vSQL of
dba_db_links
/
-
How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.
I s generic SOAP example/tutorial on my blog: get a serial number in a form using SOAP - KHKonsulting LLC
The web service uses only a single parameter, but you should be able to adapt the code to two arguments without problems.
-
Dear all,
I'm unable to retrieve the password for the user FUSION_APPS_WSM_APPID using the ldapsearch command
Is the correct command extract the password for the user FUSION_APPS_WSM_APPID below?
$ORACLE_HOME/bin/ldapsearch - h < hostname > Pei 3060 d 'cn = sleep '' w < password > base b s 'orclCSFKey = basic.credentials, cn = oracle.wsm.security, cn = CredentialStore, cn is FusionDomain, cn = JPSContext, cn is FAPolicies' objectclass = * orclcsfname orclcsfpassword
Kindly help me in this problem.
Kind regards
Vinayak K
Can you clarify why you need recover the password? Application identities are designed for internal processing and never to be exposed outdoors or used for other purposes only lift access to the code in some scenarios within the system. So only the administrator must have access to the account and the password of access they would reset it in the store of credentials if necessary. That said I think that the admin can retrieve the password using the command listCred wlst something like:
listCred(map="oracle.wsm.security",key="FUSION_APPS_WSM_APPID-KEY")
--
Jani Rautiainen
Relationship with the developers of Applications in fusion
-
Remove the automatic sequence and trigger the DDL for surrogate keys?
Is there a way to remove the shutter and the sequence of creation for surrogate keys when export file DDL?
I know that most of the time the auto sequence and trigger creation is welcome and very convenient.
However I'm migrating from an old model of Designer and here only the necessary sequences are created.
They have a different name and logical trigger is personalized (and generated outside of the Designer).
There is a lot of code package accordingly. So, I prefer to create and use different sequences.
Is there a way to do this? Tips are welcome. Create
Hello
you change preferences - "Data Modeler > model > physics > Oracle"-set "Default auto-increment DDL" and "Identity default DDL" voices against ZERO and generate the DDL for Oracle12c
Philippe
-
Hello
on the 11g on Win 2008 R2
How to find the ddl for all index built on MY_VW?
Thank you.You can use DBMS_METADATA for this:
SELECT DBMS_METADATA.GET_DDL ( 'INDEX' , index_name , owner ) FROM all_indexes WHERE table_name = '
' AND table_owner = ' ' ; -
Failed to retrieve the mappings for the server. Reason: null
I get the following in the Console error when I add or update my server
[oolocal], (07 / 14 at 04:40:11): server is available. Get the settings from the server to the server
[oolocal], error, 07 / 14 at 04:40:12, impossible to fetch Server mappings. Reason: null
[oolocal], error, 07 / 14 at 04:40:12, failed to get the logs directory. Reason: nullStandalone CF8
Webroot in c:\inetpub
RDS works (so I can browse the datasource)
Kind regards
Aaron
This problem is known. Failed to retrieve the mappings for the server. Reason: null. We fix it.
Just to check the parameters are collected successfully from the server. Create the project and join the server to the same. CFM open and type
must identify the data sources. -
There the rest APIs to retrieve the metadata for entity for eloqua objects?
There is a list of all the objects that are accessible by the REST for CRUD in this link: REST API - Documentation for kernel objects in the objects of the core section.
For each of the objects listed in the objects of the core section are there is a metadata field in the Properties section.
For example, for the purpose of the e-mail message, The REST API - to access Emails , under the Properties section, there entered corresponding to the fields of the object of the emails under the
Name, Type, Description and validation topics.Is there a REST API to retrieve the same information, i.e. metadata field for an object programmatically eloqua?
Otherwise, this is a serious obstacle to building systems that are the metadata engine and support for SOAP is removed...The closest to what you are looking for would be endpoints of assistance for a description of the fields. Example of /api/bulk/1.0/contact/fields
{
"items": [{}
'name': "E-mail address",
"internalName": "C_EmailAddress",
'dataType': 'emailAddress;
'hasReadOnlyConstraint': false,
'hasNotNullConstraint': false,
'hasUniquenessConstraint': true,
'Déclaration': '{{Contact.Field (C_EmailAddress)}}.
"uri": "/ contact/field/100001",
"converted': ' / Date (-2208970800000) /"
'updatedAt': ' / Date (-2208970800000) / ".
},
{
'name': "First name",
"internalName": "C_FirstName",
'dataType': "string",.
'hasReadOnlyConstraint': false,
'hasNotNullConstraint': false,
'hasUniquenessConstraint': false,
'Déclaration': '{{Contact.Field (C_FirstName)}}.
"uri": "/ contact/field/100002."
"converted': ' / Date (-2208970800000) /"
"updatedBy": "MgrzzzOracleCloudSupportP01E10",
'updatedAt': ' / Date (1408993722380) / ".
},.....
If so, it will also include an element "defaultValue". How many characters you can store in a field (precision) is documented here: Type of data (data and Digital Formats). The same endpoint exist in bulk 2.0, and there are variants for the account fields and Objetpersonnalise. Another exists in the REST through Api/rest/2.0/assets/contact/fields?depth=complete... It does not include the declaration of ML, but there other useful information such as the type of default update and a flag 'isAccountLinkageField '.
Similarly, if you describe a form via SOAP or REST, it also will give you the fields and their type.
Kind regards
Bojan
-
Change the names of temporary tables created BY CKm and LKM
Hello
I am new to ODI.
I want to know if we can change the default name structure that is used by ODi to create temporary tables.
I have$, C$, and E$ table.
For example:-if I want to keep I have $1 for a single schema and I have $2 to another schema.
Is there a way by which we can do that?
Thank you
MaheshJust follow this guide to make unique session temporary tables:
http://odiexperts.com/interface-parallel-execution-a-new-solution
There will be no interference then.
Kind regards
Alastair -
After retrieving the system for a month, the tabs are recovered for a month there are too
Furthermore, I guess, all my settings are retrieved from a month there, but I noticed that the tabs. I guess, the recovery of the system retrieves the AppData folder, there are a Firefox settings. It's okey if I have no problems with my system, but I have... many of them. In the opera, the system recovery does not crash my tabs, Favorites, or something else, even if its settings are in the AppData.
What should I do to avoid this behaivour reset settings? Is - this deficit SQLLite?The extension of the Session Manager has options (1) create a backup when you exit Firefox and (2) locate in a different folder. I have not tested, but could be useful for you.
- https://addons.Mozilla.org/firefox/addon/session-manager/
- http://sessionManager.mozdev.org/options.html#advanced ("helps users replace the default location to store saved sessions")
Maybe you are looking for
-
Account setup with remember PW. You should disable this option. How?
Originally, when I create an account, I do not uncheck remember password. Now, I want to turn off this option, but could not find the place to do it. Where? Any advice is welcome. Thanks for help. BJ Renton
-
monitor thread on the system in real time
I have a SMU-8101 controller in my PXI system. I have it running with a system of operating in real time. I inherited some software WHICH has been used on a program of LabWindows used on a PC with a Windows 7 operating system. The SOFTWARE seems to w
-
I get more kod when try to uppdate windows: 0x13EC
Hello I get more kod when try to uppdate windows: 0x13EC. The uppdate name is Microsoft .NET Framework 3.0: Sprakpaket for x 86 (KB928416). Sincerely ARIO Nahram
-
abdobe flash player will not download
It will show you that it downloads but when I go to programs it displays the icon but no downloaded data.
-
Hosted network problem in Windows 8 Pro
my wireless network adapter supports the hostednetowork when I type in cmd netsh wlan start hostednetowrk the following text is displayed. the hosted network could not be started. the group or resource is not in the correct state to perform the reque