After rename a table

Hi, experts
I read these from internet:
Oracle provides a rename table syntax as follows:
alter table
table_name
rename to
new_table_name;
For example, we could rename the customer table to old_customer with this syntax:
alter table
customer
rename to
old_customer;
When you rename an Oracle table you must be aware that Oracle does not update applications (HTML-DB, PL/SQL that referenced the old table name) and PL/SQL procedures may become invalid.
How can I update the applications after rename the table?
Thank you in advanced

So, far i think rename can be done by --
satyaki>
satyaki>create table test_aa
  2  as
  3     select * from emp;
Table created.
satyaki>
satyaki>
satyaki>rename test_aa to test_new_aa;
Table renamed.
satyaki>
satyaki>
satyaki>select * from test_new_aa;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      1230 TEST                                                                    10
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
15 rows selected.Regards.
Satyaki De.

Similar Messages

  • Problem while renaming a table

    Hi,
    I am running oracle 10.2.0.4.0 on AIX 5.3.
    While i issue a table rename statement it just hangs.
    the table contains 1500 million rows.
    Please suggest what should i check before running a table rename statement.

    select * from dba_dml_locks is giving following output
    SESSION_ID     OWNER     NAME     MODE_HELD     MODE_REQUESTED     LAST_CONVERT     BLOCKING_OTHERS
    532     TBAADM     CUM_TRAN_DETAIL_TABLE     Exclusive     None     26888     Not Blocking
    533     SYS     WRH$_SQL_BIND_METADATA     Row-X (SX)     None     21701     Not Blocking
    533     SYS     WRH$_SQL_PLAN     Row-X (SX)     None     21701     Not Blocking
    i am renaming cum_tran_detail_table to hist_tran_detail_table
    select * from dba_ddl_locks where owner = 'TBAADM'
    SESSION_ID     OWNER     NAME     TYPE     MODE_HELD     MODE_REQUESTED
    534     TBAADM     CUM_TRAN_DETAIL_TABLE     Table/Procedure/Type     None     Exclusive
    528     TBAADM     CUM_TRAN_DETAIL_TABLE     Table/Procedure/Type     None     Share
    527     TBAADM     CUM_TRAN_DETAIL_TABLE     Table/Procedure/Type     None     Exclusive
    532     TBAADM     TBAADM     18     Null     None
    534     TBAADM     TBAADM     18     Null     None
    527     TBAADM     TBAADM     18     Null     None
    525     TBAADM     TBAADM     18     Null     None
    532     TBAADM     NABIL_CTD_SHORTFALL_TRIG     Trigger     Exclusive     None
    532     TBAADM     HIST_TRAN_DTL_TABLE     Table/Procedure/Type     Exclusive     None
    should i disable/drop any trigger before trying to rename the table? and then again enable/recreate the same after renaming?

  • Rename of table with its data sustain

    I have a table in my production server and i want to change its name without losing its data.so its poosible to rename that table maintaing the data..
    please help me i am in a real hurryyy..

    Hi
    No! U can't do it.
    U can only create a new table as copy of the old one and after copy the data from old table to new one, and at the end delete the old one.
    But you need to create a program to copy the data.
    Max

  • Refreshing Entity Objects after Altering the table

    Hi,
    My Entity Object is based on a table... and View Objects on the Entity Objects. Now if I alter the table (just changing the width of the column), that change is not visible on the Entity Object. Is there any way I can automatically refresh the Entity Objects after altering the table(only column width is changed).
    (Changes made to Entity Objects manually are reflected in the View Object correctly.)
    Regards
    Faiyaz

    'changing the width of the column' means changing the size of the column in the table description in the database. For e.g.. In the original table I had a column OIL_KEY NUMBER(6). Now I change the column to be of size 12 i.e. OIL_KEY NUMBER(12). This does not get refreshed in the Entity Object.

  • Error 503 after renaming SharePoint Foundation 2013 Server

    We renamed a SharePoint Foundation 2013 server using the procedure outlined here:
    http://www.bluesphereinc.com/blog/renaming-a-sharepoint-20102013-server/
    Everything seemed to work fine until we tried to access the site afterwards. Now all we get when trying to access the site is the Error 503: Service is unavailable message. We can get into central administration without any problems.

    Hi  ,
    According to your description, my understanding is that you encountered 503 error after renaming SharePoint Foundation 2013 Server.
    For your issue, please refer to the actions as follow:
    1.Check the web site properties in IIS. Under home directory tab, check the application pool value and then open that application pool from the application pools (separate node in the IIS tree). Click the
    identity tab and see who is the pool assigned to. For the sake of testing, you can select "Predefined" and select local service from the drop down. Restart IIS and see if things work out for you. Http 503 error is generated by the IIS and it happens
    when web server sends data stream back to the web site.
    2.Verify that all SharePoint services are started, this error might occur because of changing the service account password. You may need to change the new password to application pool or SharePoint timer
    service. Click the stopped application pool -> click advanced settings ->Identity ->click the user to retype the user ->Application Pool Identity dialog ->click set -> manually type the user name and password. Then restart the server.
    If your issue persists, please provide detail error message of ULS log 
    to determine the exact cause of the error?
    For SharePoint 2013, by default, ULS log is at      
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • I'm getting an error message after importing a table through Dreamweaver into a page developed in Muse.

    I'm getting a couple of messages after importing a table through Dreamweaver into a page developed in Muse. I have compared the code of the page with the table with the page before I inserted the table and cannot find anything missing. the web address is http://gourmetdreams.com/weekly-menu.html
    How can I clear this up?
    I also noticed that when I uploaded the file there was one error: "- error occurred - Access denied.  The file may not exist locally,  may be open in another program, or there could be a local permission problem."

    Thanks for your help! I imported the table into Muse, then exported the site as html and opened it in Dreamweaver. I should've tried that in the first place but gave up when I couldn't edit it in Muse. I didn't know you could edit the html right in Muse. Also, my styling and the images I was using weren't showing up in Muse but once I opened it in Dreamweaver, everything fell into place. AND I could edit it! My client needs to edit this page every week, so I needed to be sure she could do that. She doesn't use Muse but does use Dreamweaver. At this point, I think I'll leave it alone and not try to style it with inline css. Maybe when I get a little more time, I'll try it. I just don't want to mess things up now that the're working.

  • Error in renaming the table from SYS user

    Hi
    I am in Schema by name jc
    and I have a table by name tab1
    now i logged as sys user
    then I give a command
    rename jc.tab1 to tab2 ;
    getting the following error
    rename jc.tab1 to tab2
    ERROR at line 1:
    ORA-01765: specifying table's owner name is not allowed
    Query is
    Is it notpossible to rename a table of other schema by logging as sys user ?
    is there any other alternate method of doing so??
    Thanks and Regards
    JC

    Sorry Guido,
    I have not stolen anything from anywhere :)
    All are mine ...I have created some normal users and some users with DBA privileges....
    I use this schemas for testing purpose....
    Also if I give command like from SYS user
    Alter table jc.tab1 rename to tab2 ;
    It will create tab2 in jc schema only and not in SYS schema.
    So there is no question of poluting the SYS schema.
    Also whatever I ask in this forum is a part of my application related,
    I never give the entire program, which may be useless for others and time taking in understanding.
    I just simulate whatever I require in as simplae format as I can
    The person who is very perfect in this forumn can find such queries rubbish. But in learning process no question is rubbish, but there can be a rubbish answer to every intelligent question too... :)
    Regards
    JC

  • After renaming a file extention from .jpeg to .jpg I can no longer type ...

    After renaming a file extention from .jpeg to .jpg I can no longer type in any of the finder related editable fields/boxes. I can still type in my open applications fields.
    This problem also happens when I happen to find a file that has been named, for instance, 2008jpg. When I add the period to have the file read correctly as 2008.jpg, a warning box appears asking - {*Are you sure you want to change the extention from ".jpeg" to ".jpg"?* If you make this change, your document may open in a different application.} Two radio buttons are available within this warning box that read - 1 - {Use .jpg}(it is not color coded, which means it must be selected manually. - 2 - {Keep .jpeg}(it is colored w/my Blue highlight color, which means it will be selected if the Enter Key is used.
    The warning box does Not appear if I remove the period from a file and not again when i re-add the period to that same file.
    After trying to make these types of edits to the name of any file, with any of the various extentions available for files in our digital world, I usually get an anomaly where myability to type in the Finder ceases to be a possibility.
    I have found that I can Force Quit the Finder for a quick fix, but, I'm not sure that this Typing problem should have to be dealt with at all by this quick fix. Is this an issue with the Indexing in Spotlight, which seems to be giving many users problems?

    I downloaded and tried EasyFind. It works but it took 30+ seconds to complete finding 3 files that are on One of my Five 25+ Gb partitions of my 130 Gb Seagate Cuda(Really 160 Gb, but my Sawtooth will only recognize 130) I figured that if I ever got a better box, I could reformat it to see the whole 160 Gb. So, as far as I can see, Spotlight's indexing scheme which finds the files instantly is probably preferable. Spot light allows you to rename your files from within it's app window. I've always thought that was pretty powerful. Could my doing so be causing me any issues? As i said it is the inability to Type in the Finder that seemed to be caused from changing file Extentions that were mis-written. Maybe it was a delayed reaction to my renaming files in the Spotlight app? I've done both on occasion.
    As for these .DS_Store files. Apparently you can NOT stop them from being written to any folder that you touch/open/view during a days session. But, as a function of the OS, are the essential to have in their respective folders Forever? I've looked at the .DS_Store terminator app briefly and assume that getting rid of these files won't hurt the regular operation of my OS. They will just be re-written if I ever have to go back to any particular folder again. But, apparently, some have said that if the plan on burning a CD or DVD of their data, they delete the .DS_Store files first and then do the burn.
    I'm thinking from your having suggested this tremination app that you suspect that my having all of these ,DS_Store files could be a situation where any of them could have become corrupted and terminating them regularly should be part of my regular maintenance.
    Does that sound like I'm understanding what I can do?
    TIA

  • Can't see anything in external drive after renaming a folder

    Hi all,
    I can't see anything on my external drive after renaming a folder. I have the drive set up as a Windows drive with access through the volumes folder (I had to transfer  large amount of files from a PC and have it be readable on my MacBook Air); I read a FAQ to set it up a few months ago and it has been working fine since then. I saw the same issue come up with a PC HD on a PC, but the solution was for a PC. I don't see anything else like that in the support community (or if it's there, then I'm not searching for it the right way). There is no partition on the drive and it still shows as having the same amount of data written on the drive as before the accident.
    Many thanks in advance!
    anj

    If you upgrade the your router, it would be the firmware that will be upgraded. For more information regarding upgrading the firmware, try this link.
    For your external drive, you might need to map the drive again with a different name.
    Hope this helps.

  • What are the restrictions &pitfalls of renaming a table vs select * into...

    Hello all,
    I've got a situation coming up possibly, that I'm looking at where I may need to rename a table that has about 3 TB of data in it.
    I'd looked at doing the oracle RENAME command, and it mentions that some restrictions that would error out would be:
    views, synonyms, and stored procedures and functions that reference the table.
    I'd been looking around on different sites researching more, and found some saying that tables with foreign keys, check constraints would also error out on this....but in the Oracle docs I see it saying:
    "Oracle Database automatically transfers integrity constraints, indexes, and grants on the old object to the new object."
    Were the other non-Oracle site references maybe to older versions? I'm using 11Gr2.
    The other part of this is that the app designers really want to recreate the original table. Essentially this is doing
    TABLENAME1 -> TABLENAME1_OLD
    Then recreating TABLENAME1 anew empty for new use.
    My original thoughts were to do select * from TABLENAME1 into TABLENAME1_OLD, and then truncate TABLENAME1....but with the size of the data (and this will eventually be done in PROD), I"m trying to say that doing the RENAME and recreating the empty table would be less resource intensive.
    Would the rename and recreate table be the way to go?
    If so, then I need to make sure I know all the restrictions and pitfalls on rename would have....
    Thanks in advance!!
    cayenne

    rp0428 wrote:
    >
    I've got a situation coming up possibly, that I'm looking at where I may need to rename a table that has about 3 TB of data in it.
    I'd looked at doing the oracle RENAME command, and it mentions that some restrictions that would error out would be:
    views, synonyms, and stored procedures and functions that reference the table.
    I'd been looking around on different sites researching more, and found some saying that tables with foreign keys, check constraints would also error out on this....but in the Oracle docs I see it saying:
    "Oracle Database automatically transfers integrity constraints, indexes, and grants on the old object to the new object."
    Were the other non-Oracle site references maybe to older versions? I'm using 11Gr2.
    The other part of this is that the app designers really want to recreate the original table. Essentially this is doing
    TABLENAME1 -> TABLENAME1_OLD
    Then recreating TABLENAME1 anew empty for new use.
    My original thoughts were to do select * from TABLENAME1 into TABLENAME1_OLD, and then truncate TABLENAME1....but with the size of the data (and this will eventually be done in PROD), I"m trying to say that doing the RENAME and recreating the empty table would be less resource intensive.
    Would the rename and recreate table be the way to go?
    {quote}
    You are missing a key piece of the requirements
    What is the intended use of the OLD and the NEW tables?
    Why do you need a new table with exactly the same name unless you intend to use it exactly the same way you were using the old table? And if that is the case it seems to me that other tables with foreign keys need to be truncated also and point to the new table and not the old one.Unfortunately, I don't know. This is just a request the devs have, and I'm not sure of their reasoning, but this is what they're asking for, so, I'm trying to research the best way to do what they request.
    Thanks,
    C

  • Rename of table column messed up field in Edit Screen

    I renamed a table column. I have a report page with an edit form page tied to it based on this table. I changed the SQL statement in the Region Source on the report. The appropriate column value is displayed in the report. I changed the Page Item name on the Edit Form page. I changed the Source Value to match the new field name.
    The problem I am running into is when I run the Edit Form page and change the value in the item of the renamed column, the field in the database table is blanked out. Even if I change the value to be the same value, the column is blanked out.
    What did I miss in renaming the table column?

    I've had a similar problem. I added a couple of new columns to a table and attempted to manually add the fields to an existing form. However, as described above, whatever value was entered on the screen, a NULL was stored on the database.
    I created a new form using the Form Wizard and copied the columns between pages and got them working. In the process, I tracked the problem down to the variable name.
    For example: for the column PRC_SCHEDULABLE, a item named P5_SCHEDULABLE works but any other item name produces the NULL problem.

  • Release of space after delete/truncate table

    Hello,
    How does release of space after delete/truncate table works? Is the space used before deletion released once delete is complete or not? Will I see the space occupied by deleted table as free in dba_segments or will I need to reorganize the table (drop and recreate again?). Reason why I am asking is that I can see table with 0 rows, but in dba_segment I can see it is occupying few gigabytes....
    Thank you

    Here is a little illustration for you;
    SQL> conn ogan/password
    Connected.
    SQL> create table ogan_deneme as select * from all_objects;
    Table created.
    SQL> select count(*) from ogan_deneme;
      COUNT(*)
        228470
    SQL> set line 1000
    SQL> set pagesize 1000
    SQL> select * from dba_segments where owner='OGAN';
    OWNER    SEGMENT_NAME        PARTITION_NAME           SEGMENT_TYPE       TABLESPACE_NAME                HEADER_FILE HEADER_BLOCK      BYTES     BLOCKS    EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
    OGAN      OGAN_DENEME          TABLE              SYSTEM                                 854       319981   *30408704*       *1856*         *44*          65536                       1  2147483645                       1               1          854 DEFAULT
    SQL> truncate table ogan_deneme;
    Table truncated.
    SQL> select * from dba_segments where owner='OGAN';
    OWNER    SEGMENT_NAME        PARTITION_NAME           SEGMENT_TYPE       TABLESPACE_NAME                HEADER_FILE HEADER_BLOCK      BYTES     BLOCKS    EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
    OGAN      OGAN_DENEME           TABLE              SYSTEM                                 854       319981      *65536*          *4*          *1*          65536                       1  2147483645                       1               1          854 DEFAULT
    SQL>Hope it Helps,
    Ogan

  • After creating a table, how do I type outside of it?   I can't get a cursor to come up.

    After creating a table, how do I type outside of it?   I can't get a cursor to come up.

    Barker,
    If by "outside" you mean "on the right or left of" a table, you must make the Table a Floating Object to do that.
    If you must use Inline Tables, you can do this:
    Add a Floating Text Box with the text that needs to be "outside" the table. Arrange, then Group the Text Box with the Floating Table, and then set the Group to Inline.
    Jerry

  • Problem to open DB after rename diskgroup

    Hello,
    Version 11202 single instance with ASM
    After renaming diskgroup from DATA to PUDWHDATA using :
    smcmd umount DATA
    renamedg phase=both dgname=DATA newdgname=PUDWHDATA verbose=true
    asmcmd mount PUDWHDATA I also had to change the entries in the init.ora after renaming diskgroup as followed :
    *.control_files='+PUDWHDATA/pudwh/controlfile/current.263.616243789','+PUDWHDATA/pudwh/controlfile/current.262.616243789'
    *.db_create_file_dest='+PUDWHDATA'
    *.db_name='dudwh'
    *.db_recovery_file_dest='+PUDWHDATA'I am getting the following error message:
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: '+DATA/pudwh/datafile/system.265.616243837'The alert log shows:
    Completed: ALTER DATABASE   MOUNT
    Tue Apr 12 14:23:46 2011
    ALTER DATABASE OPEN
    Errors in file /u01/app/oracle/diag/rdbms/dudwh/dudwh/trace/dudwh_dbw0_22435.trc:
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: '+DATA/pudwh/datafile/system.265.616243837'
    ORA-17503: ksfdopn:2 Failed to open file +DATA/pudwh/datafile/system.265.616243837
    ORA-15001: diskgroup "DATA" does not exist or is not mounted
    ORA-15001: diskgroup "DATA" does not exist or is not mountedPlease advice

    Your control file still thinks you are in the old location.
    You need to correct before the database will open.
    Use "select name from v$datafile " to find the mismatch and correct.
    Oracle note 330103.1 will help after you recover.
    Best Regards
    mseberg

  • Bug Report: Page # and Icon Lost After Rename

    I love the new file management features in version 10.3 but I noticed some problems right away.
    After renaming a document, the current page position is lost and the document opens at page 1.  This first one I renamed was a 400-page book and this was a bit annoying.  I realize this is consistent with the desktop version which does not save the page position, but it is inconsistent with the iPad behavior for opening and closing documents.  A fix or a warning should be implemented.
    Also lost is the document icon, which reverts to a generic Reader logo.  This is more of a cosmetic thing.  I noticed the icon does not get restored after opening the document.  It seems necessary to scroll down to page 2 for the icon to refresh.

    Here is  the bug report page:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Maybe you are looking for

  • Getting the most out for a user that is not exactly savvy

    My apologies if I have broached this topic somewhat before. I bought my first computer last fall and was not that familiar with Windows based machines at the time. Currently, I just surf the internet and check my email in yahoo. I'd like to get more

  • Reconnect iTUnes files across 2 discs

    I currently hold my iTunes Music Library on my MacBook Pro, put usually have TV Shows and Movies on an external disc, without copying them to the library. Mainly for HD space reasons. Now I had to update my external disk for a bigger one. Is there an

  • How do i download photoshop 8

    how do I download free version of photoshop 8. I lost install media but still have serial number

  • Test scenario

    what are the typical SD related scenario in a Service industry  which is tested in implementation project

  • School Project Help, extreme newb

    Ok, here's the requirements. I have to make a "scrap book" type application that allows users to cut and paste text/images from the web and store it into this "Scrap Book". The user will be able to store the scrap book on a remote server running SQL.