Table structure changes when using 'create table X as ( select * from X@remote_server )'

I need to create and copy data from a remote Oracle server to a local server. The command I use is
create table X as ( select * from X@remote_server )
with remote_server is the tns name of the remote Oracle server.
The local table is created and populated with data as expected but when I check the structure using 'desc X' it shows me all the CHAR fields of the local table are triple as large as of the remote table.
I guess the problem is the difference  between the NLS_CHARACTERSET settings . The local charset is AL32UTF8 and the remote is  WE8MSWIN1252.
How do I change the command to make the two tables have the same field sizes ?
Thanks,
Vu

Do you want to be able to store all the data from the remote table in the local table?  Assuming you do, increasing the size of the column would be the correct behavior.
By default, a VARCHAR2(10) allocates up to 10 bytes of storage.  In the Windows-1252 character set on the source, 1 character requires 1 byte of storage.  So a VARCHAR2(10) has space for up to 10 characters.  In the UTF-8 character set on the destination, however, 1 character can require up to 3 bytes of storage.  So a VARCHAR2(10) may allow you to store as few as 3 characters.  Since Oracle has no way of knowing what data you have (and will have) in the source system, it triples the size to ensure that all the data from the remote system will fit in the new table.  If you want the columns to be the same size on the destination that they are on the source, it is highly probable that you'll get errors inserting the data because at least one value will be too large for the destination column.
Justin    

Similar Messages

  • ORA-14551 when using rules manager inside a SELECT * FROM TABLE(myFunction)

    Hello
    I want to return rows from a pipelined function, and map this to a view, or a BC4J an query this in my application.
    I want to populate the rows based on many evaluations, to achieve this, I want to include the rules manager functionality.
    I have defined my event, rule class and result view successfully, but... when I run my query, I have the following error:
    ORA-14551: cannot perform a DML operation inside a query
    We believe this is caused when the engine tries to populate the results view with the matching rules.
    Is there a workaround for this?
    Please help
    Thnks in advance.
    Alex.

    Alex,
    I cannot think of any workaround that would allow you to evaluate the rules and return the results with a single query. A Rules Manager application with composite events modifies the state of the database (for maintaining incremental state as well as the results view) when some events are processed. So, you will not be able to pipeline the results to a SQL query. If you can at least separate the ADD_EVENTS call from the rest of the logic this may be possible.
    Hope this helps,
    -Aravind.

  • Problem in Master Detail form when using ADF table for Detail

    hi,
    jdev version-11.1.2.1.0
    i have create Master detail form using datacontrol drag as ADF Master Form Detail Table.
    Now when i create a new row in Detail table using CreateInsert button a blank new row created on the top of detail table.
    and other row show that data of previous record based on master.
    problem is that i want when i click on createInsert button all row of detail table should be blank and when user fill two or three row then commit.
    Thanks in Advance

    Hi,
    if a detail table has data, then createInsert adds to these. If you want to hide existing rows, create a new View Object instance and set its "Retrieve from the Database" option to "No Rows". The use an af:switcher to change the table shown when the user clicks the createInsert button. There is a bit of coding required to have this use case in ADF, but its mostly declarative. Bottom line is that there is no automated option other than creating new rows in a separate page or dialog if you are bothered by existing rows
    Frank

  • Ho to track table structure changes ?

    Hi
    I need to know how to track the table structure changes ?
    I mean how to know when , which column was added/dropped/altered by which user for a table.
    Is there any DD view for the same in Oracle??

    user572632 wrote:
    Hi
    I need to know how to track the table structure changes ?
    I mean how to know when , which column was added/dropped/altered by which user for a table.
    Is there any DD view for the same in Oracle??refer auditing
    what is your oracle version?
    refer
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c25audit.htm
    http://www.oracle-base.com/articles/10g/Auditing_10gR2.php
    also check trigger,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm

  • clientValidater s when used in tables

    The thread UIX <clientValidater> elements when used in <tables> - problem in the JDeveloper forum gave me a solution to using client validaters on repeating fields in a <table>. I've got this to work fine but have noticed in the log (I've set debug=true in uix-config.xml) that when the page is rendered I get the message 'The id nnn is used more than once' for each of the fields in a row. I can see why it's doing this and am just curious as to whether it could cause me any problems. I don't (currently) make any use of the id other than for this situation.
    Cheers
    Ian

    It shouldn't cause any major problems. It would affect
    PPR if you tried to use PPR to individually replace
    single table cells.
    If you use <messageTextInput>, we'll automatically
    generate unique IDs per row in the table, and this'll
    get client validaters to work just fine. Unfortunately,
    <bc4j:messageTextInput> doesn't support ID generation
    for some arcane but nasty-to-untangle reasons.

  • How to create indexes using CREATE TABLE statement

    Hi,
    Can anyone please tell me how to create indexes using CREATE TABLE staement? This point is part SQL Expert exam (1Z0-047) and please guide me to use which books for this particular exam.
    Thanks in advance.

    Can anyone please tell me how to create indexes using CREATE TABLE staement?e.g. creating a primary key or a unique constraint will generate indexes along with the create table syntax:
    SQL> create table t (a integer primary key, b integer unique)
    Table created.
    SQL> select   index_name, index_type, uniqueness
      from   user_indexes
    where   table_name = 'T'
    INDEX_NAME                     INDEX_TYPE                  UNIQUENES
    SYS_C0016575                   NORMAL                      UNIQUE  
    SYS_C0016574                   NORMAL                      UNIQUE  
    2 rows selected.

  • Table structure changes from PS HRMS 8.3 & 8.8 to PS 9.1

    Hi,
    Is there any delivered report (or) excel sheet explaining the table structure changes from PS HRMS 8.3 & 8.8 to PS 9.1
    Any help on this highly appreciated.
    Thanks
    Soundappan
    Edited by: Soundappan on Nov 1, 2012 7:04 PM

    I'm not sure to understand what kind of module you're talking about.
    Anyway, there are several docs available in MOS which shows the features differences over the versions, have a look :
    PeopleTools Cumulative Feature Overview Tool ID 793143.1*
    But I didn't find any starting by your (very old) Peopletools version.
    Nicolas.

  • Showing description and not key when using check tables in Web UI

    Hi,
    I have added an field using EEWB to Opportunity Item, and connected it to check table CRMC_CUSTGRP1. It shows fine, and we can select from the check table using the web ui.
    However it shows the key column and not description column from the table. Is there a way to make the web ui show description instead of the key?
    Regards
    Mattias

    Hi,
    I debugged GET_V_S_STRUCT, and it tries calling 
    ME->VIEW_DESCRIPTOR->GET_FIELD_GEN_VALUEHELP_DL
    ME-VIEW_DESCRIPTOR is an instance of class CL_BSP_DLC_VIEW_DESCRIPTION, which does not contain the method GET_FIELD_GEN_VALUEHELP_DL, and obviously it throws an CX_SY_DYN_CALL_ILLEGAL_METHOD exception, which leaves the value table empty.
    Do you have any idea why, or have I missed something fundamental?
    Regards
    Mattias
    Edited by: Mattias Johansson on Nov 14, 2008 11:05 AM

  • Index Usage in 9i changed  when used rownum

    Hi List,My Application is in RBO
    Here is one more brain twister ?
    Assume following I Have table SHRI with a single column
    COL I have created Index on COL column say IND_COL.
    Now when I run Following query on 8i with AUTOTRACE ON
    I can see that 8i Uses the Index IND_COL Clearly .
    select * from shri where (h_name='ABC' or h_name='BOM')
    or (h_name ='BOM' or h_name='MOM')
    and rownum=1
    select * from shri where (COL='ABC' or COL='BOM')
    or (COL='ABC' or COL='BOM')
    and rownum=1
    (Note:Above example is just for ur understanding plz.dont see the usage)
    Now my problem is when I see the explain plan for above query in 8i I can see that Query uses IND_COL .
    But when I run the same in 9i It does not uses IND_COL Index (Strange!!!) .
    However when I remove "and rownum=1" clause then It again uses the index in 9i.
    Assume that such queries are existing many places .
    I am badly stuck because of this problem can anybody suggest the best way (Other than changing RBO to CBO) ?
    Regards
    Sripad.

    Run below query, you will get all the details of tablespaces.
    col "Tablespace" for a22
    col "Used MB" for 99,999,999
    col "Free MB" for 99,999,999
    col "Total MB" for 99,999,999
    select df.tablespace_name "Tablespace",
    totalusedspace "Used MB",
    (df.totalspace - tu.totalusedspace) "Free MB",
    df.totalspace "Total MB",
    round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
    "Pct. Free"
    from
    (select tablespace_name,
    round(sum(bytes) / 1048576) TotalSpace
    from dba_data_files
    group by tablespace_name) df,
    (select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
    from dba_segments
    group by tablespace_name) tu
    where df.tablespace_name = tu.tablespace_name ;

  • Using table comparison can we use multiple tables as source?

    Using table comparison can we use multiple tables as source?
    Thank you very much for the helpful info.

    Table Comparison
    1) Input Data coming in
    2) Comparison table (table to which the data is compared)
    3) Output (input rows with respective opcodes based on the comparison result of input dataset with the comparison table)
    If your question is whether table comparison can accept union/join of multiple table sources, you can achieve by using merge/query transforms and then feeding to table comparison. Here, you have to be careful about choosing the primary keys inside table comparison

  • Look for a progarm that will let me have 2 moniters but one will lock on and will not change when using spaces

    look for a progarm that will let me have 2 moniters but one will lock on and will not change when using spaces

    ok so i have one moniter to the right of me and i want to keep my google chrome on that one but still be abel to use space on the many monter. cuz when you go to spaces it movies both moniter i hope that help and i hope that you can help me.

  • Is it possible to ignore "Rigid relationships between attributes cannot be changed" when using ProcessUpdate for Dimension?

    As per the title is it possible to ignore "Rigid relationships between attributes cannot be changed" when using ProcessUpdate for Dimension?
    We have a case where very rarely an item might have been miscategorised so the brand is manually changed.  We want this dimension to be rigid to speed up ProcessUpdate.
    We do a ProcessFull each night, so it will get corrected then, but during the hourly updates we would just like to ignore this error if possible?

    Hello,
    The rigid relationship should be defined when the members will not change over time. Here are some threads regarding rigid relationship for your reference, please see:
    Processing OLAP Cube: http://social.technet.microsoft.com/Forums/sqlserver/en-US/17a55593-9543-404e-a579-0a011965585d/processing-olap-cube?forum=sqlanalysisservices
    Flexible and rigid relationship: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/2d8f5443-065d-4485-9385-6f0b5fa417da/flexible-and-rigid-relationship?forum=sqlanalysisservices
    If you have any feedback on our support, please click
    here.
    Regards,
    Elvis Long
    TechNet Community Support

  • When using Migration Assistant to transfer files from my pc, I get an error message saying that an attempt was made to access a socket in a way forbidden by its access permissions.  How can I fix this?

    When using Migration Assistant to transfer files from my pc, I get an error message saying that an attempt was made to access a socket in a way forbidden by its access permissions.  How can I fix this?

    You followed:
    http://www.apple.com/support/switch101/

  • Has anyone had issues with poor image quality when using lightroom to process raw images from Canon 7dmk2

    Hi everyone..
    ..I have been having image quality issues when using Lightroom to process raw files from a 7d mk2... They are all soft with poor clarity.....tonight in despair I tried processing them  using  canon's software and they are totally different..."much better"
    anyone else had similar problems....Andy

    I have a 7D2 and have not had what I interpret as poor image quality that has anything to do with the camera.
    Can you post a screenshot of what you’re seeing and what specifically you don’t like?  Maybe there is something you can do differently or at least there may be an explanation for what you’re seeing.
    And if you have a raw image that you wouldn’t mind sharing in a public forum, upload to http://www.dropbox.com/ then post a public share link to it in a reply, here.
    In other words post a screenshot of what you see in LR, another of what you see using DPP, and a link to the raw file you’re processing.

  • TS1424 apple store,just wanted to check on how to change my area settings in itunes from United States to United Arab Emirates(that's where i stay).it got changed when i tried to download google maps from the US store in itunes.please help me out here.Tha

    Apple store,just wanted to check on how to change my area settings in itunes from United States to United Arab Emirates(that's where i stay).it got changed when i tried to download google maps from the US store in itunes.please help me out here.Thanks

    Please please help me, if you know how.

Maybe you are looking for

  • How to upgrade (with clean install) a OEL4 server to OL5 on a live system

    My problem is that I cannot find any meaningful information on how to perform a OL upgrade on a live system with a running database. The system is running OEL 4.9 (migrated from RHEL 4 to OEL) and I want to upgrade it to OL 5.7 (wanted to use 6.1 but

  • HT3430 Can't open a Keynote 09 presentation in Keynote 08

    Keynote 09 does not have a "Save As" option so there doesn't seem to be a way to open a Keynote 09 presentation on Keynote 08.

  • How do i 'undo' changes in logic instruments?

    Can anyone help with this please? im using Ultrabeat and cant work out how to 'UNDO' changes - step back to where i was before i changed a setting etc. I'm new to Logic and could really do with a hand with this one. I dont want to have to save before

  • Form trickery ....

    Hi, We are running forms 9i/9iAS2 (on Solaris) I would like to know if there is an easy(ish) way that I could get the file date-changed of an .FMX file while the form is running? Sounds a bit mental I know, but if I can then I was planning on trying

  • How to organize music compilation?

    Hello, community! I'm new to OS X and iTunes. So I have a question how can I organize compilations. For instance I have compilation "The Rolling Stone Magazine 500" which includes hundreds  of Artists. What have I already done? I edited these tags: A