Wikipedia

Search results

Oracle 11g database datafile addition to ASM without '+' sign

If you miss the '+' sign, there will be several scenarios:
  1. db_create_file_dest is set and points to ASM (i.e: +DATA): The database will take 'DATA' as an alias and will create ASM file on the destination associated with the 'DATA' alias that will be located at the ASM +DATA root directory.
  2. db_create_file_dest is set and points to filesystem: It should be quite obvious that you'll have a new 'DATA' file in the location pointed at the parameter.
  3. db_create_file_dest is not set (worst scenario): The database will default to $ORACLE_HOME/dbs and create a datafile there with the name 'DATA'.
A final piece of advice: Set the db_create_file_dest to point to the ASM DATA disk group and remove the datafile name parameter from your command:
alter tablespace AKDATA add datafile size 100M AUTOEXTEND ON;
As you may know, even if you give a name to the datafile, when it's created on ASM, that name becomes an alias and the real filename is set by the ASM instance itself. 

Please comment if you have any other scenario and solution to offer. 

Upgrade interview questions oracle database

Upgrade interview questions oracle database

1. Oracle database upgrade from version to version.
* Direct upgrade to Oracle 10g is only supported if your database is running one of the following releases: 8.0.6, 8.1.7, 9.0.1, or 9.2.0. If not, you will have to upgrade the database to one of these releases or use a different upgrade option (like export/ import).
* Direct upgrades to 11g are possible from existing databases with versions 9.2.0.4+, 10.1.0.2+ or 10.2.0.1+. Upgrades from other versions are supported only via intermediate upgrades to a supported upgrade version.

2. What is rolling upgrade?
It is a new ASM feature from Database 11g.ASM instances in Oracle database 11g release(from 11.1) can be upgraded or patched using rolling upgrade feature. This enables us to patch or upgrade ASM nodes in a clustered environment without affecting database availability.During a rolling upgrade we can maintain a functional cluster while one or more of the nodes in the cluster are running in different software versions.Rolling upgrade can be used only for Oracle database 11g releases(from 11.1).

3.Steps to Upgrade in Oracle ?
Manual upgrade which involves the following steps:
* Backup the database.
* In UNIX/Linux environments, set the $ORACLE_HOME and $PATH variables to point to the new    11g Oracle home.
* Analyze the existing instance using the "$ORACLE_HOME/rdbms/admin/utlu111i.sql" script.
* Start the original database using the STARTUP UPGRADE command and proceed with the     upgrade by running the "$ORACLE_HOME/rdbms/admin/catupgrd.sql" script.
* Recompile invalid objects.
* Restart the database.
* Run the "$ORACLE_HOME/rdbms/admin/utlu111s.sql" script and check the result of the upgrade.
* Troubleshoot any issues or abort the upgrade.

4. What happens when you give "STARTUP UPGRADE"?
$sqlplus "/as sysdba"
SQL> STARTUP UPGRADE

Note: The UPGRADE keyword enables you to open a database based on an earlier Oracle Database release. It also restricts logons to AS SYSDBAsessions, disables system triggers, and performs additional operations that prepare the environment for the upgrade.
You might be required to use the PFILE option to specify the location of your initialization parameter file.
Once the database is started in upgrade mode, only queries on fixed views execute without errors until after the catupgrd.sql script is run. Before running catupgrd.sql, queries on any other view or the use of PL/SQL returns an error.

5.What is the difference between startup Upgrade and Migrate ?
STARTUP MIGRATE:
Used to upgrade a database till 9i.

STARTUP UPGRADE:
From 10G  we are using startup upgrade to upgrade database.

6. What happens internally when you use startup upgrade/migrate?
It will adjust few database (init) parameters (irrespective of what you have defined) automatically to certain values in order to run upgrade scripts smoothly.
In other way,it will issue few alter statements to set certain parameters which are required to complete the upgrade scripts without any issues.

What is the difference between normal startup and startup upgrade?

[Applicable for oracle 10g.]
The answer is same for both the questions. 
Basically startup upgrade will open the database by setting the below parameters in memory.(not for spfile)
ALTER SYSTEM enable restricted session;
ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;
ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;
ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;
ALTER SYSTEM SET resource_manager_plan=” SCOPE=MEMORY;
It will be just a normal database startup, but it will make an environment for migrating the version.
Alert log will show all these details:
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Autotune of undo retention is turned on. 
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
—————————————————
—————————————————
Mon Mar 25 19:54:01 2013
Database mounted in Exclusive Mode
Completed: ALTER DATABASE   MOUNT
Mon Mar 25 19:54:02 2013
ALTER DATABASE OPEN MIGRATE
Mon Mar 25 19:54:02 2013
————————————————-
————————————————-
Starting background process MMNL
MMNL started with pid=12, OS id=2536
Mon Mar 25 19:54:14 2013
ALTER SYSTEM enable restricted session;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
Autotune of undo retention is turned off. 
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;
Mon Mar 25 19:54:14 2013
ALTER SYSTEM SET resource_manager_plan=” SCOPE=MEMORY;
replication_dependency_tracking turned off (no async multimaster replication found)
Completed: ALTER DATABASE OPEN MIGRATE