Joins in Snapshot definition

Hi!
Is it possible to use joins in snapshot definitions or can I only query one table per definition?
Thanks in advance

Hi,
I don't think there is any restriction on adding joins to view but as you are adding one more condition so it will have some performance impact right?
Best regards,
Rafi
http://rafioracledba.blogspot.com/

Similar Messages

  • ORACLE SNAPSHOTS ::: DEFINITION

    Hi all,
    What 's an oracle snapshot? MATERIALIZED VIEW and SNAPSHOT 're the same?
    what's the utilies of each one?
    thx

    They are the same. When Oracle first introduced them in version 7 they called them Snapshots. In 8 they were rebranded as Materialized Views. The keyword "snapshot" is deprecated but still works...
    SQL*Plus: Release 9.2.0.6.0 - Production on Thu Jul 12 10:54:24 2007
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    SQL> create snapshot my_emps as select * from emp where deptno = 10;
    Materialized view created.
    SQL> Cheers, APC

  • How do I create a Snapshot without testing query?

    I'm working in an environment where the connection to the database server is done through a VPN that is sometimes broken and I have to wait for some time until it is restored. Other times, the database server is just down and in maintenance.
    In the meantime, I have to work with Director installed in a local virtual machine in my laptop.
    So, now I'm trying to develop some EDQ processes when there is no connection to the database, I'm unable to save snapshots because they require a test to occur (clicking in the Test button) before saving them, even if I'm providing a full SQL query to snapshot. I think it's because Director needs to know stuff like the data types of the columns to initialize properly the fields in the process.
    The problem is that I can't stop working just because there is no VPN. I should be able to create the processes and test them later when connection to the database is restored. I can do a lot of stuff (I can even copy-paste snapshots!) but I can't change nor create new ones, and that blocks me constantly.
    How can I do a snapshot save without database connection and have Director asking me the datatypes instead of trying to guess them from a "Test"?

    Hi,
    You can't create a snapshot without a connection to the database. A connection is needed when a snapshot definition is created in order to retrieve the column names and data types. As a solution to your problem, why not use data interfaces? Create a data interface that is of the required shape and refer to this in your processes (instead of the snapshot). You can then create mappings to different sources of data, e.g. snapshots, reference data, etc. You can test your processes when you're offline using a reference data mapping.
    regards,
    Nick

  • Help:Nested Inner Join

    Hello Folks,
    I have a query which has a nested Inner Join as follows
    INNER JOIN(Client
    INNER JOIN CUBS SNAPSHOT ON Client . Client = CUBS SNAPSHOT . CLIENT) ON CancelDesc . CancelReason = CUBS SNAPSHOT . CANCELREASONcouldnt figure out wat is the quivalent of this nested inner join in Oracle Server. I am trying to create a report based on this inner join of a query. Can anyone throw some light on this.
    Thanks

    Hi,
    Inner joins don't need to be nested. The results will be the same, no matter in what order the tables are joined.
    In Oracle, don't use table names with spaces in them, and don't put spaces before or after the dots that separate table name qualifiers from column names.
    I think this is what you want:
    INNER JOIN     cubs_snapshot  ON     CancelDesc.CancelReason = cubs_snapshot.cancelreason
    INNER JOIN     Client            ON     Client.Client           = cubs_snapshot.clientWhenever you have a question, post a little sample data (CREATE TABLE and INSERT statememts) for all tables invlovled, and the results you want from that data.
    If you really did need to nest joins, you could join some tables in a sub-query, then use the result set of that sub-query as if it were a table.
    For example:
    WITH  cubs_and_client            AS
         SELECT     CancelReason
         ,     ...     -- Whatever other columns are needed in superior query or queries
         FROM          client
         INNER JOIN     cubs_snapshot     ON     Client.Client           = cubs_snapshot.client
    SELECT     
    INNER JOIN     cubs_and_client     ON     CancelDesc.CancelReason = cubs_and_client.CancelReason
    ...In this example, the two tables cubs_snapshot and client are joined in a sub-query. The results of that sub-query can be referenced later in the query as if it were a table called cubs_and_client, very much like a view.

  • Unable to publish application that contains snapshots (WTG-20502)

    Hmm, I am able to publish normal applications to mobileserver just ok using wtgpack. Publishing of applications that contains snapshot definitions failed giving following message :
    creating servlets
    log0: Creating Snapshot...
    log0: Publication/PublicationItem does not exist :: 11674,WTGPI_10088
    log3: javax.servlet.ServletException: Publication/PublicationItem does not exist
    :: 11674,WTGPI_10088
    log0: ID: A2226282F282EC2C1CA22C021C-B08596F321641F29863C6747920387EE634F8E55
    log3: at oracle.lite.web.util.JupXMLPlant.doPost(JupXMLPlant.java:177)
    log0: handler: /logoff /
    log3: at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    log0: Servlet oracle.lite.web.JupLogoff
    log3: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    log3: LOGOFF ADMINISTRATOR: Thu Aug 29 16:10:14 EEST 2002 Online for: 3 seconds
    Access count: 2
    log3: at oracle.lite.web.JupServlet.service(JupServlet.java:190)
    log3: at oracle.lite.web.AppServletHandler.handle(AppServletHandler.java:282)
    log3: at oracle.lite.web.JupApplication.service(JupApplication.java:350)
    log3: at oracle.lite.web.JupHandler.handle(JupHandler.java:97)
    log3: at oracle.lite.web.HTTPServer.process(HTTPServer.java:302)
    log3: at oracle.lite.web.HTTPServer.handleRequest(HTTPServer.java:162)
    log3: at oracle.lite.web.JupServer.handle(JupServer.java:309)
    log3: at oracle.lite.web.SocketListener.process(SocketListener.java:157)
    log3: at oracle.lite.web.SocketListener$ReqHandler.run(SocketListener.java:208
    Cannot find any information from documentation or forums concerning this (Publication/PublicationItem does not exist :: 11674,WTGPI_10088).
    Whats wrong? At some point also this publishing of applications that contain snapshot's was working but not anymore.
    -JS-

    There was some 'caching' on multiple places.
    First of all I had to remove all stuff related to my application from ..\mobile\sdk\wtgsdk\bin\wtgapp.xml -File and pack and publish again.
    Ofcourse the mobileserver (and mgp) had to be restarted also to get the changes 'committed'.

  • Oracle 10g Lite with ADF/BC4J Application(Offline access in Mobile )

    Hi All,
    We have the following requirement from one of our client.
    Customer Company has R12 Apps instance(which is having 10g Database APPSDB). The users will come in the morning
    and connect to the System(NEWSYSTEM) to download their daily worksheet(resides in APPSDB) to their Mobile Devices
    (Windows XP - http://www.keenzo.com/zoom.asp?zoom=3830134) and then disconnect from the system. The download of data
    should start after login into their Mobile Device Custom Application So that only their worksheet will be downloaded
    to their Mobile Device DB.
    Then they will goto their fields and review their daily worksheet in the Mobile Device application(NEW APPLICATION)
    in offline mode. And update in the application with their findings, which should be stored in the Mobile Device database(MOBILEDB).
    In the evening the uses will come and connect to the system(NEWSYSTEM) and login into their Mobile Application and
    start the upload process, then the updated data from their Mobile Database will be uploaded into APPSDB via the NEWSYSTEM.
    I checked the links, http://www.oracle.com/technology/products/lite/index.html and http://lite.us.oracle.com and I have
    got some understanding about Oracle 10g Lite. For the above requirement we are proposing the NEWSYSTEM as Oracle 10g Lite Server
    and the NEW APPLICATION as ADF/BC4J which can run in their Mobile Devices(work offline and then sync with DB).
    I have the following questions.
    1) The above proposing system is feasible?
    2) Can we develop the Mobile Application using ADF/BC4J and using that we would like to
    control the sync process from our custom application.(so that only their worksheet will come to their Mobile Device DB)
    3) If I want to have the above system,
    a) I should have Oracle 10g Lite server installed(im Unix or Windows)
    b) I should have Oracle 10g Lite client installed in a Windows PC/Laptop
    c) To get my custom application in My Mobile Device, first I have to deploy the application
    in Oracle 10g server using Oracle Mobile Server. Then I have to connect my Mobile Device to the Oracle 10g Lite server,
    and deploy the application in my Mobile Device using Oracle Mobile Manager.
    4) I would like to do a POC before start the project.
    What are all the installations I have to do in my Laptop.(Consider I am installing Oracle 10g Lite server/client, Mobile Manager in my Laptop)
    I am new to Oracle 10g Lite, correct me if any of my understanding is wrong.
    If you have any comments in the approach please add it.
    Thanks in advance.
    With Regards,
    Kali.

    1) The above proposing system is feasible?
    perfecly feasible, and actually a reasonably standard use of oracle lite
    2) Can we develop the Mobile Application using ADF/BC4J and using that we would like to
    control the sync process from our custom application.(so that only their worksheet will come to their Mobile Device DB)
    Actually two different questions here. The application code that runs on the client device can be written in any thing that will run on that type of device, and is capable of using the APIs to connect to the local database, and the other functionality like synchronisation. From the forum there look to be VB, C, java users out there (an i even believe if you wanted to, you could use forms). Main decision regarding the Platform for the application code development tends to be whatever you have the skills in.
    In terms of the sync process only downloading a particular users worksheet, this would be defined when you define the snapshots of the database tables you want to download, rather than the sync login process itself.
    For example - you have a table WORKSHEETS on the server that you want to download, it has a column EMP_NO which is the employee identifier. You would define the selection for the snapshot as
    select * from WORKSHEETS where EMP_NO=:emp_no (note the bind variable)
    when you then add users to the oracle lite application (actually the database), then you will have a parameter called EMP_NO to define with the employee number for that particular user, and this will be used automatically as the bind variable in the download.
    NOTE subsetting in this way does not need to be direct, for example things like
    select * from TASKS where id in (select task_id from user_tasks where emp_no=:emp_no) is perfectly valid
    NOTE when reading the forum and documentation, be careful of the word application. There are actually two different things to be developed, both normally called 'application'
    Within oracle lite you create an application with publication items, scripts, sequences etc. and then subscribe your users to this application. The application in this context is actually the database and synchronisation management ONLY (you can include files and code for download)
    The second application is your runtime code that has a user interface, functionality, processing and validation. This is written in some development platform, and accesses the database created above for select, insert, update etc.
    3) If I want to have the above system,
    a) I should have Oracle 10g Lite server installed(im Unix or Windows)
    YES this goes on the app server and installs a repository schema MOBILEADMIN within your database
    b) I should have Oracle 10g Lite client installed in a Windows PC/Laptop
    YES - once the server is set up, this is downloaded and set up by accessing the <server url>/webtogo/setup
    c) To get my custom application in My Mobile Device, first I have to deploy the application in Oracle 10g server using Oracle Mobile Server. Then I have to connect my Mobile Device to the Oracle 10g Lite server,
    and deploy the application in my Mobile Device using Oracle Mobile Manager.
    steps in outline are
    1) install server
    2) develop the oracle lite application (ie: database) and publish this to the mobile server (can use the development kit or java APIs for these two steps
    3) add a user with the relevant subsetting parameters
    4) set up oracle lite win32 client on the laptop from the server download
    5) synchronise using the msync utility on the client to create the databases and odbc entries
    6) develop your application code using the client database
    7) during development, then changes to database structure would be via changes and re-publish of the oracle lite application, followed by a sync to update the client database
    8) once all development is complete, the runtime application code can be bundled up into the oracle lite application if you want, and then the initial sync for live users will download the database and application code.
    4) I would like to do a POC before start the project.
    What are all the installations I have to do in my Laptop.(Consider I am installing Oracle 10g Lite server/client, Mobile Manager in my Laptop)
    You can set up a standalone server on the laptop, but better to do this on a development app server so you can use the main server development database as the data souce for the snapshot definitions (pretty easy install). there are conflicts if you try and put the oracle lite client and the mobile development kit on the same machine, but if you are familiar with java, the API development is fairly straightforward to use (i have developed applications in this, and i know only the basics of java) you do not need the MDK
    Basic for a POC i would say is to
    1) set up mobile server on development
    2) define a simple oracle ite application on two server tables. one has select * from table, and the other has select * from table where .... including bind variable. at this stage use complete refresh as the mode for simplicity
    3) publish the application, create user and define the subsetting variable
    4) set up mobile client and synchronise user. use the msql utility to interrogate the database and check the content, and do some updates 9standards SQL syntax)
    5) create simple appliaction code to conect to and read the database on the client
    6) do a sync after the updates above and check they appear in the server
    The above should be reasonably quick and proves
    a) ability to define the data you want to be sent to the users
    b) ability to create an app to manage the database running on the client device in you preferred software platform
    c) data download and upload
    after this basic POC, you can extend into defining fast refreshes to improve the efficiency of the sync process, managing the MGP process, developing a more comprehensive database and application etc. If you have complex joins between server table, you may also want to look at creating views to denormalise data and use these as the basis for the snapshots

  • Error while creating the Unique Index of the Primary Key of an Item

    Hi all,
    I have deployed a new item (CO_CONTRACTUNIT_PRODUCT) in my publication. The deploy appears to be successfull as the item can be seen in the repository through the Mobile Manager.
    The problem occurs when i sync my local DB to get the item offline. While synchronizing, the following error appears, both in the sync window and the log file ol_sync.log.
    "ERROR",POL-5130,"11/09/2010 11:43:52","table or view %s.%s not found:CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID","DB_ROSHNI"
    However, the debug file gives this other error regarding this table.
    ALL_INDEX:CREATE UNIQUE INDEX "TPCO_CONTRACTUNIT_PRODUCT_PK" ON CO_CONTRACTUNIT_PRODUCT (CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID) -5130Error at C:\ADE\omeprod_ol103021\olite\db\build\win\ocapi\..\..\..\src\ocapi\allindexes.cpp line:329 rc:-5130
    Build date Mar 29 2010
    okErr=(table or view %s.%s not found)
    mess=(CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID)
    AddLog(-5130 "ERROR",POL-5130,"11/09/2010 11:43:52","table or view %s.%s not found:CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID","DB_ROSHNI")
    But the index that is being created and is giving the error is the index created automatically with the Primary Key of the table, and so nothing has been modified in that.
    The primary key of the table is created with the three columns that are part of the index that is returning the error.
    As I could not solve the error, I tried to drop and re-create the item in the repository, but no luck. As a last option, i tried to remove the item from the repository to be able to sync properly again (just like before creating the item), but the error still happens.
    Another weird point is that i have tried creating the item in another publication of another database (but with almost equal items), and the item could was downloaded to my local DB without any problem, which makes this problem still more bizarre.
    What can it be?
    Any help would be great!
    Roshni

    have you tried unistalling the client and reinstalling it?
    schema evolution changes are not always handled correctly please check thread:
    Modification of publication item into Mobile Server
    i quote from rekounas instructions:
    If you are just adding a field, you should only have to run the alter publication item API call.
    Here is an old note on schema evolution on different scenarios. The names for the APIs that they use are now deprecated. Use the ConsolidatorManager class and call the method alterPublicationItem("PUBLICATION_ITEM_NAME", "SELECT STMT") :
    A) Add column
    1. Upload all client data. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Change the Oracle8i/9i database schema (add column)
    4. Create a Java program to call the Consolidator Admin API AlterPublicationItem()
    5. Start Mobile Server
    6. Execute a sync from the client
    7. The new column should be seen on the client. Use MSQL to check snapshot definitions.
    B) Drop column
    1. Upload all client data. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Delete column of the base table in the Oracle database schema
    4. Create a Java program to call the Consolidator Admin API DropPublicationItem()
    5. Create a Java program to call the Consolidator Admin API CreatePublicationItem() and AddPublicationItem().
    6. Start Mobile Server
    7. Execute a sync from the client
    8. The new column should be seen on the cliet. Use MSQL to check snapshot definitions.
    C) Change column datatype
    Changing datatypes in a repliatated system is not an easy task. You have to follow certain procedures in order to make it to work. Use DropPublicationItem, CreatePublicationItem and AddPublicationItem methods from the Consolidator Admin API. You must stop/start Mobile Server listener to refresh the cache.
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Drop/create column (do not use conversion procudures) at the base table
    4. Call DropPublicationItem(). Check if the ErrorQueue and InQueue no longer exist.
    5. Call CreatePublicationItem() and AddPublicationItem(). Check if the ErrorQueue and InQueue reflect the new column datatype
    6. Start Mobile Server. This automatically resumes application
    7. Client executes sync. This should drop the old snapshot and recreate the new snapshot. Use MSQL to check
    snapshot definitions.
    D) Drop table
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Drop base table
    4. Call DropPublicationItem(). Check if the ErrorQueue and InQueue no longer exist.
    5. Start Mobile Server. This automatically resumes application
    6. Client executes sync. This should drop the old snapshot. Use MSQL to check snapshot definitions.
    E) Add table
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Add new base table
    4. Call CreatePublicationItem() and AddPublicationItem() method
    5. Start Mobile Server. This automatically resumes application
    6. Client executes sync. This should add the new snapshot. Use MSQL to check snapshot definitions.
    F) Changing Primary Keys
    Chaning PK is a severe operation which must be executed manually. A snapshot must be deleted and recreated to propagate the changes to the clients. This causes a full refresh on this snapshot.
    1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
    2. Stop Mobile Server listener
    3. Drop the snapshot using DropPublicationItem() method o
    4. Alter the base table
    5. Call CreatePublicationItem()and AddPublicationItem() methods for the altered table
    6. Start Mobile Server. This automatically resumes application
    7. Client executes sync. The old snapshot will be replaced by the new snapstot using a full refresh. Use MSQL to check snapshot definitions.
    G) To Change a Table Weight =>
    Follow the procedure below to change the Table Weight parameter. The table weight is used by the Mobile Server/Synchronization to determin the sequence in which client records are applied to the Oracle database.
    1. Run MGP to apply any changes in the InQueue to the Oracle databse
    2. Change table weight using SetTemplateItemMetadata() method
    3. Add/change constraint on the the base table which reflects the change in table weight
    4. Synchronize
    gl m8

  • 10gLiteR3 publishing ORA-00942: table or view does not exist error

    Hi All,
    I am encountering table or view does not exist error while publishing using the api.
    Below is the code:
    try {
    consolidatorManager.openConnection("MOBILEADMIN","PASSWORD", ADMIN_JDBC_URL);
    mobileResourceManager = new MobileResourceManager("MOBILEADMIN","PASSWORD",ADMIN_JDBC_URL);
    consolidatorManager.createPublicationItem(EXT_CONN, "RMT_TEST_TABLE" , "MOBILEADMIN","RMT_TEST_TABLE", "F", "SELECT * FROM MOBILEADMIN.RMT_TEST_TABLE", null, null);
    consolidatorManager.addPublicationItem(mobileResourceManager.getPublication("/mobileApp"),"RMT_TEST_TABLE",null, null, "S", null, null);
    } catch (Exception e) {
    e.printStackTrace();
    When I execute the above code it does not throw any exceptions but I see the below error in err.log. I,U,D triggers are getting created on the remote table, CMP, CFM, CVR,CLG tables are also created, I also see primary key for this table in VPKS. Publishing seems to be fine but I see the below error in err.log.
    java.sql.SQLException: ORA-00942: table or view does not exist
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:422)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:366)
         at oracle.lite.sync.Subscription.getVirtualTablePrimaryKey(Subscription.java:7522)
         at oracle.lite.sync.Subscription.getTablePrimaryKey(Subscription.java:7365)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2334)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2157)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2129)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2108)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2093)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2079)
         at oracle.lite.sync.ConsolidatorManager.createPublicationItem(ConsolidatorManager.java:1253)
    I am not able to figure out what table it is looking for. Any ideas why this is happening?

    check the MGP compose process, is it also showing the error?
    If it is them at some point in 10.2 Oracle introduced a 'feature' (ie: bug) that causes problems to the housekeeping routines when new versions of publication items are published
    In 10.0 and early 10.2 when making changes to publication items VIEWS called CPV$.. were created to log the column list for each version of a publication item, and check if you are making changes when you publish. In the case of old versions, once all clients have synchronised and been moved to the latest version it tries to delete this view.
    at some point the publish started creating TABLES instead of views (but using the same naming convention ie: CPV$..). This works fine as far as the logging of changes and old column lists, but the housekeeping called at the end of the publish and GP process still trieds to do a DROP VIEW and this causes the error.
    The only way of clearing this i have found is to look at the log file to get the name of the object that it is trying to drop, set up a view script to create a dummy view with the list of columns in the table, drop the table and then create the view. It then gets dropped on the next MGP cycle and the error goes away
    If the error is not showing up in the MGP process, only in the publish, and your changes appear to be publishing OK, then the problem is likely to be with a snapshot definition AFTER the change you have made - real pain to identify on re-publish - possibly missing schema name in the snapshot definition

  • Errors in infoset

    Hi,
    I was trying to create an Infoset on 2 ODS (ODS1 and ODS2). ODS1 with Left outer join had linked with ODS2. Now i have added 5 Mater data objects to the infoset and linkd to ODS1 (Left outer join). I get the fallowng errors:
    1)Invalid ON condition for left outer join (ODS1)
    2)Not all objects are linked with ON conditions
    So I have included 2 ODS1's (one as Left outer and one as inner join). With the inner join ODS1 have joined the MD objects and with Left Outer join ODS1 have joined ODS2. Still it shows error:
    1) Not all objects are linked with ON conditions
    Any suggessions to avoid the error.
    Thanx in advance.

    Hi Raj,
    While creating various joins in InfoSet definition, check the syntax of InfoSet after eevery single join you add to the definition. So this way you will come to know the exact join which is causing problem.
    Regards,
    Yogesh

  • Replicating to a different schema

    Some questions regarding Oracle 9i Lite:
    1. Using the WebToGo Application Packager (or Consolidator API), is it possible to specify the target schema in the Oracle Lite DB for a snapshot definition? Everything, no matter what the source schema (SYSTEM, SCOTT, etc.), is replicated to the SYSTEM schema on the client OLite DB.
    2. Can the Mobile Server push Java stored procedures to the client Olite DB?
    3. We created a snapshot definition for a table with no primary key. This would be a read-only table on the client DB. Using the WTG Packager, we cleared the Updatable checkbox on the snapshot definition tab. When we try to publish the application, it complains that the table cannot be updatable since it has no PK. Why is this happening? We even tried using the Consolidator API but still got the same error.
    Any help/pointers would be greatly appreciated.
    TIA

    Just tap into the existing trail if the change data is already there. There's no need to have a second extract in that case. So ADD REPLICAT and specify the EXTTRAIL the same as the EXTTRAIL for the redo log extract.
    OGG won't pick up truncates by default. If the row is gone before the update arrives at the target table then you can use INSERTMISSINGUPDATES. When using this parameter make sure that you add supplemental logging (ADD TRANDATA) for columns that you need but that may not be updated (e.g. target columns with NOT NULL or FK constraints).
    Good luck,
    -joe

  • Problem in creating client database..

    hi all,
    I am trying to add publicaion Items by using APIs and then publishing it by Packaging Wizard.how can i create client data snapshot by using APIs.Beacuse I am not able to create any client database on downloading this application on client machine.

    If you are new to oracle lite i would suggest you just use the MDK or wtgpack to create your first application as it guides you through more, before tackling the APIs (which need more understanding of the process).
    The normal purpose of using oracle lite is to create a database on a client evice that is synchronised with the server database. In order to do this you will go through the following steps
    1) define an 'application' (sometimes called a 'publication') - the name of this will be the name of the client database. basic things you do is give it a name and a destination platform (WIN32, PPC2003 etc.)
    2) for each table you want in the client database, you define a 'publication item' (basically a snapshot definition). This needs an internal name (MDK/wtgpack creates these automatically in the format WTGPI_nnnnn), the base schema containg the table, the name of the table, the refresh mode (complete or fast), basic conflict resolution (client wins or server wins), dml flag (only if you want read only items), a priority order (the order of inserts if there are multiiple table to deal with parent/child relationships) and a SQL statement
    The basic for the SQL statement is
    select * from schema.table - this selects all data
    if you want to restrict the data sent, then this can be either fixed for all users
    select * from schema.table where id between 1000 and 2000
    or using a bind variable
    select * from schema.table where assigned_user=:username
    3) once you have the application and publication items defined you publish it to the mobile server
    4) in the mobile server manager you will now be able to see the application you have defined, and all of the meta data related to the publication items
    5) you now create a user
    6) after creating the user, you go to access and link them to the application, and if you used any bind variables go into data subsetting and set the value for that user
    7) next on the client device you need to install the oracle lite client - easiest done by going into IE and the link <mobileserver>/webtogo/setup and follow the instructions
    8) next on the client run msync, specify the user, password and server url and the database should download

  • Select statement  -SQL 05

    Hi all, I am getting this error: ...Any suggestions...
    All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
    SELECT     TOP (100) PERCENT EID, MAX(loginDate) AS LoginDate, DeptUserID
    FROM         (SELECT     dbo.User_TBL.Username AS EID, dbo.User_TBL.LastLogIn AS loginDate, dbo.DeptUser.DeptUserID
                           FROM          dbo.User_TBL INNER JOIN
                                                  dbo.DeptUser ON dbo.User_TBL.User_ID = dbo.DeptUser.User_ID
                           UNION
                           SELECT     Username AS EID, LastLogIn AS LoginDate, DeptID
                           FROM         dbo.User_TBL AS AdminUser_1
                           UNION
    SELECT     TOP (100) PERCENT (dbo.CCFUser.First_Name + ' ' + dbo.CCFUser.Last_Name + '('+ dbo.CCFUser.Work_Status + ')') AS FullName, dbo.CCFUser.EID, dbo.CCFUser.CCFRole,dbo.CCFUser.CSGID, dbo.Department.DeptID, dbo.CCFUser.loginDate,dbo.CCFUser.ModifyDate
                           FROM         dbo.CCFUser INNER JOIN
                                                 dbo.Sheet ON dbo.CCFUser.EID = dbo.Sheet.EID INNER JOIN
                                                 dbo.SnapShot ON dbo.Sheet.SnapshotID = dbo.SnapShot.SnapshotID INNER JOIN
                                                 dbo.Department ON dbo.SnapShot.pDeptID = dbo.Department.DeptID
    where
    dbo.CCFUser.Deleted = 0) AS A
    GROUP BY EID, DeptUserID
    ORDER BY EID, DeptUserID

    emmim44 wrote:
    SELECT
          TOP (100) PERCENT EID, MAX(loginDate) AS LoginDate, DeptUserID
    SELECT
          TOP (100) PERCENT (dbo.CCFUser.First_Name + ' ' + dbo.CCFUser.Last_Name + '('+ dbo.CCFUser.Work_Status + ')') AS FullName,      dbo.CCFUser.EID,
         dbo.CCFUser.CCFRole,
         dbo.CCFUser.CSGID,
         dbo.Department.DeptID,
         dbo.CCFUser.loginDate,
         dbo.CCFUser.ModifyDate
    Just as the error says.  The Select clauses of all parts of an Union query must have the same number of columns.  Not two fields in the first Select and seven fields in the second Select like you have here.
    If you don't want to select any data in the first part you can use nulls as place holders.
    SELECT
          TOP (100) PERCENT EID, MAX(loginDate) AS LoginDate,
          DeptUserID,
         NULL AS CCFRole,
         NULL AS ....,
         NULL AS ....,
         NULL AS ...,
         NULL AS ...
    SELECT
          TOP (100) PERCENT (dbo.CCFUser.First_Name + ' ' + dbo.CCFUser.Last_Name + '('+ dbo.CCFUser.Work_Status + ')') AS FullName,      dbo.CCFUser.EID,
         dbo.CCFUser.CCFRole,
         dbo.CCFUser.CSGID,
         dbo.Department.DeptID,
         dbo.CCFUser.loginDate,
         dbo.CCFUser.ModifyDate

  • Crystal Reports - Two Tables in one report, grouped by machine.

    I have two tables for machine schedules.  One is a Current Job Table, and the other is a Que Job Table.  I do have tables joined to a definition table for the machine name.
    Cur Job Table - Def table
    Que Job Table - Def table
    I want to report the information from the current job table for each 13 machines in sequence.  Some machines may have more current jobs than qued jobs.
    ...Machine 1 (Machine Name)
    .....Current Jobs (Cur Job Table)
    .....Qued Jobs (Que Job Table)
    ...Machine 2 (Machine Name)
    .....Current Jobs (Cur Job Table)
    .....Qued Jobs (Que Job Table)
    Etc.
    Is there a way to do this easily?  I have tried grouping and sub reports.  Seems like I end up with duplicate records due to the SQL joins.

    Sharon,
    Select distinct will not work here, as select distinct checks all fields in the record, and when joining the two detail tables, it will not clear out "duplicates" on only one side of the join.
    I would also humbly suggest that using Select Distinct to try to "clean up" a query is rather dangerous.  You may end up dropping some data that should appear on the report.  (In fact I recently had to fix a report due to this issue - coded by someone else, of course!  :->)  If you are getting duplicate records and you don't want them, the query should be coded to produce the desired result set WITHOUT the Distinct clause being the reason duplicates are dropped.  (This is not to say that select distinct is not useful, or should never be used.  If you need a distinct list of customers over a date range, using Select Distinct custcode from sales where date between {?start} and {?end} is perfectly OK.)
    HTH,
    Carl

  • CNS-9025 An internal error occurred. ORA-00904: EXTRA_COL: invalid ID

    With our new version of Mobile Server (10.2.0.2) a lot of problems seem to have been solved. In older versions we didn't succeed in republishing. Meaning we had to drop the old version en publish a new version. Doing this meant we had to redo data subsetting for every user, which is a lengthy task. Besides it triggers full refresh for every user, that is a major one as well.
    In the new version a lot goes better, but still we are experiencing some problems (or challenges).
    Again the main issue is that in the course of time our application grows.
    Now we stumble into the simple issue:
    We want to add a column to our database.
    What we do is the following (as described by Oracle):
    - Add the column (EXTRA_COL) to our 'mother'database
    - Alter the snapshot definition for this column (add the column)
    - Republish...
    When I resynch the new column appears on my client, so far so good.
    However if I change something to the data on the client and I do a resynch I get:
    "CNS-9025 An internal error occurred. ORA-00904: EXTRA_COL: invalid ID.
    It seems as though 'internally' the column is not added everywhere it should be.
    For example the CEQ$table does not have the EXTRA_COL column.
    I'm quite sure that somebody else should encounter these problems as well as new views lead to data structure changes quite often.
    Anybody encountering this as well, and more important, somebody got a clue on what is going on?
    Thnx in advance.

    There is a bug with 10.2 where the re-publish of a item that has has ddl changes (like an extra column) does not always work correctly. It seems to be intermittent (at least in our environment) and the symptoms are
    alter base schema table
    re-publish snapshot (note if the snapshot definition is the standard 'select * from ...' you should not need to do anything apart from republishing)
    no errors reported in the re-publish
    however the new column has not been added to either CEQ$object OR CFM$WTGPI_nnnnn (the inqueue table for the object) - the missing column on the CFM$ table is the source of the error shown above in the posting as there is a mismatch when the data is uploaded
    dropping the publication item would fix the problem, but be aware if you have any users out there, when they synchronise any data being uploaded for a publication item that has been dropped and re-created will be LOST with no error being reported (in the sync history you will see a blank name in the upload section), due to the internal mapping having changed
    We have found that normally when this happens forcing a republish of the affected object by making a change to the selection logic (eg adding something like 'id is not null') and republishing again fixes the problem - as with a lot of mobile issues, fiddle with it enough and it will eventiually sort itself out

  • Weird thread sync behavior (only every other notify works...)

    So what's up with this? Why does only every other call to notify() within SyncThread work? I've tested this app in 1.4.2_03, 1.4.2_08 and 1.5.0_04 and they all report the following output:
    Count is 2
    Count is 4
    Count is 6
    Count is 8
    Count is 10
    Count is 12
    Count is 14
    Count is 15
    :public class JavaThreadSyncBug {
    :    public static void main(String args[]) {
    :        try {
    :            SyncThread s = new SyncThread();
    :            CallerThread c = new CallerThread(s);
    :            s.start();
    :            c.start();
    :            s.join();
    :        catch(Exception e) {
    :            System.out.println(e.getMessage());
    :public class SyncThread extends Thread {
    :    boolean terminated = false;
    :    int count = 0;
    :    public SyncThread() {
    :        super("SyncThread");
    :    synchronized public void run() {
    :        while (!terminated) {
    :            try {
    :                wait();
    :                System.out.println("Count is " + count);
    :            catch(InterruptedException e) {
    :                System.out.println(e.getMessage());
    :    synchronized public void touch() {
    :        ++count;
    :        notify();
    :    synchronized public void terminate() {
    :        terminated = true;
    :        if (isAlive()) {
    :            notify();
    :public class CallerThread extends Thread {
    :    SyncThread s = null;
    :    CallerThread(SyncThread _s) {
    :        super("CallerThread");
    :        s = _s;
    :    public void run() {
    :        try {
    :            for (int i = 0; i < 15; ++i) {
    :                sleep(1000);
    :                s.touch();
    :            s.terminate();
    :        catch(InterruptedException e) {
    :            System.out.println(e.getMessage());
    :}I should point out that I can work around this by doing the following in SyncThread's touch function:
    notify();
    notify();
    or by calling
    notifyAll();
    But I am really curious about what's going on here...
    Thanks,
    Ken

    >
    Rhetorical question:
    Is there an underlying reason why a joining thread is
    eligible to be scheduled via a call to notify()? It
    seems to me that the joining thread (by definition)
    wouldn't care about anything until the thread it's
    joined to has terminated...Even 'Rhetoricallly' I don't know. I have just taken your example a bit further so that 2 threads are joined and then you only get every 3rd notify()! If I use notifyAll() I see everyone!
    public class JavaThreadSyncBug
        public static void main(String args[])
            try
                final SyncThread s = new SyncThread();
                CallerThread c = new CallerThread(s);
                s.start();
                c.start();
                new Thread()
                    public void run()
                        try
                            s.join();
                            System.out.println("XXXX");
                        catch(InterruptedException e)
                            System.out.println(e.getMessage());
                }.start();
                s.join();
            catch(Exception e)
                System.out.println(e.getMessage());
    class SyncThread extends Thread
        boolean terminated = false;
        int count = 0;
        public SyncThread()
            super("SyncThread");
        public void run()
            while (!terminated)
                synchronized(this)
                    try
                        wait();
                        System.out.println("Count is " + count);
                    catch(InterruptedException e)
                        System.out.println(e.getMessage());
        synchronized public void touch()
            ++count;
            System.out.println(count);
            notify();
        synchronized public void terminate()
            terminated = true;
            if (isAlive())
                notify();
    class CallerThread extends Thread
        SyncThread s = null;
        CallerThread(SyncThread _s)
            super("CallerThread");
            s = _s;
        public void run()
            try
                for (int i = 0; i < 15; ++i)
                    sleep(1000);
                    s.touch();
                s.terminate();
            catch(InterruptedException e)
                System.out.println(e.getMessage());
    }

Maybe you are looking for

  • Printing and Page scaling issues

    On a lot of my documents -- scanned from 8x11 b&w pages -- Acrobat seems to want to scale down the pages to print correctly, when this is not true. Is there anything that I can do to solve this issue? I realize that I can set page scaling to none, bu

  • How can i delete emails in icloud

    I just purchased the new iphone 5.  I use gmail and when I open up my gmail....there are over 2,000 messages in my inbox.  These are messages that had been deleted from my other phone and on my main computer.  I was told to empty my folders in Gmail

  • How Do I Transfer Files from an IMac CRT with a Broken Screen?

    Hello, I have an old I Mac DV (dark gray) CRT with all of my old files. When the screen stopped working I bought a new I Mac. The computer turns on but the screen is dark. How can I transfer my old files to the new computer. I also have a portable ha

  • CRM Survey Suit Tables

    Hi Experts. Can anybody tell me survey tables because I want to generate report for the Questioners that have been designed by using survey builder. I am trying to design the survey reports by using Query.

  • Fsck check on boot and Ctrl+C

    Well... just today when I was booting Arch, fsck kicked in (30th mount). I pressed Control+C by accident and to my surprise it killed fsck and boot process halted with warnings/errors that read 'fsck failed, should be run manually' . Is this a bug?