Cross Column

Showing posts with label Global Database Name. Show all posts
Showing posts with label Global Database Name. Show all posts

Tuesday, January 15, 2013

Using Database Configuration Assistant to Create Additional Databases

During Oracle Database installation, if you choose to create a starter database (see also [1]), Oracle Universal Installer automatically runs Database Configuration Assistant (DBCA) after software installation is complete. DBCA then guides you through the steps to create the database.

If you do not create a starter database and later want to create one, or if you want to create additional databases, then you use DBCA.  The Database Configuration Assistant enables you to
  • Create a database
  • Configure database options in an existing database
  • Delete a database
  • Manage database templates

There may be situations in which you want to create more than one Oracle database on the same host 
computer. When you do this with DBCA, the new databases typically  use the same Oracle home directory as the first database, but store database data files separately from those of the first database.

In [1], we describe the steps that we used to install a starter database with a Global Database Name (GDNSTAGE7.  In this article, we will show how to add a new database (GDN: ATGOID) in the same Oracle home directory.


Steps


Here are our steps to create a new database named ATGOID using DBCA.  Note that highlighted options are our selections.  For more detailed descriptions, read [2].
  1. Welcome
  2. Operations
    • Select the operation that you want to perform:
      • Create a Database
      • Configure Database Options
      • Delete a Database
      • Manage Tempaltes
    • ASM configuration operations must be performed using Automatic Storage Management Configuration Assistant (ASMCA) from Oracle Grid Infrastructure home.
  3. Database Templates
    • Select template to use for creation
      • General Purpose or Transaction Processing
      • Custom Database
      • Data Warehouse
  4. Database Identification
    • See Figure 1 (note that we didn't specify domain name here)
    • Global Database Name: ATGOID
    • SID: ATGOID
  5. Management Options
    • Uncheck "Configure Enterprise Manager"
    • We don't need this option for our benchmark
  6. Database Credentials
    • Specify passwords for the following user accounts in the new database:
      • SYS
      • SYSTEM
  7. Network Configuration
    • Select the listeners for which you want to register this database:
      • Register this database with all the listeners
      • Register this database with selected listeners only
    • Note that we have created a new listener ATGOID using Net Configuration Assistant[3]
  8. Database File Locations
    • Specify storage type and locations for database files:
      • Storage Type: File System
      • Storage Locations:
        • Use Database File Locations from Template
        • Use Common Location for All Database Files
        • Use Oracle-Managed Files
  9. Recovery Configuration
    • Specify Fast Recovery Area (Default)
  10. Database Content
    • Default
  11. Initialization Parameters
    • Typical (Default)
  12. Database Storage
    • You can specify storage parameters for database creation.  (Default)
  13. Creation Options
    • Select the database creation options
      • Create Database
      • Save as a Database Template
      • Generate Database Creation Scripts
    • Generate Database Creation Scripts

Log File Location


Log files for the current operation are located at:
  • $ORACLE_BASE/cfgtools/dbca/ATGOID

What to Expect?


After the creation of a new database, you should find the following information:
Database Information:
Global Database Name: ATGOID
System Identifier(SID): ATGOID
Server Parameter File name:  $ORACLE_HOME/dbs/spfileATGOID.ora

If you look into initATGOID.ora, you can also find the following two entries:
*.db_domain=''
*.db_name='ATGOID'
Note that the domain name is an empty string because we didn't provide domain name at step 4.

References

  1. Installing Oracle Database 11g Release 2
  2. Oracle® Database 2 Day DBA 11g Release 1 (11.1)
  3. Using Net Configuration Assistant to Configure a Listener

Monday, January 7, 2013

Global Database Name in Oracle Database 11g

When you install a new Oracle Database (see [1]), you are asked to provide the Global database name as shown below:


In a distributed database system, each database should have a unique global database name. Global database names uniquely identify a database in the system. For example, if global naming is enforced by the remote database, you must use the remote database global database name as the name of the database link that you are creating.

In this article, we will examine the following topics:
  • How to check if global naming is enforced?
  • How to view different names?
  • How to change the domain name in a global database name?

How to check if global naming is enforced?


To determine whether global naming on a database is enforced on a database, you can either examine the database initialization parameter file or query the V$PARAMETER view. For example, to see whether global naming is enforced on the remote database, you could start a session on the remote database and then create and execute the following globalnames.sql script (sample output included):

COL NAME FORMAT A12
COL VALUE FORMAT A6
SELECT NAME, VALUE FROM V$PARAMETER
   WHERE NAME = 'global_names'
/

SQL> @globalnames

NAME         VALUE
------------ ------
global_names FALSE


Note that global naming is not enabled by default when you install a new Oracle database.  In other words, you won't find the parameter global_names in the new initialization parameter file.

Global Database Name


In our installation, we have used "orcl.us.oracle.com" as the global  database name, which is composed of two components:
  • DB_NAME
    • "orcl"
  • DB_DOMAIN
    • "us.oracle.com"  (must follow standard Internet conventions)
You can find this piece of information in your initialization parameter file:

*.db_domain='us.oracle.com'
*.db_name='orcl'

How to query different names?


If a database instance is created, you should be able to find out all different names from the data dictionary:
  • DB_NAME
    • SQL> select name from v$database;

      NAME
      ---------
      ORCL

  • DB_DOMAIN
    • SQL> SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = 'db_domain';

      NAME      VALUE
      --------- -----------
      db_domain us.oracle.com
  • GLOBAL_NAME
    • SQL>SELECT * FROM GLOBAL_NAME;

      GLOBAL_NAME
      -------------------
      ORCL.US.ORACLE.COM

How to change domain name?


The db_domain initialization parameter is only important at database creation time when it is used, together with the db_name parameter, to form the database global name. At this point, the database global name is stored in the data dictionary. You must change the global name using an ALTER DATABASE statement, not by altering the db_domain parameter in the initialization parameter file. It is good practice, however, to change the db_domain  arameter to reflect the change in the domain name before the next database startup.

For more details on how to change the domain in a global database name, you can read [2].

References

  1. Installing Oracle Database 11g Release 2
  2. Managing Global Names in a Distributed System
  3. How to Change DB_NAME & ORACLE_SID
  4. Using Database Configuration Assistant to Create Additional Databases
  5. Using Net Configuration Assistant to Configure a Listener

© Travel for Life Guide. All Rights Reserved.

Analytical Insights on Health, Culture, and Security.