Timeout when creating a view

Hi, apologies if this has been posted in the wrong place, new to SQL Server and these forums!
We have a large-ish transaction file (around 57million rows currently) which i'm trying to aggregate to a weekly level to aid with reporting, so attempting to create a view in SQL Server Management Studio but getting the below error:
'Tmeout Expired. The timeout perioed elapsed prior to completion of the operation or the server is not responding'
below is the SQL for the view:
SELECT TOP (100) PERCENT dbo.D_TIME2.RET_YEAR,
dbo.D_TIME2.RET_MONTH,
dbo.D_TIME2.RET_WEEK_ID,
dbo.F_DSTSKU.DOOR_ID,
dbo.F_DSTSKU.DOCTYPE,
dbo.F_DSTSKU.SELLTHRU_TYPE,
dbo.F_DSTSKU.CURRENCY,
dbo.F_DSTSKU.SKU_ID,
SUM(dbo.F_DSTSKU.SALES_UNITS) AS Units,
SUM(dbo.F_DSTSKU.SALES_VALUE) AS Value
FROM dbo.F_DSTSKU
LEFT OUTER JOIN
dbo.D_TIME2
ON dbo.F_DSTSKU.TRANSACTION_DATE = dbo.D_TIME2.DATE
GROUP BY dbo.D_TIME2.RET_YEAR,
dbo.D_TIME2.RET_MONTH,
dbo.D_TIME2.RET_WEEK_ID,
dbo.F_DSTSKU.DOOR_ID,
dbo.F_DSTSKU.DOCTYPE,
dbo.F_DSTSKU.SELLTHRU_TYPE,
dbo.F_DSTSKU.CURRENCY,
dbo.F_DSTSKU.SKU_ID
ORDER BY dbo.D_TIME2.RET_YEAR,
dbo.D_TIME2.RET_MONTH,
dbo.D_TIME2.RET_WEEK_ID,
dbo.F_DSTSKU.DOOR_ID,
dbo.F_DSTSKU.DOCTYPE,
dbo.F_DSTSKU.SELLTHRU_TYPE,
dbo.F_DSTSKU.CURRENCY,
dbo.F_DSTSKU.SKU_ID
I've checked through all the properties i can find, and query execution is either set to unlimited or 65,000 seconds, but i'm getting this error popping up after about 30 seconds. Any ideas?

A view, like a table, has no inherent order despite your attempt to make it so.  By definition, any resultset is unordered if the generating query does not include an order by clause.  Do not be fooled - many have.  The only reason an order
by clause is allowed in a view is to support the top clause - but the database engine is smart enough to ignore the use of "top 100 percent" since it is a meaningless directive. 
Next - and this likely has nothing to do with your issue - is the use of an outer join.  I hope you understand what the effect of this join is on the results your query generates.  If your current data is such that there is always a match for every
row between the tables, you may be misleading yourself. 
Next - what is the version, edition, and sp level of your server instance and what is the compatibility level of the database if it is not current with the version?  This is something you should always identify when posting questions.  It is usually
relevant information.
Next - I suggest you create the view using a create sql statement (as opposed to the SSMS gui).  You will find that SSMS can get in the way of performing a task and can add some problems of its own. 
Lastly, make no assumptions and help your readers help you.  Presumably F_DKTSKU and D_TIME2 are tables.  If they are views, that adds another layer of complexity to the problem.  For this reason it is generally advisable to include the DDL
for the tables and objects involved in your question.  It would also help to see the complete view definition - including all of the options you have chosen (explicitly or implicitly).  But first try to create your view with an actual query. 
That alone has a high probability of succeeding.

Similar Messages

  • Error when creating a view in r/3

    Guys,
    This is the first time creating a view in my R/3 sandbox, when I try to save it for the first time, It is asking for the development class, as it is just sand box, I typed "$TMP" and trying to save it as a local object.
    But it give me an error saying "Test objects cannot be created in foreign namespaces". What do I need to do now.
    Please help...Urgent...
    Points are assured...
    Thanks in advance,

    Guys,
    I got it. The name of the view was not named starting with 'Z'. So I renamed it as 'ZREQ_DAT' and it works now.
    Thanks,
    Sirish.

  • Error when Create Materialized View

    Hi
    When I tried to create MV show me error :
    SQL> @CRIA_MV_ARC_BW.SQL
    AND INDUSTRIAL.CD_FABRICA = SUBSTR(ARC.DS_ARC, 1, 3)
    ERROR at line 88:
    ORA-01031: insufficient privilegesI am using Oracle 9.02 and there are Grant for all Tablles , my query of creation is:
    CREATE MATERIALIZED VIEW CLIBGF.MV_ARC_BW
    NOCACHE
    LOGGING
    NOPARALLEL
    BUILD IMMEDIATE
    REFRESH FORCE
    START WITH TO_DATE('26-nov-2009 02:00:00','dd-mon-yyyy hh24:mi:ss')
    NEXT trunc(sysdate) + 1/12
    ENABLE QUERY REWRITE
    AS
    SELECT     MAX(NVL((SELECT  DECODE(A.T$CDNG$O,'F',DECODE(TRIM(B.T$CALC$O),'S','C',A.T$CDNG$O),A.T$CDNG$O)
                     FROM TRITON.TTDFAT995501 A, TRITON.TTDFAT996501 B
                    WHERE A.T$OCOM$O + 0 = ARC.CD_UNIDADE_EXPEDIDORA
                      AND A.T$NDOC$O = NOTAS.CD_NOTA
                      AND (A.T$OCOM$O = B.T$OCOM$O AND A.T$NREF$O = B.T$NREF$O)
                                        AND ROWNUM =1),
                   0)) NEGOCIO,
           ARC.CD_CLIENTE CD_CLIENTE,
           CLIENTE.T$NAMA DS_CLIENTE,
           ARC.CD_ARC,
           ARC.CD_STATUS,
           ARC.CD_STATUS || ' - ' || STATUS.DS_STATUS STATUS,
           TO_CHAR(ARC.DT_EMISSAO, 'DD/MM/YYYY') DT_EMISSAO,
           TO_CHAR(ACAO_INV.DT_REALIZADO, 'DD/MM/YYYY') DT_REALIZADO_INVESTIGACAO,
           ARC.CD_MARCA || ' - ' || MARCA.T$DSMA$O MARCA,
           ARC.CD_PRODUTO CD_PRODUTO,
           EMBALAGEM.T$CDAC$O || ' - ' || EMBALAGEM.T$DESC$O DS_EMBALAGEM,
           SUBSTR(ARC.DS_ARC, 1, 3) CD_COMPANHIA_PRODUTORA,
            ARC.CD_MOTIVO_RECLAMACAO CD_MOTIVO_RECLAMACAO,
            MOTIVO.DS_ITEM DS_MOTIVO_RECLAMACAO,
           DECODE(ARC.FL_PROCEDENCIA, 0, 'PROCEDENTE', 1, 'IMPROCEDENTE', ' ') PROCEDENCIA,
           SUM(NVL((SELECT SUM(NVL(T$IQUA$O, 0))
                     FROM TRITON.TTDFAT995501 A, TRITON.TTDFAT996501 B
                    WHERE A.T$OCOM$O + 0 = ARC.CD_UNIDADE_EXPEDIDORA
                      AND A.T$NDOC$O = NOTAS.CD_NOTA
                      AND (A.T$OCOM$O = B.T$OCOM$O AND A.T$NREF$O = B.T$NREF$O)),
                   0)) NR_QUANTIDADE_VENDIDA,
               ARC.NR_QUANTIDADE_AFETADA NR_QUANTIDADE_AFETADA,     
           ARC.NR_QUANTIDADE_AFETADA_REAL NR_QUANTIDADE_AFETADA_REAL,
           DS_JUSTIFICATIVA DSJUST
      FROM ARCTB_ARC                 ARC,
           ARCTB_NOTAS               NOTAS,
           ARCTB_TABELA_MOTIVO       MOTIVO,
           ARCTB_ACAO_IMEDIATA       ACAO_INV,
           ARCTB_ACAO_IMEDIATA       ACAO_IME,
           ARCTB_STATUS              STATUS,
           TRITON.TTCCOM010501       CLIENTE,
           TRITON.TTCCOM936501       CIDADE,
           TRITON.TTIITM001810       D,
           TRITON.TTIITM983501       PRODUTO,
           TRITON.TTFGLD010806       CC,
           TRITON.TTCCOM983501       MARCA,
           TRITON.TTCCOM000501       CIA,
           TRITON.TTIITM982501       NAT,
           SEI.SIBTB_MULTIMARCA      MULTIMARCA,
           SEI.SIBTB_DIRETORIA_DEPTO DIRETORIA,
           TRITON.TTCCOM994501       USUARIO,
           ARCTB_GERENCIA_INDUSTRIAL INDUSTRIAL,
           TRITON.TTIITM984501       EMBALAGEM
    WHERE ARC.CD_ARC = NOTAS.CD_ARC(+)
       AND ARC.CD_ARC = ACAO_INV.CD_ARC(+)
       AND ACAO_INV.CD_TIPO_ACAO(+) = 0
       AND ACAO_INV.CD_ACAO_IMEDIATA(+) = 999
       AND ARC.CD_ARC = ACAO_IME.CD_ARC(+)
       AND ACAO_IME.CD_TIPO_ACAO(+) = 1
       AND ACAO_IME.CD_ACAO_IMEDIATA(+) = 999
       AND ARC.CD_CLIENTE = CLIENTE.T$CUNO(+)
       AND CLIENTE.T$ESTA$L = CIDADE.T$ESTA$L(+)
       AND CLIENTE.T$CDMU$L = CIDADE.T$MUNI$L(+)
       AND TRIM(REPLACE(ARC.CD_PRODUTO, '-', '')) =
           TRIM(REPLACE(D.T$ITEM(+), '-', ''))
       AND TRIM(REPLACE(ARC.CD_PRODUTO, '-', '')) =
           TRIM(REPLACE(PRODUTO.T$ITEM$O(+), '-', ''))
       AND PRODUTO.T$PROC$O = NAT.T$PROC$O(+)
       AND EMBALAGEM.T$CDAC$O(+) = PRODUTO.T$CDAC$O
       AND ARC.CD_MOTIVO_RECLAMACAO = MOTIVO.CD_ITEM(+)
       AND ARC.CD_MARCA = MARCA.T$CDMA$O(+)
       AND SUBSTR(ARC.DS_ARC, 1, 3) = CIA.T$NCMP(+)
       AND ARC.CD_STATUS = STATUS.CD_STATUS(+)
       AND TRIM(ARC.CD_CENTRO_CUSTO) = TRIM(CC.T$DIMX(+))
       AND CC.T$DTYP(+) = 2
       AND CC.T$SUBL(+) = 0
       AND ARC.CD_DEPTO_MULTIMARCA = MULTIMARCA.CD_MULTIMARCA(+)
       AND ARC.CD_DEPTO = DIRETORIA.CD_DEPTO(+)
       AND ARC.CD_USUARIO = TRIM(USUARIO.T$CDUS$O(+))
       AND ARC.CD_STATUS IS NOT NULL
       AND ARC.CD_MOTIVO_RECLAMACAO = MOTIVO.CD_ITEM(+)
       AND INDUSTRIAL.CD_FABRICA = SUBSTR(ARC.DS_ARC, 1, 3)
       GROUP BY TO_CHAR(ARC.DT_EMISSAO, 'YYYY'),
              TO_CHAR(ARC.DT_EMISSAO, 'MM'),
              ARC.CD_ARC,
              ARC.DS_ARC,
              ARC.DS_SUPERVISOR,
              ARC.CD_STATUS,
              STATUS.DS_STATUS,
              TO_CHAR(ARC.DT_EMISSAO, 'DD/MM/YYYY'),
              TO_CHAR(ACAO_INV.DT_ORIGINAL, 'DD/MM/YYYY'),
              TO_CHAR(ACAO_INV.DT_REALIZADO, 'DD/MM/YYYY'),
              TO_CHAR(ACAO_IME.DT_ORIGINAL, 'DD/MM/YYYY'),
              TO_CHAR(ACAO_IME.DT_REALIZADO, 'DD/MM/YYYY'),
              TO_CHAR(ARC.DT_PROCEDENCIA, 'DD/MM/YYYY'),
              TO_CHAR(ARC.DT_RECEBIMENTO, 'DD/MM/YYYY'),
              TO_CHAR(NVL(ARC.DT_APROVACAO_INDUSTRIAL,
                          ARC.DT_APROVACAO_COMERCIAL),
                      'DD/MM/YYYY'),
              ARC.CD_CLIENTE,
              CLIENTE.T$NAMA,
              CIDADE.T$DSCA$L,
              ARC.CD_MARCA,
              MARCA.T$DSMA$O,
              ARC.CD_PRODUTO,
              D.T$SEAK,
              EMBALAGEM.T$CDAC$O || ' - ' || EMBALAGEM.T$DESC$O,
              NAT.T$DESC$O,
              ARC.NR_LOTE,
              ARC.DT_FABRICACAO,
              SUBSTR(ARC.DS_ARC, 1, 3),
              CIA.T$CITY,
              ARC.CD_MOTIVO_RECLAMACAO,
              MOTIVO.DS_ITEM,
              DECODE(ARC.FL_PROCEDENCIA,
                     0,
                     'PROCEDENTE',
                     1,
                     'IMPROCEDENTE',
              ARC.DS_DISPOSICAO,
              ARC.CD_CENTRO_CUSTO,
              CC.T$DESC,
              ARC.NR_QUANTIDADE_AFETADA,
              DS_JUSTIFICATIVA,
              DS_DISPOSICAO,
              CD_RESPONSAVEL_CAUSA,
              ARC.NR_QUANTIDADE_AFETADA_REAL,
              ARC.DT_ATENDIMENTO,
              MOTIVO.CLASSIFICACAO,
              ARC.DS_COORDENADOR,
              ARC.FL_ATENDIMENTO,
              TO_CHAR(ARC.DT_ATENDIMENTO, 'DD/MM/YYYY'),
              ARC.DS_COORDENADOR_INVESTIGACAO,
              INDUSTRIAL.REGIAO
    ORDER BY ARC.CD_ARC DESC;
    Edited by: muttleychess on Nov 25, 2009 10:25 AM

    Please see my privilege
    GRANTEE PRIVILEGE ADM
    CLIBGF CREATE TABLE NO
    CLIBGF CREATE ANY VIEW NO
    CLIBGF CREATE SNAPSHOT NO
    CLIBGF SELECT ANY TABLE NO
    CLIBGF CREATE ANY TRIGGER NO
    CLIBGF CREATE ANY SNAPSHOT NO

  • Timeout when creating socket in EJB

    What is the best way to solve the problem when creating sockets and being dependant
    on the timeout of the JVM. On windows the timeout is approx. 20 seconds. But on
    Solaris the same operation has timeout of more than 200 seconds...
    Socket sock = new Socket(host, port);
    The solution seems to be using threads. But threads are not allowed in EJB's...
    Dows anyone have a solution for this?
    Mala

    Hello Tor,
    Try the following:
    Socket s = new Socket();
    s.connect(socketAddress, timeOut);
    These features are available in J2SE 1.4 and above.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Tor Mala" <[email protected]> wrote:
    >
    What is the best way to solve the problem when creating sockets and being
    dependant
    on the timeout of the JVM. On windows the timeout is approx. 20 seconds.
    But on
    Solaris the same operation has timeout of more than 200 seconds...
    Socket sock = new Socket(host, port);
    The solution seems to be using threads. But threads are not allowed in
    EJB's...
    Dows anyone have a solution for this?
    Mala

  • "Invalid Metadata Objects" when creating materialized views

    Hi experts,
    I have run into some trouble. I had an analytic workspace that grew too fast (see 11.2.0.2 AW size grows steadily with every cube build so I deleted it and created a new one.
    It seemed to build fine using the tip that David Greenfield gave us in the mentioned forum post, but when I try to enable materialized views (which I had enabled in the previous workspace) I'm gettig the following error:
    Your metadata changes have been saved, with the following errors
    Invalid Metadata Objects:
    Invalid Object "TABLESPACE.LECTURAS": "CREATE MATERIALIZED VIEW "TABLESPACE"."CB$LECTURAS"
    ORGANIZATION CUBE ON TABLESPACE.TABLESPACE_AW(
    FACT "LECTURAS_STORED"("LECTURAS_MEASURE_DIM" 'LECTURA') IS "LECTURA",
    DIMENSION "TIEMPO" IS "TIEMPO" USING "TIEMPO_TIEMPO_HOUR_ID_UNIQUE_KEY" ,
    DIMENSION "GEOGRAFIA" IS "GEOGRAFIA" USING "GEOGRAFIA_GEOGRAFIA_CONTADOR_ID_UNIQUE_KEY" )
    BUILD DEFERRED
    REFRESH ON DEMAND
    FORCE
    USING TRUSTED CONSTRAINTS
    AS
    SELECT
    TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') "TIEMPO",
    T1."COD_METERID" "GEOGRAFIA",
    SUM(T1."VAL_AI_HOR") "LECTURA"
    FROM
    TABLESPACE."LECTURA_HORARIA_FINAL" T1
    GROUP BY
    (TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') , T1."COD_METERID")
    ORA-00942: table or view does not exist
    Running this same script in SQLDeveloper yields the same error at line 17, which is the FROM clause. BUT I can run the SELECT statement by itself and returns the expected result. So the table exists in the correct tablespace.
    I must be missing something big...
    Thanks in advance.
    Joan
    P.S.: In the code above I'm using "TABLESPACE" in substitution for the real username and tablespace name (which is the same) for privacy reasons.

    When you ran the select statement, were you connected as the same user that you used to try to enable the MVs?
    Can you create a standard (non cube) MV with the same select statement? (Connected as the same user you used in AWM.)
    "CREATE MATERIALIZED VIEW "TABLESPACE"."MV_TEST"
      BUILD DEFERRED
      REFRESH ON DEMAND
      FORCE
      USING TRUSTED CONSTRAINTS
    AS
      SELECT
       TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') "TIEMPO",
       T1."COD_METERID" "GEOGRAFIA",
       SUM(T1."VAL_AI_HOR") "LECTURA"
      FROM
       TABLESPACE."LECTURA_HORARIA_FINAL" T1
      GROUP BY
       (TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') , T1."COD_METERID")
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem when creating a View

    Hi Friends,
               I'm creating a View taking one of the SAP tables as base , and it is giving me warning , that all the "All the fields are marked as keyfields"  why is it doing this?? Is there any solution for this , and when I try to create Genric extractor from this View in RSO2 , It gives me error saying that the extract structure cannot be maintained.This is bcoz some of the Quantities in the View are referencing to some other fields in a different table.Please advice, if anyone faced this earlier.
    thanks in advance,

    The keys of the view will be inherited from the underlying table, and you don't have the ability in a view to adjust them.
    Here is a paste from the F1 screen.  As C.P. says, you're better off with a generic data source (Txn RSO2).
    This indicator shows whether the view field belongs to the key of the view.
    The system automatically derives the key of a view from the key fields of the tables involved in the view and the join conditions.
    The key is defined so that it satisfies the following requirements:
    1. All the key fields must be stored together at the beginning. Fields that do not actually belong to the key but which lie between the key fields are also marked as key fields.
    2. All the data records of the view are already unique in the key. If no key can be defined with this attribute, all the fields of the view are marked as key fields.
    The key of a view has an effect when accessing the view data with OPEN SQL in ABAP programs. The key plays a direct role for example for SELECT SINGLE and for the supplement ORDER BY PRIMARY KEY, but it also plays an indirect role internally when compressing data with SELECT ... FOR ALL ENTRIES.
    As for the unit issue, you need to include the reference field for the unit as part of the view.  In other words, if PRICE refers to CURRENCY, you need to include CURRENCY in the view.
    Sounds to me like whoever created the view needs to tweak it a bit.

  • Ora-00904 when creating a view

    Hello everyone,
    I'm trying to create a view based on 6 tables, and I'm getting an ORA-00904: Invalid column name error. I also tried to do a basic select * from table_name and inserted one of the restrictions in my where clause and am getting the same error. I've checked and re-checked the column names in my script.
    Can anything else be causing this error?
    Rose

    CREATE OR REPLACE VIEW GEN_VISTA_VW (PERSON_ID,
    LAST_NAME, MIDDLE_NAME, FIRST_NAME, ADDRESS, LINE2, LINE3, COMMUNITY, POSTAL_CODE, HOME_PHONE, BUS_PHONE, PROVINCE, HOME_SCHOOL_ID, EMPNO, POSITION, REG_NUMB)
    AS (SELECT
              PERSON.PERSON_ID,
              PERSON.LAST_NAME,
              PERSON.MIDDLE_NAME,
              PERSON.FIRST_NAME,
              PERADDR.LINE1,
              PERADDR.LINE2,
              PERADDR.LINE3,
              PERADDR.CITY,
              PERADDR.ZIP,
              PERPHONE.PHONE_NO,
              TBLLOC.PHONE_NO,
              PERADDR.STATE,
              TBLLOC.LOCATION_CODE,
              EMPCOMP.EMPNO,
              TBLPOS.POSITION_TITLE,
              EMPQUAL.REG_NUMB
         FROM
              PERSON,
              PERADDR,
              PERPHONE,
              TBLLOC,
              TBLPOS,
              EMPCOMP,
              EMPQUAL
         WHERE
              person.person_id = tblpos.person_id
    AND person.person_id = perphone.person_id
         AND person.person_id = peraddr.person_id
         AND person.person_id = empqual.person_id
         AND person.person_id = empcomp.person_id
         AND tblpos.location_code = tblloc.location_code)
    Thank you

  • Is it possible to use a pooled table when creating a view?

    Hi,
    I am trying to create a view based on table A005 but this table is a Pooled table and the system wont allow me to create a view on it.
    Is there any way to do this?
    Thanks,

    Hi,
      Join stmt can not be executed on Cluster tables & pooled tables.
    regards,
    ajit.

  • ORA-12052 when create materialized view

    I following the sample in Oracle document to create materialized viewCREATE MATERIALIZED VIEW LOG ON sales
       WITH ROWID, SEQUENCE(amount_sold, time_id, prod_id)   INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON times
       WITH ROWID, SEQUENCE (time_id, calendar_year)  INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON products
       WITH ROWID, SEQUENCE (prod_id,prod_name)  INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW sales_mv
       BUILD IMMEDIATE   REFRESH FAST ON COMMIT
       AS SELECT t.calendar_year, p.prod_id, p.prod_name,
          SUM(s.amount_sold) AS sum_sales
          FROM times t, products p, sales s
          WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id
          GROUP BY t.calendar_year, p.prod_id, p.prod_name; This works. BUt I actually does not want do aggregation. Thus I changed the MV creation statement toCREATE MATERIALIZED VIEW sales_mv
       BUILD IMMEDIATE REFRESH FAST ON COMMIT
       AS SELECT t.calendar_year, p.prod_id, p.prod_name,s.amount_sold
          FROM times t, products p, sales s
          WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id;I got errorSQL Error: ORA-12052: cannot fast refresh materialized view GLU.SALES_MV
    *Cause:    Either ROWIDs of certain tables were missing in the definition or
               the inner table of an outer join did not have UNIQUE constraints on
               join columns.
    *Action:   Specify the FORCE or COMPLETE option. If this error is got
               during creation, the materialized view definition may have be
               changed. Refer to the documentation on materialized views.Please help or point me to the relevant document.
    Thanks

    damorgan, Thank you for you reply.
    the inner table of an outer join did not have UNIQUE constraints on join columns.
    I am not sure how much clearer and explanation can be written.If you look at the query, you will find that there is no outer join in the query.
    sales table does not have unique constraints on prod_id and time_id. If this is the cause of the problem, I cannot change the data but is there a work around. That is way I ask for specific doc. In 11g documents, I only find some info on CREATE MV. That is mainly on syntax but not on requirement.

  • Insufficient Privileges when create materialized view as user system

    If I login as system (connect sys/****@DevDB) and try to create a materialized view for another schema (e.g. XDCONTROLDB), I get the insufficient privileges error. If I login as sys as sysdba then I can create successfully.
    I have searched some ariticles in Google and grant create any snapshot, create any table, create any view, global query rewrite, select any table system privileges to system but still get the same error.
    Any other privileges I need to grant to system?
    Cheers
    below is a sample script to create the view which get the error:
    CREATE MATERIALIZED VIEW XDControlDB."XDTest1" PCTFREE 10
    PCTUSED 0 MAXTRANS 255
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE START WITH sysdate NEXT sysdate + 1/24
    ENABLE QUERY REWRITE AS
    SELECT * From XDControlDB.RiskInstance;
    Message was edited by:
    user500168
    Message was edited by:
    user500168

    Thanks for your reply. After I grant privileges to system, I login as system and try to create the view as below which I get the insufficient privileges error:
    CREATE MATERIALIZED VIEW XDControlDB."XDTest1" PCTFREE 10
    PCTUSED 0 MAXTRANS 255
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE START WITH sysdate NEXT sysdate + 1/24
    ENABLE QUERY REWRITE AS
    SELECT 1 From XDControlDB.RiskInstance;
    As you can see, I try to create the view under a schema called 'XDCONTROLDB'. If I login as sys as sysdba, then it create successfully.
    After I create UserA, and grant the privileges I mentioned in the ealier post, I login as UserA, and run the statement above I get the same privileges error. But if I change the stament to below which will create the view under UserA's schema, then it create successfully:
    CREATE MATERIALIZED VIEW UserA."XDTest1" PCTFREE 10
    PCTUSED 0 MAXTRANS 255
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE START WITH sysdate NEXT sysdate + 1/24
    ENABLE QUERY REWRITE AS
    SELECT 1 From XDControlDB.RiskInstance;
    Looking for your suggestions,
    Cheers

  • ORA-01031 when creating a view

    Hi guys,
    I transported a view(custom view ZVIEW) from Development to Production and found that the view was missing the database of the production system.
    When i tried to create the same view usin SE14 am getting a warning
    ORA-01031: insufficient privileges                     
    DDL time(___1): .......119 milliseconds                
    The SQL statement was not executed                     
    Statements for View ZVIEW_STD_TIME could not be executed
    Request for ZVIEW_STD_TIME could not be executed       
    in the system the SAPR3 and OPS$PRDADM has sysdba privilege so i guess SYSCONN need not be implemented.
    Please help.
    Thanks and regards,
    Siddhartha

    Hi Rabi,
    Check below sap notes.
    Note 985607 - ORA-01031 Creating views after upgrade to Oracle 10g
    Note 1028220 - ORA-01031: Insufficient privileges despite SAPCONN role
    Regards
    Ashok

  • Konqueror: Server Timeout When Trying to View Workgroup?

    This is a pretty simple problem, but I have a suspicion that the solution won't be.
    In Konqueror, I can go to network places, Samba shares, and click on my workgroup, but then it will sit and timeout.
    I have samba installed, and I can access network shares if I type in smb://<ip address>. I cannot type in the computer name as it appears on the network (when viewed from Windows).
    Samba is running while I'm trying this.
    Why is Konqueror unable to actually browse the network?

    I had this problem too. I sorted this out by having the IP addresses and host names of all the machines on my workgroup in /etc/hosts and /etc/hosts.allow and setting security=share in smb.conf. I was able to browse then. It does conk off now and then but this is , I think, the problem of CIFS. I used to connect with ease when smbfs was used. For eg with xffm-samba and xfce desktop ( I compiled xffm separately since Thunar does not have this capability) I never have a problem.

  • OBI crashing when creating a view on an analysis (initially created table view works fine)

    Wondering if anyone else has experienced this. It seems pretty wierd because the initial view gets created.
    This is what happens:
    I create a new analysis. Data source doesn't matter. I have tried Sample App Lite & 2 different Essbase cubes.
    Drop some columns on the criteria
    Click Results. It displays a table view. I can save it and view it etc.
    If I try to create a 2nd view of any type including another table the front-end will hang, displaying "Processing, please wait"
    Logging onto the server we will see that there is a windows dialog box stating "nqssserver.exe has stopped working. Windows can check online for a solution........"
    It eventually times out. I think nqsserver.exe restarts by itself. The view doesn't get created.
    OBI 11.1.1.7
    Any ideas?
    - Daniel

    Hi Daniel,
    We need to dive to much more granular level, to identify the cause for this kind of issue. Some analysis on the coredump (search for .dmp) produced by your windows OS using Windebug utility, running through console~obis1.log etc might have to be done to catch the culprit.
    Note: I do not remember exactly, but there is are configuration steps available in my oracle support, to enable core dump on windows boxes (at least for Dr Watson though!!). You might want to have a look.
    If you think there are any visible messages in the log, you could post here; I could help you read through them.
    Dhar

  • BIEE ERROR when creating Relational View

    Hi Everyone,
    I am using the OTN Relational View Creator from the oracle website to create my relational views. However, all my dimension are grayed out and i am unable to select my attributes and hierarchies. Would anyone know what I am doing wrong or is the data that was created not setup properly.
    Regards,
    Cbeins

    Guys,
    I got it. The name of the view was not named starting with 'Z'. So I renamed it as 'ZREQ_DAT' and it works now.
    Thanks,
    Sirish.

  • How to create a view for all Service Requests that are not approved by reviewer

    Hallo,
    I want to create a view in the Service Requests library that shows all SRs that are not approved. How to configure condition that says: if a SR has related Review Activity which is In Progress, show that SRs?
    I couldn't find this when creating the view. Thank you.

    So here's the first problem with that: Which review activity? a SR can contain multiple RAs, so how do we decide if an arbitrary SR is approved or not? 
    As to the specific language you use (Any child RA is In Progress) you might want to look at the criteria from the default Change approval view, which does something similar: 
    <QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
    <Criteria>
    <FreeformCriteria>
    <Freeform>
    <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
    <Expression>
    <And>
    <Expression>
    <SimpleExpression>
    <ValueExpressionLeft>
    <Property>$Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity' TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity']/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property>
    </ValueExpressionLeft>
    <Operator>Equal</Operator>
    <ValueExpressionRight>
    <Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Active"]$</Value>
    </ValueExpressionRight>
    </SimpleExpression>
    </Expression>
    <Expression>
    <SimpleExpression>
    <ValueExpressionLeft>
    <Property>$Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$</Property>
    </ValueExpressionLeft>
    <Operator>Equal</Operator>
    <ValueExpressionRight>
    <Value>$MPElement[Name="CoreChange!ChangeStatusEnum.InProgress"]$</Value>
    </ValueExpressionRight>
    </SimpleExpression>
    </Expression>
    </And>
    </Expression>
    </Criteria>
    </Freeform>
    </FreeformCriteria>
    </Criteria>
    </QueryCriteria>
    This is a simple AND criteria with two componets. one looking for a Review Activity (TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity') which is related to the targetting CR by Contains Activity ($Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity';
    Context in this... context means the CR targeted by the view) where it's status (/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$) is In Progress ($MPElement[Name="CoreActivity!ActivityStatusEnum.Active"]$). The other is filtering
    for the target change request's status ( $Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$) is In Progress ($MPElement[Name="CoreChange!ChangeStatusEnum.InProgress"]$). 
    You could convert the second criteria to point to SRs and SR status values, and then use the similar text for the first criteria. i'd recommend
    Anton's Advanced View Editor (or
    the free version) to do the criteria adjustment. 

Maybe you are looking for