Rename table

how to rename table using export and import utility ??
Thanks 10

883532 wrote:
how to rename table using export and import utility ??
Thanks 10What is the version?
In 9i its not possible to rename table using export/import, why not using SQL? its very simple
SQL> create table emp_new as select * from emp;
if its above 10g.then
$expdp system/***** tables=scott.emp dumpfile=emp.dmp logfile=emp.log directory=data_pump_dir
$impdp system/***** dumpfile=emp.dmp logfile=emp_imp.log remap_table=emp:emp_new directory=data_pump_dir
HTH.
User Profile for 883532
     883532      
     Newbie
Handle:      883532
Status Level:      Newbie
Registered:      Sep 6, 2011
Total Posts:      28
Total Questions:      18 (12 unresolved)
Keep the forum clean as much as possible by marking threads as answered.
Edited by: CKPT on Feb 20, 2012 10:00 PM

Similar Messages

  • Rename Tables in Numbers 3.0

    I've been using Numbers '09 for several years, and I have one spreadsheet that has 2 sheets (2012, 2013) and each sheet has multiple tables.  In Numbers '09, I was able to copy and entire tables, and after the paste it would have the same name as the previous table.  i.e. Original table would be called Oct 12-13, and the Pasted Table would then be called Oct 12-13-1.  I could then rename the Table to Oct 19-20.  In Numbers 3.0, I am unable to rename tables. 
    Has anybody been able to find a way to rename individual tables on a sheet?

    Hi dbutlerman,
    That confused me too at first. In Numbers '09 I figured out how to display and change the name in the Table Inspector.  In Numbers 3.0 I couldn't find how to change the name in the Table pane at the right.
    But I tried doubleclicking the table name itself on the sheet and found I could edit it right there. 
    For me, more intuitive and convenient than Numbers '09.
    SG

  • ORA-20079:  WM internal error [unable to rename table]

    Hi,
    I am getting following error when i try to enable versioning on a table. Any idea how to resolve it ?
    BEGIN DBMS_WM.EnableVersioning('TestTable'); END;
    ERROR at line 1:
    ORA-20079: WM internal error [unable to rename table]
    ORA-06512: at "SYS.LTDDL", line 1615
    ORA-06512: at "SYS.LTDDL", line 1193
    ORA-06512: at "SYS.LT", line 647
    ORA-06512: at "SYS.LT", line 8024
    ORA-06512: at line 1
    thanks
    -na

    Hi,
    You need to determine the original error that is being generated by oracle. This can be done by attempting to rename the table yourself. For example:
    SQL> alter table TestTable rename to RenamedTable ;
    That will give you a better understanding as to why Workspace Manager is unable to rename the table. Also, what version of the database and workspace manager are you using ?
    If the direct rename succeeds while enableversioning continues to fail, then you would need to file a TAR on this.
    Regards,
    Ben

  • Is it possible that rename table captured by streams

    is there any way that i can capture rename table??

    Just setup your rule for DDL to the schema level and it will.
    Use dbms_streams_adm.add_schema_rules instead of dbms_streams_adm.add_table_rules.
    Regards,

  • Does renaming table require rerunning stats?

    OS: OEL (latest) 64-bit
    DB: 11gR1
    I need to create a copy of a large table A in production (call the new table B). The data is the same but the physical layout of the tables is different (different partitioning scheme is being used between table A and B).
    When I go to move table B to replace table A (which will eventually be dropped), do I have to rerun stats on table B?
    That is,
    (1) table A become table A_OLD
    (2) table B becomes table A
    Do I need to rerun stats on table A in step (2)? Is there anything else that needs to be done?
    ( I am doing this to limit the impact to the GUI which uses this table -- the final table name does not change so the GUI should not be affected.)
    Cheers!

    user601798 wrote:
    Yes, do I need to rerun stats on the 'new' table A even though it has the same data and name (after rename) but different partitioning scheme (physical model)? It seems to me that the answer would be 'Yes'.
    Otherwise, does not the optimizer fail to recognize the new partitioning?
    (1) table Toys (all data present) and table Toys_New (empty)
    (2) table Toys_New is loaded with table Toys data (both tables now have same data -- only difference is partitioning)
    (2) table Toys is renamed table Toys_Old (will purge this at a later time)
    (4) table Toys_New is renamed table Toys
    And I was just thinking -- forgot to mention firsthand -- Toys_New will have the same indexes but of course the indexes will have unique names from those on Toys (to avoid 'object already exist' errors.
    Given that last note I am more than convinced that stats needs to be run on Toys_New after step (4)
    Cheers!Yes, you need to.
    Your new table's name is "Toys" but this new table is totally different table than old Toys. So you need to analyze table again.
    Regards
    Gokhan

  • Unable to rename table

    oracle version: 10.2.0.4.0
    SQL> alter table ai_xx rename to ai_xx_old;
    alter table ai_xx rename to ai_xx_old
    ERROR at line 1:
    ORA-00942: table or view does not existThe table is valid and exists
    SQL> select 1 from schema.ai_xx where rownum < 2;
             1
             1These are the privileges the user executing this command has:
    PRIVILEGE                                ADM
    ADMINISTER DATABASE TRIGGER              NO
    ALTER ANY CLUSTER                        NO
    ALTER ANY DIMENSION                      NO
    ALTER ANY INDEX                          NO
    ALTER ANY INDEXTYPE                      NO
    ALTER ANY LIBRARY                        NO
    ALTER ANY OUTLINE                        NO
    ALTER ANY PROCEDURE                      NO
    ALTER ANY SEQUENCE                       NO
    ALTER ANY SQL PROFILE                    NO
    ALTER ANY TABLE                          YES
    PRIVILEGE                                ADM
    ALTER ANY TRIGGER                        NO
    ALTER ANY TYPE                           NO
    ALTER SESSION                            NO
    ALTER USER                               YES
    ANALYZE ANY                              NO
    COMMENT ANY TABLE                        NO
    CREATE ANY CLUSTER                       NO
    CREATE ANY CONTEXT                       NO
    CREATE ANY DIMENSION                     NO
    CREATE ANY DIRECTORY                     NO
    CREATE ANY INDEX                         NO
    PRIVILEGE                                ADM
    CREATE ANY INDEXTYPE                     NO
    CREATE ANY JOB                           NO
    CREATE ANY LIBRARY                       NO
    CREATE ANY OUTLINE                       NO
    CREATE ANY PROCEDURE                     NO
    CREATE ANY SEQUENCE                      NO
    CREATE ANY SYNONYM                       NO
    CREATE ANY TABLE                         NO
    CREATE ANY TRIGGER                       NO
    CREATE ANY TYPE                          NO
    CREATE ANY VIEW                          NO
    PRIVILEGE                                ADM
    CREATE CLUSTER                           NO
    CREATE DATABASE LINK                     NO
    CREATE PROCEDURE                         NO
    CREATE PUBLIC SYNONYM                    NO
    CREATE SEQUENCE                          NO
    CREATE SESSION                           NO
    CREATE SYNONYM                           NO
    CREATE TABLE                             NO
    CREATE TRIGGER                           NO
    CREATE USER                              NO
    CREATE VIEW                              NO
    PRIVILEGE                                ADM
    DEBUG ANY PROCEDURE                      NO
    DEBUG CONNECT SESSION                    NO
    DELETE ANY TABLE                         YES
    DROP ANY CLUSTER                         NO
    DROP ANY CONTEXT                         NO
    DROP ANY DIMENSION                       NO
    DROP ANY DIRECTORY                       NO
    DROP ANY INDEX                           NO
    DROP ANY INDEXTYPE                       NO
    DROP ANY LIBRARY                         NO
    DROP ANY OUTLINE                         NO
    PRIVILEGE                                ADM
    DROP ANY PROCEDURE                       NO
    DROP ANY SEQUENCE                        NO
    DROP ANY SYNONYM                         NO
    DROP ANY TABLE                           NO
    DROP ANY TRIGGER                         NO
    DROP ANY TYPE                            NO
    DROP ANY VIEW                            NO
    DROP PUBLIC SYNONYM                      NO
    EXECUTE ANY CLASS                        NO
    EXECUTE ANY INDEXTYPE                    NO
    EXECUTE ANY LIBRARY                      NO
    PRIVILEGE                                ADM
    EXECUTE ANY PROCEDURE                    NO
    EXECUTE ANY PROGRAM                      NO
    EXECUTE ANY TYPE                         NO
    FLASHBACK ANY TABLE                      NO
    FORCE TRANSACTION                        NO
    GLOBAL QUERY REWRITE                     NO
    GRANT ANY OBJECT PRIVILEGE               YES
    INSERT ANY TABLE                         YES
    MANAGE FILE GROUP                        NO
    MANAGE SCHEDULER                         NO
    ON COMMIT REFRESH                        NO
    PRIVILEGE                                ADM
    QUERY REWRITE                            NO
    SELECT ANY DICTIONARY                    NO
    SELECT ANY SEQUENCE                      NO
    SELECT ANY TABLE                         YES
    UNLIMITED TABLESPACE                     NO
    UPDATE ANY TABLE                         YES
    83 rows selected.Is there a missing privilege to be added for rename to work?.
    Thanks

    user1980 wrote:
    oracle version: 10.2.0.4.0
    SQL> alter table ai_xx rename to ai_xx_old;
    alter table ai_xx rename to ai_xx_old
    ERROR at line 1:
    ORA-00942: table or view does not existThe table is valid and exists
    SQL> select 1 from schema.ai_xx where rownum < 2;
    1
    1These are the privileges the user executing this command has:
    <snip>
    Is there a missing privilege to be added for rename to work?.
    ThanksIt's not an issue of privileges, its an issue of name resolution. If you specify only the table name (RENAME A_TABLE), it will only look for A_TABLE within the currently connected user's schema. You need to either connect as the owner of the table, or qualify the name.

  • How to rename tables and refresh views

    Hi all
    I need to write a script that will rename several tables and at the same time I would like to refresh all the views that point to this table.
    questions:
    - how do I rename a table
    - how do I refresh the views that point to this table?
    Thanks
    J

    Hello,
    You might have to write pl/sql to recreate all views depends upon the tables you just renamed. You can use user_dependencies to identify the views and create sql to use new_table_name
    DECLARE
       CURSOR mcur
       IS
          SELECT table_name
          FROM user_tables
          WHERE table_name IN ('A1');
       v_sql   VARCHAR2 (100);
    BEGIN
       FOR cur IN mcur
       LOOP
          v_sql   :=
             'RENAME ' || cur.table_name || ' to ' || cur.table_name || '_NEW';
          DBMS_OUTPUT.put_line (v_sql);
          EXECUTE IMMEDIATE v_sql;
       END LOOP;
    END;Regards

  • Indexes of a rename table

    Hi,
    I'm hoping someone can help me as I'm having a difficult time searching for the answer.
    My question is whether or not I need to update the indexes of table after it has been renamed to something else?
    If anyone could point to where I can find the answer or if anyone knows I would appreciate your help.

    Thanks for the help.
    For some reason I thought you might since the original index was made against a different table name as for instance,
    CREATE TABLE temp_A
         NUMB_1               NUMBER,
         LETTER_A"          VARCHAR2(10 BYTE),
    CREATE INDEX A_IDX ON temp_A("NUMB_1");
    alter table "temp_A" rename to temp_B;
    I thought you may need to drop and recreate the index after renaming. I know it's silly but I just wanted to make sure in case renaming a table would invalidate a bunch of triggers.

  • Rename Table Name with proper naming convention

    Hi,
    I have many tables in DB & want to create a copy of those in another DB, but with proper name
    Means If My table is fgh_sub_record_file then It should rename like Fgh_Sub_Record_File in dynamic way.
    Pls Help.

    I am not sure of the reason for your intention. 
    But, An easy method would be the below:
    1. Get all the tables from DB1 to DB2(I assume you do this by backup/restore or export wizard)
    2. Create the below function in DB2.
    --Create the below function
    Create Function dbo.CapitalizeEachword ( @MyString varchar(max))
    Returns nvarchar(Max)
    As
    Begin
    Declare @XML xml
    Set @MyString = Replace(@MyString,'_',' ')
    Set @XML =CAST( '<root><rows><row>' + REPLACE(@MyString,' ','</row></rows><rows><row>')
    + '</row></rows></root>' As XML)
    Return
    REPLACE((
    Stuff (
    (Select ' ' + Col
    From
    Select Stuff(COL, 1,1, UPPER(Left(col,1))) As Col
    From
    Select X.p.value('row[1]','nvarchar(200)') As col
    From @XML.nodes('/root/rows') As X(p)
    ) X
    ) Y
    For XML Path('')), 1, 1, '')
    End
    3. Execute the below and verify the generated script and execute the script once concluded.
    --Test script to see your execution script(You may need to get the script and execute once verified)
    select 'exec sp_rename @objname=' + name + ', @newname=' + dbo.CapitalizeEachword(name)
    from sysObjects
    where type = 'U'

  • Renamed tables and sequences; now maps won't deploy

    I "inherited" an OWB project where the original developer had not used any naming conventions for the project objects (dimensions, cubes, tables, maps, sequences). I, being a big fan of naming conventions, proceeded to rename the project tables, maps, etc to follow a naming convention.
    Well great, but now all the maps are broken (i.e., won't deploy) because the maps still reference the old object names. Is there a way to propogate an object rename to all objects that reference the renamed object? Or do I have to track down all of the places where an object is used, and manually do the rename?
    Thanks,
    s.l.

    Steve:
    All u have to do is to log in to your Runtime Editor and check for the mappings, locations and all other objects that you have changed or are associated to the changes are valid.
    You do not have to deploy each and evry object; you can click on the module and set the default action and deploy all your objects at one go.
    That will solve your problem.
    Sobe from down uder

  • How can I to rename Table in Other Scheme ?

    I some tables area backup, but all are in other scheme , How can I to rename all ?
    SQL> rename SYSADM.PS_LOC_CNTRCT_SN   to SYSADM.PS_LOC_CNTRCT_SN_999;
    rename SYSADM.PS_LOC_CNTRCT_SN   to SYSADM.PS_LOC_CNTRCT_SN_999
    ORA-01765: specifying table's owner name is not allowed

    @pmcda Look up prerequisites for RENAME
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9019.htm#i2064929
    SQL> show user
    USER is "SYSTEM"
    SQL> alter table scott.dept rename to department;
    Table altered.
    SQL> select * from scott.department;
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> alter table scott.department rename to dept;Best regards
    Maxim

  • Rename table using sysdate!

    I have a statement : rename AA_QISATE_INFO_PROCESSLOG to AA_QISATE_INFO_PROC20090805
    This statement is present in .sql file which is having 50 other statements
    I want to rename a table with to AA_QISATE_INFO_PROC<sysdate>. I do not want to hardcode date value at the end of table name.

    user12133658 wrote:
    Hi BluShadow .. why is this scary? sorry for being a 'noob', but I have a table, suppose, CurrentData and I rename it to FY09Data and create a new CurrentData, now empty. Is that bad? Please explain.And the users use the application with your new blank CurrentData, but then a couple of months down the line they say... "we really need to be able to see last years data". What do you do? Are you going to copy all the data from your "archive" into the CurrentData? What if the table structure has changed since due to an application/database upgrade and the table structures don't match? Oooo, that's going to get messy. What about changing the application to read archives of data? But that means that the queries would have to be dynamic to cope with dynamic table names that perhaps didn't exist when the application was created. All in all, table names should not be based on changing values such as times or dates.
    Now, if it was a partitioned table, the data can still remain in the same table and the partitions would ensure that performance is maintained because you would have partitioned in such a way that previous partitions of data are seperate from the current data. If an application change requires a structural change to the table it will apply to all old data too, and, if the users need to get back to the old data for whatever reason, it's already there. Then, when the data is confirmed as "no longer needed" the partition can simply be dropped... no deletion performance issues on millions of records.

  • Privileges after renaming Table

    Dear All,
    I have a table called audit_control and we have some privileges and roles to it..
    Now we need to change it to ts_audit_control;
    alter table audit_control rename to ts_audit_control;
    Now my question is does this automatically copy necessary privileges to new table ?
    Any help appreciated
    Prasanth

    Now my question is does this automatically copy necessary privileges to new table ?Yes,oracle will automatically update datadictionary,do not worry about that.

  • Rename Table Operator OMB+

    Hi,
    I'm doing an OMBSYNCHRONIZE TABLE ... where I replace Table A with Table B, which works fine.
    Unfortunatley the Table Operator Name isn't changing only the bound name of the Table. How can I alter now the table operator name?
    cheers,
    Bernhard

    You need to alter mapping as
    OMBALTER MAPPING 'your_mapping' MODIFY OPERATOR 'table_you_want_to_change' SET PROPERTIES(PHYSICAL_NAME) VALUES('name_you_want')

  • Query to find tables whcih are renamed

    Hi,
    Can anyone help me with a query to list the tables which are renamed or a ttribute of a specific table which will give the result.
    Example: If database is renamed then create_date from sys.databases gives the database renamed.
    Similar I want for tables
    Thanks

    Hi cnk_gr,
    Actually I dont want to rename tables want to list the tables whicha re renamed comaring the time.
    Can you suggest how could this be achievedusing sp_rename?
    Thanks.
    Hi Priyanka,
               As for as i know, there is no way to track the changes done by sp_rename, unless if you already plan this case as
    cnk_gr mentioned with adding extendedproperty, or you can write your version of SP_rename like SP_rename1 which internally calling SP_rename and track the changes on a table
    below is the code the changes the object name, i dont know what %% the statement is doing, but i think it may be updating the objectname in physical location where the objectname is saved(just the reference is changed from old name to new name)
    -- update the object name
    EXEC %%Object(ID = @objid).SetName(Name = @newname)
    May be you can compare the schema between similar other server like reporting server or restore a backup, which doesn't have the rename applyed and find out the differnence.
    Note: when you rename a table in SSMS, it internally calling sp_rename to change the table name
    Thanks
    Saravana Kumar C

Maybe you are looking for

  • Mac noob needs help

    hi guys. i am having a lot of trouble here.... could you take a look at the log and point me in the right direction? start-ups take 4 -5 minutes computer won't restart too much weirdness going on to list... sorry this is so long --- but please help!

  • Cisco css http keepalive is not working with GET command

    Dear all i have Cisco Css connected to Dell Server (via switch) Cisco CSS - 192.168.1.3 and Dell Server - 192.168.1.5 Dell server is setup with windows 2009R2 and Apache HTTPD is version 2.2 This server is dedicated to host multiple doamins with Apac

  • HT5538 All text messages sent to my wife are also coming to my phone. How can we stop this?

    My wife's iPhone 4 and my iPhone 4S are both using iOS 6. We also sync to an iMac and a Macbook Pro.  My wife updated her phone last night.  Then today I received a message on the iMac to provide my e-mail password for iMessage and FaceTime. Since th

  • Based on single Doc number Multiple line items update to in single Z database table

    Dear Frds, Based on single Doc number Multiple line items update to database table Example : Doc Num: Janu If users are using different doc number again the line items are modifying and replacing to new document Number . Pls Help me Screen attached a

  • Unhash RV220W password for built-in cisco credential

    hmm.. odd. we have 4 RV220W routers installed in a mesh and all seem to be working fine. oddly, one is configured just a bit differently.  instead of access via the 'cisco' credential, we have been using an added 'admin' credential. no real issue so