How to drop a table in another schema.

Hi there, was looking to drop a table that is currently created under GL schema when consolidation process is done. These tables are kind of temporary and stay there if consolidation process doesn't complete successfully.
So, I'm try to execute a script that would drop the table but the particularity is that this drop isn'T executed by apps but with bolinf (custom user).
So, while trying to delete it with bolinf, I always get an error message that the table doesn't exists or so.
Here's the code
r_gl_int_ctrl.INTERFACE_TABLE_NAME is retreived from gl_interface_control table and from INTERFACE_TABLE_NAME column.
EXECUTE IMMEDIATE 'DROP TABLE GL.' || r_gl_int_ctrl.INTERFACE_TABLE_NAME;
and this generates the following error : ORA-00942: table or view does not exist
R12.0.6
RDBMS 10.2.0.3.0
Custom package under bolinf schema is trying to drop GL.GL_CONS_INTERFACE_38190 and it's not working. Nevertheless, if I install this package under apps, table get dropped.
Is there a way that I can drop a GL table like GL.GL_CONS_INTERFACE_38190 from BOLINF schema ? If so, what privileges/grant should user BOLINF have in order to drop this table from a GL Schema ?
Thank you.

Hi;
You need to give drop grant to your user.Easy way is to give
GRANT DROP ANY TABLE TO USER; << but its mean it will give drop grant for all table.
Also see:
OERR: ORA 942 "table or view does not exist" [ID 18536.1]
Regard
Helios

Similar Messages

  • How to drop all tables in perticular schema??

    Hi,
    I am new in oracle.
    I want to drop all tables in one perticular schema,
    Please tell me solution.
    PratHamesh

    If your few of your tables have referential intigrity constraints and trying to drop master table whithout droping child table first, oracle will produce an error.
    Better option would be to drop the entire schema and then create a new schema with the same name.
    on sql plus.
    set long size 20000
    select dbms_metadata.get_ddl('USER','USERNAME') from dual;
    --then save the above output to create the user later.
    drop username cascade
    use the above saved script to create the user again.
    Jaffar

  • How to share data in "User_*" tables with another schema

    I would like to share the data in the USER_SEGMENTS table with another schema. If I create a view and grant select on the view, when the other schema queries the view the data is identical to themselves querying the SYS.user_segments table directly.
    create view sys_user_segments as select * from sys.user_segments;
    grant select on sys_user_segments to A;My guess is that the SYS.user_segments table is a view based on the current user.
    Is there a way to share this data without creating a copy of the table?
    Oracle: 10g
    Thanks

    Hi,
    All the data dictionary "tables" whose names start with user_ (or all_ or dba_) are actually views, and what results they bring back depend on what schema you logged in to. I don't think there's any way to allow user A to directly see what's in user B's version of user_segments.
    Why do you need this? Can you use the all_ views instead, by giving A some privileges on B's objects?
    Failing that, you can replicate the data into a regular table. Inside a AUTHID DEFINER stored procedure, the data dictionary views (such as user_segments) are the versions of the procedure owner, so B can write a stored procedure (let's call it populate_my_segments) that populates a regular table (let's call it my_segements), and then grant EXECUTE privilges on populat_my_segments and SELECT privileges on my_segements to user A. A can then refresh the table and look at it whenever he wants to.
    If A only needs to see a little information, e.g. the total number of bytes, from B's user_segments, then B can write a function just to return that information.

  • How can we copy table from one schema to other schema

    Hi,
    I have create one table in one schema and i want to copy it to other schema.How we can copy table from one schema to other schema

    Hi,
    You can try something like this :-
    SQL> CONNECT SYS/SYS123@SERVER AS SYSDBA
    Connected.
    SQL> CREATE USER TEST_1 IDENTIFIED BY TEST_1;
    User created.
    SQL> CREATE USER TEST_2 IDENTIFIED BY TEST_2;
    User created.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_1;
    Grant succeeded.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_2;
    Grant succeeded.
    SQL> CONNECT TEST_1/TEST_1@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY ( TEST_COL NUMBER );
    Table created.
    SQL> INSERT INTO TEST_COPY VALUES ( 1 );
    1 row created.
    SQL> INSERT INTO TEST_COPY VALUES ( 2 );
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT ALL ON TEST_COPY TO TEST_2;
    Grant succeeded.
    SQL>  CONNECT TEST_2/TEST_2@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY AS SELECT * FROM TEST_1.TEST_COPY;
    Table created.
    SQL>  SELECT * FROM TEST_COPY;
      TEST_COL
             1
             2Regards,
    Sandeep

  • How to drop multiple tables in SQL Workshop

    Hi,
    I'd like to drop multiple tables in one time but
    SQL command processor returnes error message: ORA-00933.
    Could you please tell me how to drop multiple tables in
    one time?
    My trial was follows
    Drop table "table1", "table2"
    Result
    ORA-00933: SQL command not properly ended
    Regards,
    Hideki Sakamoto

    Hideki,
    SQL syntax permits you to specify only one table in a DROP TABLE command.
    The SQL Command Processor permits you to run one statement or PL/SQL block per submission.
    So there are at least two ways you can do this. You could either upload or create a SQL script in SQL Workshop which contains your multiple statements:
    drop table "table1"
    drop table "table2"
    or you could execute a single anonymous PL/SQL block in the SQL Command Processor, as in:
    begin
    execute immediate 'drop table "table1"';
    execute immediate 'drop table "table2"';
    end;
    Joel

  • Connect role allows user to update/delete row of a table of another schema

    I am using oracle 9i r2, I created a user and only give him CONNECT role. Then I opened the sqlplus and found that he could query table of another schema which doesn't belong to the new user, but the thing which scares me most is that when I tried to update/delete a row from a table of another schema, it succeeded. Also, I created a new role with system priviledges CREATE_SESSION and SELECT_ANY_TABLE then granted to new user and revoked the CONNECT role but the same thing happened like before. What I am doing wrong? By the way, I am trying to create a read only user. Any help is greatly appreciated.

    Thanks guys for the tips. I have forgotten to mention that this situation happened only in a new created schema which has only a table and the table was exported from another oracle db( I pre-created the user with connect role and assign the tablespace etc), the import worked fine. Then I used a read only user(in different schema) to update/delete row to the imported table.The read only user can't update/delete other schemas besides from the new one. Is that I missed something when importing the table or pre-create user, tablespace, etc? Thanks in advance.

  • How to view tables in another schema in the database

    I am starting to use the SQl Developer 1.5.
    We can connect to an oracle database successfully, expanding the tables, it shows the list of tables of one schema.
    We have other schema in the database. In the query panel, when we type in the name of the other schema such as tcs. then some table names will popup in the intellisense.
    How can we show the list tables in other schema within the same database.

    In SQL Developer left panel, there's a browse tree. There's a 'Other Users' branch under each database, expand that you will see all the option to check user's objects. Your user need to have check dictionary privilege

  • How to create table in another schema of same database

    Hi..
    I've a database DB1
    and has 2 schemas / USers in that..
    Usr1 and Usr2...
    And i created a TEMP table in Usr1 schema... and created
    Then tried the following statement in Usr2 schema...
    CREATE TABLE TEMP AS SELECT * FROM Usr1.TEMP;
    Then it's giving error that ...
    :00942 TABLE OR VIEW DOESN'T EXIST..
    What is the reason for that...
    Thank you

    josh1612 wrote:
    What other grants do i need to give so as to replicate the Primary Keys also...????That's not a matter of grants. It's the way the CREATE TABLE AS SELECT statement works. It does not copy over indexes, primary key constraints, unique constraints, foreign key constraints, etc.
    If you want to copy all that over, you would probably want to get the DDL from the original table (using the DBMS_METADATA package if you're in a recent version), modify the DDL with the new schema name, create the table, indexes, and constraints, and then do an INSERT ... SELECT to populate the data. Or do an export & import of the table from one schema to another.
    Justin

  • How to move one table to other schema

    Hi;
    imagine i have one schema A and i create table in this schema as test. Now i have one other schema,name is B. I wanna move my A.test table to B.test2
    How i can do it?
    thanks

    Following discussion might help How to move the table to the another schema?

  • How to drop the tables (articles) in subscription database MERGE replication.

    We have configured the merge replication from publication server to subscription server,
    Here I mistakenly selecting few tables (articles) in publication,
    Now I need to remove those mistakenly selected tables in subscription server database . 
    Note: I am trying to below way but unable to remove those tables in subscription server.
    1<sup>st</sup> I unselected those tables (articles) in publication, but not working.
    Could please tell me the how to remove those tables in subscription database.

    Ok that is normal, dont worry, if you mistakenly  chosen few tables, just add the new tables
    that you forgot it, just make click on the publication, you only have to Re-run the snapshot agent, i mean you must generate another snapshot and then synchronice with your suscriber, and then you will not need DROP the tables on the suscriber, if you have
    troubles yet, please post imagens to help you more !
    Thanks and regards.

  • How to update one table from another

    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?

    Comet wrote:
    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?I am not convinced you have what you think you have
    >
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    When you want to produce a DATE datatype when starting with a string,
    you must use TO_DATE() on the SET line!
    (TO_CHAR(received_date,'RRRR') + 2000)since when do you do add characters (from TO_CHAR) with a constant number (2000)?
    You should NEVER EVER rely on implicit datatype conversion
    Edited by: sb92075 on Jul 27, 2011 7:09 PM

  • Report on a table from another schema

    hi,
    i have a table PROJECTS in schema CSALE when i create a report in APPEXP application (persing via user TESTER2) it gives me the error table does not found while TESTER2 has full writes on PROJECTS table.
    select project_id ID, Project_name DESC from SCALE.PROJECTS;
    when i run this query from SQL PLUS it works fine.
    I have used synonym it giving me the error
    ORA-04045: errors during recompilation/revalidation of TESTER2.PROJECTS
    ORA-00980: synonym translation is no longer valid
    Please help me how can i create a report on the table of other schema.
    Thanks

    In your schema CSALE (SCALE you stated as well)
    GRANT SELECT ON projects TO tester2In your schema TESTER2
    CREATE OR REPLACE SYNONYM projects FOR csale.projectsnow
    SELECT project_id ID, project_name description
      FROM projects;should work for you.
    Please note:
    You were using a reserved word in your query (DESC) for column alias for Project_name.
    Denes Kubicek

  • How to find full tables hierarchy in schema

    Hi,
    How to find the table hierarchy list from oracle schema by using Reference Key constraint?
    In my schema I am having many tables, approximate 4000 and from there I needs to get a single list which should be based in the Foriegn key based (Parent tables should be first then child tables)
    Regards
    Anee

    You can start with this
    select A.table_name children,
             B.TAble_name Father
    from DBA_CONSTRAINTS A,
            DBA_CONSTRAINTS B
    WHERE A.CONSTRAINT_TYPE = 'R'
         And B.Constraint_name = a.r_Constraint_name

  • How to put a table into another pop up window?

    My problem now is how are we going to see a table in another window when we click a button???????
    --liml                                                                                                                                                                                                               

    Your question seems not difficult to solve. Write an ActionListener for your button click, which can brings up a JFrame or JDialog. You can put your table on the content pane of the Jframe or JDialog, if necessary, with the help of a JScrollPane instance.

  • How to drop multiple tables in one statement

    I could used to run the below syntax to drop multiple tables in MS SQL, but it doesn't work in Oracle seems like, I am using free Oracle SQL Developer. Not a big deal but wanna know if this can be done. Thanks,
    DROP TABLE A, B, C, D, F

    I'm not so sure in 1 select statement is it possible or not but you can try to use in this manner to see what happens ->
    drop table &tab;
    Enter value for tab: A
    Table A Successfully dropped.
    Enter value for tab: B
    Table B Successfully dropped.Regards.
    Satyaki De.

Maybe you are looking for

  • My Firefox cannot access mms://apasf.apa.at/radio_salzburg.

    Dear Sir/Madam, I enjoy using Firefox (much better than IE!!!). I am trying to listen to Radio Salzburg using online streaming. When I click on the link '''Radio Salzburg live hören''' on the web page '''http://salzburg.orf.at/magazin/studio/streamin

  • Networking a G4 to a G5

    I have a iMac G5 connected to a cable modem and have moved my old 1.25 iMac G4 upstairs. What is the cheapest way to network the two? Neither computer has been upgraded in any way. iMac G5 2.0   Mac OS X (10.4.3)  

  • Editable text inside draggable movie clip

    I am dinamically creating textfields inside movie clips. Those movie clips are all dragabble (startDrag). The problem is that those textfields are supposed to be editable (input type) but once I attach startDrag to them, it's impossible for them to g

  • CS3 & WacomCTE  Ink color resetting to black

    I have so far not found reference to this problem. Up until now everything great, older driver+sapphire+CS3 in Vista, but today my pen periodically reset to black while having another color selected, only to return to the selected color in a new laye

  • Howto stop the application module from using a DB

    Hello, Maybe and unusual question, but is there a way to stop the application module from connect to a DB? I know its purpose is to do so. But currently we are using 'stub' views and entities. In the executequery and dodml we wrote our own code to ac