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.
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. -
How to create index on XMLTYPE ordered collection table?
I am using Oracle 11.2.0.2.
Essentially, my XML documents have a 3-level hierarchy:
event
+---action [1:n]
+---- param [1:n]
I am trying to create indexes on ordered collection tables, but can not get the syntax right...
I have created a table with an object-relational XMLType column:
CREATE TABLE T_C_RMP_MNTRNG_XML_FULL_IL4 (
MESSAGE_ID NUMBER(22,0) NOT NULL ENABLE,
XML_EVAL_ID NUMBER(22,0),
VIN7 VARCHAR2(7 BYTE),
FLEET_ID VARCHAR2(50 BYTE),
CSC_SW_VERSION VARCHAR2(100 BYTE),
RECEIVED DATE,
XML_CONTENT SYS.XMLTYPE ,
DWH_LM_TS_UTC DATE NOT NULL ENABLE,
CONSTRAINT PK_C_RMP_MNTRNG_XML_FULL_IL4 PRIMARY KEY (MESSAGE_ID)
) NOLOGGING TABLESPACE CATALOG
VARRAY "XML_CONTENT"."XMLDATA"."action" STORE AS TABLE "T_OR_MON_ACTION" (
NOLOGGING TABLESPACE "CATALOG"
VARRAY "param" STORE AS TABLE "T_OR_MON_ACTION_PARAM" (
NOLOGGING TABLESPACE "CATALOG"
) RETURN AS LOCATOR
) RETURN AS LOCATOR
XMLTYPE XML_CONTENT STORE AS OBJECT RELATIONAL XMLSCHEMA "http://mydomain.com/cs.xsd" ELEMENT "monitoring";
I am running the following SELECT:
SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, UNIXTS_TO_DATE(ACTION_TIMESTAMP) ACTION_TIMESTAMP
FROM T_C_RMP_MNTRNG_XML_FULL_IL4,
XMLTABLE(
'for $i1 in /monitoring ,
$i2 in $i1/action
return element r {
$i1/eventId,
$i2
PASSING XML_CONTENT COLUMNS
EVENT_ID VARCHAR(40) PATH 'eventId',
ACTION_SUB_ID INTEGER PATH 'action/actionSubId',
ACTION_TYPE VARCHAR2(100) PATH 'action/type',
ACTION_TIMESTAMP NUMBER(13,0) PATH 'action/time'
) T2
WHERE (
EVENT_ID IS NOT NULL AND ACTION_SUB_ID IS NOT NULL
The explain plan looks like this (sorry, don't know how to get this formatted any "eye-friendlier"):
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1609K| 6316M| | 6110K (1)| 20:22:11 |
|* 1 | HASH JOIN | | 1609K| 6316M| 111M| 6110K (1)| 20:22:11 |
| 2 | TABLE ACCESS FULL| T_C_RMP_MNTRNG_XML_FULL_IL4 | 582K| 104M| | 5241 (1)| 00:01:03 |
|* 3 | TABLE ACCESS FULL| T_OR_MON_ACTION | 32M| 117G| | 105K (2)| 00:21:08 |
Predicate Information (identified by operation id):
1 - access("NESTED_TABLE_ID"="T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC0001300014$")
filter(CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(XMLCONCAT(SYS_XMLGEN("T_C_RMP_MNTRN
G_XML_FULL_IL4"."SYS_NC00017$",NULL,SYS_XMLCONV("T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC00012$",0,32,
'EC1EEF23FD023A27E04032A06D930A8D',3,3783,1)),SYS_MAKEXML('EC1EEF23FD023A27E04032A06D930A8D',3780,
"T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC00008$","SYS_ALIAS_0"."SYS_NC_ROWINFO$")),'/eventId',NULL),0,
0,20971520,0),50,1,2) AS VARCHAR(40) ) IS NOT NULL)
3 - filter(CAST(TO_NUMBER(TO_CHAR("SYS_ALIAS_0"."actionSubId")) AS INTEGER ) IS NOT NULL)
Note
- dynamic sampling used for this statement (level=2)
- Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)
The XML schema looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:storeVarrayAsTable="true" oraxdb:flags="2105639" oraxdb:schemaURL="http://mydomain.com/cs.xsd" oraxdb:schemaOwner="MYUSER" oraxdb:numProps="23">
<xs:element name="monitoring" oraxdb:propNumber="3785" oraxdb:global="true" oraxdb:SQLName="monitoring" oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="monitoring757_TAB" oraxdb:defaultTableSchema="MYUSER">
<xs:complexType oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="action" oraxdb:propNumber="3780" oraxdb:global="false" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="action756_COLL" oraxdb:SQLCollSchema="MYUSER"/>
<xs:element ref="reservationType" oraxdb:propNumber="3781" oraxdb:global="false" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="softwareVersion" oraxdb:propNumber="3782" oraxdb:global="false" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="eventId" oraxdb:propNumber="3783" oraxdb:global="false" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="vin" oraxdb:propNumber="3784" oraxdb:global="false" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="action" oraxdb:propNumber="3790" oraxdb:global="true" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="action754_TAB" oraxdb:defaultTableSchema="MYUSER">
<xs:complexType oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER">
<xs:sequence>
<xs:element ref="type" oraxdb:propNumber="3786" oraxdb:global="false" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element maxOccurs="unbounded" ref="param" oraxdb:propNumber="3787" oraxdb:global="false" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="param753_COLL" oraxdb:SQLCollSchema="MYUSER"/>
<xs:element ref="actionSubId" oraxdb:propNumber="3788" oraxdb:global="false" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="time" oraxdb:propNumber="3789" oraxdb:global="false" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="type" type="xs:string" oraxdb:propNumber="3791" oraxdb:global="true" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="type751_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="param" oraxdb:propNumber="3794" oraxdb:global="true" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="param750_TAB" oraxdb:defaultTableSchema="MYUSER">
<xs:complexType oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER">
<xs:sequence>
<xs:element minOccurs="0" ref="value" oraxdb:propNumber="3792" oraxdb:global="false" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="key" oraxdb:propNumber="3793" oraxdb:global="false" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="value" type="xs:string" oraxdb:propNumber="3795" oraxdb:global="true" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="value748_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="key" type="xs:string" oraxdb:propNumber="3796" oraxdb:global="true" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="key747_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="actionSubId" type="xs:integer" oraxdb:propNumber="3797" oraxdb:global="true" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="actionSubId746_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="time" type="xs:integer" oraxdb:propNumber="3798" oraxdb:global="true" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="time745_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="reservationType" type="xs:string" oraxdb:propNumber="3799" oraxdb:global="true" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="reservationType744_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="softwareVersion" type="xs:string" oraxdb:propNumber="3800" oraxdb:global="true" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="softwareVersion743_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="eventId" type="xs:string" oraxdb:propNumber="3801" oraxdb:global="true" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="eventId742_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="vin" type="xs:string" oraxdb:propNumber="3802" oraxdb:global="true" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="vin741_TAB" oraxdb:defaultTableSchema="MYUSER"/>
</xs:schema>
How can I create an index on these ordered collection tables in order to improve performance?
I found the example at http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_rewrite.htm#ADXDB5859 but am not able to apply it to this particular case...
Thank you in advance...If the schema is not annotated then xs:integer and xs:string are mapped to NUMBER and VARCHAR2(4000) datatypes, so you have to use those in your query in order to avoid unnecessary typecasting operations.
You should also use chained XMLTABLEs when accessing a parent/child relationship instead of a FLWOR expression, otherwise the CBO may not rewrite the XQuery correctly (maybe it's fixed in the latest release).
If you make those changes, the plan should show cleaner predicates :
SQL> SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, ACTION_TIMESTAMP
2 FROM test_table,
3 XMLTABLE('/monitoring'
4 PASSING XML_CONTENT COLUMNS
5 EVENT_ID VARCHAR2(4000) PATH 'eventId',
6 actions XMLTYPE PATH 'action'
7 ) T1,
8 XMLTABLE('/action'
9 PASSING actions COLUMNS
10 ACTION_SUB_ID NUMBER PATH 'actionSubId',
11 ACTION_TYPE VARCHAR2(4000) PATH 'type',
12 ACTION_TIMESTAMP NUMBER PATH 'time'
13 ) T2
14 WHERE EVENT_ID IS NOT NULL
15 AND ACTION_SUB_ID IS NOT NULL
16 ;
Execution Plan
Plan hash value: 1763884463
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 109 | 220K| 6 (17)| 00:00:01 |
| 1 | MERGE JOIN | | 109 | 220K| 6 (17)| 00:00:01 |
|* 2 | TABLE ACCESS BY INDEX ROWID| TEST_TABLE | 11 | 352 | 2 (0)| 00:00:01 |
| 3 | INDEX FULL SCAN | SYS_C007567 | 11 | | 1 (0)| 00:00:01 |
|* 4 | SORT JOIN | | 109 | 216K| 4 (25)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | T_OR_MON_ACTION | 109 | 216K| 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("TEST_TABLE"."SYS_NC00012$" IS NOT NULL)
4 - access("SYS_ALIAS_0"."NESTED_TABLE_ID"="TEST_TABLE"."SYS_NC0000800009$")
filter("SYS_ALIAS_0"."NESTED_TABLE_ID"="TEST_TABLE"."SYS_NC0000800009$")
5 - filter("SYS_ALIAS_0"."actionSubId" IS NOT NULL)
Note
- dynamic sampling used for this statement (level=2)
Now, if still necessary, it all boils down to choosing a technique to index NULL values :
- composite index with a not null or constant column
- FBI
- bitmap
Pick one that best fits your data, selectivity and activity on the tables. -
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 -
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,
JeffHello 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 -
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
Maybe you are looking for
-
ICal still shows previous day in ical proper, but shows current date in the dock
iCal is open in the MONTH, on my desktop permanently, but it continually shows yesterdays date. It isn't till I actually click on the following day in iCal proper that the date changes to the current date. The iCal icon on the dock works fine with n
-
Came home tonight and went in to check my email. I had my mbp clamshelled using a spectre flat screen monitor. When I woke the mbp the screen was fuzzy. After unplugging the external monitor I can't get the monitor on the mbp to work. I've tried ever
-
Regarding Seeburger AS2 Adapter
Hi, Wheni go thru my adapters list i didn't find Seeburger AS2 adapter in the list, but my client wants to use the Seeburger AS2 adapter for their scenario's. What should i do in order use the Seeburger AS2 adapter. Is it a third party adapter? do we
-
String to array convertion problem
Hi, I am reading this from url which returns js array. But when i m trying to covert int to array i stuck. string str="[{"CompanyCode":"17023928","LastTradedPrice":"15,878.68","Volume": "0","PercentageDiff":"1.35","FiftyTwoWeekHigh":"21,206.77","Fift
-
UCES or CRM utility IC webclient
Dear Experts, I am new to SAP. I want to know what is the t code to launch web portal of sap UCES. Also which is more beneficial solution to utility company :- SAP UCES or SAP CRM for Utilities? Kindly mention the critical differences between the two