Different table name in export & import

Hi,
DB version 9i.
I have a table name with "ABC".
I want to import in same user with "XYZ"
in 9i do not have remap table option. :(
What is the procedure using only exp/imp. Please explain me syntax.
Thanks in Advance.

Hi
I THINK THIS WILL HELP YOU.
SQL> conn hem@test
Enter password:
Connected.
SQL> create table t1
2 (
3 id number
4 );grant select on hem.t1 to scott;
Table created.
SQL> insert into t1 values(1);
1 row created.
Now CONNECT WITH SYS
grant select on hem.t1 to scott;
no connect with scott
SQL> conn scott@test
Enter password:
Connected.
SQL> select * from hem.t1;
ID
1
SQL> create table t2 as select * from hem.t1;
Table created.
SQL> select * from t2;
ID
1
Regards
Hemant

Similar Messages

  • Import table with a different table name!

    Dear All,
    I have backup all users in my database using exp command.
    Now i want to import 2 tables from this backup, as tables already exists i want to import table with different table name.
    Is it possible with exp command? If not what else is the solution.
    Thanks, Imran

    Hi..
    Now i want to import 2 tables from this backup, as tables already exists i want to import table with different table name.Is it possible with exp command? If not what else is the solution.
    >
    Well, its not possible.You can import those two tables in some test database, rename them and then take the export and import in the database you want.
    Or,
    You can import those 2 tables in some other schema in your database, rename them again take the export and them import it.
    Anand

  • Note:304522.1 How to Move Queue Tables without using export import

    Trying to use the pkg available in Metalink "Note:304522.1 How to Move Queue Tables without using export import"
    Using the 10.1.0.x and upwards Package, I'm getting the following error on a single consumer queue table with an xmltype payload:
    SQL> exec move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK');
    BEGIN move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK'); END;
    ERROR at line 1:
    ORA-20000: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.MOVE_AQT", line 652
    ORA-06512: at line 1
    We've tried in multiple environments, always with the same results.
    Trace file shows:
    *** 2006-11-08 10:06:47.154
    *** SERVICE NAME:(SYS$USERS) 2006-11-08 10:06:47.147
    *** SESSION ID:(379.954) 2006-11-08 10:06:47.147
    qtable move procedure starting execution at 08-11-2006 10:06:47 for queue table XFORM_TEST_INT.INTERFACE_XML_QUEUE
    qtable move procedure experienced an exception at 08-11-2006 10:06:47
    qtable move error message ORA-06502: PL/SQL: numeric or value error
    qtable move procedure ended execution at 08-11-2006 10:06:47
    Can anyone help with this? Has anyone used this before successfully (or not successfully). We urgently need this working today to test moving our queue table into a tablespace with a smaller block size for performance reasons in production.
    Thanks for the help!
    Tony

    Thank you,
    Yes we've done that. They've confirmed a problem with the links/scripts on the note. The 10.1 and up version was not really 10.1 and up.
    As they would not have a new version available in time for the move we needed to perform, we switched our approach to using dbms_redefinition instead.
    Thanks for the reply,
    Tony

  • Table Values in Export/Import/Tables RFC calls

    Hi
    I know that using Adaptive RFC, the best practice is to use the Tables section of the function rather than the import/export.
    However, in ECC6.0, when creating entries in the Tables section of the FM it tells me that this section is obsolete.
    Should I start to use the export/import parameters instead?
    Cheers
    Ian

    Hi Ashu
    Thanks for the reply but there is no code snippet.  It is a 'best practice' question.
    The document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de">Effective Web Dynpro - Adaptive RFC</a> details that table values should not be passed in the exporting/importing parameters of the R/3 RFC enabled function module.  THey should always be added to the Tables section.
    However, in ECC6.0, when adding entries into the Tables section of an R/3 function module, it says that this practice is obsolete.
    Therefore, what is the current best practice for Adaptive RFC??
    Cheers
    Ian

  • How to build Form or Report on different table name

    Hi,
    I want to know, is it possible to query data from a different tables with same structure.
    For example:
    I have tables tableA, tableB ....
    What I want is to select table name from combo box and
    after that to query data for the chosen table.
    So is it possible anyway to build a form or report without knowing the table name during the design ?
    Thanks

    Hello Boris,
    The way you can make this work is like this:
    You need to create a view (say vw_2Tables)whose source is like
    select "table_A" tableName, col1,col2,... from table_A
    union
    select "table_B" tableName, col1,col2,... from table_B
    Then create the Report based on this view:
    select tableName, col1, col2
    from vw_2tables
    where tableName = :P_tablename;
    This will make the Portal create a bind parameter for you.
    Create an LOV whose Select statement is
    select "table_A" tableName from dual
    union
    select "table_B" tableName from dual
    And add this LOV to the bind parameter source in Report
    (in Customization Tab).
    You need to run this Report in customize mode
    (if your report name is say Rep_1
    then this will be http://...../Rep_1.show_parm)
    Hope this helps
    Madhav

  • Extracting text from a file name on export / import (Regular Expressions??)

    I’m not even sure if the publishing service, File Naming, in Lightroom supports Regular Expressions or not?? Basically I’m trying to extract the left portion of the file name ie: everything before the underscore “_”. When I import a file I rename the file to reflect the current Image sequence number and then append the date the photo was taken; a typical file is as follows “05625_2008-01-05.dng” on export I would like the new name to be only the sequence number in this case “05625.jpg”. Ideally I would then like to append the folder name that contains the file… “05625 - FolderName.jpg.
    I don’t want to go down the road of figuring out the correct syntax if regular expressions aren’t supported. Thanks in advance - CES

    Is the imported sequence number captured in meta data somewhere or is their somewhere that all of the available fields and there reference names can be found???
    Unfortunately not anywhere available to the user (but it's still stored in at least some filed I know off).
    By the way, why did you choose to put the suffix at the beginning of the name (1234_2010-08-13.jpg)? The common practice is to leave the suffix at the end. That will ensure the filenames will sort in chronological order by filename and you could have easily used the suffix when exporting files. You wouldn't have this problem now.

  • Issue with determing table name runtime

    Hi All,
    I have a problem in determing the table name during runtime
    TABLES : ekko.
    DATA : test TYPE REF TO lcl_test.
    DATA : itab TYPE STANDARD TABLE OF ekko.
    IF test IS INITIAL.
        CREATE OBJECT test.
      ENDIF.
    test->cmeth( EXPORTING itab1 = itab ).
    CLASS lcl_test DEFINITION.
      PUBLIC SECTION.
        METHODS : cmeth IMPORTING itab1 TYPE STANDARD TABLE.
    ENDCLASS.                   
    *       CLASS lcl_test IMPLEMENTATION
    CLASS lcl_test IMPLEMENTATION.
    METHOD test.
    *Here i have to know the table name of the importing internal data itab1 (In this particular case its EKKO)
    *In general it can be any table
    *Is there a way to determine a table name (as EKKO) in this method
    *My problem is i need to find out the field of that internal table
    *to find out the fields of the  table i'm using
    CALL FUNCTION 'GET_COMPONENT_LIST'
    EXPORTING
    program = sy-repid
    fieldname = 'I need to pass header of the internal table something like wa_ekko'
    TABLES
    components = icomp.
    ** so i have to find out the table name and declare a work area and then pass that to Get_component_list FM*
    OR
    I CAN USE BELOW CODE AS WELL
    data:
        wa_ref        type ref to data,
        desc_table    type ref to cl_abap_tabledescr,
        desc_struc    type ref to cl_abap_structdescr.
      field-symbols:
        <p_data>      type any,
        <p_field>     type any,
        <p_component> type abap_compdescr.
    ** The probelm  here is it_data has s tructure defined in class unlike mine  with is type standard table*
    create data wa_ref like line of it_data.
      assign wa_ref->* to <p_data>.
    desc_table ?= cl_abap_tabledescr=>describe_by_data( it_data ).
      desc_struc ?= desc_table->get_table_line_type( ).
    loop at it_data assigning <p_data>.
        loop at desc_struc->components assigning <p_component>.
            assign component <p_component>-name of structure <p_data> to <p_field>.
        endloop.
      endloop.
    endmethod.
    Hope i'm clear
    Thanks
    David

    Hi
    Perhaps something like this can help you:
    TABLES : EKKO.
    DATA : ITAB TYPE STANDARD TABLE OF EKKO.
    CLASS LCL_TEST DEFINITION.
      PUBLIC SECTION.
        METHODS : CMETH IMPORTING ITAB1 TYPE STANDARD TABLE.
    ENDCLASS.                    "lcl_test DEFINITION
    CLASS LCL_TEST IMPLEMENTATION.
      METHOD CMETH.
        DATA: MY_WA       TYPE REF TO DATA.
        DATA: DESC_TABLE    TYPE REF TO CL_ABAP_TABLEDESCR,
              DESC_STRUC    TYPE REF TO CL_ABAP_STRUCTDESCR.
        FIELD-SYMBOLS:
             <P_DATA>      TYPE ANY,
             <P_FIELD>     TYPE ANY,
             <P_COMPONENT> TYPE ABAP_COMPDESCR.
        CREATE DATA MY_WA LIKE LINE OF ITAB1.
        ASSIGN MY_WA->* TO <P_DATA>.
        DESC_STRUC ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( <P_DATA> ).
        LOOP AT DESC_STRUC->COMPONENTS ASSIGNING <P_COMPONENT>.
          WRITE: / <P_COMPONENT>-NAME.
        ENDLOOP.
      ENDMETHOD.                    "test
    ENDCLASS.                    "lcl_test IMPLEMENTATION
    DATA : TEST TYPE REF TO LCL_TEST.
    START-OF-SELECTION.
      IF TEST IS INITIAL.
        CREATE OBJECT TEST.
      ENDIF.
      TEST->CMETH( EXPORTING ITAB1 = ITAB ).
    Max

  • Table names

    hi,
    i have a foxpro .dbf file. I want to view this file's content. I try to import data to access, but it fails. I search alot. Finally I make a connection to this file using
    jdbc.
    My file name is 3006.dbf , i added it to "user dns" (mic->control panel->admin. tools ->data source) and write a small class. No exception occured , i think connection is ok.
    import java.sql.*;
    public class jdbc3 {
         public static void main(String[] args) {
              String data = "jdbc:odbc:3006";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data);
              } catch (Exception e) {
                   e.printStackTrace();
                   System.out.println("Error -" + e.toString());
    }But i dont know, table names, column names etc. How can i view content of this file.
    &#304; also found a code at this forum, which shows , how to get table names
    i tried
    import java.sql.*;
    public class jdbc3 {
         public static void main(String[] args) {
              String data = "jdbc:odbc:3006";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data);
                            DatabaseMetaData metadata = conn.getMetaData();
                   String[] names = { "TABLE" };
                   ResultSet tables = metadata.getTables(null, "%", "%", names);
                   while (tables.next()) {
                        String tableName = tables.getString("TABLE_NAME");
                        String tableSchema = tables.getString("TABLE_SCHEM");
                        String tableType = tables.getString("TABLE_TYPE");
                        System.out.println("Table Name:" + tableName
                                  + " Table Schema: " + tableSchema + " Table Type: "
                                  + tableType);
              } catch (Exception e) {
                   e.printStackTrace();
                   System.out.println("Error -" + e.toString());
    }but i got this exception,
    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Driver not capable
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.SQLTables(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(Unknown Source)
         at jdbc3.main(jdbc3.java:16)

    Well, I had that problem, but it's when we don't select a Database. That is to say I didn�t put the path of the database file. Or maybe you're not using the correct odbc.

  • Query - Table Name

    Dear Experts,
    Do you know where can I find the contents of Table Name that represents?
    I am confuse when I see different table names such as:
    1. OINV A/R Invoice
    2. Inv1   A/R Invoice - Rows
    3. ADO1 A/R Invoice(Rows) - History
    4. Inv3   A/R Invoice - Rows
    5. Inv9   A/R Invoice - Base Documents
    6. ADO9 A/R Invoice(Rows) - History
    Could anyone tell me more about this or where I can find relevant info?
    Thank you.
    Raymond

    Dear Raymond
    1. OINV A/R Invoice   : Header Level Information store in this table
    2. Inv1   A/R Invoice - Rows : Row Level Item Detail Qty & Unit Price detail store in this table.
    3. ADO1 A/R Invoice(Rows) - History
    4. Inv3   A/R Invoice - Rows  : Other Charges document level detail store in this table.
    5. Inv9   A/R Invoice - Base Documents :
    6. ADO9 A/R Invoice(Rows) - History
    Thanks
    Chetan Vora

  • Global display options for equal columns of different tables

    Hi,
    is it possible to create some kind of templates for tables which are nearly the same! I mean different table names, different content and some columns are equal.
    e.g. I've got a a lot of Error tables, in every table there is a column named Reload Flag, which should be displayed as a List of value, can i set this by default. Or for example I've got a column named Error message and i display it as a standard report column, but i always have to edit the column formatting, because the column is very broad. I have to change the CSS Style ( {width:30em;} )!
    THX Mat

    Hi,
    Yes, It must be working using rowid since its not mention anywhere, I could not post it. But I too think so.
    check the below block
    SQL> Declare
      2  v_mydept1 emp.deptno%TYPE;
      3  v_mydept2 dept.loc%TYPE;
      4  CURSOR C1 IS SELECT e.deptno,d.loc
      5  FROM emp e,dept d
      6  WHERE e.deptno = d.deptno
      7  and empno=7900
      8  FOR UPDATE of e.sal;
      9  Begin
    10  OPEN C1;
    11  LOOP
    12  FETCH C1 INTO v_mydept1,v_mydept2;
    13  Dbms_output.put_line(v_mydept2);
    14  Dbms_output.put_line(v_mydept1);
    15  EXIT WHEN C1%NOTFOUND;
    16  UPDATE dept SET loc = 'NY' WHERE CURRENT OF C1;
    17  select loc into v_mydept2 from dept where deptno=v_mydept1;
    18  Dbms_output.put_line('Record updated '||v_mydept2);
    19  End loop;
    20  COMMIT;
    21  End;
    22  /
    Declare
    ERROR at line 1:
    ORA-01410: invalid ROWID
    ORA-06512: at line 16The logic doesnot make sense, but if you can notice the error speaks about rowid.
    For update locks the specific rows listed in the cursor and Where Current Of Clause must be taking in account the rows as per thier ROWID.
    Twinkle
    Edited by: Twinkle on Apr 8, 2010 4:28 PM

  • Using a parameter for a table name?

    In SQL Server, can you use a parameter for a table name?  I'm working with Visual C# and want to do something like this:
    SELECT MAX(ItemID) FROM @TableName;
    Can this be done?
    (Basically, I have three separate methods within a class--one for each table I have; and each one will perform the above query but on different table names.  I'd like to see if there is a way that I can have just one method that will allow me to specify
    the table name.)

    As pointed out in other posts, you can. But a more relevant question is whether you should.
    A table in a relational database is supposed to model a unique entity, and each column in the table is supposed to model a unique attribute. This is not always how it is, but it is from this model a relational database is designed.
    From this angle, having a dynamic table name does not really make sense for application code. (Administrative actions is a different story.) Think of it this way: have you ever wanted to make the class name dynamic in C#?
    Admittedly, it is different in .NET, because everything inherits from System.Object, but in a relational database there is no inheritence.
    Anyway, if you are using stored procedures, you should have one stored procedure per table. Physically, in the plan cache, there will be one query plan per table, no matter how you do it.
    If you are submitting SQL statements from your application, it is a different matter. In this case, I find it difficult to object if you have a class that performs generic actions against tables. Then you build the SQL string in the client code.
    However, no matter how you do it, you need to be careful to avoid SQL injection. We had the example:
    DECLARE @TableName nvarchar(50),@sqlCommand nvarchar(max)
      SET @TableName = ' ItemInformation'
      SET @sqlCommand = 'SELECT MAX(ItemID) FROM ' + @TableName
    EXEC (@sqlCommand)
    But what if we have:
      SET @TableName = ' sys.objects; SHUTDOWN WITH NOWAIT; --'
    As long as we do it in T-SQL, we can (and we should do!) this to prevent SQL injection:
      SET @sqlCommand = 'SELECT MAX(ItemID) FROM ' + quotename(@TableName)
    If you build your SQL strings in C#, you will need to employ other checks. There is only an issue if the user can inject data somewhere, but your generic class will not have knowledge of this, and must assume the worst.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Import Data using Full Table Name

    Is there a way to run the import data wizard so when pulling data from a csv it generates an insert statement not only using the table name but using the Oracle Schema name -- ie fully qualified table name?

    Hi Nilanjan,
    I need help ASAP.
    About this dump-load task, how does it works?  Because I was checking out a package called Import SQL  and this one only imports data from a table, however this table has to be allocated within the database that is being used, and I right? Are these 2 related somehow?
    Does this task order BPC to find data from a SQL Table (allocated in a different server, different instance for SQL) and import it to SQL Fac2 table?
    Can you help me with a simple explanation what do I need to do to run this task?  The page help.sap.com  talks shows a section within DumpLoad Task Usage which is called  Importing Into SQL Server... 
    * Processing the Application using DumpLoad  -
    Importing into SQL
    You can use DumpLoad to process the application as a standalone procedure, or with data import, export, or clear.
    Prerequisites
    The DumpLoad task (OsoftTaskDumpLoad2008.dll) is registered with Microsoft SSIS. See Registering Custom Tasks.
    Procedure
    1.Open a package or create a new package in Microsoft SSIS on the Planning and Consolidation server.  i already did this for the DumpLoad task ... should I do this for the Import SQL task also ?
    2.Select the task and add it to the package.   WHAT DOES SELECT THE TASK  MEAN?
    3.Open the task, and choose  Data Management  None .
    4.Enter the application set, application, and user ID.
    Im getting confused, can you please provide more details about the whole procedure. Thanx in advance
    Velázquez

  • Export / Import Mapping into Different Project in same repository

    Hi,
    Any one tell me, its this possible?
    We have one repository ( OWB 10 R2 ) and two projects named dev_project and test_project.
    We want to copy or (export /import) the mappings from dev_project to test_project, how to do this? It seems export and import can be done if the servers are different (also it is possible to recover from the back up to the same server and same project.)
    Thanks in advance
    -NB

    I don't use 10gr2, but with 9.2 it is possible to do this, but you need to modify the MDL file before importing it.
    ** Before doing this, I'd recommend you export everything from your design repository to be safe **
    Export the object(s) from DEV_PROJECT to an MDL file. Then open the MDL file in your favorite text editor and rename the project from DEV_PROJECT to TEST_PROJECT. Then import the MDL file back into the repository matching by name (NOT UOID).
    I'd recommend you not do this, however. Why do you need a seperate project for test and dev? Why not create another runtime repository connection in your project so that you can deploy to both the development and test environment from the same project?

  • SSIS 2008 - Import all CSV files in folder - each target different table

    I'm new to SSIS 2008, and I'm attempting to import a series of CSV files into a database. I want to loop over every CSV file in a specified folder and import each file into a different table that must be created on the fly (name of table should be base name
    of file, i.e. with path and extension stripped off). The file structures are similar, but not identical, so the single target table solution won't work.
    Using an example I found here:
    http://microsoft-ssis.blogspot.com/2011/02/how-to-configure-foreach-loop-file.html
    I'm able to successfully load all files into ONE table, but I need to load each file into a separate table. Can anyone provide some assistance on exactly how to modify the project to allow for a table to be created, on the fly, for each source file?
    thanks,
    Mark

    Obviously you need the name of the table to become equal to the name of the file you are processing and this you can do using an expression, so you capture your file name and assign it to the package variable. From there you need an Execute SQL Task to
    create the table which input parameter becomes that variable for the table. The tricky part is to insert the data each time to a new table, the standard DFT would not work as you cannot manipulate on the OpenRowset object, so you can either use a Script Task
    to code that in or a bulk insert procedure, depends what you are more comfortable with.Do you need help with any of the items?Arthur My Blog

  • Export Import with different tablespaces

    Does anyone know if there is a way to export from one database (creating a dmp file) and then importing into another database with different tablespaces? I have tried this and get this error:
    ORA 959. It complained that the tablespace doesnt exist (which it doesnt). Is there a way I can change the export or import parameters to avoid this and just use the default tablespaces?
    I may well be missing the point here so please feel free to tell me I am being a fool.
    Thanks
    Johan

    Example. All these tables are from the same schema with the same tablespace specified in the dmp file. There are many more and 90 % fail but not all.
    importing SCHEMA1 objects into SCHEMA2
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "ACCOUNT_RPRT_NOT_TOBE_PUBLISH" ("O__NUM" CHAR(13) NOT NULL EN"
    "ABLE, "O__ST" NUMBER(4, 0) NOT NULL ENABLE, "STEP_COUNTER" NUMBER(7, 0), "S"
    "TATUS" NUMBER(1, 0), "RETRY_COUNTER" NUMBER(5, 0), "RESTART_COUNTER" NUMBER"
    "(5, 0), "PID" NUMBER(3, 0), "OBJ_LOCK" VARCHAR2(10), "MYFILE" VARCHAR2(200)"
    ", "LONG_FIELD" CLOB, "LAST_SELECT_B_S" VARCHAR2(250), "LAST_SELECTION" VARC"
    "HAR2(250), "L_EXECUTION_CTRL" CHAR(13), "ID" NUMBER(6, 0), "ERROR_COUNTER" "
    "NUMBER(7, 0), "CREATION_TIME" NUMBER(5, 0), "CREATION_DATE" NUMBER(6, 0), ""
    "COMPLETION_TIME" NUMBER(5, 0), "COMPLETION_DATE" NUMBER(6, 0), "COMMIT_COUN"
    "TER" NUMBER(5, 0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(I"
    "NITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "AIA_DATA_T_256K" LO"
    "GGING NOCOMPRESS LOB ("LONG_FIELD") STORE AS (TABLESPACE "AIA_DATA_T_256K""
    " ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE STORAGE(INITIAL 65"
    "536 FREELISTS 1 FREELIST GROUPS 1))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'AIA_DATA_T_256K' does not exist
    . . importing table "ACTUARIAL_RPT_CNTR" 0 rows imported
    . . importing table "ACTUARIAL_RPT_CVRG" 0 rows imported
    . . importing table "ALIS_CANCEL_BILLING" 2799 rows imported

Maybe you are looking for