SQL & PL/SQL :: RENAME Table In Oracle 8i?

Nov 21, 2011

how to rename table in oracle 8i ?

ALTER TABLE olname RENAME TO nwname;

Above command is not working.

View 2 Replies


ADVERTISEMENT

Server Administration :: Rename A Partitioned Table?

Mar 21, 2007

i want to rename a table that has partitions.

alter table
testora.oldtablename
rename to
testora.newtablename;

ORA-14048: a partition maintenance operation may not be combined with other operations

View 2 Replies View Related

SQL & PL/SQL :: Unable To Rename A Column For Original Table?

Feb 14, 2012

i am not able to rename a column for original table, once i create a new one with Create table as select i can rename the new table column, but not the original one

SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 14 13:10:10 2012

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> show user
USER is "WEBSYSTEMD6"
SQL> alter table cbe rename column tnum to tnum_old;
alter table cbe rename column tnum to tnum_old
*
ERROR at line 1:
ORA-00900: invalid SQL statement

SQL> create table cbe_test as select * from cbe;

Table created.

SQL> alter table cbe_test rename column tnum to tnum_old;

Table altered.

SQL>

View 12 Replies View Related

SQL & PL/SQL :: Copy Into Same Table / Recursive Rename Of Duplicates

May 11, 2011

In MS Windows, if I copy a file and paste it into the same folder, I get a copy with the text 'Copy of' in front of the file name. If I paste it again, I get another copy with a different version number.

E.g.
sqlnet.log
Copy of sqlnet.log
Copy (1) of sqlnet.log
Copy (2) of sqlnet.log

I was wondering if I could copy existing rows into a table and do the same thing?

So, for example if I had this table:

create table tst_srch (srch_is varchar(100), user_name varchar(100), srch_name varchar(100));

insert into tst_srch values (1,'USER1','SRCHA');
insert into tst_srch values (2,'USER1','SRCHB');
insert into tst_srch values (3,'USER1','SRCHC');
insert into tst_srch values (4,'USER1','SRCHD');
insert into tst_srch values (5,'USER2','SRCHC');
insert into tst_srch values (6,'USER2','SRCHD');
insert into tst_srch values (7,'USER2','SRCHD_1');

Could I write a procedure like copy_searches('USER1','USER2') that would copy all USER1's searches to USER2 - including renaming any duplicates.

So it would create these new rows:

8,USER2,SRCHA
9,USER2,SRCHB
10,USER2,SRCHC_1
11,USER2,SRCHD_2

I've looked at various insert statements, merge and match statements and exception handling in procedures .

View 6 Replies View Related

Server Utilities :: Rename Table While Using Datapump Import?

Mar 18, 2013

I have a Datapump Export File which was created in Schema mode.

I have to import the tabelles in a new database where a have to use the REMAP SCHEMA Parameter.

Additionally I would like to add a prefix to tablenames.

For example:

original tablename: THE_TABLE
Name after import: IMP_THE_TABLE

Is there a way to add a prefix while using Datapump Import?

View 5 Replies View Related

Copy And Rename An Oracle Database - (without Export / Import)

Oct 21, 2011

I inherit a backup procedure described in

[URL]......

I ask if this procedure works on Oracle Database 10g R2. I have a Oracle DB 10g r2 on Linux machine and I want to copy it to a windows Oracle DB 10g r2, or if it not works to another Linux machine.

View 2 Replies View Related

Export/Import/SQL Loader :: Use Export And Then Rename Table?

Jan 12, 2013

oracle 11g.2 ASM with RAC under RHEL 5

we have 2 table same structure one of them is empty and the pther one is contain data the vendor do the insert as select but i found he is wrong due to there duplicated ,now i want to use export and then rename the table and then import but i need with export do a condition

exp user/pass tables=MTR_EPPC_CALLED_DATA file=MTR_EPPC_CALLED_DATA.dmp query="where callstarttime >=to_date('01122012','ddmmyyyy')
and callstarttime <=to_date('31122012','ddmmyyyy')"

but it's seem the query take one condition how can i use this above condition in export ???also my friend say there is way to insert with rowid is this possible ??

View 2 Replies View Related

SQL & PL/SQL :: How To Rename A Index

Aug 8, 2011

How can i rename a index? is there a way except for drop and create.

View 2 Replies View Related

SQL & PL/SQL :: Rename User Or Schema

Jul 12, 2012

I have one use "A" . I would like to rename user "A" to "B". how its possible ?

View 11 Replies View Related

Alter Tablespace Rename

Sep 28, 2012

I would like to rename tablespace A to B , but when I do it tables after rename tablespace have columns tablespace_name.dba_tabkles in A . Is possibility to change it into without move ?

View 6 Replies View Related

Windows :: Rename Command In Dos

Mar 13, 2011

I want to rename

cf(1)
cf(2)
cf(3)

to

cf1
cf2
cf3

in DOS.

View -1 Replies View Related

Rename Database With Physical Standby?

Jul 23, 2010

I need to rename an Oracle9i database on windows which has a physical standby database running on a different machine.

I have the steps to rename the primary database but am unsure of it's impact on the physical standby database. It seems like I will have to re-create the physical standby database, since renaming the primary database involves opening the db with "resetlogs". It's a production environment hence can't play with it without knowing the results.

View 1 Replies View Related

SQL & PL/SQL :: Generate Command To Rename Log File From ASM To Non-ASM

Apr 9, 2013

I am in the process of recovering a database from an ASM environment to a non-ASM environment using RMAN. I've got a query to generate the command to RENAME the file:

SELECT 'ALTER DATABASE RENAME FILE '''||MEMBER||''' TO '''||'/u01/data/dev'||
SUBSTR(MEMBER,
INSTR(MEMBER, '/', -1, 1),
INSTR(MEMBER, '.', 1, 1) - INSTR(MEMBER, '/', -1, 1)) ||
DECODE(SUBSTR (MEMBER, 1, INSTR(MEMBER, '/', 1, 1) -1), '+DATA', 'a', '+FRA', 'b', 'c') ||'.log'';'
FROM V$LOGFILE;

When I run the query, this is an example of the result I get:

ALTER DATABASE RENAME FILE '+FRA/db1/onlinelog/group_3.259.766075171' TO '/u01/data/dev/group_3b.log';
ALTER DATABASE RENAME FILE '+DATA/db1/onlinelog/group_1.262.766075829' TO '/u01/data/dev/group_1a.log';

But I want to replace the "group" with "redo" and get the below result:

ALTER DATABASE RENAME FILE '+FRA/db1/onlinelog/group_3.259.766075171' TO '/u01/data/dev/redo_3b.log';
ALTER DATABASE RENAME FILE '+DATA/db1/onlinelog/group_1.262.766075829' TO '/u01/data/dev/redo_1a.log';

View 7 Replies View Related

PL/SQL :: Rename Only Two Names In Column Report_headings1?

Jul 30, 2012

I need to rename only two names in column report_headings1. But in order for me to see all other names I need to use all of them in decode function. Is there an easier way to write this Select Statement.

select days_start, days_to,
decode(report_heading1,'31 Or More days', 'Future', '00 Dispute/Pend', 'Dispute or Pend', '1 to 30 Days', '1 to 30 Days',
'31 to 60 Days', '31 to 60 Days','61 to 90 Days', '61 to 90 Days', '91 Or More Days', '91 Or More Days' ) report_heading1, report_heading2, type
from ar_aging_bucket_lines lines, ar_aging_buckets buckets
where lines.aging_bucket_id = buckets.aging_bucket_id;

View 5 Replies View Related

Recovery Manager (RMAN) :: Way To Rename Dbfs

Oct 8, 2012

11.2.0.3 win 2003. have direct aim to restore database from inc0+inc1 backup + recover up to latest archives made after inc1.

Steps have to be done:

1. SQLPLUS> startup nomount from pfile='......';
2. RMAN> restore controlfile from ...
3. SQLPLUS > alter database mount;
4. RMAN> run
{

[code]...

failover to previous backup

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 10/08/2012 13:30:20

[code]....

List of Backup Sets
===================

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
795 108.13M DISK 00:00:16 05-OCT-12
BP Key: 831 Status: AVAILABLE Compressed: YES Tag: BACKUP_WORK_00000

[code]...

Questions:

1. Why it ignoring "set new name" and db_file_name_convert??
2. Why no backup or copy of datafile 1,2,3,4 found to restore, it can seee it clearly through all its commands?

View 4 Replies View Related

Reports & Discoverer :: Rename Report Output File

May 10, 2012

I'm calling myreport.rdf from a form using the rwservlet and destype=mail and desformat=pdf. The report file is attached to the email as myreport.pdf. However, I want to have the output file named myfilename.pdf. Is there any way to accomplish this short of using destype=file and then renaming it and sending that file?

View 2 Replies View Related

Server Administration :: ORA-01111 / Name For Data File 636 Is Unknown - Rename To Correct File

Nov 3, 2012

i have two tablespaces dictionary managed (SYSTEM,APPLSYSX) i tried to change to locally cause it will cause problem in future when trying to run OATM migration.i did it successfully on APPLSYSX,when i did it on system upon oracle procedure.i have to change all tablespaces to read only when i did that with tablespace APPLSYSD(alter tablespace APPLSYSD read only) i received errors

SQL> alter tablespace APPLSYSD READ ONLY;
alter tablespace APPLSYSD READ ONLY
*
ERROR at line 1:
ORA-01230: cannot make read only - file 636 is offline
ORA-01111: name for data file 636 is unknown - rename to correct file
ORA-01110: data file 636: '/vol5u/oracle/prddb/9.2.0/dbs/MISSING00636'
i have not this file on the OS

View 1 Replies View Related

Oracle 10g - Take Snapshot Of Table Before Insert Or Update Happens To That Table

Dec 28, 2010

I need to take a snapshot of a table before insert or update happens to that table.... in oracle 10g. I am reading the MV docs from oracle and below link..

[URL].......

how MV should be written for this and how to schedule it in dbms_jobs for auto refresh?

assuming that t1 is the table where DML operation are goin to happen so before any insert or update, snapshot has to be taken, and I am assuming that to do this it would look something like this?

create materialized view my_view refresh fast as select * from t1;

create materialized view log on my_view;

and then schedule in a dbms_jobs?

View 1 Replies View Related

PL/SQL :: Static Table Creation In Oracle - Difference Between Static And Dynamic Table

Dec 11, 2012

Static Tables Creation In oracle & Diff Between Static table ,Dynamic table

View 2 Replies View Related

SQL & PL/SQL :: PDF To Oracle Table?

Jan 2, 2013

I need to develop a solution which will read data from a PDF file and insert them to a oracle table. The PDF file is text pdf, which is a kind of form. I need to read specific data from particular field and insert it to oracle table.

View 3 Replies View Related

Export A Table In Oracle 8?

Sep 24, 2013

i am using oracle 8 and i need to export a table and then import it how can i do it with export import command

View 1 Replies View Related

Connecting To Oracle Table With VB 6.0?

Jul 31, 2004

sample code to connect to Oracle table using VB6.0, as well as code to populate the table and to access a particular record in the table.

Asuming userID is 'MyID' and Password is 'MyPass', Server Database is 'Mydata'.

View 2 Replies View Related

Joining 2 Table Together In Oracle?

Jan 7, 2013

Basically, i was asked to join Table 1 and Table 2 together in oracle. I have been given the values of Table 1. For example, Depot_ID has value of DEP01, DEP02, DEP02 etc. Therefore, I have to create table 2 with those attributes given below. But the attribute name of the Table 2 is Depot_No which is different.

My question: Is it correct to give the same values of Depot_ID in Table 1 to Depot_No in Table 2, such as, DEP01, DEP02, DEP02?

How to join those two tables below:

Table 1:

Depot_ID
Address
Location

Table 2:

Product_ID
Depot_No
Quantity
Aisle
Bay

View 2 Replies View Related

SQL & PL/SQL :: Take Table Structure In Oracle?

Jul 11, 2012

How to take table structure in oracle? Actually I got it through this command "SELECT dbms_metadata.get_ddl(a.object_type,a.object_name) FROM user_objects a where object_type != 'PACKAGE BODY'"

any other way to get it? I need like table name field name datatype

View 11 Replies View Related

SQL & PL/SQL :: Oracle Table Partitioning?

Jun 2, 2010

an existing normal table be converted to a partitioned table without recreating the table or truncating/reloaded data?

View 4 Replies View Related

SQL & PL/SQL :: Table Inheritance In Oracle

Mar 25, 2010

If Employee and Customer are sub-types of Person, when creating the object tables, how can you name the necessary Nested Tables to represent the relationships of the Child objects?

[PERSON]
|
__________|__________
| |
| |
[EMPLOYEE] [CUSTOMER]
|1 |1
| |
| organises | attends
|(organisedBy) | (isAttendedBy)
| |
|* |*
------[EVENTS]-------

CREATE TABLE Person_TBL of Person (Person# PRIMARY KEY)
NESTED TABLE organises STORE AS EventListType;

Am I right in thinking that the Person table will hold both Employee and Customer objects (object types have been declared such)?

But then how would the Nested tables of Employee.organises and Customer.attends be named?

View 4 Replies View Related

Oracle Table Sort Order

Jul 16, 2010

I know the only way to guarantee a specific sort order result when querying table is by using the order by clause. However, I have an issue where I do not have access to the code for the web user interface of a very lightly used interface (has two users). In that user interface is a drop down box that is populated by a table - one table. The drop down box is populated by the query "select [column name] from [table name]". Right now there are 400+ rows in that table total, so it's small but not having the items ordered is a pain.

I would like to alter something on the db side so the result of "select [column name] from [table name]" is an ordering by the column descending. I don't want the sort order to be the same for all queries (including joins and all) just want to control the order for that one query. It is Oracle9i.

View 1 Replies View Related

Error While Creating Table In Oracle 10g?

Aug 19, 2008

If i create a table in Oracle 10g it givea me the follwoing Error.. what couls be the error...

ORA-00911: invalid character
create table shopper
(
cShopperId varchar2(30) primary key,
cPassword char(20) not null,
vFirstName varchar2(20) not null,

[code]....

View 1 Replies View Related

Add Partial Primary Key Into Oracle Table?

Oct 17, 2006

how to add a primary key into the oracle table but how do i add a partial primary key?

View 2 Replies View Related

Analyzing Partitioned Table On Oracle

Sep 6, 2010

A question regarding analyzing behavior of partition table on Oracle -

Is analyzing different sub partitions within a partition is same as analyzing that partition and what about vice-versa?

Attached File(s)

untitled.JPG ( 9.2K )
Number of downloads: 3

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved