How to get DDL descriptions of DDIC tables?
Hi,
for a replication scenario of ERP data into BOBJ BI on Demand we have to define data schemas in the BI oD MS SQL Server. Instead of doing that manually, we could also import DDL (data definition language) descriptions of the ERP DDIC table to replicate into the SQL Server.
The question is: Is it possible to generate or extract DDL descriptions of database tables defined in the ERP DDIC and if yes, how (e.g. inside ABAP or using DB tools)?
Thanks for any assistance,
H-D
Hi,
if you use SQL2005 or SQL2008 you can try SSMS to generate the DDL statements. Just expand your database <SID> and apply a filter on the tables tab. If you right click on a specific table you have the option to 'Script table as' -> 'Create to' -> 'New Query Editor Window'. That way you will get the CREATE TABLE statement.
Regards,
Sven
Similar Messages
-
How to get DDL history for a Table?
Hi All,
Is there any way to find all the DDL commands fired on a table?
And to find the user who has done that?
I think using Flashback query, we will only get DML changes and UNDO_SQL
and the user responsible for the change.
Is there any similar one getting DDL History.
Or any other query to find the same?
Thanks,
KishoreIn general, no, there is no way to get this information after the fact over any appreciable time frame. I assume that you have Oracle 10.2 since you haven't provided a version number...
If you are looking to set up something to track future DDL, depending on your particular requirements:
- You could write DDL triggers that would generate entries into custom audit tables when DDL was generated.
- You can enable Oracle's built-in auditing capabilities
- You can use Oracle's Audit Vault product
If your historical DDL is relatively recent, and you're in ARCHIVELOG mode, and you still have the archived logs from the time in question, you could use LogMiner to extract the DDL. If flashback logging is enabled, you could flashback an entire database to a point in time to see what a table looked like, but that would be relatively unwieldy in addition to being possible only over a relatively short time frame.
Justin -
How to get the data from Pooled Table T157E.
Hi Experts,
How to get the data from Pooled Table T157E.
Any help.
Thanks in Advance,
Ur's Harsha.create some internal table similar to T157E and pass all data as per SPRAS.
After that use internal table in your program as per the requirement.
Regds,
Anil -
How to get the size of the table
Hi All,
How to get the size of the table in Oracle 10g?
Is there any script which needs to be run?
Regards,
ApoorvHi All,
Sorry but somehow the table user_segments is not populated in my case. But we have another table SYS.ALL_TABLES whose structure is given below. Would I be able to calculate the table size based on the columns given below:
ColumnName Data Type
OWNER VARCHAR2 (30 Byte)
TABLE_NAME VARCHAR2 (30 Byte)
TABLESPACE_NAME VARCHAR2 (30 Byte)
CLUSTER_NAME VARCHAR2 (30 Byte)
IOT_NAME VARCHAR2 (30 Byte)
STATUS VARCHAR2 (8 Byte)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2 (3 Byte)
BACKED_UP VARCHAR2 (1 Byte)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2 (10 Byte)
INSTANCES VARCHAR2 (10 Byte)
CACHE VARCHAR2 (5 Byte)
TABLE_LOCK VARCHAR2 (8 Byte)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2 (3 Byte)
IOT_TYPE VARCHAR2 (12 Byte)
TEMPORARY VARCHAR2 (1 Byte)
SECONDARY VARCHAR2 (1 Byte)
NESTED VARCHAR2 (3 Byte)
BUFFER_POOL VARCHAR2 (7 Byte)
ROW_MOVEMENT VARCHAR2 (8 Byte)
GLOBAL_STATS VARCHAR2 (3 Byte)
USER_STATS VARCHAR2 (3 Byte)
DURATION VARCHAR2 (15 Byte)
SKIP_CORRUPT VARCHAR2 (8 Byte)
MONITORING VARCHAR2 (3 Byte)
CLUSTER_OWNER VARCHAR2 (30 Byte)
DEPENDENCIES VARCHAR2 (8 Byte)
COMPRESSION VARCHAR2 (8 Byte)
DROPPED VARCHAR2 (3 Byte) -
How to set DDL lock for a table
OCI,how to set DDL lock for a table?
Oracle acquires a dictionary lock automatically on behalf of any DDL transaction requiring it. Users cannot explicitly request DDL locks. Only individual schema objects that are modified or referenced are locked during DDL operations. The whole data dictionary is never locked
DDL locks fall into three categories: exclusive DDL locks, share DDL locks, and breakable parse locks.
see this link
http://www.sc.ehu.es/siwebso/KZCC/Oracle_10g_Documentacion/server.101/b10743/consist.htm#i5281 -
How to get ddls from sqlplus like that of TOAD
Hi,
I have to work on a terminal machine for a client where the TOAD is not installed. For my regular DBA activities I need to take the DDL many times.
I am very much used to the style of DDL scripts which TOAD 9.6.x.x gives for any object in a schema.
Can someone suggest how I can I get exactly TOAD-like scripts (which provide not just the create statements)
For e.g.
*1.From sqlplus when I do*
select dbms_metadata.get_ddl('TABLE','APE1_ACCUMULATORS') from dual;
I get only the below
CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
OWNER_ID
*2.But from TOAD 9.6.x.x when i click on "create scripts" I will get*
DROP TABLE XLTDBO92.APE1_ACCUMULATORS CASCADE CONSTRAINTS;
CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
OWNER_ID
DROP SYNONYM XLTDB92.APE1_ACCUMULATORS;
CREATE SYNONYM XLTDB92.APE1_ACCUMULATORS FOR XLTDBO92.APE1_ACCUMULATORS;
GRANT DELETE, INSERT, SELECT, UPDATE ON XLTDBO92.APE1_ACCUMULATORS TO XLTDBO92_ALL;
So my question is:
How to such scripts from sqlplus as well ,irrespective of the type of the object?_
Note:I am posting a new thread because my previous question was answered even though i was not able to type in completely. My mistake as it was posted in before i could finish the question.
Regds,
KunwarIf the DDL returned by dbms_metadata is not to your liking then write your own scrips to generate DDL or cover scripts to generate all related items that you want.
In the case of synonyms and grants this is very easy using rdbms dictionary views, but if you generate a table's DDL you may also want and need the PK, UK, FK, secondary indexes, comments, and policies on the table as well as synonyms and grants. Everything that if you drop the tables goes away.
There is a dbms_metaddata procedure get_dependent_ddl to generate dependend objects on a table that may be of interest.
HTH -- Mark D Powell -- -
How to get Worksheet Description from SQL
Hi,
Can any one help me out. How to get Workbook and Worksheet Description from SQL. I have entered these descriptions from Discoverer Plus.
Thanks in advance.check this !!!! at least it a starting point
Thread: Where in the EUL schema can I find metadata on worksheets
I followed this steps:
Use the following steps to get the Trigger Working:
1. Login as EUL owner EUL10
Create a test table
CREATE TABLE eul10.TRIG_TAB
ACC_DATE DATE,
sso_name varchar2(100)
2. Create a function under the eul schema owner: eul_trigger$post_login
Do not pass any argument to the function.
Return a number from function.
CREATE OR REPLACE FUNCTION EUL10.EUL_TRIGGER$POST_LOGIN
RETURN NUMBER AS
BEGIN
insert into EUL10.TRIG_TAB(acc_date) values(sysdate);
commit;
RETURN 0;
END;
3. Login with Discoverer Administrator to EUL=EUL10.
4. Check the Menu > Tools > Default EUL.
Make sure this is set to EUL10
If not then change the EUL10 and restart Discoverer Administrator.
5. Now Register the trigger in Discoverer Administrator
Menu >Tools > Register PL/SQL Function ...
6. Click import
7. Select the trigger EUL10.eul_trigger$post_login
|8. Make sure the display name is eul_trigger$post_login (MUST BE lowercase or it will not work)
Function name must be in uppercase: EUL_TRIGGER$POST_LOGIN
9. Make sure the the return type is number and that no arguments get passed.
10. Validate the Function by clicking on the Validate button.
11. Click ok
12. Connect with Discoverer desktop as EUL owner.
13. We see entries in the table trig_tab with the current date.
...... metalink note : 372067.1 Subject: How To Get the EUL_TRIGGER$POST_LOGIN Trigger to Work -
WD ABAP: How to get the contents of selected table lines?
Hi,
I'm trying to figure out how to get the contents of table lines back from the UI. I display a table with several lines of data. The user selects some rows. I want to move the contents of the selected rows to another table. I have a context attribute, say DATA, with attributes FIELD1... FIELDn, using a DDIC structure. These are bound to the table UI element and the corresponding table columns. To get the selected rows, I use wd_context->get_selected_elements(). This works, but what I get from this method is references to if_wd_context_element. How do I know which row (row number = ?) this corresponds to? And how do I get the actual data? I want a structure with FIELD1 = value1 FIELD2 = value2 etc. My context attributes FIELD refer to table columns, but I'm looking for the table line...
Can somebody help me?
Thanks,
IraHi Ira,
wd_context->get_selected_elements() returns WDR_CONTEXT_ELEMENT_SET which is a table type of IF_WD_CONTEXT_ELEMENT. You can loop through the WDR_CONTEXT_ELEMENT_SET, get into variable say node_elelement which is of type ref to If_Wd_Context_Element. Then you could use the method GET_STATIC_ATTRIBUTES of If_Wd_Context_Element which returns a structure with values of all the attributes in the selected row.
If you need the row number, while populating the node you could have an additional attribute called rowno and populate it correctly. When you select the data using method GET_STATIC_ATTRIBUTES, you would get the appropriate row number.
Regards,
Srini. -
All,
Is there any way to get DDL of partition
For example:
Table_name : ABC
Partitions_Name : Data_201008
Owner:msg
Here, how can i get t he DDL of partition(Data_201008)
Thanks in advacneHi,
AFAIK, we can't get separately the ddl for a partition as it belongs to the table.There is nothing like "create table partition", to add a partition you perform "alter table add partition"(dml command).So, you can get a ddl for the table not a single partition.
select DBMS_METADATA.GET_DDL('TABLE','TABLE_NAME','OWNER') from dual;HTH
Anand -
How to get the value from Advanced table
Hi,
In the Advanced table have 2 LOV fields, I need LOV field value dynamically in the controller to validate the save button, if iam not selected any value in lov save button will not allow to save the data. In the table i am using 'Add another row'. How to get the lov field value in the process form request??? and how to do this requirement
Thanks
Naresh1. You can specify required property on LOV field to "yes". For events where you wish to disable the client side validations, set the property disable client side validation to "true".
2. If above behavior is not what you are looking for, then you need to handle in AM and not CO.
a. Call an AM method from CO.
b. In that AM method, get handle of VO.
c. Iterate the VO Rows and check for your validation rules.
-Prince
http://www.princekapoor82.blogspot.com -
How to get the links from Master table
Hi,
I need to show url on the jsp page which should be taken from Backend "Master Table".
say an example like some value CRM_IMAGE = ZWEB CRMIMAGE.I need to show CRM_IMAGE as Hyperlink on the product detail.jsp.
Can anyone help me for this.
Regards,
Deepika
Edited by: Ecom Dev on Dec 21, 2009 11:05 AMHi Ecom,
To retrieve value on product detail page you have to develop your custom code in which you have to create BO, BOM, BEI and BEO to access Your master table data from ISA page.
You also need to create Custom RFC in which you pass porduct ID and retrieve related value from Master Table.
You can find example in ISA tutorial how to get value from Back-end via JCO.
eCommerce Developer
Edited by: Ecommerce Developer on Dec 21, 2009 11:44 AM -
hi Friends,
I am Using ME_PROCESS_PO_CUST badi for validation in Purchase oreder (ME21N),
For that I implementaed PROCESS_ITEM method which fires during each row now i want to add another validation in same implimentation for that i need privious row's value so how to get that value ?
following is my current validation code.
method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
DATA:ls_poitem TYPE mepoitem.
DATA:ls_poheader TYPE MEPOHEADER.
DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
DATA:w_mara TYPE mara.
DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
WA_ZMMTBL039 TYPE ZMMTBL039 .
DATA:ls_poitem1 TYPE mepoitem.
DATA:V_KUNNR1 TYPE KNA1-KUNNR.
DATA:V_KUNNR2 TYPE KNA1-KUNNR.
ls_poitem = im_item->get_data( ).
lm_poheader = im_item->GET_HEADER( ).
ls_poheader = lm_poheader->GET_DATA( ).
CLEAR: WA_ZMMTBL039,w_mara.
REFRESH:IT_ZMMTBL039[] .
SELECT *
INTO TABLE IT_ZMMTBL039
FROM ZMMTBL039
WHERE bsart EQ ls_poheader-bsart.
IF sy-subrc EQ 0.
CLEAR: WA_ZMMTBL039,w_mara.
SELECT SINGLE *
INTO w_mara
FROM mara
WHERE matnr EQ ls_poitem-MATNR.
IF SY-SUBRC EQ 0.
READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY bsart = ls_poheader-bsart
mtart = w_mara-mtart
spart = w_mara-spart.Hello
If you had searched the SDN forums you would have found plenty of answers to your question.
Following is some sample coding:
method IF_EX_ME_PROCESS_PO_CUST~POST.
DATA:
ls_header TYPE mepoheader,
lt_items TYPE purchase_order_items,
ls_item TYPE purchase_order_item,
ls_item TYPE mepoitem.
ls_header = im_header->get_data( ).
lt_items = im_header->get_items( ).
LOOP AT items INTO ls_item.
ls_item = line_item-item->getdata( ).
" process item data...
ENDLOOP.
ENDMETHOD.
Regards,
Uwe
PS: Do not use such kind of pseudonyms instead of your real name. Because my impression is that a nobody (in term of ABAP development competence) tries to claim to be a somebody who fills his knowledge gaps via SDN. Using pseudonyms significantly decreases your changes to get any answers at the SDN forums. -
How to get current row data in table control
Hi , expert ,
I am professional in oracle , but now I am a new guy in SAP ABAP .
I have a question in UI
How to get current row data and click pushbutton in table control to open next screen ?
I want to get the current data and open next screen to carry out detail detail .
Thansk for all your suggestion .GET CURSOR LINE SY-CUROW .
READ TABLE internal_table index SY-CUROW. -
How to get the script of a table or view in SQL Developer?
Dear friends/expert,
Could you tell me how to get the script for a view or a table easily in SQL Developer like pressing F4 in TOAD?
I found that I can press SHIFT+F4 for a view in SQL Developer and get the script of the view in Details Tab. But how to move the script to SQL worksheet to edit? It is very easy to do in TOAD.
And I didn't find a way to get the script for a table till now. Is there any way to do that?
Thanks in advance.
Best regards,
Ning1. Although the team might put a lot of effort in keeping track on the forum, a lot of posts still go by without answer.
2. If you have an enhancement request, log it at the announced SQL Developer Exchange, so others can vote to add weight on the issue. Be clear and detailed in the explanation.
3. Given the structure of the application, I guess it won't be easy (maybe impossible) to add the functionality you are asking. Do you have a suggestion on how to access the info?
4. If your request gets accepted, still another year or two may go by until the functionality gets added. For sure you'll be better off writing a user defined extension or report (querying DBMS_METADATA.GET_DDL).
Hope that helps,
K.
Edited by: -K- on 12/01/2009 09:37 -
How to get changed records in a table
I have a table t1 as
create table t1( num number, name varchar2(35),code char(2));
my data looks like
num name code
1 xy c1
2 zx c2
3 qq c5
after 2 hr i have changed my value to:
1 zx c3
2 za c2
3 qq c5
i need to get a select statement which gives the changed rows:
my output looks like:
1 zx c3
2 za c2
how to get these changed rows
Thanks in advance"It's not working" - fabulous feedback.
Really any reply to that should be just left at "because you're doing it wrong" however....
The flashback query syntax doesn't work like that.
Has to be more like this:
select t1.column,t2.column
from t1 ,t2
where t1.column=t2.column
MINUS
select t1.column,t2.column
from t1 AS OF TIMESTAMP TO_TIMESTAMP('27.04.2011 10:00:00', 'DD-MM-YYYY HH24:MI:SS')
, t2 AS OF TIMESTAMP TO_TIMESTAMP('27.04.2011 10:00:00', 'DD-MM-YYYY HH24:MI:SS')
where t1.column=t2.column;The documentation is great for seeing how things should work, syntax etc.... you should try it.
Maybe you are looking for
-
Memory Question about my K8N!
Right now I am using 2 Kingston HyperX DDR400 memory. The boards are 512Mb doublesides... If I was to add anotherboard same brand and speed but 1gb (for a total of 2gb) will the memory run ad 440mhz or drop to 333mhz? Better question, will this wor
-
To whom it may concern: I was charging my IPod and I received a message to update it. Now I can't shut down or turn of my Ipod. It has the ITunes Icon and the adapter plug on it. It states I need to restore my IPod, but I could possibly lose all o
-
My Macbook started the dreaded random shut downs this week after 5 trouble free months. Having read the experiences of others I was not hopeful of a fast resolution but I took it into the Apple Store in the Bullring this morning at 10am. It was repai
-
Pls could someone help me configure my AEBS to connect to the router via ethernet as I'm getting poor performance using wifi and would like to try something different. Thanks v much in advance! Matt : )
-
Records are getting overwritten in the internal table using Select query.
Hi All, I have following query : Loop at i_salesplant. select maramatnr mvkeVKORG mvkeVTWEG maraZZCOEAFE maraZZCOEAFEUOM mvkeZZALLPOL into corresponding fields of table i_zallocpol from mara inner join mvke on mvkematnr = maramat