Help regarding drop table information
hello all,
i want to know is there any data dictionary present who maintainted the droped table history with terminal number so i can easily know who dropped perticular table .
any help appriciated
Message was edited by:
Pankaj M
In 10g onwards you can investigate the recyclebin (if not tuned off and tables are not dropped with purge clause). It might contain at least some information you need:
SQL> desc recyclebin
VIEW recyclebin
Name Null? Type
OBJECT_NAME NOT NULL VARCHAR2(30)
ORIGINAL_NAME VARCHAR2(32)
OPERATION VARCHAR2(9)
TYPE VARCHAR2(25)
TS_NAME VARCHAR2(30)
CREATETIME VARCHAR2(19)
DROPTIME VARCHAR2(19)
DROPSCN NUMBER
PARTITION_NAME VARCHAR2(32)
CAN_UNDROP VARCHAR2(3)
CAN_PURGE VARCHAR2(3)
RELATED NOT NULL NUMBER
BASE_OBJECT NOT NULL NUMBER
PURGE_OBJECT NOT NULL NUMBER
SPACE NUMBER
Similar Messages
-
Need help regarding af:table ADF component.
Hello,
I am using a af:table component to display some data. I have binded the value attribute to an arraylist, whose each element is an object with four variables.
Now in the backing bean, i am trying to use this, CollectionModel collModel = (CollectionModel)mTable.getValue(); here mTable is the RichTable to which i have done the binding of the table.
The code throws an exception saying that java.util.ArrayList cannot be cast to CollectionModel.
Please help me, how to resolve the issue, is this arising because i provided an arraylist to the value attribute of the table? How should i convert the arraylist to a CollectionModel.
Urgent help needed.
Thanks
Ankush GuptaHello,
public void goNext(ActionEvent actionEvent) {
CollectionModel collectionModel = (CollectionModel)mTable.getValue(); // Replcae it with as you suggested ArrayList collectionModel = (ArrayList)mTable.getValue();
JUCtrlHierBinding tableBinding = null;
tableBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
DCIteratorBinding iteratorBinding = tableBinding.getDCIteratorBinding();
int rowNumber = 0;
ArrayList list = new ArrayList(getUpdatedLines());
rowNumber = Integer.parseInt(list.remove(0).toString());
setUpdatedLines(list);
iteratorBinding.setRangeStart(rowNumber-1);
Row currentRow = iteratorBinding.getRowAtRangeIndex(0);
Key rowKey = currentRow.getKey();
ArrayList tableRowKey = new ArrayList();
tableRowKey.add(rowKey);
RowKeySetImpl rks = new RowKeySetImpl();
rks.add(tableRowKey);
mTable.setSelectedRowKeys(rks);
AdfFacesContext.getCurrentInstance().addPartialTarget(mTable);
But my problem is i need a collectionModel to work further. How can i do that?
The working of this code is that I have binded a table to mTable, now with some logic i have the list of some specific rows number, which will be used for my navigation (navigation refers to that on clicking the button binded to this goNext func, it will go the first row in the list which i have and so on on the click of button).
Thanks
Ankush Gupta -
Help regarding pm tables link with fi/co tables
Hi ,
I need urgent requirement regarding one object.
my need is i want to know the link among the plant maintenance tables with fi/co tables.
my out put is depends on equipment no fetch diff g/l accounts.
how to fetch data from diff g/l accounts depends on pm table equi.becoz i am getting equipment no from equi table.
Thanks n regards,
khadar.thanq for ur reply ,
In my selection criteria I have equipment no and date and diff radio buttons for diff g/l accounts ,depends on that I have to fetch dig g/l accounts with equipment and class
with regards,
khadar. -
Regarding Table Information in PO Shipment Form
Hi All,
I have small doubt for table information
in Purchase Order Form, In Line--> Shipment Details Form
we have Promised Date, Needed By and Original Promise Date.
I got the information of Promised Date and Needed By Date information in po_line_locations_all table.
but I am not able to find the Original Promise Date information.
Please anyone can share this information.
ThanksWelcome to the Oracle Forums. Please take a few minutes to review the following:
<ul>
<li>Before posting on this forum please read
<li>10 Commandments for the OTN Forums Member
<li>Announcement: Forums Etiquette / Reward Points
</ul>
Based on your question it sounds like you are working with the Oracle Enterprise Business Suite (EBS). If this is true, this forum is for general Forms questions. Please post your question in the General EBS Discussion forum. If you have a general Forms question, by all means, ask it here! ;-)
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Dear All,
I created one table like
create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
after performing some operations I want to delete the same.
At that time i got following error. Please help me and tell what is the reason for the error.
ORA-00604 error occured at recursive level1
ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
ORA-06512 at line no 2
Thanks and Regards
Prasad26bffcad-f9a2-4dcf-afa0-e1e33d0281bf wrote:
Dear All,
I created one table like
create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
after performing some operations I want to delete the same.
At that time i got following error. Please help me and tell what is the reason for the error.
ORA-00604 error occured at recursive level1
ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
ORA-06512 at line no 2
Thanks and Regards
Prasad
ORA-20123 is a localized/customized error code & message; therefore any solution depends upon what is unique inside your DB now.
I suspect that some sort of TRIGGER exists, which throws posted error, but this is just idle speculation on my part.
How do I ask a question on the forums?
https://forums.oracle.com/message/9362002#9362002 -
Need some help with the Table Function Operator
I'm on OWB 10gR2 for Sun/Solaris 10 going against some 10gR2 DB's...
I've been searching up and down trying to figure out how to make OWB use a Table Function (TF) which will JOIN with another table; allowing a column of the joined table to be a parameter in to the TF. I can't seem to get it to work. I'm able to get this to work in regular SQL, though. Here's the setup:
-- Source Table:
DROP TABLE "ZZZ_ROOM_MASTER_EX";
CREATE TABLE "ZZZ_ROOM_MASTER_EX"
( "ID" NUMBER(8,0),
"ROOM_NUMBER" VARCHAR2(200),
"FEATURES" VARCHAR2(4000)
-- Example Data:
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (1,'Room 1',null);
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (2,'Room 2',null);
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (3,'Room 3','1,1;2,3;');
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (4,'Room 4','5,2;5,4;');
Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (5,'Room 5',' ');
-- Destination Table:
DROP TABLE "ZZZ_ROOM_FEATURES_EX";
CREATE TABLE "ZZZ_ROOM_FEATURES_EX"
( "ROOM_NUMBER" VARCHAR2(200),
"FEATUREID" NUMBER(8,0),
"QUANTITY" NUMBER(8,0)
-- Types for output table:
CREATE OR REPLACE TYPE FK_Row_EX AS OBJECT
ID NUMBER(8,0),
QUANTITY NUMBER(8,0)
CREATE OR REPLACE TYPE FK_Table_EX AS TABLE OF FK_Row_EX;
-- Package Dec:
CREATE OR REPLACE
PACKAGE ZZZ_SANDBOX_EX IS
FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX;
END ZZZ_SANDBOX_EX;
-- Package Body:
CREATE OR REPLACE
PACKAGE BODY ZZZ_SANDBOX_EX IS
FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX
AS
RETURN_VALUE FK_Table_EX := FK_Table_EX();
i NUMBER(8,0) := 0;
BEGIN
-- TODO: Put some real code in here that will actually read the
-- input string, parse it out, and put data in to RETURN_VALUE
WHILE(i < 3) LOOP
RETURN_VALUE.EXTEND;
RETURN_VALUE(RETURN_VALUE.LAST) := FK_Row_EX(4, 5);
i := i + 1;
END LOOP;
RETURN RETURN_VALUE;
END UNFK;
END ZZZ_SANDBOX_EX;
I've got a source system built by lazy DBA's and app developers who decided to store foreign keys for many-to-many relationships as delimited structures in driving tables. I need to build a generic table function to parse this data and return it as an actual table. In my example code, I don't actually have the parsing part written yet (I need to see how many different formats the source system uses first) so I just threw in some stub code to generate a few rows of 4's and 5's to return.
I can get the data from my source table to my destination table using the following SQL statement:
-- from source table joined with table function
INSERT INTO ZZZ_ROOM_FEATURES_EX(
ROOM_NUMBER,
FEATUREID,
QUANTITY)
SELECT
ZZZ_ROOM_MASTER_EX.ROOM_NUMBER,
UNFK.ID,
UNFK.QUANTITY
FROM
ZZZ_ROOM_MASTER_EX,
TABLE(ZZZ_SANDBOX_EX.UNFK(ZZZ_ROOM_MASTER_EX.FEATURES)) UNFK
Now, the big question is--how do I do this from OWB? I've tried several different variations of my function and settings in OWB to see if I can build a single SELECT statement which joins a regular table with a table function--but none of them seem to work, I end up getting SQL generated that won't compile because it doesn't see the source table right:
INSERT
/*+ APPEND PARALLEL("ZZZ_ROOM_FEATURES_EX") */
INTO
"ZZZ_ROOM_FEATURES_EX"
("ROOM_NUMBER",
"FEATUREID",
"QUANTITY")
(SELECT
"ZZZ_ROOM_MASTER_EX"."ROOM_NUMBER" "ROOM_NUMBER",
"INGRP2"."ID" "ID_1",
"INGRP2"."QUANTITY" "QUANTITY"
FROM
(SELECT
"UNFK"."ID" "ID",
"UNFK"."QUANTITY" "QUANTITY"
FROM
TABLE ( "ZZZ_SANDBOX_EX"."UNFK2" ("ZZZ_ROOM_MASTER_EX"."FEATURES")) "UNFK") "INGRP2",
"ZZZ_ROOM_MASTER_EX" "ZZZ_ROOM_MASTER_EX"
As you can see, it's trying to create a sub-query in the FROM clause--causing it to just ask for "ZZZ_ROOM_MASTER_EX"."FEATURES" as an input--which isn't available because it's outside of the sub-query!
Is this some kind of bug with the code generator or am I doing something seriously wrong here? Any help will be greatly appreciated!Hello Everybody!
Thank you for all your response!
I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
I had created a Z table with the following fields :
ZADS :
MANDT
VKORG
ABGRU.
I had written a select query as below :
I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table
select vkorg abgru from ZADS into it_rej.
Earlier :
IT_REJ is a Work area:
DATA : BEGIN OF IT_REJ,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
Now :
DATA : BEGIN OF IT_REJ occurs 0,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
I guess this will fix the issue correct?
PLease suggest!
Regards,
Developer. -
Allowing a user to create/drop tables in another users schema
We have a central shared schema (TEAM). So we can monitor who is doing what users have there own login(USER1, USER2...). Is there a way to allow a user to create/drop objects in another user.
I.e.
SQL> connect USER1
SQL> create team.table1(col1 char(1));
SQL> drop table team.table1:
How can this be set up?
BenHere is what you can do, If you want to keep track of what users are doing.
Open the glogin.sql file and set the spool like this
spool /oracle/audit/SID_&_user.logEverytime user logs in it will be populated and you will be able to see who is doing what.
You can remove the write permission on glogin.sql so that no one can modify it.
You also need to create a script like this, which would rename it every time same user would login.
#!/bin/ksh
time=`date +"%b"_"%d"_"%H"_"%M"`
##you need to pass some more variables and while loop to include all the users## ( This is just for an example)
if [ -f /oracle/audit/SID_SYS.log ]
then
mv /oracle/audit/SYS.log /oracle/audit/SYS.log.$time
fiEdit the glogin.sql file with this script information like this
host /oracle/audit/file.kshHope this helps, if you need more information let me know. -
OIM - query regarding child tables
Hi All
I have a query regarding child tables. For example, when a user is removed from an AD group, his corresponding entry from the AD groups child table will be deleted. I want to know whether it is deleted of marked as deleted. Can I get the information later on that the user was removed from which AD group?
Please help.
ThanksYou will have to enable the audit level = Resource Form and perform the additional tasks to track the process form data changes. This will track all modifications to the forms.
-Kevin -
Hi
i have Oracle 10g R2 i'm facing one problem, that there is a table which has been dropped it's in Recycle Bin there is many information about dropped table like Dropped time, user and etc..
But i want to know the Terminal or Machine name which the drop command was issued.
Please guide me in this regard.
NasirHi Masir,
For DDL auditing, consider a DDL trigger:
http://www.dba-oracle.com/t_ddl_triggers.htm
Using the Data Definition Language (DDL) triggers, the Oracle DBA can automatically track all changes to the database, including changes to tables, indexes, and constraints. The data from this trigger is especially useful for change control for the Oracle DBA.
DDL triggers execute every time a DDL statement is executed, and adds new entries to your new table, as shown below:
connect sys/manager
create or replace trigger
DDLTrigger
AFTER DDL ON DATABASE
BEGIN
insert into
perfstat.stats$ddl_log
user_name,
ddl_date,
ddl_type,
object_type,
owner,
object_name
VALUES
ora_login_user,
sysdate,
ora_sysevent,
ora_dict_obj_type,
ora_dict_obj_owner,
ora_dict_obj_name
END;
HTH . ..
Don Burleson -
Dropping tables in a specified user where in i dont know the SYS privilege
Hi,
I have 10 users with each user containing about 120 tables, but i want to drop all the tables without dropping the users and im working on a testing database where in i only have access to ALL_USERS...
Can anyone help me in this regard......
Thanks
- SriOk, I'll try to be clearer.
in SQL*Plus, first enter the line:
sql> spool drop_tables.sql;
then enter the query as above. This should output a load of lines which read 'drop table owner.table_name; and the last line will be row count.
Then issue the command:
sql> spool off;
you should then see that a file has been created on your filesystem called drop_tables.sql. Take a look inside and it will contain lots of 'drop table' commands.
return to SQL*Plus and run that script:
mysql> @drop_tables.sql
when you are SURE that you are happy with what has been dropped, issue the COMMIT;
if you are not happy, issue a ROLLBACKl
regards
James -
Table is been dropped and i want o recover it.
Database is running in archive log mode and i had valid full database rman backup too.
flashback is disabled.
database version -10g
Please let me know the steps i can follow to recover the dropped table.Hello,
If your RECYCLEBIN is activated you may Flashback Drop your Table.
So you may check your RECYCLEBIN by using the following query:
select object_name, original_name from user_recyclebin;If you can see your Table (original_name) so you may execute the statement below:
flashback table <table_name> to before drop;Else, you'll need a Backup or a dump to restore your Table.
For instance, by duplicating your database elsewhere and get back the Table by DataPump (expdp/impdp).
Hope this help.
Best regards,
Jean-Valentin
Edited by: Lubiez Jean-Valentin on Feb 3, 2010 10:13 PM -
Find table information in iStore application
Hi,
I need to modify existing iStore application, so i require db table information they used.
In existing application some buttons are there like 'Save to cart' , 'Update cart' . If i select these buttons i need to find out what are tables to be updated. I have gone through iStore application code, i found out javascript function 'submitForm('Save.x','formName')' . I didnt understand well. Can anyone tell me how data transaction handled by the iStore application and how to find table names which are updated?
Its very urgent.. Please help me out...
Regards,
Sadanand & BabuBabu,
As replied on a previous thread, only option is to enable debug and go through the collected log. Try to generate as much of log info as possible. Debug log methods may differ based on OAF or JTF pages.
--Shiv -
How to find table information for a datasource?
Hi,
Can you please tell me how to find table information for a datasource. I am not getting much help from help.sap.
I am trying to find table information for below datasources. We are creating DSO's for the below mentioned datasources, for some we have standard DSO's(0WBS_O06), for others I am trying to create
0CO_OM_NWA_1,
0CO_OM_NWA_2,
0CO_OM_WBS_1,
0CO_OM_WBS_6
Please help me.
Regards,
Bob.Hi BOB,
Another option to find the table information...
inorder to get the tables names involved in that particular data source follow the below steps.
1) ST05 --> activate the Trace
2) RSA3 --> enter your data source (for ex: 0CO_OM_NWA_1)
3) Execute
4) Now goto ST05 -> deactivate the trace
5) click on Display trace(F7) button
6) Execute
7) It will display the complete SQL trace
8) Now from the Menu "Trace list" --> select "Combined Table Access"
it will display the complete tables list involved in that data source...
From Table name section you can get the list of tables involved in that data source.
I had traced and took the information of tables involved in that data source 0CO_OM_NWA_1
0CO_OM_NWA_1
AFKO Order header data PP orders
AFVC Operation within an order
AUFK Order master data
COSP CO Object: Cost Totals for External Postings
COSPP Transfer of the Order in the COSP Table to the Project
COSS CO Object: Cost Totals for Internal Postings
COSSP Transfer of the Order COSS Table to the Project
COVREF Coverage Reference Table: All Processing Blocks
COVRES Table of Coverage Results
You can follow the same steps and find the tables for the rest.
Regards
KP -
Hello,
I'm currently tring to drop a table using a process trigered by a button click
Icreated my button and also a "PL/SQL process" and I put
DROP TABLE &P0_TABLE_NAME. CASCADE CONSTRAINTS;
inside field "source" with ticking the checkbox "Do not validate PL/SQL code (parse PL/SQL code at runtime only)."
But when a click on the button I have the following error
ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "DROP" when expecting one of the following: begin case declare 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 pipe
Error Error while dropping table
OK
Do anyone have a clue about this ?
Debug trace is
A C C E P T: Request="Purge"
0.00: Metadata: Fetch application definition and shortcuts
0.00: alter session set nls_language="AMERICAN"
0.00: alter session set nls_territory="AMERICA"
0.00: ...NLS: Set Decimal separator="."
0.00: ...NLS: Set NLS Group separator=","
0.00: ...NLS: Set date format="DD-MON-RR"
0.00: ...Setting session time_zone to +02:00
0.00: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
0.00: Fetch session state from database
0.01: ...Check session 2289784661666743 owner
0.01: ...Check for session expiration:
0.01: ...Metadata: Fetch Page, Computation, Process, and Branch
0.01: Session: Fetch session header information
0.01: ...Metadata: Fetch page attributes for application 121, page 2
0.01: ...Validate item page affinity.
0.03: ...Validate hidden_protected items.
0.03: ...Check authorization security schemes
0.03: Session State: Save form items and p_arg_values
0.03: ...Session State: Save "P0_TABLE_NAME" - saving same value: "STATPHI_595730051"
0.04: ...Session State: Save "P2_TABLE_NAME" - saving same value: "STATPHI_595730051"
0.04: ...Session State: Save "P2_TYPE" - saving same value: "2"
0.04: ...Session State: Save "P2_CALENDAR" - saving same value: "PA"
0.04: ...Session State: Save "P2_FILE_NAME" - saving same value: ""
0.04: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
0.04: Branch point: BEFORE_COMPUTATION
0.04: Computation point: AFTER_SUBMIT
0.04: Tabs: Perform Branching for Tab Requests
0.04: Branch point: BEFORE_VALIDATION
0.04: Perform validations:
0.04: Branch point: BEFORE_PROCESSING
0.04: Processing point: AFTER_SUBMIT
0.04: Item button "P2_PURGE_TABLE" pressed process.
0.04: ...Process "DROP TABLE": PLSQL (AFTER_SUBMIT) DROP TABLE &P0_TABLE_NAME. CASCADE CONSTRAINTS;
0.06: Encountered unhandled exception in process type PLSQL
0.06: Show ERROR page...
0.06: Performing rollback...
----Hi user631592 ;-)
You can't used directly a DDL statment.
But you can use an EXECUTE IMMEDIATE in your process.
SO
BEGIN
EXECUTE IMMEDIATE ' DROP TABLE STATPHI_595730051';
END;
Regards -
Drop table if exists in sql statement
Oracle: 10G
Is there a way to check if table exist and then only drop table. Something like:
drop table (select table_name from user_tables where lower(table_name) = 'o2i_filing_dest')As already suggested, you could e.g. use an anonymous PL/SQL block as part of your SQL script, e.g. something like that:
set echo on
spool <your_log_file>
WHENEVER SQLERROR EXIT FAILURE
DECLARE
PROCEDURE EXEC_DONT_FAIL( P_CMD IN VARCHAR2 ) IS
e_table_or_view_does_not_exist exception;
pragma exception_init(e_table_or_view_does_not_exist, -942);
e_type_does_not_exist exception;
pragma exception_init(e_type_does_not_exist, -4043);
e_sequence_does_not_exist exception;
pragma exception_init(e_sequence_does_not_exist, -2289);
BEGIN
EXECUTE IMMEDIATE P_CMD;
EXCEPTION
WHEN e_table_or_view_does_not_exist OR e_type_does_not_exist OR e_sequence_does_not_exist THEN
NULL;
END;
BEGIN
EXEC_DONT_FAIL('drop type <type_name1> force');
EXEC_DONT_FAIL('drop view <view_name1>');
EXEC_DONT_FAIL('drop table <table_name1> purge');
EXEC_DONT_FAIL('drop sequence <seq_name1>');
END;
CREATE TABLE ...Note that the literals in angle brackets are just placeholders for demonstration purposes, you need to use your actual object names/file names there.
Of course you could also use a FOR ... LOOP in the PL/SQL block that queries e.g. USER_OBJECTS to find out which objects to drop.
That way it is ensured that only expected exceptions will be ignored but all others will raise and stop your script in that case.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/
Edited by: Randolf Geist on Sep 25, 2008 10:09 AM
Clarification regarding angle brackets added
Maybe you are looking for
-
How do I Rename Mac Hard Drive with Home Folder Only?
Hello, I have a Macbook Pro with an SSD which has OSX Snow Leopard and my Applications, and the other hard drive has my Home Folder. I replaced the optical drive with the SSD. The other hard drive has the standard name of 'Macintosh HD'. I need to ch
-
Hello, I have a mid 2011 iMac i5. I have an older dell monitor that I am trying to add as a second display. When I hooked up the monitor I used the VGA to divi adapter, then divi to thunderbolt. I don't have the shorter VGA to thunderbolt adapter or
-
One message type different IDoc Types
Hi All, Can we use one message type and different data types based on the requirement in PI mapping.Basically I want to select mappings based on IDoc ...My requirement is to use different IDoc types for one message type in mapping ...will it work ?
-
"Adobe InDesign is missing required files. Please reinstall."
Hi EveryOne ! "Adobe InDesign is missing required files. Please reinstall. Missing files: \Program Files\Common FIles\Adobe\TypeSupport\...\CP1252.TXT" This is the message I keep receiving on CS5.5 of InDesign. I am running InDesign CS5.5 North Ameri
-
Hi all, Can anybody guide me through this scenario... I have activated the workflow for PO release. I have a 3 step release strategy. In the third step there are authorizations for 4 number of HOD's. In Workflow for object ID - USER, I can give only