Rename a table
I am using Crystal XI. The database table has been renamed and I need to rename the table in several reports. I used to be able to use SetLocation and point the new one to the old one and press update... but that does not appear to work.
What is the easiest way handle renaming a table? If I drop and re-add it, it messes up all my groups and fields that I have placed in the report
Thanks,
Jeff
Hello Jeff,
I recommend to post this query to the [Crystal Reports Design|SAP Crystal Reports; forum.
This forum is dedicated to topics related to the creation and design of Crystal Report documents. This includes topics such as database connectivity, parameters and parameter prompting, report formulas, record selection formulas, charting, sorting, grouping, totaling, printing, and exporting but also installation and registering.
It is monitored by qualified technicians and you will get a faster response there.
Also, all Crystal Reports Design queries remain in one place and thus can be easily searched in one place.
Best regards,
Falk
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? -
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
JCSorry 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 -
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!!
cayennerp0428 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. -
Renaming multiple tables at a time
Hi friends .....
I have a requirement to rename multiple tables at a time tables like culvert, drain, village, street..... these three tables are different tables . i want to rename this tables with a common prefix. so please give a solution... thanks in advance...
RajanikanthcHi,
You can load the requested list of tables onto a temporary table using sqlloader and pass as in put to the your procedure.
Assume that you have loaded the table names onto the table aksi_tmp;
Sample procedure
CREATE OR REPLACE PROCEDURE aksi_prc(tbl_name IN VARCHAR2)
IS
sql_stmt1 varchar2(200):='ALTER TABLE';
sql_stmt2 varchar2(200):='RENAME TO';
prefix varchar2(10):='BKUP';
sqlstmt_final varchar2(200);
invalid_table EXCEPTION;
pragma exception_init(-00942,Invalid_table);
BEGIN
sqlstmt_final:=sql_stmt||' '||tbl_name|| ' '||sq_stmt2|| ' '||prefix||'_'||tbl_name;
--FOR table t2 abv statement will return ALTER TABLE t2 RENAME TO BKUP_t2;
EXECUTE IMMEIDATE sqlstmt_final;
EXCEPTION when invalid_table then
null;
END;
DECLARE
CURSOR c1 IS
SELECT col1
from t2;
BEGIN
for i in c1
LOOP
aksi_prc(i.col1);
END LOOP;
END;Hope this helps..
Regards,
Achyut K -
User is asking to rename the table !
Is there any syntax out there to rename the table without
dropping and recrreating whole table.
From
PSQL> desc t
Name Null? Type
ID NUMBER
AMT NUMBER
SQL> desc t1
ERROR:
ORA-04043: object t1 does not exist
SQL> RENAME t to t1;
Table renamed.
SQL> desc t1;
Name Null? Type
ID NUMBER
AMT NUMBERTTFN
John -
I have duplicated a sheet in Numbers and need to rename the tables in the duplicate sheet to avoid circular references. Can anyone help me?
Hi Pacarina,
I'm not sure if this is your question (I'm puzzled by your mention of circular references) but this is how you change a table name in Numbers 3. Select the table (click on it), then make sure Table Name is checked in the Table tab of the format panel, then edit the name directly where it appears above the table.
SG -
Renaming Oracle Tables in Production
If you need to rename Oracle tables in Production, then which process is most effective:
A.
LOCK TABLE xxx IN EXCLUSIVE MODE
RENAME xxxTO new_name;
Table renamed.
B. dbms_redefinition
C. other ...
THANK YOU !!All we can say is that dmbs_redefinition is an option to consider. Only the OP knows his environment, what kind of window the work will have to be done in, and the timing issues between the renames and moving in new code. Such as in the case where you need the new object names in place to perform java compiles to move in new classes.
At my current job we would take a window and shut the database down, bring it up in restricted mode, perform the renames of the tables (and associated indexes for standard purposes), move the code into place, and then test. Full testing might require unrestricting the system or we might be able to just grant restricted session to a few users. Once we are satisified we would fire up our daemon processes and then release the batch schedule.
IMHO -- Mark D Powell -- -
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 -
Drawbacks of Renaming a table ?
Hi All,
I have two tables t1 and t1_bkp1.
If I do the following
rename t1 to t1_bkp2;
rename t1_bkp1 to t1; will that cause any drawbacks ? like disabling any constraints or any other issue with its dependencies ?
Kindly let me know.
Thanks in advance.
Aj
Edited by: Aj09 on Mar 5, 2010 1:19 PMHi,
I do not think if there will be any issue. If you rename t1 table to t2 then all the constraints pointing to t1 will now be poiting to t2. Similarly if you rename table t3 to t1, do not expect the contraints on the earlier table t1 which was renamed to t2 to work with new t1 table. The table will carry its own indexes and constraints.
Regards -
How do I rename the table using Impdp?
Using the Impdp/Expdp utility of Oracle, I am trying to import a table. However the target database contains a table with the same name. How do I rename the table using Import?
REgards,
SakthiSAKTHIVEL wrote:
Using the Impdp/Expdp utility of Oracle, I am trying to import a table. However the target database contains a table with the same name. How do I rename the table using Import?
Hmm well why you just can't rename the table on the target db with the rename table to command and then do the import, will be easy right?
Aman.... -
ORA-26563: renaming this table is not allowed
Hi ,
We have included structure in SAP standard table. When I tried to adjust table using SE14, system gives error message 'ORA-26563: renaming this table is not allowed'.
Could you please guide me to resolve above issue.
Regards,
NarenHi,
Is this link Re: Urgent! - Problem during Conversion of SAP datadictionary table... helps you?
Vinod -
Rename Collection Tables????????
Hi all,
I have tried to using xdb_utilities.renameCollectionTable to rename the tables created through a registration schema where maintainOrder is true in some collection elements.
Is it possible???? I wanted to rebuild the index from this tables???.
I maked correctly with maintainOrder = false, but I think, in this moment the tables were NESTED TABLES and now not.
Any idea????
Thanks in advance,
David.Hi mgralike,
apologize for me short answer.
The ORSWE is the user utilized to create all infrastructure and to register the schemas aldo. At this moment he have been granted with all permisions, all roles (DBA, XDBADMIN, XDBWEBSERVICES and so on) and all systems privelegess to avoid problems with others Oracle functionalities.
I have just registered other schemas with the same form and I could change the tables with yours package XDB_Utilities form the Oracle XML Basic Demo.
In the new schema 'PlantillaProyecto, XSD' I only have changed two attributes in order to achieve a xml ordered. maintnainDOM and maintnainOrder, and in some cases only maintnainOrder has been declared. Now, I can not see tables in ALL_NESTED_TABLES.
The first schema has not declared any previous attributes and I could change the tables names but the xml downloaded from the repository it is not ordered.
I think, it is a problem with my use of attributes.
I executed the following code describe PLANTILLAPROYECTO with the result:
Nombre ┐Nulo? Tipo
TABLE of SYS.XMLTYPE(XMLSchema "http://www.orswegimoarmada.es/ORSWE/XSD/Plantill
aProyecto/PlantillaProyecto.xsd" Element "PlantillaProyecto") STORAGE Object-rel
ational TYPE "PlantillaProyecto955_T"
Thanks,
David. -
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 advancedSo, 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.
Maybe you are looking for
-
Best way to install a photosmart 5180 on new 8.1
What's the best way to install a Photosmart 5180 on a new 8.1 pc? I have the disc, but I don't think it'll work. Should I download the software and hook it up via USB cable or wireless. The pc is wireless, and I tried to find the printer on the netwo
-
When the balance carryforward package is executed the package progress status is "Complete" but the detail log which follows states an error occurred but no details are provided and there are no baances carried forward. /CPMB/MODIFY completed in 0 se
-
Unable to select the SSRS report parameters and execute the reports.
Hi All, We have set of SSRS reports and are been published to SharePoint 2010.After that I have enabled Anonymous user access at SharPoint side,after enabling Anonymous user access no one is able to access the reports so I have removed Anonymous user
-
Help! Connection pointbase error
i used webserver7.0. this is my server.xml: <jdbc-resource> <jndi-name>jdbc/sample</jndi-name> <datasource-class>com.pointbase.jdbc.jdbcUniversalDriver</datasource-class> <property> <name>password</name> <value>PBPUBLIC</value> </property> <property>
-
Hi All I am developing an OCCI application to read data from oracle 10g server. I used setdatabuffer() to allocate resultset buffers and then fetch data into them using resultset->next(rowCount) method. It works perfectly with all data types(NUMBER,C