dcsimg
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: i am fired..

  1. #1
    Join Date
    Apr 2001
    Posts
    126

    Exclamation

    hi,

    But the table name is not dual.
    the trigger is


    begin
    :NEW.TIMESTAMP := sysdate;
    end;


    i queried "select owner, table_name from dba_tables where table_name = 'DUAL'; "

    I got the result as

    OWNER TABLE_NAME
    ------------------------------ --------------------------
    SYS DUAL


    Also i queried "select count(1) from dual;
    Resut COUNT(1)
    ----------
    2

    please give me some solution

    Thanx in advance

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Somehow 2 rows are stored in dual table. To correct this , rerun catalog.sql and catproc.sql.

  3. #3
    Join Date
    Apr 2001
    Posts
    126

    Thumbs down going strange....in full

    oops... is that the only way!!!!!.

    will it not overwrite the data dictionary...

  4. #4
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Fordikon - we are now up to at least 3 threads on this same topic. Please try to keep the posts in the same thread.

    Thanks,

    - Chris

  5. #5
    Join Date
    Mar 2001
    Location
    Ireland/Dublin
    Posts
    688

    Re: going strange....in full

    May be you shall just delete 1 raw from the dual. It has to have 1 record:
    SQL> select * from dual;
    D
    -
    X

  6. #6
    Join Date
    Apr 2001
    Posts
    126
    dear anyone please give me the solution....

    it is my burning issue..

  7. #7
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447

    Re: going strange....in full

    Originally posted by fordikon
    oops... is that the only way!!!!!.

    will it not overwrite the data dictionary...
    No it wont, catalog just create view on existing tables no table is altered (therefore no data is touched)
    catproc creates procedures

  8. #8
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    So delete 1 of the rows.

    Why in the world do you have more than 1 row in Dual??

    First, make sure it is the DUAL table we all know and love. There should only be a single dual table in your database, and it should be owned by sys and it should looklike this:


    CREATE TABLE DUAL (
    DUMMY VARCHAR2 (1))
    TABLESPACE SYSTEM
    PCTFREE 10
    PCTUSED 40
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 16384
    NEXT 16384
    PCTINCREASE 50
    MINEXTENTS 1
    MAXEXTENTS 505
    FREELISTS 1 FREELIST GROUPS 1 )
    NOCACHE;


    When you do SELECT * FROM DUAL, you should get this:

    DUMMY
    --------
    X

    So,

    - If there are any other DUAL tables in the database - drop them

    - If the SYS.DUAL table does not look like the one I listed above - drop it and use my script to re-create it. Then add:
    GRANT SELECT ON DUAL TO PUBLIC WITH GRANT
    OPTION;

    - If there is only 1 table and it is the correct table but simply has too many rows, then:
    DELETE FROM DUAL WHERE DUMMY <> 'X';

    - If there are multiple rows with the value of 'x', then use the ROWID solution from this very similar post:

    http://www.dbasupport.com/forums/sho...threadid=11708

    - chris

  9. #9
    Join Date
    Apr 2001
    Posts
    126

    Angry

    Is running catproc and catalog is the right way ... is this from "sys" user?.


    What is the problem here.. please explain. and the what happens it i run these scripts..

  10. #10
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Yes, that is the best safe way. Run the cat procedures to fix the issue.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width




×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.