answersLogoWhite

0

â–º Rename a Datafile in Oracle(10g):-SQL> select name from v$datafile;

NAME

--------------------------------------------------------------------------------

/u01/app/oracle/product/10.2.0/oradata/abab/system.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/undo.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/sysaux.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/usr01.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/usr02.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/asm01.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/usr04.dbf

/u01/app/oracle/product/10.2.0/oradata/abab/m123.dbf

8 rows selected.

SQL> alter tablespace msb read only;

Tablespace altered.

SQL> select TABLESPACE_NAME, status from dba_tablespaces;

TABLESPACE_NAME STATUS

------------------------------ ---------

SYSTEM ONLINE

UNDOTBS1 ONLINE

SYSAUX ONLINE

TEMP ONLINE

USR01 ONLINE

USR02 ONLINE

TEMP01 ONLINE

INNER ONLINE

ASM ONLINE

MSB READ ONLY

TEMPORARY ONLINE

TABLESPACE_NAME STATUS

------------------------------ ---------

TSPUNDO ONLINE

12 rows selected.

SQL> alter tablespace msb offline;

Tablespace altered.

============================================================

Work on OS level:-

[oracle@abab-YYY-XXX abab]$ CD /u01/app/oracle/product/10.2.0/oradata/nisi/

[oracle@abab-YYY-XXX abab]$ ls

asm01.dbf redo1.log sysaux.dbf undo.dbf usr04.dbf

m123.dbf redo2.log system.dbf usr01.dbf

redo3.log temporary.dbf usr02.dbf

[oracle@abab-YYY-XXX abab]$ cp m123.dbf mmm.dbf

[oracle@abab-YYY-XXX abab]$ ls

asm01.dbf redo1.log sysaux.dbf undo.dbf usr04.dbf

m123.dbf redo2.log system.dbf usr01.dbf

mmm.dbf redo3.log temporary.dbf usr02.dbf

[oracle@abab-YYY-XXX abab]$

============================================================

SQL> alter database rename file

2 '/u01/app/oracle/product/10.2.0/oradata/abab/m123.dbf'

3 to

4 '/u01/app/oracle/product/10.2.0/oradata/abab/mmm.dbf';

Database altered.

SQL> alter tablespace msb online;

Tablespace altered.

SQL> alter tablespace msb read write;

Tablespace altered.

SQL> select name, status from v$datafile;

NAME STATUS

------------------------------------------------------------ -------

/u01/app/oracle/product/10.2.0/oradata/abab/system.dbf SYSTEM

/u01/app/oracle/product/10.2.0/oradata/abab/undo.dbf ONLINE

/u01/app/oracle/product/10.2.0/oradata/abab/sysaux.dbf ONLINE

/u01/app/oracle/product/10.2.0/oradata/abab/usr01.dbf ONLINE

/u01/app/oracle/product/10.2.0/oradata/abab/usr02.dbf ONLINE

/u01/app/oracle/product/10.2.0/oradata/abab/asm01.dbf ONLINE

/u01/app/oracle/product/10.2.0/oradata/abab/usr04.dbf ONLINE

/u01/app/oracle/product/10.2.0/oradata/abab/mmm.dbf ONLINE

8 rows selected.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the difference between database file and datafile?

Datafile is a group of files in each table space in an Oracle database. Database files are all files that are found within the database.


What oracle will do in datafile media recovery?

first of all ur database in mount mode.... and then enable archieve log and then check


How do you rellocate a datafile?

Alter tablespace is the command


What is the meaning of i in oracle9i?

Oracle i means "Internet", that means oracle manipulate data via internet. But next oracle comes with "Grid Computing" and rename with 'g'


What is a Checkpoint in oracle?

A checkpoint performs the following three operations:Every dirty block in the buffer cache is written to the data files. That is, it synchronizes the datablocks in the buffer cache with the datafiles on disk. It's the DBWR that writes all modified databaseblocks back to the datafiles.The latest SCN is written (updated) into the datafile header.The latest SCN is also written to the controlfiles.The update of the datafile headers and the control files is done by the LGWR(CKPT if CKPT is enabled). As of version 8.0, CKPT is enabled by default.


What is the industry average for Capital Expenditure?

http://people.stern.nyu.edu/adamodar/New_Home_Page/datafile/capex.html


How do you rename a directory in UNIX?

You rename a directory the same way you rename a file. Use the 'mv' command to rename it.


What has the author Neil Webster written?

Neil Webster has written: 'DMU Datafile' 'European Locomotive Pocket Book' 'DMU and Light Rail Datafile' 'Locomotive Hauled Travel' 'European Loco Pocket Book' 'EMU Datafile' 'European Railways' 'Panchayati raj and the decentralisation of development planning in West Bengal' -- subject(s): Panchayat, Local government


You are given a text file named datatxt The file contains a list of integer scores The number of scores is unknown You are required to write a C program to read ALL the scores from the?

#include #include #include using std::cin;using std::cout;using std::endl;using std::ifstream;//function prototypesint numberOfElements(ifstream& inData);void readDataFromFile(ifstream& inData, long* dataFile, int arraySize);int main(){const char fileName[] = "data.txt";ifstream inData;inData.open(fileName, std::ios::in);if (inData.fail()){cout


What are modules of oracle?

Oracle sells many functional modules which use the Oracle RDBMS as a back-end, notably Oracle Financials, Oracle HRMS, Oracle SCM, Oracle Projects, Oracle CRM, Oracle Procurement.


How do you rename Favorite folders?

You right click on the site you want to rename. Then you go down and click rename.


What is the meaning of i in oracle 9i?

The i in Oracle 8i and Oracle 9i stands for INTERNET....The i in Oracle 8i and Oracle 9i stands for INTERNET....The i in Oracle 8i and Oracle 9i stands for INTERNET....The i in Oracle 8i and Oracle 9i stands for INTERNET....