Posts

Showing posts from June, 2014
Space_Count **   select user_bytes/1024/1024 from dba_data_files         where tablespace_name='<tbs_name>'; ** select sum(user_bytes)/1024/1024 from dba_data_files       where tablespace_name='<tbs_name>';            This will give us the space used in a particular datafile..... Tablespace_Size ** select bytes/1024/1024 from dba_data_files       where tablespace_name='<tbs_name>'; ** select sum(bytes)/1024/1024 from dba_data_files       where tablespace_name='<tbs_name>';             This command will give the tablespace size what size is the tablespace created of..
Renaming Database Well Rename your database in a very easy way..without affecting the DBID or to the SID... Step 1 :  Backup Controlfile to text Step 2:  Create  a pfile of your database Step 3:  Edit your controlfile with database name...keeping only resetlogs Step 4:  Edit pfile with dbname and controlfile parameter.. Step 5:  Startup with nomount option with the updated pfile.. Step 6:  Create a new controlfile Step 7:  Update the new controlfile in pfile and Startup with that pfile Step 8:  Create a new Spfile from the updated Pfile....               Thats it Database is renamed.......... Sql > alter database backup controlfile to trace as '/home/oracle/control.txt [ oracle@localhost :~ ]  vi control.txt CREATE CONTROLFILE REUSE DATABASE "ORACLE" RESETLOGS  ARCHIVELOG     MAXLOGFILES 16     MAXLOGMEMBERS 3     MAXDATAFILES 100 ...
Recovery Catalog Step 1: Create a user to own Recovery Catalog..and grant him the necessary privilage   **   create user recovery identified by recovery;   **   grant connect,resource,recovery_catalog_owner to recovery... Step 2 : Create a default tablespace for the recovery owner..      **   create tablespace recovery             datafile "....................path............." size 50m autoextend on; Step 3: Make the user use the default tablespace which is created      **  Alter user recovery default tablespace recovery; Step 4: Creating catalog In the other screen just connect rman catalog..        **    rman catalog username/password                 ex: rman catalog recovery/recovery later inside rman   rman > create catalog;              ---> Thi...