Synchronizing two DBs

From DB1 user ,create dblink to DB2 user
suppose Table1 in DB1 user is to be synchronized with Table2 in DB2 user
procedure in DB1
select all records in Table1 and store in arrays (the rowid in arrays) -- i don't know how to do this
insert into Table2@dblink select all records in Table1 where rowid in (Array rowid);
delete from Table1 where rowid in (Array rowid)
Can anyone help me out in creating the arrays of rowids and using them in the insert and delete statements...
The rowids are needed as it takes some time to tranfer from DB1 to DB2,during this time Table1 can be filled with some datas and these datas will be deleted if we don't take the rowids of what we have inserted ...
Thanks in advance

Oracle gives you read-persistency. Once your transaction starts, it won't see newly inserted records.
If you really want to, you could do something like this:
package body thepackage is
  type rt2 is table of pls_integer index by varchar2(20);
  ra2 rt2;
procedure load_array is
  type rt1 is table of rowid;
  ra1  rt1;
begin
  -- unfortunately we can't do bulk collect into varchar2 indexed array
  -- so we take a little detour
  select rowid
  bulk   collect
  into   ra1
  from   table1;
  for i in ra1.first .. ra1.last
  loop
    ra2(rowidtochar(ra1(i).rowid)) := 0;
  end loop;
end;
procedure insert_data is
begin
  insert into table2@dblink
  select *
  from   table1
  where  ra2.exists(rowidtochar(rowid))
    and  not exists ...... -- something to prevent re-inserting records already in table2
end;
end;As an alternative to the above, you could insert the rowids into a global temporary table and reference that instead.

Similar Messages

  • Different NLS_LENGTH_SEMANTICS in two dbs...and ORA-12899

    Hi,
    I have created two db instances on the same server. One with db characterset EL8MSWIN1253(single-byte characterset) , NLS_LENGTH_SEMANTICS=BYTE and the other with UTF8(multi-byte characterset) NLS_LENGTH_SEMANTICS=CHAR.
    I'm trying to export a table from db1 and import to db2 ... respectively reffered above.
    This table has the following definition:
    SQL> CREATE TABLE TEST(A NUMBER(1) , B VARCHAR2(10));
    Table created
    SQL> INSERT INTO TEST VALUES(1 , 'TEST_TEST');
    1 row inserted
    SQL> COMMIT;
    Commit complete
    SQL> INSERT INTO TEST VALUES(2 , 'ΤΕΣΤ_ΤΕΣΤ');     <------------greek chars 1 row inserted
    SQL> COMMIT;
    Commit completeIn order to accomplish the aim....
    1) I exported the table
    2) I imported it without the rows - only to 'precreate' the tables
    3) I imported it with rows ... but error ORA-12899 (current value exceeds the max length specified) occurs....
    Of course this type of error is not a suprise ...since after step 2 , when i issue the command:
    SQL> DESC TEST;
    Name Type              Nullable Default Comments
    A    NUMBER(1)         Y                        
    B    VARCHAR2(10 BYTE) Y                        <---------the NLS_LENGTH_SEMANTICS of the exported file has been used...Issuing the command
    SQL> alter table test modify b varchar2(10 char);
    Table alteredbefore step 3 and after repeating step 3 ... solves the problem(ORA-12899).
    However , is there any other way to do this .....????? (imagine that there are some hundreds/thousands of tables....to be imported in such a db)...
    Note: I use Db10g v.2
    Thanks...
    Sim

    Actually.. there is one ...Metalink - Note : 313175.1...
    However , i tried to modify/accomplish the scenarios expressed on :
    1)Metalink Note: 144808.1 (point E1 - How to go to CHAR semantics ? -> use exp/imp ) and
    2)the steps described on:
    http://otn.oracle.com/oramag/oracle/03-mar/o23sql.html
    Have anybody accomplished it with exp/imp as described above on two dbs running different db charactrer sets(one single-byte and the other UTF8)...????
    Thanks....
    Sim

  • Synchronizing Two Custom Z Tables Using Abap Program

    Hi,
        My requirement is Synchronizing two custom z tables using abap program me.
    I have vendors in two tables, i have to select the common vendors from first which are existing in second  table also.
    In first table each vendor can have more than one supplier types in one field only. In second table these supplier types are divided into
    different fields.
         My requirement is I have to check supplier types in first table and i have to pass X to corresponding supplier types in second table vendor.
    I have to pass X value for each depending in Second table depending upon supplier type in first table.
    . How to do it can any one suggest with code.
    Thanks in Advance,
    Vivek
    <subject edited by moderator>
    Message was edited by: Manish Kumar

    Hi,
    Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
    For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
    Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
    Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
    If the key of Table2 is vendor no & vendor type, then do a read table for the key.
    The logic in pseudo-code:
    Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
         extract the vendor types in to itab Table1New.
         Select the vendor & types from Table2 by using the for all entries option (better performance).
         loop at Table1New
              check in Table2:
                   if the unique key is vendor no: check all fields for the vendor type from Table1New
                   if the unique key combo is vendor no & type: check by using a read table.
              If not found => add entry to Table2
         endloop.
    endselect Table1 (when using package size)
    I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
    Good luck!
    Best regards,
    Zhou

  • Problem in synchronizing two executions

    One execution (not in loop structure) is to run vi-A to move a motor by certain distance. Another execution is a loop struction, and in each loop execution vi-B inside it acquires current motor position.
    I hope to synchronize this two executions so that when the motor just begin to move, the vi-B simultaneously begin to acquire position. However, I always failed to synchronize them. In the position ~ time plot, there are always a short beginning period where position is zero.
    Any suggestion on solving this problem? Thanks a lot.
    Dejun  

    My first thought is why make it into two separate threads?  It may be easier to have it move then read position in a loop.  This would simplify the problem and make things easier.
    If you need to use threads I have two thoughts.  Use LabVIEW 8.0 Shared Variable to share information between the two threads.  You can also FIFO commands using the Shared Variable.  Second thought is that you may be overrunning one of the threads.  You can probably read faster that you can move so put loop count indicators on the front panel to see how many iterating each thread has run.  You may be surprised by what you see.
    Let me know if this is any help.  If not, fire me back a specific question and I will try to help,
    Matt
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • Comparing Table between two dbs DBMS_RECTIFIER_DIFF.DIFFERENCES

    We have streams replication between two databases db1 & db2 (table level streams replication).
    We would like to compare tables between these databases.
    we can use DBMS_RECTIFIER_DIFF.DIFFERENCES to find out differences. However what is value to be passed for REFERENCE_SITE & COMPARISON_SITE parameters?
    Is it DBLINK or TNSNAMES entry ?

    Its the DBLINK.

  • Question about synchronizing two methods...

    i have 2 methods:
    writeData() //method 1
    createNewDataFile() //method 2
    the main thread will be using method 1 quite frequently. In method 2, a separate thread will be waking up every 10 minutes or so and doing some maintenance on the file written to in method 1. So, when the thread is in method 2 i need method 1 to standby and wait. I also want the opposite, that when the main thread is in method 2 method 1 will stand by.
    Any help is appreciated!

    799454 wrote:
    So wait,
    i thought synchronized only worked on the actual methods where it is declared:Using the synchronized keyword obtains a lock. Each object has exactly one lock associated with it. Once a thread has obtained an object's lock, no other thread can obtain that lock (and hence cannot enter a sync block on that lock) until the first thread releases it by leaving its sync block or calling wait().
    so, you're saying that if i declare:
    synchronized method 1
    synchronized method 2
    then i have a single object with 2 synchronized methods, so if thread A is in EITHER of those methods, the other method will be locked as well?The method isn't "locked" per se, but yes, 1 object, 2 synced methods, if T1 is in either method, then T2 cannot enter either method.
    I strongly urge you to go through that tutorial and/or a book on Java concurrency, thoroughly.

  • How to synchronized two Timer Task ?

    I need to execute 2 job
    job1 every sec
    job2 every min
    when one task is executing other task should wait
    so i created 2 timer
    timer1 will execute secjob every sec
    timer2 will execute minjob every min
    and one job object with synchronized execute method
    please see the code for further detail
    problem:
    before completion of secjob , minjob started excuting
    job Fired Fri Oct 10 20:45:16 IST 2008 by Timer-0 ID :7.....
    job Fired Fri Oct 10 20:45:21 IST 2008 by Timer-0 ID :7.....
    job Fired Fri Oct 10 20:45:26 IST 2008 by Timer-0 ID :7....{color:#ff0000}*job Fired Fri Oct 10 20:45:31 IST 2008 by Timer-1 ID :8*{color}*.*
    {color:#ff0000}*...*{color}
    job Fired Fri Oct 10 20:45:34 IST 2008 by Timer-0 ID :7.....
    job Fired Fri Oct 10 20:45:39 IST 2008 by Timer-0 ID :7.....
    public class Fire {
        static void secJob(Job job)  {
             Timer timer = new Timer();
             int delay = 0;  
             int period = 1000*1; 
             SecJob secJob = new SecJob(job);
             timer.schedule(secJob, delay, period);        
        static void minJob(Job job) {
             Timer timer = new Timer();
             int delay = 0;  
             int period = 1000*60; 
             MinJob minJob = new MinJob(job);
             timer.schedule(minJob, delay, period);
        public static void main(String[] args) {       
            final Job job = new Job();
            secJob(job);
            minJob(job);
    public class SecJob extends TimerTask{
        Job job;
        public SecJob(Job job) {
            this.job = job;
        public void run() {
            job.execute(SecJob.class);
    public class MinJob extends TimerTask{
        Job job;
        public MinJob(Job job) {
            this.job = job;
        public void run() {
            job.execute(MinJob.class);   
    public class Job {
        private void sleep(long count,PrintStream out) {
            try {
                for (int i = 0; i < count; i++) {
                    Thread.sleep(1000*1);
                    out.print(".");
                out.println();
            } catch (InterruptedException e) {
                e.printStackTrace();
        public synchronized void execute(Class c) {
            Thread t = Thread.currentThread();
            if(c == MinJob.class ) {
                System.err.print("job Fired "+new Date()+" by "+t.getName()+" ID :"+t.getId());
                sleep(3,System.err);
            }else if(c == SecJob.class ) {
                System.out.print("job Fired "+new Date()+" by "+t.getName()+" ID :"+t.getId());
                sleep(5,System.out);

    I'd only use one timer and write a dispatcher task that stores the time at which job2 is executed. If the last time is more than one minute past, execute job1, reset the time tracking field, and execute job2.

  • Synchronizing two audio  tracks

    Hi, I have two audio tracks, one instrumental and one vocal. I want to attach the vocals to the instrumental. When I import both files to the garageband program I can't get them to synchronize. In other words I can't get the vocals to match up with the instrumental track. Is there any way to auto synch, or anything that can help me synch these two tracks. If anymore explaining is required let me know. I use garageband 3.0.4 if that info helps.

    Why can't you sync them? Do they have different tempos? If they have the same tempo, you can just shift them back and forth until they match. Make sure you turn snap-to-grid off (cmd-g).

  • Things to consider while merging two DBs?

    Dear gurus,
    We have 2 instances, 1 is prod and other is replica of prod, just 4-5 hours behind prod,
    used for queries just to reduce overhead on PROD,(the second instance is not a DSS/warehosuese/OLAP env it is just replica on instance 1) with some additional indexes,
    now the management has decided to remove the second instance,
    my question is : how do i proceed that the queries running on instance 2 should not create any problem when shifted to instance 1
    thanks

    user548749 wrote:
    my question is : how do i proceed that the queries running on instance 2 should not create any problem when shifted to instance 1If an existing query on instance 2 uses an index which is not available on instance 1, there can be a hefty performance impact. Or instance 1 can already be quite busy and unable to handle the additional volume of queries from instance 2. Or the buffer cache on instance 1 may not allow the same level of caching enjoyed by queries on instance 2 (due to production processes that are absent from instance 2).
    So there is no simple way to identify problematic queries that worked fine on instance 2 and would be a problem on instance 1. For starters, you will need to parse every single query on both and compare the resulting execution plans simply to determine if there will be a difference.
    Also, as instance 1 contains more data than instance 2 (which lags some hours behind), execution plans can quite likely be different in some cases due to the volume of data.
    This is not a simple exercise to undertake. There will be execution plan differences - and the difference may not be a bad thing due to the differences of instance 1 compared with instance 2.
    What you can do is implement resource profiles on instance 1 for instance 2 queries - and that way attempt to control those queries resource utilisation and thus minimise their impact on instance 1.
    Bottom line though - I see this as a lot of manual and hard work to make the replacement of instance 2 with instance 1 a transparent one to the end users that are using instance 2 for queries.
    Billy

  • Can we use JDK in ERP Connector for tranferring data between two DBs?

    HI ALL,
    Iam using ERP connector for transferring the data between Proectserver 2003 and R/3 system.
    In Erp connector Previously they are using SDK in .net
    My assumption is Can We use the jdk for this.
    Thanks in advance.
    Regards
    BHI
    Message was edited by: BHI BHI

    hello bhi,
    you want a connector for R/3 that runs in java?
    if it is, you case use SAP JCo. I don't have any
    idea however, if this connector could connect
    ProjectServer and R/3.
    regards
    jo

  • Question on integration between two DBs

    I have a scenario where I have a local oracle database and another oracle database accessible via an application exposed using web services.
    The data model is different in the local database then the one accessible via web service.
    The requirement is to query the data in the local oracle db transform it and then sync with the other database via web services. The kind of transformation required is as follows:
    The local DB has a single table. Each row in the table can be broken into 3 parts and converted as a master detail detail format. And the DB accessible via services has 3 tables one for each type of information. The services available are also 3 individual services accepting one type of data.
    So, is it possible to sync the data at a regular interval of this form from local to the other DB using Golden Gate?
    Please provide some pointers...

    GoldenGate talks to GoldenGate, your web services part is extraneous to this process.
    What you can do is extract your data on the source and replicate it on the target. The process will be that you need to break up the original data for inserting into your three target tables. You will have to use colmap and a sourcedef file (the tables are not identical). I would probably use three replicats, that way, each of your target tables can run independent of one another.
    But, that is a pretty expensive way to replicate one table. Why not use a materialized view or Streams?

  • Auto Synchronizing two audio tracks (ADR)

    PremProCC.
    I can't find a video I saw some months ago which showed how a good audio speaking track was matched up to a noisy recording. It was automatic as I recall, but can't find the tutorial video anywhere.
    Even if you don't know where to find the video, how does one do this? I have a voice track, a third VO recording, which is essentially identical but it's a better read. It's only a 5:15: video and could do it manually in a few minutes, but I want to find an auto way to do this.
    Thanks
    Greg

    OK, I found it.
    What I was looking for is in Audition cs6 cc video: Multitrack sessions.
    Greg

  • Same account name on two computers can't write over network

    I'm having great difficulty synchronizing two computers. One is an iMac and the other is a MBP. They are both used only by me for work. I don't need to share them with anyone else, only with each other. The main account is exactly the same on both of them as the iMac is a Migration of the MBP, so the user name and password are identical.
    Regardless of how I set sharing/permissions on any given folder, I can only read in either direction. Whenever I try to write, it asks for authentication (odd since the volume is already mounted), then says the file already exists (even though it doesn't) would you like to overwrite? I click overwrite, and then it comes back and says "you can't overwrite since the file already exists". Huh?? Looking at the destination the file does exist, but is zero bytes.
    I finally created a dummy admin account on one of the machines, logged into this account from the other, and then things work like you would expect. I can write to those directories of the main account that have write privileges and not to those that don't.
    So my question, is there anyway to just log into the main account, which is exactly the same on both machines and be able to write? This odd behavior seemed to start somewhere around 10.5 as I was always able to do this before.
    Thanks,
    Darryl

    I am having exactly the same problem, also with an iMac and a MBP. My iMac is about 6 weeks old, and I migrated via Time Machine. I can read the files from the connected machine, but cannot write, regardless of which is the host. Permissions are all fine.
    I did notice one thing: the UUID number for the accounts is the same (accounts have same name as with darrylh). You can find this under System Preferenes>Accounts and right click or control-click on the account name after unlocking it. I am working with Apple support on this, but no resolution yet. I suspect that the UUID (Universally Unique ID) should not be the same on two machines, but I don't know the consequences of changing it or which one to change.
    Thanks.

  • How do i syncronise two macs on the same network

    I currently have a macbook pro, and that is now going to be my home office computer. I am about to buy a macbook air as my travel laptop. I will need them to have the same information on how do I keep them syncronised when I update information on one or the other.

    How to Keep Two Macs in Sync
    osx - How to keep two Macs in sync?
    syncing two macs: what will work...:
    Synchronizing two Macs using an Intermediary
    Sync several Macs: sync Macs with Mac OS X sync tool SyncMate
    Best Sync app for two macs?

  • {SOL}Problem in Export/Import a simple table between two diff. characterset

    Hi ,
    I have created a simple table on SCOTT schema....
    SQL> CREATE TABLE TEST(A NUMBER(1) , B VARCHAR2(10));
    Table created
    SQL> INSERT INTO TEST VALUES(1 , 'TEST_TEST');
    1 row inserted
    SQL> COMMIT;
    Commit complete
    SQL> INSERT INTO TEST VALUES(2 , 'ΤΕΣΤ_ΤΕΣΤ');     <------------greek chars
    1 row inserted
    SQL> COMMIT;
    Commit complete
    The nls_parameters:
    SQL> SELECT * FROM NLS_INSTANCE_PARAMETERS;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   GREEK
    NLS_TERRITORY                  GREECE
    NLS_SORT                      
    NLS_DATE_LANGUAGE             
    NLS_DATE_FORMAT               
    NLS_CURRENCY                  
    NLS_NUMERIC_CHARACTERS        
    NLS_ISO_CURRENCY              
    NLS_CALENDAR                  
    NLS_TIME_FORMAT               
    NLS_TIMESTAMP_FORMAT          
    NLS_TIME_TZ_FORMAT            
    NLS_TIMESTAMP_TZ_FORMAT       
    NLS_DUAL_CURRENCY             
    NLS_COMP                      
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    17 rows selected
    SQL> SELECT * FROM NLS_SESSION_PARAMETERS;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CURRENCY                   $
    NLS_ISO_CURRENCY               AMERICA
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD-MON-RR
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY              $
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    17 rows selected
    and db characterset is EL8MSWIN1253
    I export such as(following generally the instuctions found on Note:227332.1-Metalink):
    C:\Documents and Settings\s_k>SET ORACLE_SID=EPESY
    C:\Documents and Settings\s_k>SET NLS_LANG=GREEK_GREECE.EL8MSWIN1253
    C:\Documents and Settings\s_k>C:\oracle\product\10.2.0\database10g\BIN\exp SYSTE
    M/passwd@EPESY FILE=C:\TEST.DMP TABLES=(SCOTT.TEST) ROWS=Y LOG=C:\TEST2.TXT
    Export: Release 10.2.0.1.0 - Production on ╩Ϋ± ╔ΎΫΊ 22 12:28:58 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ╕ήώΊί ≤²Ίϊί≤ύ ≤ί: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    ╟ ίΌάή∙ή▐ ▌ήώΊί ≤ΪΎ ≤ίΪ ≈ά±άΆΪ▐±∙Ί EL8MSWIN1253 Άάώ ≤ΪΎ ≤ίΪ ≈ά±άΆΪ▐±∙Ί NCHAR AL1
    6UTF16
    ╨±ΎίΪΎώΉά≤▀ά ήώά ίΌάή∙ή▐ Ϊ∙Ί Ώ±Ύ≤ϊώΎ±ώ≤Ή▌Ί∙Ί ΏώΊ▄Ά∙Ί Ή▌≤∙ ╙ΫΉέάΪώΆ▐≥ ─ώάϊ±ΎΉ▐≥ .
    ╧ Ϊ±▌≈∙Ί ≈±▐≤Ϊύ≥ ▄ΈΈάΌί ≤ί SCOTT
    . . ίΌάή∙ή▐ ΪΎΫ Ώ▀ΊάΆά                           TEST          2 ή±άΉΉ▌≥ ίΌ▐≈ϋύ≤
    άΊ
    ╟ ίΌάή∙ή▐ ΪίΈί▀∙≤ί ίΏώΪΫ≈■≥ ≈∙±▀≥ Ώ±ΎίώϊΎΏΎ▀ύ≤ύ.Then , i shutdown this database and i start the other.....
    with this nls_parameters
    SQL> select * from nls_session_parameters;
    PARAMETER                                                                        VALUE
    NLS_LANGUAGE                                                                     AMERICAN
    NLS_TERRITORY                                                                    AMERICA
    NLS_CURRENCY                                                                     $
    NLS_ISO_CURRENCY                                                                 AMERICA
    NLS_NUMERIC_CHARACTERS                                                           .,
    NLS_CALENDAR                                                                     GREGORIAN
    NLS_DATE_FORMAT                                                                  DD-MON-RR
    NLS_DATE_LANGUAGE                                                                AMERICAN
    NLS_SORT                                                                         BINARY
    NLS_TIME_FORMAT                                                                  HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT                                                             DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT                                                               HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT                                                          DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY                                                                $
    NLS_COMP                                                                         BINARY
    NLS_LENGTH_SEMANTICS                                                             CHAR
    NLS_NCHAR_CONV_EXCP                                                              FALSE
    17 rows selected
    SQL>
    SQL> select * from nls_instance_parameters;
    PARAMETER                                                                        VALUE
    NLS_LANGUAGE                                                                     GREEK
    NLS_TERRITORY                                                                    GREECE
    NLS_SORT                                                                        
    NLS_DATE_LANGUAGE                                                               
    NLS_DATE_FORMAT                                                                 
    NLS_CURRENCY                                                                    
    NLS_NUMERIC_CHARACTERS                                                          
    NLS_ISO_CURRENCY                                                                
    NLS_CALENDAR                                                                    
    NLS_TIME_FORMAT                                                                 
    NLS_TIMESTAMP_FORMAT                                                            
    NLS_TIME_TZ_FORMAT                                                              
    NLS_TIMESTAMP_TZ_FORMAT                                                         
    NLS_DUAL_CURRENCY                                                               
    NLS_COMP                                                                        
    NLS_LENGTH_SEMANTICS                                                             CHAR
    NLS_NCHAR_CONV_EXCP                                                              FALSE
    17 rows selected
    with this db characterset: UTF8
    C:\Documents and Settings\s_k>SET NLS_LANG=GREEK_GREECE.EL8MSWIN1253
    C:\Documents and Settings\s_k>C:\oracle\product\10.2.0\database10g\BIN\imp syste
    m/passwd@info FROMUSER=SCOTT TOUSER=SCOTT FILE=C:\TEST.DMP LOG=C:\TEST0_IMP.TXT
    Import: Release 10.2.0.1.0 - Production on ╩Ϋ± ╔ΎΫΊ 22 12:40:16 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ╕ήώΊί ≤²Ίϊί≤ύ ≤ί: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    ┴±≈ί▀Ύ ίΌάή∙ή▐≥ ϊύΉώΎΫ±ή▐ϋύΆί άΏⁿ EXPORT:V10.02.01 Ή▌≤∙ ≤ΫΉέάΪώΆ▐≥ ϊώάϊ±ΎΉ▐≥
    ίώ≤άή∙ή▐ ▌ήώΊί ≤ί ≤ίΪ ≈ά±άΆΪ▐±∙Ί EL8MSWIN1253 Άάώ ≤ίΪ ≈ά±άΆΪ▐±∙Ί NCHAR UTF8
    server ίώ≤άή∙ή▐≥ ≈±ύ≤ώΉΎΏΎώί▀ ≤ίΪ ≈ά±άΆΪ▐±∙Ί UTF8 (ϊΫΊάΪ▐ ΉίΪάΪ±ΎΏ▐ ≤ίΪ ≈ά±άΆΪ▐±
    ∙Ί)
    server ίΌάή∙ή▐≥ ≈±ύ≤ώΉΎΏΎώί▀ ≤ίΪ ≈ά±άΆΪ▐±∙Ί NCHAR AL16UTF16 (ϊΫΊάΪ▐ ΉίΪάΪ±ΎΏ▐ ≤ί
    Ϊ ≈ά±άΆΪ▐±∙Ί nchar)
    . ίώ≤άή∙ή▐ Ϊ∙Ί άΊΪώΆίώΉ▌Ί∙Ί ΪΎΫ SCOTT ≤ΪΎ SCOTT
    . . ίώ≤άή∙ή▐ ΪΎΫ Ώ▀ΊάΆά                         "TEST"          2 ή±άΉΉ▌≥ ίώ≤▐≈ϋ
    ύ≤άΊ
    ╟ ίώ≤άή∙ή▐ ΪίΈί▀∙≤ί ίΏώΪΫ≈■≥ ≈∙±▀≥ Ώ±ΎίώϊΎΏΎ▀ύ≤ύ.
    C:\Documents and Settings\s_k>SQLPLUS SCOTT/TIGER
    SQL*Plus: Release 10.2.0.1.0 - Production on ╩Ϋ± ╔ΎΫΊ 22 12:41:20 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ╙²Ίϊί≤ύ ≤ί:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> SELECT * FROM TEST;
             A B
             1 TEST_TEST
             2 ????_????What may be the cause.....????
    Note: I use db 10g v.2 on Windows XP platform.. and the two db instances reside on the same machine....
    Thanks...
    Sim

    "Generally speaking the value of the NLS_LANG registry key or environment variable needs to be equal to the characterset of the database."
    Yes...that's why i have set the NLS_LANG env.variable to GREEK_GREECE.EL8MSWIN1253 ..equal to:
    SQL> select * from nls_database_parameters;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CURRENCY                   $
    NLS_ISO_CURRENCY               AMERICA
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CHARACTERSET EL8MSWIN1253
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD-MON-RR
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY              $
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    NLS_RDBMS_VERSION              10.2.0.1.0"nls_language doesn't come into play, nor nls_instance_parameters."
    Yes...it's true.
    "So, in the dump you posted, no one can tell whether those characters were INSERTed correctly at all. Your NLS_LANG *registry key* may have been set to an incorrect value (it defaults to American_America.MSWIN1252)."
    Actually , i have used a third-party tool PL/SQL Developer (which does have the OracleDB10g as default home).
    Looking at the Windows registry of OracleDB10g the NLS_LANG is equal to GREEK_GREECE.EL8MSWIN1253.
    "Thirdly, as I implied above the NLS_LANG on import should have been American_America.UTF8."
    According to the Note 227332.1 , if the db characterset of the two dbs are not the same.. then it is preferable the conversion should be done on the import process and not the export....
    So, in an example described there -export from a AMERICAN_AMERICA.WE8MSWIN1252 db and import on UTF8 db - (seems exactly the same as mine) the import is done as such:
    c:\>set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
           c:\>imp ....
    The conversion to UTF8 is done while inserting the data
           in the UTF8 database.Additional notes....
    I have used many different patterns doing the import......
    1) Use of AMERICAN_AMERICA.UTF8
    2) Use of GREEK_GREECE.EL8ISO8859P7
    3) Use the appropriate NLS_LANG that corresponds to the display of chcp command....
    All tries display some '?' chars.....
    Anyway... I 'll continue reading ... and testing
    Thanks... a lot for your points
    Sim

Maybe you are looking for

  • Remote Control No longer works after 10.3 upgrade

    I have begun pushing out ZCM 10.3 to my infrastructure and I'd like ask WHY the Remote Control Policy no longer works. The managed device was unable to initialize Novell encryption scheme for the session. Ensure that the managed device is UTC time sy

  • How to reverse and reset documents cleared by FB1S

    Hi all, This is the scenario am into: Payment program cleared an open item doc say 19xxx for the vendor and created a clearing document 20xxx and check ABCD was send to vendor. Later found check was to be voided and the document reversed. Instead of

  • Opening Final Cut HD

    I've installed the software successfully along with "Live Type" and "Soundtrack". The other two programs open and work fine but when I click on the Final Cut icon all I get is the startup screen then nothing. It simply goes back to my desktop screen.

  • Xmp preserved file name

    I like to check the 'Preserve current file name in XMP metadata' box when using the Batch Rename in Bridge so I can possibly use the original name after running the batch renaming. But I cannot seem to locate where the "current file name" is stored i

  • K7T Turbo2 - how do I tell BIOS to boot from USB?

    I have an old K7T Turbo2 system, and I'm trying to install Windows 7 on it.  I guess that's my first question - am I going to run into any nasty problems running W7 on this board, other than RAM limitations?  I have a version of "Tiny7" (which instal