Showing posts with label Oracle Database Administration. Show all posts
Showing posts with label Oracle Database Administration. Show all posts

Monday, 4 August 2014

Move or rename Datafiles online in Oracle 11g Database

Step1: Move tablespace offline through database command

SQL> alter tablespace USERS offline;

Tablespace altered.

Step2: Move tablespace offline through os command

SQL> !
[oracle@oracledb32 oracledb]$ mv /oracledb/oradata/stlbas/users01.dbf /home/oracle/users01.dbf

[oracle@oracledb32 oracledb]$
[oracle@oracledb32 oracledb]$ exit
exit

Step3: rename datafile 

SQL> alter database rename file '/oracledb/oradata/stlbas/users01.dbf' to '/home/oracle/users01.dbf';

Database altered.

Step4: Move tablespace USERS online

SQL> alter tablespace USERS online;

Tablespace altered.

SQL>

--thats it....

Tuesday, 22 July 2014

Find default account in Oracle Database

Using the following query you can find the Default Accounts (created by Oracle)

SELECT * FROM DBA_USERS_WITH_DEFPWD;


Note: The default Oracle installation locks and expires the installation accounts. These accounts should be left locked and expired unless absolutely necessary. Check to ensure these accounts have not been unlocked.