Friday, October 31, 2008

How does one rename a database? (For Starter DBA's / Juniors)

How does one rename a database? (For Starter DBA's / Juniors)

Follow these steps to rename a database:

1. Start by making a full database backup of your database (in case you need to restore if this procedure is not working).


2. Execute this command from sqlplus while connected to 'SYS AS SYSDBA':
ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS;

3. Locate the latest dump file in your USER_DUMP_DEST directory (show parameter USER_DUMP_DEST) - rename it to something like dbrename.sql

4. Edit dbrename.sql, remove all headers and comments, and change the database's name. Also change "CREATE CONTROLFILE REUSE ..." to "CREATE CONTROLFILE SET ...".

5. Shutdown the database (use SHUTDOWN NORMAL or IMMEDIATE, don't ABORT!) and run dbrename.sql

6. Rename the database's global name:
ALTER DATABASE RENAME GLOBAL_NAME TO new_db_name;

How does one create a new database? (For Starter DBA's / Juniors)

How does one create a new database? (For Starter DBA's / Juniors)

The purpose of this post to educate Starter DBA's / Junior DBA's as to how easy it is to create a database :)

One can create and modify Oracle databases using the Oracle "dbca" (Database Configuration Assistant) utility. The dbca utility is located in the $ORACLE_HOME/bin directory. The Oracle Universal Installer (oui) normally starts it after installing the database server software to create the starter database.

One can also create databases manually using scripts. This option, however, is falling out of fashion as it is quite involved and error prone. Look at this example for creating and Oracle 9i or higer database:

CONNECT SYS AS SYSDBA

ALTER SYSTEM SET DB_CREATE_FILE_DEST='/u01/oradata/';

ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_1='/u02/oradata/';

ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_2='/u03/oradata/';

CREATE DATABASE;

Installing Oracle Database 10g Release 2 on Linux

Installing Oracle Database 10g Release 2 on Linux

The procedure & steps for "Installing Oracle Database 10g Release 2 on Linux x86" can be found here on this link:

http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html

Build Your Own Oracle RAC 10g Release 2 Cluster on Linux and FireWire

Build Your Own Oracle RAC 10g Release 2 Cluster on Linux and FireWire

One of the most efficient ways to become familiar with Oracle Real Application Clusters (RAC) 10g technology is to have access to an actual Oracle RAC 10g cluster. There's no better way to understand its benefits - including fault tolerance, security, load balancing, and scalability — than to experience them directly. To know more abt this just go thru this link:

http://www.oracle.com/technology/pub/articles/hunter_rac10gr2.html

Oracle Database 10g: The Top 20 Features for DBAs

Oracle Database 10g: The Top 20 Features for DBAs

The can be found at the below given link:

http://www.oracle.com/technology/pub/articles/10gdba/index.html