-
How to shutdown / startup rac instances
How to shutdown / startup rac instances:-1. Shutdown Oracle Home process accessing database.2. Shutdown RAC Database Instances on all nodes.3. Shutdown Node applications running on nodes.4. Shut down the Oracle Cluster ware or CRS. #Stopping enterprise manager:-[oracle@rac1 ~]$ emctl stop dbconsoleOracle Enterprise Manager 11g Database Control Release 11.2.0.2.0Copyright (c) 1996, 2010 Oracle Corporation. All rights… Continue Reading
-
Create oracle 11g database manually on linux
Make sure oracle binaries are installed.We will proceed with database installation if binaries are already installed. Step 1:Create Directory structure with Oracle ownership and permission as below: [oracle@localhost ~]$ cd /u01 [oracle@localhost u01]$ mkdir testdb [oracle@localhost u01]$ chmod -R 777 /u01/testdb/* [oracle@localhost u01]$ chown -R oracle:oinstall /u01/testdb/* [oracle@localhost u01] cd testdb [oracle@localhost testdb]$ mkdir adump… Continue Reading
-
How to Hot backup & restore of an Oracle 11gR2 database
How to take Hot backup & restore in Oracle 11gR2 database:- Step 1:-Prerequisites:-$Select log_mode from v$database;If the database is not in archivelog mode then put the database in the archive log modesql>shut immediate;sql>startup mount;sql>alter database archivelog ;sql>alter database open; Step 2:-Taking a hot backup- Now that we have prepared our database for a hot backup,… Continue Reading
-
Noarchivelog database recovery on oracle 11g
Oracle Version:- Oracle 11g Scenario: Database is in nonarchive log mode. And all the datafiles , redologfiles and controlfiles have been lost.Rman backup is present.And only controlfile is present from multiplexed location. Solution:- SQL> select log_mode from V$database; LOG_MODE————NOARCHIVELOG SQL> select name from V$DATAFILE; NAME——————————————————————————–/u01/app/oracle/oradata/prim/system01.dbf/u01/app/oracle/oradata/prim/sysaux01.dbf/u01/app/oracle/oradata/prim/undotbs01.dbf/u01/app/oracle/oradata/prim/users01.dbf/u01/app/oracle/oradata/prim/example01.dbf/u01/app/oracle/oradata/prim/somtbs.dbf Now let’s see what happens when I move all datafiles,… Continue Reading
-
What’s View and Synonym?
What is a view? A view is a virtual table. Every view has a Query attached to it. (The Query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.) A view is based on a table or another view and acts as a window through which data on… Continue Reading
-
How to Change Archive Log Destination in Oracle 11g
sqlplus / as sysdba SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 13Next log sequence to archive 15Current log sequence 15 To check current archiving location: SQL> SHOW PARAMETER DB_RECOVERY_FILE_DEST NAME TYPE VALUE———————————— ———– ——————————db_recovery_file_dest string /u01/app/oracle/flash_recovery _area SQL> ALTER SYSTEM SET log_archive_dest =’/u01/arch’ scope=both;ERROR at line 1:ORA-02097:… Continue Reading
-
Performing Block Media Recovery using RMAN
Oracle Version :- 11gOs Version:- Rhel 6.4 To demonstrate this scenario we need some corrupted datablocks on some data files. So here we will corrupt a data block manually in order to test the block recovery feature of RMAN. Step 1:-We will create a user and will grant him dba privilge. [oracle@server1 ~]$ sqlplus… Continue Reading
-
How to sync standby database which is lagging behind from primary database
Primary Database Server: server1.soumya.comStandby Database Server: server2.soumya.com Primary Database: primStandby database: stand Database version:11.2.0.1.0 Reason:-1. Might be due to the network outage between the primary and the standby database leading to the archivegaps. Data guard would be able to detect the archive gaps automatically and can fetch the missing logs assoon as the connection is… Continue Reading
-
Scripts related to TEMP TABLESPACE
scripts related to temp tablespace To check instance-wise total allocated, total used TEMP for both rac and non-rac:- set lines 152col FreeSpaceGB format 999.999col UsedSpaceGB format 999.999col TotalSpaceGB format 999.999col host_name format a30col tablespace_name format a30select tablespace_name,(free_blocks*8)/1024/1024 FreeSpaceGB,(used_blocks*8)/1024/1024 UsedSpaceGB,(total_blocks*8)/1024/1024 TotalSpaceGB,i.instance_name,i.host_namefrom gv$sort_segment ss,gv$instance i where ss.tablespace_name in (select tablespace_name from dba_tablespaces where contents=’TEMPORARY’) andi.inst_id=ss.inst_id; Total Used… Continue Reading
-
Oracle Architecture
Objectives These notes introduce the Oracle server architecture. The architecture includes physical components, memory components, processes, and logical structures. Primary Architecture Components The figure shown above details the Oracle architecture. Oracle server: An Oracle server includes an Oracle Instance and an Oracle database. · An Oracle database includes several different types of files: datafiles, control files, redo log files and archive redo… Continue Reading

