Kamran Agayev’s Oracle Blog

Kamran Agayev’s Oracle Blog

Archive for August, 2009

Move datafiles to another folder

Posted by Kamran Agayev A. on August 14, 2009

This question is one of the most famous questions in OTN forum 🙂 So I decided to show the way to do it

SQL> select name from v$datafile;

NAME
——————————————————————————–

C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\SYSTEM01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\UNDOTBS01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\SYSAUX01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\USERS01.DBF

SQL> alter tablespace users offline;

Tablespace altered.

SQL> host
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>move c:\oracle\product\10.2.0\oradata\test_tbs\USERS01.DBF c:\oradata

C:\Documents and Settings\Administrator>exit

SQL> alter database rename file ‘C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\USERS
01.DBF’ to ‘c:\oradata\users01.dbf’;

Database altered.

SQL> alter tablespace users online;

Tablespace altered.

SQL> select name from v$datafile;

NAME
——————————————————————————–

C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\SYSTEM01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\UNDOTBS01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST_TBS\SYSAUX01.DBF
C:\ORADATA\USERS01.DBF

SQL>

Advertisements

Posted in Administration | 1 Comment »

All about the DUAL table – Tom Kyte

Posted by Kamran Agayev A. on August 13, 2009

If you want to know EVERYTHING related to DUAL table in Oracle, please refer to Tom Kyte’s discussion

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1562813956388

Posted in Administration | Leave a Comment »

Oracle 10gR2 Architecture – Learn it by heart

Posted by Kamran Agayev A. on August 10, 2009

It’s a wonderful demonstration of Oracle 10gR2 Architecture. As a DBA, you HAVE to learn it by heart 🙂 And draw it minimum 3-4 times 🙂

Oracle_architecture

Posted in Administration | 5 Comments »