Skip to main content

Posts

Showing posts from April, 2015

HOW TO RENAME DATAFILE IN ORACLE 10G- LINUX

Here will see how to rename a data file name. Please follow below steps. FILE_NAME TABLESPACE_NAME MAXBYTES/1024/1024/1024 -------------------------------------------------- -------------------- ----------------------- /data/ORA/tpde_02.dbf  TPDE 20 /data/ORA/tpde_01.dbf  TPDE 10 /data2/ORA/tpde_01.dbf  TPDE 30 /data3/ORA/tpde_03.dbf  TPDE 20 Above, the both data files names are same. But they are in diff locations. Now will try to rename the data file to any other name. Which is in /data2/ORA/tpde_01.dbf location Login server & cd to the datafile location. connect to the database. SQL> select name from v$database; NAME --------------------------- TPDE 2. First put the tablespace in offline mode. like below SQL> ALTER TABLESPACE TPDE OFFLINE NORMAL; Tablespace altered. 3. Then go to data file location & try to mv the data file with new name. like below. varthhammr.print.com@/data2/ORA/: mv tpde_01.dbf tpde_04.dbf varthhammr.print.com@/da

RMAN - DATABASE RESTORE USING RMAN COLD BACKUP

NOTE: Here I'm doing backup & restore for the database name => ORCL RMAN COLD BACKUP : We can only take. When the database is in MOUNT state. And the database is in noarchivelog mode. RMAN HOT BACKUP : We can only take if database running in archivelog mode. Here we can take the backup in 'OPEN' state. No need to mount the database. Please see below steps: SQL> select name from v$database; NAME --------- ORCL SQL> select open_mode from v$database;  OPEN_MODE ------------ READ_WRITE SQL> archive log list; Database log mode              No Archive Mode Automatic archival             Disabled Archive destination            USE_DB_RECOVERY_FILE_DEST Oldest online log sequence     14 Current log sequence           14 SQL> exit Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production ---------------------------------------------------------------------------------------------------------------- NOT