You are on page 1of 3

There are two types of authentications OS level DB level For OS level authentication: 1. Shutdown the database 2.

Set OS_AUTHENT_PREFIX=' ' in init.ora file 3.$ connect '/ as sysdba' 4. > startup 5.> create user username(OS level userid created by admin) identified externall y; 6.>grant connect, resource to username; 7.dbs$ sqlplus / 8. $username connect / as sysdba 9. startup force For DB level authentication: 1. set REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE in init.ora file 2. dbs$orapwd file=orapw$ORACLE_SID password=sys force=y 3. startup force; 4. grant sysdba to user(any user in the database); 5. conn user/user 6. conn user/user as sysdba 7. sho user ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ RE: Whats the Concept of Flashback Query? -------------------------------------------------------------------------------It lets you to view and repair historical data.They query the database by TIME o r user specified SCN. It do not UNDO anything . It is only a query mechanism.You can take o/p from flashback query and perform a n undo yourself. It do not work through DDL operation. for example the data before 5 minutes which has lost is repaired asexecute dbms_flashback.enable_at_time(sysdate-5/1440); ............................................ execute dbms_flashback.disable ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++ RE: Oracle log switch question -------------------------------------------------------------------------------After logswitch checkpoint accour. It update the hedder of datafile and controlfile with new SCN no. and checkpoint position. it also give the signal to dbwr to writ dirty buffer to datafile ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ If an Oracle Database has been crashed we can recover the database with SCN. For every commit transaction the SCN will generate. Sql>Alter database recover automatic using backup controlfile until SCN;

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++ Datafile media recovery or media recovery is used when we need to recover datafi le, controlfile or spfiles( server parameter file) .Crash recovery is the recovery of a database in a single-instance configuration or an Oracle Real Application Clusters configuration in which all instances have crashed.Like crash recovery Oracle will not initiate media recovery on its own, it must be demanded by a DBA only. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++ Steps are NOMOUNT STAGE SGA is allocated background processes are started Alert log file is opened Mount Stage controlfiles is read name & location of the daatfiles, logfiles are detected Open Stage files are opened ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++ There are four types of shutdown Shutdown Normal - Normal is the default mode, here new user can't logon to the d atabase, but the current user can start the new transaction and work till he wants, the database shutdown only after the last user logs off. Shutdown Transactional - here new user can't logon to the database, and the curr ent user can't start the new transaction, once the current transaction complets, database shutdown. Shutdown Immediate - here new user can't logon to the database, user can't start the new transaction, the current transactions rolls back, and database shutdown. Shutdown Abort - here new user can't logon to the database, user can't start new transaction, the current transaction is not rolled back, database shutdown's. While shutting down oracle updates data file header and control file with the cu rrent checkpoint informanation, Except Shutdown Abort the checkpoint is same in datafile header and control file it means database is consistance and it is c lean shutdown. If the checkpoint is not same at both locations then instance recovery required at next startup. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++ To Enable Restricted Session Alter system enable restricted session; To Disable Restricted Session Alter system disable restricted session; To Start the Database in Restricted Mode STARTUP RESTRICT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++ Generate AWR Report

Oracle provides two scripts to produce workload repository reports (awrrpt.sql a nd awrrpti.sql). @$ORACLE_HOME/rdbms/admin/awrrpt.sql @$ORACLE_HOME/rdbms/admin/awrrpti.sql Note: awrrpt.sql & awrrpti.sql are exactly same except that awrrpti report allo ws specific instance to report on. awrrpti.sql asks to enter dbid for particular instance of interest. STATISTICS_LEVEL should be set to TYPICAL or ALL Oracle now provides automatic performance tuning capabilities, the heart of this function is the new statistics collection facility the automatic workload repository (AWR), which automatically collects and stores statistical data in the sysaux tablespace. ADDM ranks both the problems and its recommendations according to the crucial DB time stati stic.AWR collects new performance statistics in the form of hourly snapshots (MMON processes the AWR request) and saves these to the sysa ux tablespace, it is a snapshot shot of a single point in time. Every time AWR runs ADDM will automatically does a top-down system analysi s and reports its findings on the database control home page