Sync with manually created tables or selected publication items

HI
I have the following situation :
Server side:
Table1, Table2,Table3,Table4,Table5,Table6
Client type1 :
Table1, Table2,Table3,Table4
Client type2:
Table3,Table4,Table5,Table6
so i cant create two different publications for clients.
I have 1 publication with Table1, Table2,Table3,Table4,Table5,Table6
In this situation, is it possible to synchronize with manually created lite database and tables, or mobile server knows how to sync only with snapshots created by his own ?
Sync process reports "sync ok" but nothing happens
And one more question is :
can i use some sync api to create database with snapshots
1,2,3,4 for client1 and snapshots 3,4,5,6 for client2?
Today it works in following way:
1)install mobile client on mobile devices
2)install mobile application type 1 and 2 on mobile devices
3)call msync to create database with snapshots 1-6 on all devices
4)client type 1 do not use tables 5,6 sync only tables 1,2,3,4
5)client type 2 do not use tables 1,2, sync only tables 3,4,5,6

only tables defined in the application and synchronised down to the client will be synchronised - manually created tables on the client are ignored (list of tables to be synchronised is controlled by the table c$table_list in the concli database)
for your requirement, either
use one application for both client types, but ignore the 'unused' tables in the client software - advantage=easy, disadvantage overhead in synchronising and composing data not needed
or
create two seperate applications .no problem about using the same table in multiple applications, we do that for reference data all of the time, sequences cannot be shared (but there is a work around for that), and then associate each client user to one or the other application - advantage=better meets the requirement, disadvantage=maintenance and different database names in the client configuration

Similar Messages

  • DB Link Create table as select

    I ve a query which starts with create table as select ..
    When I run the select part of the query, it runs in 2 sec.
    But the whole query runs in 10min. It is fetching data from dblink.
    I think if select can finish in 2 sec. All is left to do is create table and insert.
    Why is takin so long?
    Oracle DB version 9.2.0.8

    When I run the select part of the query, it runs in 2 sec.Does the select finish in 2 seconds or does it start returning rows in 2 seconds?
    Big difference.

  • Create table as select (CTAS)statement is taking very long time.

    Hi All,
    One of my procedure run a create table as select statement every month.
    Usually it finishes in 20 mins. for 6172063 records and 1 hour in 13699067.
    But this time it is taking forever even for 38076 records.
    When I checked all it is doing is CPU usage. No I/O.
    I did a count(*) using the query it brought results fine.
    BUT CTAS keeps going on.
    I'm using Oracle 10.2.0.4 .
    main table temp_ip has 38076
    table nhs_opcs_hier has 26769 records.
    and table nhs_icd10_hier has 49551 records.
    Query is as follows:
    create table analytic_hes.temp_ip_hier as
    select b.*, (select nvl(max(hierarchy), 0)
    from ref_hd.nhs_opcs_hier a
    where fiscal_year = b.hd_spell_fiscal_year
    and a.code in
    (primary_PROCEDURE, secondary_procedure_1, secondary_procedure_2,
    secondary_procedure_3, secondary_procedure_4, secondary_procedure_5,
    secondary_procedure_6, secondary_procedure_7, secondary_procedure_8,
    secondary_procedure_9, secondary_procedure_10,
    secondary_procedure_11, secondary_procedure_12)) as hd_procedure_hierarchy,
    (select nvl(max(hierarchy), 0) from ref_hd.nhs_icd10_hier a
    where fiscal_year = b.hd_spell_fiscal_year
    and a.code in
    (primary_diagnosis, secondary_diagnosis_1,
    secondary_diagnosis_2, secondary_diagnosis_3,
    secondary_diagnosis_4, secondary_diagnosis_5,
    secondary_diagnosis_6, secondary_diagnosis_7,
    secondary_diagnosis_8, secondary_diagnosis_9,
    secondary_diagnosis_10, secondary_diagnosis_11,
    secondary_diagnosis_12, secondary_diagnosis_13,
    secondary_diagnosis_14)) as hd_diagnosis_hierarchy
    from analytic_hes.temp_ip b
    Any help would be greatly appreciated

    Hello
    This is a bit of a wild card I think because it's going to require 14 fill scans of the temp_ip table to unpivot the diagnosis and procedure codes, so it's lilkely this will run slower than the original. However, as this is a temporary table, I'm guessing you might have some control over its structure, or at least have the ability to sack it and try something else. If you are able to alter this table structure, you could make the query much simpler and most likely much quicker. I think you need to have a list of procedure codes for the fiscal year and a list of diagnosis codes for the fiscal year. I'm doing that through the big list of UNION ALL statements, but you may have a more efficient way to do it based on the core tables you're populating temp_ip from. Anyway, here it is (as far as I can tell this will do the same job)
    WITH codes AS
    (   SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            primary_PROCEDURE       procedure_code,
            primary_diagnosis       diagnosis_code,
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_1    procedure_code,
            secondary_diagnosis_1    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_2    procedure_code ,
            secondary_diagnosis_2    diagnosis_code     
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_3    procedure_code,
            secondary_diagnosis_3    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_4    procedure_code,
            secondary_diagnosis_4    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_5    procedure_code,
            secondary_diagnosis_5    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_6    procedure_code,
            secondary_diagnosis_6    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_7    procedure_code,
            secondary_diagnosis_7    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_8    procedure_code,
            secondary_diagnosis_8    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_9    procedure_code,
            secondary_diagnosis_9    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_10  procedure_code,
            secondary_diagnosis_10    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_11  procedure_code,
            secondary_diagnosis_11    diagnosis_code
        FROM
            temp_ip    
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_12  procedure_code,
            secondary_diagnosis_12    diagnosis_code
        FROM
            temp_ip
    ), hd_procedure_hierarchy AS
    (   SELECT
            NVL (MAX (a.hierarchy), 0) hd_procedure_hierarchy,
            a.fiscal_year
        FROM
            ref_hd.nhs_opcs_hier a,
            codes pc
        WHERE
            a.fiscal_year = pc.hd_spell_fiscal_year
        AND
            a.code = pc.procedure_code
        GROUP BY
            a.fiscal_year
    ),hd_diagnosis_hierarchy AS
    (   SELECT
            NVL (MAX (a.hierarchy), 0) hd_diagnosis_hierarchy,
            a.fiscal_year
        FROM
            ref_hd.nhs_icd10_hier a,
            codes pc
        WHERE
            a.fiscal_year = pc.hd_spell_fiscal_year
        AND
            a.code = pc.diagnosis_code
        GROUP BY
            a.fiscal_year
    SELECT b.*, a.hd_procedure_hierarchy, c.hd_diagnosis_hierarchy
      FROM analytic_hes.temp_ip b,
           LEFT OUTER JOIN hd_procedure_hierarchy a
              ON (a.fiscal_year = b.hd_spell_fiscal_year)
           LEFT OUTER JOIN hd_diagnosis_hierarchy c
              ON (c.fiscal_year = b.hd_spell_fiscal_year)HTH
    David

  • Identify tablspace in create table as select

    I am trying to run a create table as select query that specifies which tablspace to create the table in. When I run the query below I get an error, any ideas?
    create table roi_call_record_backup as (select * from prod.roi_call_record)
    tablespace roi_data01;
    null

    Try this ...
    create table roi_call_record_backup
    tablespace roi_data01
    as
    (select * from prod.roi_call_record)
    null

  • We can't add a decimal number column with the create table forms

    In the version 4, we can't add a decimal number column with the create table forms.

    In the GUI, I found the following column (I translate from french to english): PK, Name, Data_type, lenght, not null, default, comments.
    In the lenght field, if I enter 9,3 to have a NUMBER(9,3), I have a message saying that the number must be an integer.

  • HT1386 My iPhone 4S will not sync with the music I have selected in iTunes.  Has anyone else had this issue and what is the best way to fix it.

    My iPhone 4S will not sync with the music I have selected in iTunes.  Has anyone else had this issue and what is the best way to fix it.

    Hi,
    Setting up syncing
    Before setting up syncing you should download and install the latest version of iTunes. Wi-Fi syncing requires iTunes 10.5 or later and iOS 5 or later. You can change your sync options at any time. Each time you sync, content is synced between your iOS device and computer to reflect new, updated, or deleted content.
    USB syncing
    Open iTunes.
    Connect the iOS device to your computer using the included USB cable and select it in iTunes under Devices on the left-hand side. Some tabs may not appear if you do not have corresponding content in your library. For example if you do not have any podcasts in your library, the corresponding Podcast tab will not appear.
    Click Apply, in the lower-right corner of the screen, to sync.
    Wi-Fi syncing
    Open iTunes
    To set up Wi-Fi syncing, connect your iOS device to your computer with the included USB cable. Select your device under Devices on the left-hand side.
    In the Summary tab, select "Sync with this [device] over Wi-Fi".
    Whenever the computer and the iOS device are on the same network, the iOS device will appear in iTunes, and you can sync it. The iOS device will sync automatically when all of the following are true: 
    The iOS device is plugged in to power
    iTunes is open on the computer
    The iOS device and the computer are on the same Wi-Fi network
    While the iOS device appears in the left-hand column of iTunes, you can select the content tabs and configure sync options.
    Click Apply or Sync to sync the iOS device.
    Hope this helps

  • To make the query more efficient (create table wiht select command)

    Hi,
    I have written this query to create another table, but it takes approx two hours while both tables are indexed with 891353, 769023, i have used the following query.
    create table source1 as select a.idx, a.source from tt a where a.idx not in (select b.idx from ttt b)
    thanks

    Try this one if you're on oracle 8i or older
    create table source1 as
      select a.idx, a.source
        from tt a
       where not exists (select null from ttt b where a.idx = b.idx)

  • [Solved]SIMPLE Question ON "CREATE TABLE as SELECT".

    Hi there,
    I was wondering how to work it out smartly and briefly.
    For example, I already have a "tableA" as following.
    tableA
    id name
    1 name1
    2 name2
    create table tmp as
    select id, name from tableA;
    It will create the tmp table successfully.
    If I want to add a new column 'tel' in tmp table,
    I can run as following.
    create table tmp as
    select id, name, 999 tel, 'aaaaaaaaa' ps from tableA;
    It will add 'tel NUMBER' column and 'ps char(9)' in tableA.
    If I want to add 'col varchar(50)' in tableA,
    I do not want to make a string which contains 50 characters in Select command.
    How can I make it work in a smart way?
    Thanks.
    Phil
    Message was edited by:
    user615355

    Is there a reason that you need this to be in a single statement? You would normally be better served here with a separate CREATE TABLE and INSERT (possibly as a direct path operation).
    That said, you could use the CAST operator, i.e.
    SCOTT @ jcave102 Local> create table a as select cast('a' as varchar2(50)) col1 from dual;
    Table created.
    Elapsed: 00:00:00.48
    SCOTT @ jcave102 Local> desc a;
    Name                                                  Null?    Type
    COL1                                                           VARCHAR2(50)
    SCOTT @ jcave102 Local> Justin

  • Performance issue Create table as select BLOB

    Hi!
    I have a performance issue when moving BLOB´s between tables. (The size of images files are from 2MB to 10MB).
    I'm using follwing statement for example,
    "Create table tmp_blob as select * from table_blob
    where blob_id = 333;"
    Is there any hints that I can give when moving data like this or is Oracle10g better with BLOB's?

    Did you find a resolution to this issue?
    We are also having the same issue and wondering if there is a faster mechanism to copy LOBs between two table.

  • OID users ( EUS) problem with grant create table with admin

    Hi,
    We activated enterprise users in the OID.
    There is a role APP_ADMIN that has the following grants:
    create user
    drop user
    create table with admin option
    this is for an application that creates BI schemas, so it needs to be able to create other users.
    I have granted these to a local role, and the user has access to the local role, thanks to the OID setup.
    The create and drop user work.
    however, the grant create table to another user does not work.
    Is there an issue with 'with admin option' grants in Enterprise user security?
    Regards,
    Peter

    If I grant
    grant create table to test_role with admin option;
    it does not work
    if I grant
    GRANT GRANT ANY PRIVILEGE to test_role WITH ADMIN OPTION;
    it does work.
    The test command as user with test_role is:
    grant create table to test_usr;
    very strange!
    If the user is a standard user and I create role test_role
    and grant create table to test_role with admin option it works.
    but if I convert the user to an EUS user and the same privilege is given to the role ( role is granted to a global role to an enterprise role)
    it doesnt work
    Edited by: Peter on Dec 7, 2012 2:36 PM

  • Using iPhotoToGoogleEarth with manually created gps data

    I use iPhotoToGoogleEarth 2.0 to export photos from iPhoto (version 8.1.2) with automatically created gps-information to GoogleEarth. This works well. If I create the gps location in iPhoto manually, the correct gps data are shown within the information data of the photo. But when I export the photo with iPhotoToGoogleEarth, these gps data are not recognized and the photo cannot be placed to the defined location in GoogleEarth.
    However if I export the photo from iPhoto as a file and import these data to iPhoto again, iPhotoToGoogleEarth will find the correct gps data.
    I assume an error in iPhoto

    When you locate a pic in iPhoto that data is +not written to the file+, instead it's stored in the central database.
    If you then export from iPhoto the data can be written to the file. This is why it's available when you re-import it.
    I think your app is looking in the file for information that is not there. It's looking in the wrong place.
    I assume an error in iPhototoGoogleEarth 2.0
    Regards
    TD

  • CREATE TABLE AS SELECT PROBLEM

    Dear members,
    I created a table whose definition is a select query.
    for ex: I created a table xx_customer as :
    create table xx_customer as
    select customer_name,customer_number
    from xx_ar_customer
    where org_id = '87'when i run the query
    select  count(*)
    from xx_customer;The count was 120 records.
    This was done as part of performance tunning.
    Now few days after the table xx_customer was created few records were inserted into table xx_ar_customer for org_id = '87' .
    So ideally the count should be more than 120 but its not.
    when i run the same query again
    select  count(*)
    from xx_customer;I get count as 120 Records which is wrong.
    It looks like it not refreshing data. If i run the table definition query i am getting count as more than 120 but if i do a select on the table count is still 120.
    Any ideas?
    Thanks
    Sandeep

    Hi,
    795291 wrote:
    I cant create view. I tried that before. If i use view then my query runs for a very long time and if i create a table then the run time is reduced by half :)
    So if we create Table as a select statement, then will it give data at the point of time it was created? Exactly!
    Will it not give latest data?Not unless the latest data happens to be the same as the data at the time it was created.
    CREATE TABLE AS is kind of like putting a photograph of yourself on your web site. If you smile, that doesn't mean the picture smiles.
    CREATE VIEW is kind of like hanging a video camea from your hat, and streaming the output to your web page. As soon as you smile, the picture smiles. It's more expensive than a still picture.
    A compromise apprioach is a Materialized View , which is really a type of table. Like any other table, it occupies space, and is relatively fast to use. You can define a materialized view to be refreshed at regular intervals (once a day, once an hour, once a week, ...) or whenever there is a change in the base table(s).

  • Create table as select statement.

    Hello Oracle Gurus,
    I am trying to create a table using select * from other table.
    The procedure that I am following is this:-
    I have a temp table whose signature is on commit delete rows.
    I insert records in this table.
    when I do select * from temp_table,perm_table I get some rows.
    then I try to create a result_table using this
    CREATE TABLE result_table
    AS SELECT * FROM temp_table,perm_table;
    I see the table in created but number of records in 0. Can anyone please explain where commit takes place while sequence in this query occurs.
    Thanks
    Edited by: user10696492 on Nov 10, 2009 8:47 AM

    Create table statement is a ddl - so an implicit commit is performed before the create statement begins. The implicit commit will delete all the rows from the temp table. If it is feasible change the definition of the temp table to on commit preserve rows.

  • "Create Table from select Query" Vs "Insert into"

    Hi
    Schenaio:
    My Select Query returns more than 10 million records, these records needs to be inserted into another table.
    Approach 1:
    I created table called TABLE1, and inserted the records using INSERT statement as a batch (batch size is 5000).
    Approach 2:
    I create table like,
    CREATE TABLE TABLE1 AS <SELECT QUERY>
    Here Apporach-1 took almost 40 minutes to complete the insert but Approach-2 took only 6 minutes.
    If anybody knows why it is? And is there any way to improve the performance of Approach-1?.
    Thanks
    Nidhi

    Most "batch" methods execute the same query multiple times. Row filtering is done after the rows are fetched from the source. The process of fetching all the rows could be a FullTableScan.
    Therefore, a FullTableScan is executed for each batch of 5000 rows.
    However, your query and batch definitions may well be different. We haven't seen the query and the execution plan.
    Another point : How are you "filtering" the rows (i.e the second execution inserts rows 5001 to 10000 and does not attempt to reinsert rows 1 to 5000) ?
    What is the overhead imposed by the filter ? (does the third execution have to exclude rows 1 to 10000 and inserts rows 10001 to 15000 and so on)
    Hemant K Chitale

  • Create Table As Select From Select

    Table_2
    CREATE TABLE TABLE_2
    "ID" VARCHAR2(10),
    "EXCL" VARCHAR2(10),
    "SEQ" NUMBER(10)
    Inserts
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('123456' ,'' ,1 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('123456' ,'EX' ,2 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('123456' ,'' ,3 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('321654' ,'' ,4 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('123798' ,'EX' ,5 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('123785' ,'' ,6 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('654787' ,'' ,7 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('654787' ,'' ,8 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('654787' ,'' ,9 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('985217' ,'EX' ,10 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('985217' ,'' ,11 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('937158' ,'' ,12 );
    INSERT INTO TABLE_2 (ID ,EXCL ,SEQ ) VALUES ('937158' ,'' ,13 );
    Select *
    ID EXCL SEQ
    123456 1
    123456 EX 2
    123456 3
    321654 4
    123798 EX 5
    123785 6
    654787 7
    654787 8
    654787 9
    985217 EX 10
    985217 11
    937158 12
    937158 13
    I need to create a table based on for all Records which are EXC not null - but I need to bring through all the records which have the same ID as EXC not null field.
    Desired output: -
    ID EXCL SEQ
    123456 1
    123456 EX 2
    123456 3
    123798 EX 5
    985217 EX 10
    985217 11
    Any ideas folks?

    Hi,
    Here's one way:
    CREATE     TABLE     table_x
    AS
    SELECT     *
    FROM     table_2
    WHERE     id     IN (
                     SELECT  id
                     FROM    table_2
                     WHERE   excl     IS NOT NULL
    ;By the way, whenever you post formatted text (such as query results) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    You'll get better answers quicker if people can read:ID EXCL SEQ
    123456 1
    123456 EX 2
    123456 3
    123798 EX 5
    985217 EX 10
    985217 11
    (for example) rather than
    Deeds_2001 wrote:
    ID EXCL SEQ
    123456 1
    123456 EX 2
    123456 3
    123798 EX 5
    985217 EX 10
    985217 11

Maybe you are looking for