Results 1 to 3 of 3

Thread: Database Lock

  1. #1
    Join Date
    Dec 2003
    Posts
    10

    Unanswered: Database Lock

    Hi Guys,

    When I tried to create a materializd view, the database got locked. The mview holds previous months data at any point of time. Plz help me out

    CREATE MATERIALIZED VIEW XXX_MVIEW
    TABLESPACE USERS
    NOCACHE
    NOPARALLEL
    BUILD IMMEDIATE
    REFRESH COMPLETE
    ON DEMAND
    START WITH TO_DATE('10-DEC-2003 11:00:00','dd-mon-yyyy hh24:mi:ss')
    NEXT trunc(sysdate) +13/24
    WITH ROWID
    USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE AS
    SELECT *
    FROM YYYYY
    WHERE
    REFERENCE_DT BETWEEN TRUNC(ADD_MONTHS(SYSDATE,-1),'MON')
    AND LAST_DAY(TRUNC(ADD_MONTHS(SYSDATE,-1),'MON'))

  2. #2
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273

    Re: Database Lock

    Originally posted by shanebeast

    When I tried to create a materializd view, the database got locked.

    Lock on the database?
    How do you know that it is a lock on the database?

    I have not seen database lock.
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

  3. #3
    Join Date
    Dec 2003
    Posts
    10

    re

    Fine, Even I got the message from the DBA that your script is locking the database and the users were not able to access it. I'm not so sure how it happened

Posting Permissions

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