Modifying Column names before Migrating to Oracle 9i

Hello Everyone,
I am trying to Migrate a SQL Server 7 database to an ORACLE 9i using the Migration Workbench tool.
I have noticed the Migration Workbench changes some of our column names that are ORACLE RESERVED WORDS. Migration Workbench adds an underscore to the end of such column names. I need to keep the column names the same.
I select a schema object On ORACLE MODEL PANE but Migration Workbench does not allow me to change the column name nor any of the its properties.
I know that i could add a new column (e.g. DATE)and insert the data from the existing column (e.g. DATE_) and then drop the column but out developers don't like this approach!
Thank you in advance for all your help!
Mitra

I am having the exact same problem. I dont think oracle migration work bench supports this i.e. changing the field names before we actuall complete the migration. So what I did was generate the DDL and clear up all the unnessasary '_' values from the DDL and then create the proper schema. I know this isn't the right way od doing things but I dont know of any other way. Keep in mind that I just started work on oracle like 2 weeks ago.

Similar Messages

  • Re: Column Name as Parameter in Oracle Procedure

    Hi,
    I've successfully compiled the following procedure:
    CREATE OR REPLACE PROCEDURE CREATE_MEASURES_IND_RPT(
        pSTART_DT                                    IN date
    ,   pEND_DT                                         IN date  
    ,   PGEO_DIMENSION_COLUMN               IN VARCHAR2
    AUTHID CURRENT_USER IS
    BEGIN
    DECLARE
        START_DT Date      := pSTART_DT;
        END_DT     Date      := pEND_DT;
    text_ip_adjusted varchar2(10000):='
      select
        replace(fiscal_yr,''/'') as fiscal_year,
        NVL(f_quarter(is_date(disdate,''yyyymmdd'')),''Year'') AS TIME_PERIOD_TYPE,
        NVL('||PGEO_DIMENSION_COLUMN||',''Province'') as geo_desc
        from data_table A,
                postal_code_table B
        where POSTCODE = B.POSTALCODE
          AND (is_date(disdate,''yyyymmdd'') >= :1 and is_date(disdate,''yyyymmdd'') < :2)
        GROUP BY
        replace(fiscal_yr,''/''),
        ROLLUP(f_quarter(is_date(disdate,''yyyymmdd''))),
        ROLLUP('||PGEO_DIMENSION_COLUMN||');
    begin
    EXECUTE IMMEDIATE text_ip_adjusted using START_DT,END_DT; COMMIT;
    END;
    END CREATE_MEASURES_IND_RPT;
    /When I try and execute the procedure, I get the following error:
    ORA-00936: missing expression
    ORA-06512: at "CREATE_MEASURES_IND_RPT", line 36
    ORA-06512: at line 1The data table has date strings which need to be converted to dates using an "IS_DATE" function I've created which is while you'll see the is_date function used. The procedure works fine when I don't include the PGEO_DIMENSION_COLUMN as a parameter so I suspect that I haven't reference the name of the column properly. Essentially, I need my procedure to be able to specify a Column Name in the Postal Code table to use as a group by field.
    Any help would be appreciated.
    Thanks,
    Ed

    Hi,
    spalato76 wrote:
    Hi,
    I've successfully compiled the following procedure:
    CREATE OR REPLACE PROCEDURE CREATE_MEASURES_IND_RPT(
    pSTART_DT                                    IN date
    ,   pEND_DT                                         IN date  
    ,   PGEO_DIMENSION_COLUMN               IN VARCHAR2
    AUTHID CURRENT_USER IS
    BEGIN
    DECLARE
    START_DT Date      := pSTART_DT;
    END_DT     Date      := pEND_DT;
    text_ip_adjusted varchar2(10000):='
    select
    replace(fiscal_yr,''/'') as fiscal_year,
    NVL(f_quarter(is_date(disdate,''yyyymmdd'')),''Year'') AS TIME_PERIOD_TYPE,
    NVL('||PGEO_DIMENSION_COLUMN||',''Province'') as geo_desc
    from data_table A,
    postal_code_table B
    where POSTCODE = B.POSTALCODE
    AND (is_date(disdate,''yyyymmdd'') >= :1 and is_date(disdate,''yyyymmdd'') < :2)
    GROUP BY
    replace(fiscal_yr,''/''),
    ROLLUP(f_quarter(is_date(disdate,''yyyymmdd''))),
    ROLLUP('||PGEO_DIMENSION_COLUMN||');
    begin
    EXECUTE IMMEDIATE text_ip_adjusted using START_DT,END_DT; COMMIT;
    END;
    END CREATE_MEASURES_IND_RPT;
    /When I try and execute the procedure, I get the following error:
    ORA-00936: missing expression
    ORA-06512: at "CREATE_MEASURES_IND_RPT", line 36
    ORA-06512: at line 1The data table has date strings which need to be converted to dates using an "IS_DATE" function I've created which is while you'll see the is_date function used. The procedure works fine when I don't include the PGEO_DIMENSION_COLUMN as a parameter so I suspect that I haven't reference the name of the column properly. Essentially, I need my procedure to be able to specify a Column Name in the Postal Code table to use as a group by field.
    Any help would be appreciated.
    Thanks,
    EdIt l;ooks like you're missing a single-quote at the very end of the expression being assigned to text_ip_adjusted.
    ...       ROLLUP(' || PGEO_DIMENSION_COLUMN || ')';How will you handle the output from that dynamic query? Maybe you should be opening a cursor.

  • SQL Dev converts MS SQL to Oracle - issue with numeric prefix column name

    Hi,
    We're working on migrating MS SQL data into Oracle 10g. An issue we encountered is that some of MS SQL's tables have column names with numeric prefix like 1Q07, 2Q07, ..., 4Q08, and so on. The converted model as well as script can be created. But one thing I notice is that SQL Dev appends a prefix "A" for column names with numeric prefix. This makes sense because Oracle does not allow a column with number. But somehow this does not work with only 4Q
    1Q04 => A1Q01
    2Q07 => A2Q07
    3Q08 => A3Q08
    4Q08 => 4Q08 ???
    Why? Any place in the tool where I can override this?
    Obviously I can manually modify column name 4Q08 to A4Q08 in the script. But by doing this when moving data, it would fail because tool has no knowledge of updated column name.
    Thanks in advance.

    Hi ittichai,
    In <repository>.MIGRATION_TRANSFORMER body
    FUNCTION first_char_check(p_work NVARCHAR2) RETURN NVARCHAR2
    v_allowed := C_DISALLOWED_CHARS || '012356789_$';
    should be
    v_allowed := C_DISALLOWED_CHARS || '0123456789_$';
    If you make this change and convert the 4Q08 will be
    A4Q08 is expected, without any manual rename.
    -Turloch
    Message was edited by:
    Turloch O'Tierney

  • Problem in XI - JDBC (oracle) Scenario, case sensitive column name

    I had a XI -> JDBC scenario, connecting to a SQL server, where the query was being generated using Message Mapping (XML SQL Format),
    now the database has been migrated from SQL server to Oracle, and we are using the same XI scenario, but now the problem is, the query generated using message mapping doesnt work because it seems the query (UPDATE statement) requires the field name as having All capital letters, i mean the Column name in query to Oracle has become case sensitive,
    can u help me out

    Hi
    Oracle doesnt have restriction that Query has to be in uppercase for any column. But it is good go use Upper case for the Query.
    Use oracle editor to do the query if it is working fine and then use XML SQL in XI
    Check this thread SAP has given some
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/68a541a1166153e10000000a1553f6/frameset.htm
    Check FAQ on the JDBC adapter, see SAP Note 831162
    always useful Note
    Thanks
    Gaurav

  • Column Name too long

    While loading the data from XML source I am getting following error
    ORA-00972: identifier is too long
    I understand that some of the Column name are more then 30 char (Oracle Limit) inmy source but I like to know what needs
    to be modified in the IKM to pick only first thirty characters of column name in case of column name is more then 30 Char.
    The LKM works fine as it take only the first 30 char to create the table name, I think it take that setting from topology manger.
    but what need to modify in IKM to take only first 30 char for column name.
    I am creating target table on the fly and I dont wanna modify each column name in the target table, It'll be alot of work for me.
    Please let me know your thoughts on this.
    Thanks

    Yes its erroring out for IKM step for creating target table.
    The step is ignoring the error on Create Target Table because of following error
    972 : 42000 : java.sql.SQLException: ORA-00972: identifier is too long
    java.sql.SQLException: ORA-00972: identifier is too long
    ofcourse the column name is longer then Oracle limitation that is 30 Chars.
    In the next step for inserting data it is also failing because of same error.
    LKM steps work fine as it strip the column name longer then 30 char.

  • How to read the column name of the Table.

    hi
       I have applied sort functionality to the Table columns. It is working fine but I need to read the table column name before sorting ( On which column user trying to sort ).
       Thank you all,
    Rama...

    Hi Alex
       Thank you very much for your valid input.
    But I am facing one problem here. To get sort functionality I added following logic in WDDOMODIFYVIEW method.
      DATA wd_table TYPE REF TO cl_wd_table.
      CHECK first_time = abap_true.
      wd_table ?= view->get_element( 'TABLE_NAME' ).
      wd_this->table_control ?= wd_table->_method_handler.
      wd_this->table_control->set_key_attribute_name( 'COL_NAME1' ).
    here I hard coded first column name(i.e. COL_NAME1). Is it correct?
      and added following code in SORT ACTION of table i.e.
    wd_this->table_control->apply_sorting( ).
    To get column name I am using the method in SORT ACTION of table which you mentioned but always I am getting  COL_NAME1 only....
    Please help me how can I rectify this...
    Thank you
    Rama

  • How can I edit column name/heading in Column Attributes?

    Hi All,
    In the link "*Home>Application Builder>Application 1000>Page 2>Report Attributes>Column Attributes*", can someone help me how to edit/modify 'Column Name' and 'Column Heading' ?
    Thanks in advance.
    Regards
    Sharath

    Hi,
    There is Headings Type radio buttons above report column attributes.
    Select Headings Type "Custom" and then you can change Headings.
    Column names (Alias) you need change to report query.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Insufficient Buffer size to store Columns Names

    I am using WebSphere 3.02 with Oracle on OS/390. Some of my servlets work but some get the error:
    Insufficient Buffer size to store Columns Names
    This is a Oracle error, ORA-17414. All of the doc says:
    Note: Cause and action for each message will be provided in a later release.
    This was in 1999, and I still cannot find cause and action information.
    Anyone know what this error is?
    Thanks.

    Thom,
    How many columns are there in your query? Do they have lengthy column names? Has your schema or query changed during the upgrade?
    One possible workaround if you have lengthy column names in your query is to try doing something like "select somelongcolumnname1 as c1, somelongcolumnname2 as c2 ..." and see if it works. Admittedly, this is only a workaround, but it should be better than renaming your column names.

  • How do i change column names in oracle model?

    Hi,
    I am performing a migration from SQL SERVER 7.0 to Oracle 8.1.7.
    I have tables that have tables in SQL SERVER with column names
    that are "TYPE" and "BODY".(These are generally TEXT datatype
    columns that need to be converted to LONG in Oracle.We need
    these to be LONG datatype in Oracle because of an application we
    are using. LOBS cannot be allowed)
    The migration utility renames these columns as "TYPE_"
    and "BODY_" and creates the tables in the Oracle Database.
    I need to have these tables in Oracle with the same column names
    viz. "TYPE" and "BODY" .
    I can create new tables in Oracle with the column names "TYPE"
    and "BODY" but cannot change the options in the migration
    workbench for this.
    Is there any option or any workaround I can use to change the
    column names in the Oracle model?or set the options so that the
    Oracle model tables donot modify these column names?
    Thanks in advance for all the help.
    Mandar

    The words 'TYPE' and 'BODY' are reserved Oracle words. Its best
    to go along with what the workbench has suggested. If you have
    to keep the original names of the columns trying wrapping double
    quotes around them after the data migration is complete. This
    may cause a case sensitivity or referential problem later on
    though.

  • Invalid Column Name Error : JDBC Driver 9.2.* accessing Oracle 7.3.*

    We are migrating a web app from JDK 1.2 environment to a JDK 1.5 server enviroment. Previously the web app used the classes12.zip package, now we are using ojdbc14.jar for the new server environment.
    Now this particular app uses Oracle7 Server Release 7.3.3.6.0. to retrieve data. I would run a query and get the result set explicitly using the column name.
    sql_query = " SELECT DISTINCT(INSIDE_SALES_TEAM_NAME) AS D_INSIDE_SALES_TEAM_NAME FROM AGED_INVENTORY" ;
    rset.getString("D_INSIDE_SALES_TEAM_NAME");
    However, after migration to ojdc14.jar (using Oracle JDBC driver 9.2.0.8.0) I can't retrieve the resultset in the above-mentioned fashion. I will always get
    java.sql.SQLException: Invalid column name
    If I use the following, then I do not get any error in retrieving data from the resultset.
    rset.getString(1);
    Any cause for this scenario?
    Thanks,
    TA

    Yes of course. I just the posted code snippet. This code used to work in old web server environment. Now we have to modify the resultset line to make it work when using ojdc14.jar.

  • Migrating from Sql Server tables with column name starting with integer

    hi,
    i'm trying to migrate a database from sqlserver but there are a lot of tables with column names starting with integer ex: *8420_SubsStatusPolicy*
    i want to make an offline migration so when i create the scripts these column are created with the same name.
    can we create rules, so when a column like this is going to be migrated, to append a character in front of it?
    when i use Copy to Oracle option it renames it by default to A8420_SubsStatusPolicy
    Edited by: user8999602 on Apr 20, 2012 1:05 PM

    Hi,
    Oracle doesn't allow object names to start with an integer. I'll check to see what happens during a migration about changing names as I haven't come across this before.
    Regards,
    Mike

  • How to modify a column name & How to modify a constraint name

    How to modify a column name?
    How to modify a primary key constraint name if the pk has been referenced by another foreign key?
    Thanks.

    Hi,
    What version of oracle are you using? If it is 9i,
    then you can the command
    alter table <table_name> rename column <column_name> to <new_column>;
    if it is 8i or earlier, you can create a view with the required names.
    hth
    Always post the oracle version and the platform you are using to get better response.

  • Oracle Invalid Column Name Error in JSP

    I was wondering if anyone could provide some help. I am new to JSP, Beans and Oracle and I am getting a java.sql.SQLException: ORA-00904: invalid column name error when I run the JSP below. The Java Bean's code it is referencing is also included and this bean is just storing information from the server from a previous login page.
    Eventually I need to display more columns from the database using this JSP, but since I can even get this one working, I am at a loss!
    PLEASE HELP!!!!
    I have even tried to replace the beans reference in the sql with just a login and password I know exists in the database! Same error... Help!
    I am running Tomcat and Oracle 9i!
    <!--
    Assign-->
    <html>
    <head>
    <title>Student Signon on page</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">>Student Signon on page</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import="BeanAs2.Bean5b" %>
    <%
    String driverClassString = "oracle.jdbc.driver.OracleDriver";
    String driverConnectString;
    driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
    String user = "system";
    String passwd = "manager";
    %>
    <jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
    <jsp getProperty id = "Bean5b" property = "login" />
    <jsp getProperty id = "Bean5b" property = "pswd" />
    <%
    Connection connection = null;
    try {
    Class.forName(driverClassString);
    connection = DriverManager.getConnection(driverConnectString, user, passwd);
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (connection != null) {
    String login =Bean5b.getpassword();
    String pswd =Bean5b.getStudentlogin();
    String sql = "SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='login' AND studentinfo.password='pswd';";
    try { // execute the query
    //SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='s40079703' AND studentinfo.password='p4007swd'
    Statement stmt = connection.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sql);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> <%= rst.getString("system.teaching.code") %> </td>
    </tr>
    <%
    stmt.close();
    connection.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    </body></html>
    package BeanAs2;
    import java.util.*;
    public class Bean5b {
         // all variables must not be public in a bean
    private String Studentlogin;
    private String password;
    public String getStudentlogin() {
    return this.Studentlogin;
    public String getpassword() {
    return this.password;
         public void setStudentlogin(String login) {
              this.Studentlogin = login;
         public void setpassword(String pswd) {
              this.password = pswd;

    Hi
    Thanks for your reply, I should of looked at my code before I copied over. The field should of been "studentinfo.familyname" which I was calling, I have just been changing so much code in this to try and see what the problem is, I didnt fix this before I copied this over.... trust me, I have tried everything........ Hence when I correctly called the "concatination the login name and password to the query properly" as you pointed out, I got rid of the error, BUT now it returning NO DATA????? (the table is populated - I have checked this!!!!)
    The table I am trying to get information from sits under a schema called system. It has the following columns;
    STUDENTID NUMBER 8
    FAMILYNAME VARHCAR 60
    GIVENNAME VARCHAR 60
    USERNAME VARCHAR 9
    PASSWORD VHARCHAR 60
    The database is called globaldb. My computer is called Midas2
    Whats more, the query works in Oracle sql*plus!!! Returning the relevent data!!!
    Actually here is the code for the JSP, with all the changes and none of the mistakes of my previous post...........,
    Pleaes help!!!
    <html>
    <head>
    <title>Student Signon on page</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">>Student Signon on page</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import="BeanAs2.Bean5b" %>
    <%
    String driverClassString = "oracle.jdbc.driver.OracleDriver";
    String driverConnectString;
    driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
    String user = "system";
    String passwd = "manager";
    %>
    <jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
    <jsp getProperty id = "Bean5b" property = "login" />
    <jsp getProperty id = "Bean5b" property = "pswd" />
    <%
    Connection connection = null;
    try {
    Class.forName(driverClassString);
    connection = DriverManager.getConnection(driverConnectString, user, passwd);
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (connection != null) {
    String login =Bean5b.getpassword();
    String pswd =Bean5b.getStudentlogin();
    String sqlQuery;
    sqlQuery = ("SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='" + login + "' AND studentinfo.password='" + pswd + "'"); %>
    <% try { // execute the query
    Statement stmt = connection.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sqlQuery);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> <%= rst.getString("studentinfo.familyname") %> </td>
    </tr>
    <%
    stmt.close();
    connection.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    </body></html>

  • Oracle 10g - Defining the column name in Non English

    Hi Experts,
    I have an exisitng application which is developed on Windows using ASP Technology and uses Oracle 10g 10.1.0.2.0.
    The application is supported with an instance of Data Base within which multiple tablespaces are created for different clients. The application is developed in such a way that some of the tables arecreated dynamically and the columns are named using the data entered through the UI.
    This application needs to be globalized now. The problem is, the column name entered through the UI can be in any language based on the client's settings and those values in turn will be used for naming the columns in the tables.
    1) Can I have the column names to be named using non english characters in Oracle 10g DB? If so,
    1.1) what should I do to configure the exisiting Oracle instance to support it?
    1.2) To what level is that configuration possible, is it per DB instance level (or) can it be done at Tablespace level. I would like to configure each tablespace to host tables with columns defined with different languages, say for example, tablespace 1 will have tables with Japaenese column names and tablespace 2 will have tables with German column names?
    2) What should I do to make my entire DB to support unicode data i.e., to accept any language strings. Currently all strings are declared as VarChar2, should I change all VarChar2 to NVarChar2 (or) is there a way to retain the VarChar2 as is and make some database wide setting?
    Please note that I do not have an option of retaining the column in English as per the Business Requirement.
    Envionment:
    OS - Windows 2003 32 bit
    Oracle 10g 10.1.0.2.0
    UI forms in ASP
    TIA,
    Prem

    1. Yes, you can.
    SQL> create table ÜÝÞ( ßàá number(10));
    Table created.
    SQL> insert into ÜÝÞ values (10);
    1 row created.1.1 and 1.2 and 2. You can choose UTF as your default character set. It allows the user of non-English characters in VARCHAR columns in your whole database. It is not per tablespace.
    SQL> create table ÜÝÞ( ßàá varchar2(100));
    Table created.
    SQL> insert into ÜÝÞ values ('âãäçìé');
    1 row created.

  • How to rename the column name in oracle 8i?

    hi,
    Does anyone know how to rename the column name in oracle 8i?My method was drop the relationship key first then delete the old column,finally add the new column.
    Thanks for your replay.
    jing

    There is no facilty to rename a column name in Oracle 8i. This is possible from Oracle 9.2 version onwards.
    For you task one example given below.
    Example:-
    Already existed table is ITEMS
    columns in ITEMS are ITID, ITEMNAME.
    But instead of ITID I want ITEMID.
    Solution:-
    step 1 :- create table items_dup
    as select itid itemid, itemname from items;
    step 2 :- drop table items;
    step 3 :- rename items_dup to items;
    Result:-
    ITEMS table contains columns ITEMID, ITEMNAME

Maybe you are looking for

  • HT1386 My Itunes doesn't recognize my Iphone 4s, but my computer sees it. What should I do without having to restore/reformat my phone?

    i updated the iOS a few days ago, and now my itunes doesn't recognize my phone, but my computer does. Help please cause I created ringtones I want to use and i can't pull them off my phone til this issue is resolved (SN: My carrier is Verizon if that

  • Here's my experience

    So My b210 for some unknown reason has stopped working with my ipad I reset to factory It tells me to log on to eprint I go to log on Hp eprint tells me i ***HAVE*** to combine by existing snapfish account that i never even knew i had let alone used.

  • Text from Bulgaria

    I used to be with 02 never had any problems with them when travelling in Europe I'm now with BT mobile. When travelling to Bulgaria I had nothing but problems with this service. And also Cyprus. Bulgaria I had to choose from networks trying to get it

  • Error in Approval process

    Hi All, I am a new bie to OIM 11g. I have developed a custom (single level parallel) approval composite and it is working fine. According to my new requirement I need to add two serial approval blocks before the parallel approval block. On the whole

  • How to add authorisation check to a program?

    Hi all :       Could you please tell me how to add authorisation check to a program?         Thanks a lot.