Replicated Table - has_replication_filter bit does not reset

Running SQL Server 2005 SP2. Transactional replication with no updating subscriber.  Push to subscriber.
What I am trying to do is implement partition switching on a replicated table.  My process looks like:
BEGIN TRAN
EXEC sp_dropsubscription @publication = 'PUBLICATION_LogTest',
    @article = 'testlog', @subscriber = N'all', @destination_db = N'all'
EXEC sp_droparticle @publication = 'PUBLICATION_LogTest',
    @article = 'testlog', @force_invalidate_snapshot = 1
ALTER TABLE testlog switch PARTITION 2 TO Testlog_delete PARTITION 2
EXEC sp_addarticle @publication = 'PUBLICATION_LogTest',
    @article =  'testlog', @source_owner = N'dbo', @source_object =  'testlog',
    @type = N'logbased', @pre_creation_cmd = N'none', @schema_option = 0,
    @destination_table =  'testlog', @destination_owner = N'dbo'
    @force_invalidate_snapshot = 1
COMMIT
EXEC sp_startpublication_snapshot @publication = 'PUBLICATION_LogTest'
(testlog_delete is not replicated)
When I try to alter the table, I get an error message:
ALTER TABLE SWITCH statement failed because the table 'sand.dbo.testlog' is marked for replication.
If I look in sys.tables after the DROP subscription/article, I see the the has_replication_filter bit = 1 (the is_published = 0, and is_replicated = 0).
Note that none of the tables are filtered vertically or horizontally.
If I start SQL Server in single user mode and use DAC, I can reset the has_replication_filtered bit = (0) with:
EXEC sp_MSsetfilteredstatus <ObjectId>
Then I can do the partition switch.
...but this stored proc is unavailable outside of DAC.
So three questions:
(1) Why causes the has_replication_filter bit to get set to 1 (it is happening on some of my tables, but not all of them)
(2) How can reset this bit outside of DAC
(3) Is there a better way (outside of upgrading to SQL Server 2008) to manage partition switching on a replicated table?

I had the same problem and the way I solved it was to create a dummy publication with a filter for the table I needed to switch partitions on (the filter I used was one that would not have any data: "where TestTime < '19700101'"). I saved the publication
without creating a snaphot. I checked "sys.tables" and saw the bits were set as you mentioned above. I then deleted the filter from the publication and saw that the "has_replication_filter"
bit got set to "0". I then dropped that publication and the bits stayed at "0".
I am now able to switch the partitions on that non-replicated table without having to use the DAC and try to update the system tables.

Similar Messages

  • APEX_APPLICATION_FILES: ORA-00942: table or view does not exist

    Hello,
    As my first APEX task I am attempting the upload/download demo on http://download.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/up_dn_files.htm
    The ultimate goal is to store PDF files in the database.
    In order to complete step 1: To create an application using the Create Application Wizard:
    - I first created a user from SYSTEM called 'myapp'
    - Next I logged into 'myapp' to continue the exercise. (I am wondering if that is where I am going wrong... If so, please clarify)
    - Knowing that I would want to save the upload to a table I created a table with a BLOB
    I did the steps for the upload and ran the application - no errors to there.
    Next I needed to "To create a report on APEX_APPLICATION_FILES:".
    I started the wizard as instructed. When I pasted the SELECT ... FROM APEX_APPLICATION_FILES, I got the table or view does not exist. A quick review of the TABLES tab shows only the tables that I created. Not any of the system tables or views.
    I logged back in as SYSTEM and reviewed the 'rights' given the user 'myapp'. All were checked.
    I knew nothing of Oracle when I installed XE, so I took defaults or whatever the install doc said to do. Is that part of the problem? It is clear that I do not have rights to see that table, but I also do not see the table when logged in as SYSTEM.
    Any insight appreciated,
    Rick

    Thanks for the reply.
    Version is:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Database      
    NAME     XE
    CREATED     10/13/2006 08:04:21 PM
    RESETLOGS_TIME     10/13/2006 08:04:25 PM
    Install Version 10.2.1015
    Regarding the code links, this one looks like what I need:
    DECLARE
    l_bfile BFILE;
    l_blob BLOB;
    BEGIN
    INSERT INTO tab1 (col1)
    VALUES (empty_blob())
    RETURN col1 INTO l_blob;
    l_bfile := BFILENAME('IMAGES', 'MyImage.gif');
    DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
    DBMS_LOB.fileclose(l_bfile);
    COMMIT;
    END;
    Is the 'BFILENAME' function that causes the 'get a filename' dialog box of Windows to open for the user to find which file to upload?
    I'm going off to look for a newer version of APEX, thanks.

  • Database startup showing ORA-00942: table or view does not exist in trace

    Hi Friends,
    SunOS 5.10 Generic_137112-06 i86pc i386 i86pc , 64 Bit
    Oracle 10.2.0.1.0
    While I am doing a startup, getting following error.
    SQL> startup;
    ORACLE instance started.
    Total System Global Area 3221225472 bytes
    Fixed Size 2122544 bytes
    Variable Size 410819792 bytes
    Database Buffers 2801795072 bytes
    Redo Buffers 6488064 bytes
    Database mounted.
    ORA-01092: ORACLE instance terminated. Disconnection forcedThe alert log shows the following
    Errors in file /applns/oracle/admin/CTSD1/udump/ctsd1_ora_11486.trc:
    ORA-00942: table or view does not exist
    Error 942 happened during db open, shutting down database
    USER: terminating instance due to error 942
    Instance terminated by USER, pid = 11486
    ORA-1092 signalled during: ALTER DATABASE OPEN...A look at the trace file shows this
    /applns/oracle/admin/CTSD1/udump/ctsd1_ora_11486.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /applns/oracle
    System name: SunOS
    Node name: N890
    Release: 5.10
    Version: Generic_137112-06
    Machine: i86pc
    Instance name: CTSD1
    Redo thread mounted by this instance: 1
    Oracle process number: 23
    Unix process pid: 11486, image: oracle@N890 (TNS V1-V3)
    *** SERVICE NAME:() 2011-02-16 19:24:50.188
    *** SESSION ID:(325.3) 2011-02-16 19:24:50.188
    Successfully allocated 3 recovery slaves
    Using 367 overflow buffers per recovery slave
    Thread 1 checkpoint: logseq 45929, block 2, scn 310788795>cache-low rba: logseq 45929, block 3
    >on-disk rba: logseq 45929, block 52, scn 310788832
    >start recovery at logseq 45929, block 3, scn 0
    ----- Redo read statistics for thread 1 -----
    Read rate (ASYNC): 24Kb in 0.31s => 0.08 Mb/sec
    Total physical reads: 4096Kb
    Longest record: 0Kb, moves: 0/61 (0%)
    Longest LWN: 16Kb, moves: 0/3 (0%), moved: 0Mb
    Last redo scn: 0x0000.128642df (310788831)
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 1
    Average hash chain = 4/4 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 117/121 = 1.0
    *** 2011-02-16 19:24:50.515
    KCRA: start recovery claims for 4 data blocks
    *** 2011-02-16 19:24:50.515
    KCRA: blocks processed = 4/4, claimed = 4, eliminated = 0
    *** 2011-02-16 19:24:50.516
    Recovery of Online Redo Log: Thread 1 Group 1 Seq 45929 Reading mem 0
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 1
    Average hash chain = 4/4 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 121/121 = 1.0
    ORA-00942: table or view does not existI have searched MOS and Google, but didn;'t get any relevant results.
    Also flushed my shared_pool as mentioned in (http://www.tanelpoder.com/files/oracle_rowcache.pdf) after mount and started , still no luck
    Any help is appreciated
    Thanks
    SSN

    Hi,
    Thanks.
    Tried log mining, but still couldn't find the culprit. I think now, I have to drop and create this db.Still wondering what might have happened.
    select group#,status from v$log;
        GROUP# STATUS
             1 INACTIVE
             3 INACTIVE
             2 CURRENT
    SQL> select group#,MEMBER from v$logfile where group#=2;
        GROUP#
    MEMBER
             2
    /applns/oracle/oradata/CTSD1/redo02.log
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo02.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.
    SQL> select group#,MEMBER from v$logfile where group#=1;
        GROUP#
    MEMBER
             1
    /applns/oracle/oradata/CTSD1/redo01.log
             1
    /applns/oracle/oradata/CTSD1/redolog001.log
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo01.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redolog001.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.
    SQL> select group#,MEMBER from v$logfile where group#=3
        GROUP#
    MEMBER
             3
    /applns/oracle/oradata/CTSD1/redo03.log
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo03.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL>  EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.SSN

  • Mod_plsql: ORA-942 Execute(Temp BLOB) ORA-00942: table or view does not exi

    mod_plsql: ORA-942 Execute(Temp BLOB) ORA-00942: table or view does not exist
    This is the error I get in the Apache log. On the page:
    "The requested URL /pls/apex/wwv_flow.accept was not found on this server."
    I am sure this is just a configuration issue. I installed v1.6 with the http server off the companion cd with the db (10.2.0.1). After I had it working (did not test everything) I upgraded to 3.0.1.
    I get this message when I am trying to import an application that I just exported! I am testing this for pushing code up to our production environment.
    My dads.conf file looks like:
    Alias /i/ /oracle/product/apps/htmldb/images/
    AddType text/xml xbl
    AddType text/x-components htc
    <Location /pls/apex>
    SetHandler pls_handler
    Order deny,allow
    Allow from all
    AllowOverride None
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDatabasePassword xxxxxx
    PlsqlDatabaseConnectString 192.168.2.195:1521:idpdev ServiceNameFormat
    PlsqlDefaultPage apex
    PlsqlDocumentTablename wwv_flow_file_object$
    PlsqlDocumentPath docs
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlAuthenticationMode Basic
    PlsqlNLSLanguage AMERICAN_AMERICA.WE8ISO8859P1
    </Location>
    marvel.conf file is empty
    There is a log file for pl/sql.... it has the following text in it that seemed pertinent: Attempting to logon with '(unknown)'
    Also a log that says this and seems to have a "special character" in it that may be causing an issue:
    <1133864024 ms>6565646261636b206f6e a70726f6d707420202e2e2e646f6e65 a
    <1133864024 ms>-----------------------------2444716671664
    <1133864024 ms>^M
    <1133864024 ms>UploadBlobDoc: readahead 27 bytes into 82f5e5c
    <1133864024 ms>UploadBlobDoc : Inserting piece OCI_NEXT_PIECE
    <1133864024 ms>UploadBlobDoc:Attempt to write 2048 bytes(offset 249857)
    <1133864024 ms>UploadBlobDoc:OCILobWrite for 2048 bytes (offset 249857)
    <1133864024 ms>UploadBlobDoc: Read-Ahead buf 82f5e5c has 27 bytes
    <1133864024 ms>UploadBlobDoc : Inserting piece OCI_LAST_PIECE
    <1133864024 ms>UploadBlobDoc:Attempt to write 27 bytes(offset 251905)
    <1133864024 ms>UploadBlobDoc:OCILobWrite finished for 27 bytes
    <1133864024 ms>ORA-942 Execute(Temp BLOB) ORA-00942: table or view does not exist
    <1133864024 ms>Stale Connection due to Oracle error 942
    <1133864024 ms>/pls/apex/wwv_flow.accept HTTP-404 ORA-00942: table or view does not exist
    <1133864024 ms>(wpu.c,594) longjumping back to the beginning
    <1133864024 ms>(wpu.c,457) cleaning up before longjmp
    <1133864024 ms>(wpu.c,461) doing a rollback
    <1133864024 ms>(wpcs.c, 76) Executed 'rollback' (rc=0)
    <1133864024 ms>(wpcs.c, 76) Executed 'begin dbms_session.reset_package; end;' (rc=0)
    <1133864024 ms>(wpd.c,1816) Going to close cursor
    <1133864024 ms>Freed BLOB
    <1133864024 ms>DeinitCursor
    <1133864024 ms>(wpx.c,690) Shutdown has been called
    <1133864024 ms>(wpx.c,702) Going to logoff
    <1133864024 ms>Logoff: Closing connection due to stale connection
    <1133864034 ms>[ReqEndtime: 2/Oct/2007:15:38:11]
    <1133864034 ms>[ReqExecTime: 80 ms]
    I did go in and update the permissions to the wwv_flow_file_objects$ table to give PUBLIC full access to that table to see if that was the problem... it wasn't.
    Probably information overload, but just wanted to be thorough. Anyone have any ideas?

    I also have another issue... probably more of a clarification....
    I run the following to stop the process:
    "/oracle/product/apps/opmn/bin/opmnctl stopproc ias-component=HTTP_Server"
    then
    "/oracle/product/apps/opmn/bin/opmnctl startproc ias-component=HTTP_Server"
    But, at that point, it says that opmn is not running.
    So I try:
    "/oracle/product/apps/opmn/bin/opmnctl stopall"
    then
    "/oracle/product/apps/opmn/bin/opmnctl start"
    then
    "/oracle/product/apps/opmn/bin/opmnctl startproc ias-component=HTTP_Server" and it still says that opmn is not running.
    Once I start running the stops and starts, it will eventually start correctly.
    I think that I am trying the steps too fast and that I probably need to wait a bit between steps since that seems to work better that way.

  • Table or view does not exist when using in PL/SQL block

    I hav something strange...
    When i execute a query it works just fine... When i use the exact same query in a function i want to create, i get the error 'table or view does not exist'
    I create the function with the same user then when i'm executing the query.
    For example:
    select name,userid from portal.WWLOG_ACTIVITY_LOGS
    if i execute this... it works fine. I get my results.
    However when i create a function:
    CREATE OR REPLACE FUNCTION EBUSINESS.GET_USER_CREATOR (p_userid IN Varchar2) return VARCHAR2
    as
    /*CURSOR c_user_creator IS
    select distinct name,userid from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;*/
    v_creator varchar2(500);
    v_ret_val VARCHAR2(500) := 'NOT_FOUND';
    BEGIN
    select userid into v_ret_val from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;
    --v_ret_val := x.userid;
    --end loop;
    -- Is the user in the group or not?
    /*OPEN c_user_creator;
    FETCH c_user_creator INTO v_creator;
    IF c_user_creator%FOUND THEN
    v_ret_val := v_creator;
    ELSE
    v_ret_val := 'NOT FOUND';
    END IF;
    CLOSE c_user_creator;*/
    Return v_ret_val;
    END;
    The table or view does not exist...
    I tryed with cursor, select into, for x in (select....)
    Nothing works.
    A select grant is a select grant right? Are there different grant you should use so you can select it into a function or just do a normal select?
    I also tryed to create a view that just sais select * from WWLOG_ACTIVITY_LOGS but that doesn't work...

    Are there different grant you should use so you can
    select it into a function or just do a normal select? Yes. Grants on objects used in functions/procedures must be given directly to the user, and not through a role.

  • Table or view does not exist - Data Dictionary Import Wizard(Data Modeler)

    Hi All,
    In Data Modeler, Data Dictionary Import Wizard, I'm able to connect to database.But while going to the second stage (Select Schema/Database), I'm getting an error "ORA-00942: table or view does not exist".
    I am able to select the table with select * from all_tables and I can open many tables as well.
    Could anyone tell me, whether I'm missing any privilege, that causing this error.
    Thanks in advance for you support.
    Thanks.

    Hi,
    Thanks for your response, sorry for my late reply as I was away from my place.
    Yes, it is showing "Connection established successfully".
    log file as below-
    2012-08-02 10:37:26,471 [main] INFO ApplicationView - Oracle SQL Developer Data Modeler 3.1.1.703
    2012-08-02 10:39:42,889 [AWT-EventQueue-0] ERROR AbstractDBMExtractionWizardImpl - java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
    Pls see oracle version details-
    Oracle Database 11g Enterprise Edition
    11.1.0.6.0
    64bit Production
    Thanks again and waiting for reply.

  • Error in pakcage table or view does not exist but on sql prompt query works

    Hi
    Can any one help me to understand the error of ORA-00942: table or view does not exist while compiling the package on Oracle 9.2.0.4.0
    The below package compiled in system user and trying to query on view v$session_wait however getting below error.
    PACKAGE BODY SYSTEM.PK_DB_ALERT
    On line: 212
    PL/SQL: ORA-00942: table or view does not exist
    I can execute same query mentioned below from sql prompt from system user and it works fine however it doesn't like from package, Please advice, thank you in advance.
    SELECT SID, seq#, event, wait_time
    FROM v$session_wait
    WHERE event NOT LIKE 'SQL*Net%' AND wait_time <> 0
    ORDER BY 2

    SDD wrote:
    Hi
    Can any one help me to understand the error of ORA-00942: table or view does not exist while compiling the package on Oracle 9.2.0.4.0Which means package owner is granted select on view not directly but via roles. However, roles are ignored by definer rights packages/stored procedures/stored functions/triggers... You need to grant package owner select on view directly.
    SY.
    Edited by: Solomon Yakobson on Jan 21, 2010 4:06 AM

  • ORA-00942: table or view does not exist

    select
                        nvl(appr.APPROVER_NAME, org.APPROVER_NAME) as APPROVER_NAME,
                        nvl(appr.APPROVER, org.APPROVER) as APPROVER,
                        nvl(appr.APPROVER_TYPE, org.APPROVER_TYPE) as APPROVER_TYPE,
                        nvl(appr.ASSIGNED_DATE, org.ASSIGNED_DATE) as ASSIGNED_DATE,
                        nvl(appr.APPROVAL_DATE, '-') as APPROVAL_DATE,
                        nvl(appr.STATE, org.STATE) as STATE,
                                    org.SEQ as numberoftimesmodified,
                        nvl(appr.PROCESS, org.PROCESS) as PROCESS,
                        appr.seq2
                        from (
                             select a.seq,
                             b.usr_display_name as APPROVER_NAME,
                             b.usr_login as APPROVER,
                             'User' as APPROVER_TYPE,
                             '-' as ASSIGNED_DATE,
                             '-' as STATE,
                             a.seq as numberoftimesmodified,
                             '-' as PROCESS
                             from(
                                  SELECT 1 as seq, USR_UDF_MANAGER_LOGIN as GID, '' as approver_name, 'user' as approver_type FROM DEVT_OIM.USR WHERE USR_LOGIN =:BENEFICIARY_GID AND :APPLICATION = 'Oracle 11i On demand'
                                  UNION
                                  select rownum as seq, regexp_substr(:APPROVERPAYLOAD,'[^,]+', 1, level) as gid, '' as approver_name, 'user' as approver_type from dual
                                  where :APPLICATION != 'Oracle 11i On demand'
                                  connect by regexp_substr(:APPROVERPAYLOAD, '[^,]+', 1, level) is not null
                             ) a
                             inner join DEVT_OIM.usr b on a.gid = b.usr_login
                        ) org
                        left join(
                             select b.numberoftimesmodified as seq, rownum as seq2, a.*
                             from
                                  select
                                  LEAD(a.ASSIGNEES) OVER(ORDER BY a.numberoftimesmodified) as prev_gid,
                                  LEAD(a.pushbacksequence) OVER(ORDER BY a.numberoftimesmodified) as prev_pushbacksequence,
                                  a.ASSIGNEES as current_gid,
                                  nvl(retrieveGidName(a.ASSIGNEES), '-') as APPROVER_NAME, 
                                  (DEVT_OIM.TOKNEW(REPLACE(a.ASSIGNEES, ',', ':'))) as APPROVER,
                                  'User' as APPROVER_TYPE,
                                  a.pushbacksequence,
                                  TO_CHAR(a.assigneddate,'DD-Mon-YYYY HH:MI:SS AM') as ASSIGNED_DATE,
                                  case when a.state = 'WITHDRAWN' then TO_CHAR(a.updateddate,'DD-Mon-YYYY HH:MI:SS AM') else TO_CHAR(d.updateddate,'DD-Mon-YYYY HH:MI:SS AM') end as APPROVAL_DATE,
                                  a.numberoftimesmodified,
                                  case when a.state = 'EXPIRED' then 'Expired' when a.approvalduration is null then 'Pending' when  a.outcome = 'REJECT' then 'Rejected' else 'Approved' end as PROCESS,
                                  d.state as process2,
                                  case when d.substate = 'REASSIGNED' then 'Reassigned' when d.state = 'INFO_REQUESTED' then 'Request Info' when a.state = 'EXPIRED' then 'Expired'
                                       when  a.outcome = 'REJECT' then 'Rejected' when d.substate = 'INFO_SUBMITTED' then 'Submitted' when a.state = 'WITHDRAWN' then 'Withdrawn' when e.state is null then 'Pending' else 'Approved' end as state,
                                  e.ASSIGNEES, d.substate
                                  from WFTASKHISTORY a
                                  left join WFTASKHISTORY d on d.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and d.numberoftimesmodified = (a.numberoftimesmodified+1)
                                  left join WFTASKHISTORY e on e.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and e.numberoftimesmodified = (a.numberoftimesmodified-1) and e.ASSIGNEES = a.ASSIGNEES
                                  where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY and a.state is not null
                                  order by a.numberoftimesmodified
                             ) a
                             inner join (select rownum as numberoftimesmodified, pushbacksequence from (select distinct pushbacksequence from WFTASKHISTORY a where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY order by pushbacksequence)) b
                             on b.pushbacksequence = a.pushbacksequence
                             where a.prev_gid != a.current_gid or prev_gid is null
                             order by a.numberoftimesmodified
                        ) appr on org.seq = appr.seqORA-00942: table or view does not exist
    00942. 00000 - "table or view does not exist"
    *Cause:   
    *Action:
    Error at Line: 55 Column: 172

    Hi User,
    The ORA - 00942 indicates that the Underlying object is not present in the Database.
    Just Check whether the Table you are used in the Select statement exists in the user/Schema.
    To check this..
    SELECT *
      FROM USER_TABLES
    WHERE TABLE_NAME = 'YOUR_TABLE_NAME';Or
    Simply,
    SELECT *
      FROM TAB;If you are using the Table from other Schema, Just give the table name like this..
    SELECT *
      FROM SCHEMA_USER.table_name;Thanks,
    Shankar

  • PL/SQL: ORA-00942: table or view does not exist

    Hi
    i have logged into my schema and trying to access the database "DAD" which has the table name "SCHOOL"
    i wrote a function which should give me new_sno when i give it the old_sno
    and i have this errors , pls help
    CREATE OR REPLACE FUNCTION ORIG_SN(OSNO in Number,OTN in Number)
    RETURN Number IS
    NEW_SNO Number:=0;
    BEGIN
    SELECT new_sno AS NEW_SNO
    FROM DAD.SCHOOL
    WHERE ORIG_SNO = OSNO AND ORIG_TN = OTN;
    RETURN NEW_SNO;
    END ORIG_SN;
    Warning: Function created with compilation errors.
    Errors for FUNCTION ORIG_SN:
    LINE/COL ERROR
    5/1 PL/SQL: SQL Statement ignored
    6/15 PL/SQL: ORA-00942: table or view does not exist
    Thanks in advance ..

    Try this,
    CREATE VIEW SCHOOL_VIEW AS SELECT * FROM DAD.SCHOOL;and then change your function like
    CREATE OR REPLACE FUNCTION ORIG_SN(OSNO in Number,OTN in Number)
    RETURN Number IS
    my_new_sno Number:=0;
    BEGIN
    SELECT new_sno INTO my_new_sno FROM SCHOOL_VIEW WHERE ORIG_SNO = OSNO AND ORIG_TN = OTN;
    RETURN my_new_sno;
    END ORIG_SN;and see if it is getting created without any errors.
    -Arun
    Edited by: Arunkumar Ramamoorthy on Aug 15, 2009 1:56 AM

  • Problem creating a view in Administrator: 942: table or view does not exist

    Hi and thank you for reading,
    I am working with the Administration tool and would like to create a view in the physical layer. However I am getting the following error messages when I try to view the Date in the view:
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    I proceed as following:
    Right click on a physical schema (this schema is already created and works in Answers) -> new Physical Schema ->Table Type: Select -> Select * from Table_A where name='name' (Table_A is in the physical schema) -> OK -> Save -> Deploy -> Update Row count (works) -> View Data -> Error
    Any Idea what I am doing wrong. I have started with an easy select statement to test how to create a view in Oracle Administrator.
    Thanks a lot for any help
    Evgeny

    Do you see Table_A, and in which database schema?
    Try to put alias (database user) before table name.
    Select * from user.Table_A where name='name'
    Where user is database user.
    If you have Table_A in another user and connection pool is set to different user, then grant select from Table_A owner to connection pool user (make synonym for Table_A):
    Example (I'm using connection pool from userB and have tables from userA and userB).
    create or replace public synonym xx for userA.xx
    and
    grant select on xx to userB
    Hope this helps.
    Regards,
    Goran
    http://108obiee.blogspot.com

  • ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00942: table or view does not exist on 12C RAC

    Hi Geeks,
    I have encountered an issue while starting up my database on 12c RAC.
    Till mount it goes fine but when i attempt to open it throws me an error.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size                  4737560 bytes
    Variable Size            2952791528 bytes
    Database Buffers         1.2415E+10 bytes
    Redo Buffers               26857472 bytes
    Database mounted.
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00942: table or view does not exist
    Process ID: 11338068
    Session ID: 1429 Serial number: 3
    Here is the trace file output...
    ORACLE_HOME = /oracle_home/app/orahome
    System name:    AIX
    Node name:      INS1
    Release:        1
    Version:        7
    Machine:        00C8CCA74C00
    Instance name: INST1
    Redo thread mounted by this instance: 1
    Oracle process number: 7
    Unix process pid: 20381876, image: oracle@ins1 (TNS V1-V3)
    *** 2014-11-27 22:49:20.892
    *** SESSION ID:(197.5) 2014-11-27 22:49:20.892
    *** CLIENT ID:() 2014-11-27 22:49:20.892
    *** SERVICE NAME:() 2014-11-27 22:49:20.892
    *** MODULE NAME:(sqlplus@ins1 (TNS V1-V3)) 2014-11-27 22:49:20.892
    *** ACTION NAME:() 2014-11-27 22:49:20.892
    2014-11-27 22:49:20.889716 : Start recovery for domain=0, valid=0, flags=0x4
    *** 2014-11-27 22:49:24.580
    Successfully allocated 32 recovery slaves
    Using 3 overflow buffers per recovery slave
    *** 2014-11-27 22:49:24.740
    Thread 1 checkpoint: logseq 15, block 2, scn 3510749
      cache-low rba: logseq 15, block 3
        on-disk rba: logseq 15, block 72, scn 3510824
      start recovery at logseq 15, block 3, scn 0
    *** 2014-11-27 22:49:24.981
    Started resilvering redo thread 1 seq 15 blocks 72-73
    *** 2014-11-27 22:49:24.994
    Completed resilvering redo thread 1 seq 15
    *** 2014-11-27 22:49:24.994
    Started writing zeroblks thread 1 seq 15 blocks 74-81
    *** 2014-11-27 22:49:24.994
    Completed writing zeroblks thread 1 seq 15
    ==== Redo read statistics for thread 1 ====
    Total physical reads (from disk and memory): 4096Kb
    -- Redo read_disk statistics --
    Read rate (ASYNC): 35Kb in 0.25s => 0.14 Mb/sec
    Longest record: 0Kb, moves: 0/104 (0%)
    Longest LWN: 2Kb, moves: 0/33 (0%), moved: 0Mb
    Last redo scn: 0x0000.0035922b (3510827)
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 262144
    Longest hash chain = 1
    Average hash chain = 25/25 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 151/176 = 0.9
    *** 2014-11-27 22:49:25.007
    KCRA: start recovery claims for 25 data blocks
    *** 2014-11-27 22:49:25.039
    KCRA: blocks processed = 25/25, claimed = 25, eliminated = 0
    *** 2014-11-27 22:49:25.054
    Recovery of Online Redo Log: Thread 1 Group 6 Seq 15 Reading mem 0
    *** 2014-11-27 22:49:25.060
    Completed redo application of 0.02MB
    *** 2014-11-27 22:49:25.235
    Completed recovery checkpoint
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 262144
    Longest hash chain = 1
    Average hash chain = 25/25 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 176/176 = 1.0
    Recovery sets nab of thread 1 seq 15 to 74 with 8 zeroblks
    *** 2014-11-27 22:49:26.000
    2014-11-27 22:49:26.000433 : Validate domain 0
    2014-11-27 22:49:26.001348 : Validated domain 0, flags = 0x0
    *** 2014-11-27 22:49:28.315
    Count of ofsmtab$: 0 entries
    *** 2014-11-27 22:49:28.732
    ORA-00942: table or view does not exist
    ORA-00942: table or view does not exist
    *** 2014-11-27 22:49:28.738
    USER (ospid: 20381876): terminating the instance due to error 942

    In my case the issue has fixed by executing the following..
    grant SELECT on SYS.USER$ to XDB;
    grant SELECT on SYS.USER$ to CTXSYS;
    grant SELECT on SYS.USER$ to DVSYS;
    grant SELECT on SYS.USER$ to LBACSYS;
    grant SELECT on SYS.USER$ to APEX_040200;
    grant SELECT on SYS.USER$ to DV_SECANALYST; 
    Refer the above screen shot...

  • Table /xyz/abc does not exist in the database

    Hi experienced developers,
    I created two transparent tables in customer name space in development system, transport to quality together with program using the tables, everything fine, no errors, no warnings.
    Then transported to production. No errors, no warnings. Detailed protocol shows tables have been activated, no errors or warnings.
    First try to use the program gives a dump.
    line 1191:
    ""/xyz/abc" is not defined in the ABAP Dictionary as a table, p"
    "rojection view, or database view."
    Double-click on the table in program code gives a popup information message
    Table/xyz/abc does not exist in the
    database
    After acknowleding the popup, the usual dictionary entry is shown, table is active. Utilities -> database object -> Display leads to an empty screen
    Fields of /xyz/abc  
    Fld name Position Data Type Length Decimals Not null Default
      Indexes for /xyz/abcI
    Utilities -> runtime object -> Display shows  the table name followed by message
    There is no active runtime object for ...
    prededed by big icon exclamation mark.
    We created a new transport with exactly the same result.
    Basis people have no idea.
    The only thing special (but OK I think) is that the tables have key fields only.
    Database is Oracle 11.2.0.2.0, SAP ECC 6.0
    SAP_ABA     701     0008     SAPKA70108     Cross-Application Component
    SAP_BASIS     701     0008     SAPKB70108     SAP Basis Component
    PI_BASIS     701     0008     SAPK-70108INPIBASIS     Basis Plug-In
    ST-PI     2008_1_700     0005     SAPKITLRD5     SAP Solution Tools Plug-In
    SAP_BS_FND     701     0009     SAPK-70109INSAPBSFND     SAP Business Suite Foundation
    SAP_BW     701     0008     SAPKW70108     SAP Business Warehouse
    SAP_AP     700     0022     SAPKNA7022     SAP Application Platform
    WEBCUIF     700     0009     SAPK-70009INWEBCUIF     SAP WEBCUIF 700
    Yes I know, this is a DDIC forum question but I hope for more (experienced) readers here.
    Thank you all for any hint leading to a solution.
    Best regards
    Clemens Li

    Hi,
    thank you for the comments although it does not help.
    Here is the excerpt from productive system  import protocol (original table names replaced as customer requirement)
    *** Activate objects at level 1
    Too low cost (2.100) for parallel processing. Minimum: 6.000
    * Synchronous execution, no parallel processing *
    Activate table /xyz/abcd1
    Table /xyz/abcd1 was activated successfully
    Activate table /xyz/abcd2
    Table /xyz/abcd2 was activated successfully
    Synchronous processing: 4 sec., 2 objects, 2.100 costs
          Object Activation
    End phase  001 ***********************************************************
    Start phase 002 **********************************************************
          Statistics on Activated and Deleted Objects
    Number of objects to be activated............:  2
    Objects not activated........................:  0
    Activated objects with errors in dependencies:  0
    Objects activated with warning...............:  0
    Successfully activated objects...............:  2
    Number of objects to be deleted..............:  0
    Objects not successfully deleted.............:  0
    Successfully deleted objects.................:  0
    Tables/views with DROP/CREATE................:  0
    No. of them marked for DROP/CREATE: 0
    Not marked for DROP/CREATE: 0
    Number of nametabs to be deleted.............:  0
    Successfully deleted nametabs................:  0
    Nametabs that were not successfully deleted..:  0
          Statistics on Activated and Deleted Objects
    End phase  002 ***********************************************************
    =========================================================================
    Mass Activation
    =========================================================================
    Process..................: ENNIPROD_10
    Return code..............: 0
    Phase 001..................: 00:00:04 (Object Activation)
    Phase 002..................: < 1 sec. (Statistics on Activated and ...)
    Program runtime..........: 00:00:05
    Date, time...............: 08.03.2012, 16:30:43
    Program end==============================================================
    ABAP Dictionary: Activation
    End date and time : 20120308163043
    Ended with return code:  ===> 0 <===
    Actually, I don' understand it.
    Regards,
    Clemens

  • ORA-00942: table or view does not exist in database control

    Hi all,
    i am getting "ORA-00942: table or view does not exist" error while accessing tablespaces from database control. i am able to access control files, redo log files everything fine, but not tablespaces.
    database version ---> 10.2.0.1
    OS ----> RedHat Enterprise Linux 4 U 2
    but the database is working fine from SQL*Plus and other Editors. this error is only from database control. so what might be the cause.
    Any Ideas ...........
    Balaji

    hi,
    Have you tried to re register your database within OEM, CG

  • ERROR ORA-00942: table or view does not exist

    Hi:
    I created a .sql file and a loader file. Running the .sql file with sql * plus Worksheet:
    declare
    gr sdo_georaster;
    begin
    select image into gr from gis.RasterImages where geoid=1 for update;
    sdo_geor.generatePyramid(gr,'resampling=NN');
    update gis.RasterImages set image=gr where geoid=1;
    commit;
    end;
    I trying to create a pyramid,but the error appeared:
    ERROR at line 1:
    ORA-29400: DATA CONTROL ERROR ORA-00942: table or view does not exist
    ORA-06512: &#22312; "MDSYS.SDO_GEOR_INT", line 162
    ORA-06512: &#22312; "MDSYS.SDO_GEOR", line 826
    ORA-06512: &#22312; line 5
    I don't know why?
    Anyone can help me?
    Thanks.

    Hi,
    I think you are executing the select statement for schema X and the table is in the schema srnr.
    And schema X is not having select privilege on the table 'students' present in schema srnr.
    Goto schema srnr.
    Execute the following statement:
    grant select on students to X;
    This will give schema X the privilege to query the table students present in srnr.
    Regards,
    Anupama

  • Error in Upload file-table or view does not exist-wwv_flow_file_objects$

    Hi,
    i am trying to upload a file and then store the contents of the file into one of my tables in the schema.I wrote one package for uploading the file and then a process to insert each record in the uploaded file to the table in my schema.When i try compiling the package it gives an error.
    PL/SQL: ORA-00942: table or view does not exist
    The name of the table is wwv_flow_file_objects$
    The package is as follows-
    CREATE OR REPLACE PACKAGE BODY Text_File_Pkg AS
    FUNCTION get_file_lines (
    p_file_name IN VARCHAR2,
    p_lines IN OUT line_tab_type,
    p_rec_sep IN VARCHAR2 DEFAULT dos_new_line
    ) RETURN INTEGER
    IS
    v_binary_file BLOB;
    v_text_file CLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    v_warning INTEGER;
    v_rec_sep_len CONSTANT INTEGER := LENGTH(p_rec_sep);
    v_start_pos INTEGER := 1;
    v_end_pos INTEGER := 1;
    v_line_num INTEGER := 1;
    v_file_length INTEGER;
    BEGIN
    IF p_file_name IS NULL
    THEN
    RETURN 1;
    END IF;
    IF p_rec_sep IS NULL
    THEN
    RETURN 2;
    END IF;
    SELECT blob_content
    INTO v_binary_file
    FROM wwv_flow_file_objects$
    WHERE NAME = p_file_name
    AND (mime_type = 'text/plain' OR mime_type = 'application/octet-stream')
    AND doc_size &gt; 0;
    DBMS_LOB.createtemporary(v_text_file, TRUE);
    DBMS_LOB.converttoclob(v_text_file, v_binary_file,
    DBMS_LOB.lobmaxsize, v_dest_offset,
    v_src_offset, DBMS_LOB.default_csid,
    v_lang_context, v_warning);
    IF v_warning = DBMS_LOB.warn_inconvertible_char
    THEN
    -- Unable to convert file.
    RETURN 3;
    END IF;
    v_file_length := DBMS_LOB.getlength(v_text_file);
    LOOP
    EXIT WHEN v_start_pos &gt; v_file_length;
    v_end_pos := DBMS_LOB.INSTR(v_text_file, p_rec_sep, v_start_pos);
    IF v_end_pos = 0
    THEN
    v_end_pos := v_file_length + 1;
    END IF;
    IF (v_end_pos - v_start_pos) &gt; 4000
    THEN
    -- Line exceeds 4000 characters.
    RETURN 4;
    END IF;
    p_lines(v_line_num) := DBMS_LOB.SUBSTR(v_text_file, v_end_pos - v_start_pos, v_start_pos);
    v_line_num := v_line_num + 1;
    v_start_pos := v_end_pos + v_rec_sep_len;
    END LOOP;
    RETURN 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN 5;
    END get_file_lines;
    END Text_File_Pkg;
    Any suggestions.
    Many Thanks,
    Sanjai

    Hi,
    i am trying to upload a file and then store the contents of the file into one of my tables in the schema.I wrote one package for uploading the file and then a process to insert each record in the uploaded file to the table in my schema.When i try compiling the package it gives an error.
    PL/SQL: ORA-00942: table or view does not exist
    The name of the table is wwv_flow_file_objects$
    The package is as follows-
    CREATE OR REPLACE PACKAGE BODY Text_File_Pkg AS
    FUNCTION get_file_lines (
    p_file_name IN VARCHAR2,
    p_lines IN OUT line_tab_type,
    p_rec_sep IN VARCHAR2 DEFAULT dos_new_line
    ) RETURN INTEGER
    IS
    v_binary_file BLOB;
    v_text_file CLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    v_warning INTEGER;
    v_rec_sep_len CONSTANT INTEGER := LENGTH(p_rec_sep);
    v_start_pos INTEGER := 1;
    v_end_pos INTEGER := 1;
    v_line_num INTEGER := 1;
    v_file_length INTEGER;
    BEGIN
    IF p_file_name IS NULL
    THEN
    RETURN 1;
    END IF;
    IF p_rec_sep IS NULL
    THEN
    RETURN 2;
    END IF;
    SELECT blob_content
    INTO v_binary_file
    FROM wwv_flow_file_objects$
    WHERE NAME = p_file_name
    AND (mime_type = 'text/plain' OR mime_type = 'application/octet-stream')
    AND doc_size &gt; 0;
    DBMS_LOB.createtemporary(v_text_file, TRUE);
    DBMS_LOB.converttoclob(v_text_file, v_binary_file,
    DBMS_LOB.lobmaxsize, v_dest_offset,
    v_src_offset, DBMS_LOB.default_csid,
    v_lang_context, v_warning);
    IF v_warning = DBMS_LOB.warn_inconvertible_char
    THEN
    -- Unable to convert file.
    RETURN 3;
    END IF;
    v_file_length := DBMS_LOB.getlength(v_text_file);
    LOOP
    EXIT WHEN v_start_pos &gt; v_file_length;
    v_end_pos := DBMS_LOB.INSTR(v_text_file, p_rec_sep, v_start_pos);
    IF v_end_pos = 0
    THEN
    v_end_pos := v_file_length + 1;
    END IF;
    IF (v_end_pos - v_start_pos) &gt; 4000
    THEN
    -- Line exceeds 4000 characters.
    RETURN 4;
    END IF;
    p_lines(v_line_num) := DBMS_LOB.SUBSTR(v_text_file, v_end_pos - v_start_pos, v_start_pos);
    v_line_num := v_line_num + 1;
    v_start_pos := v_end_pos + v_rec_sep_len;
    END LOOP;
    RETURN 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN 5;
    END get_file_lines;
    END Text_File_Pkg;
    Any suggestions.
    Many Thanks,
    Sanjai

Maybe you are looking for