1

Forgive me I just learned Oracle. There exist so many terminologies in the Oracle world.

Regarding the concept of database and instance. I already know some differences between them.

The Oracle database includes all the physical files belonging to the server while the Oracle instance will provide the interface between the user and the data he wants to manipulate.

But I want to know which one is created first?

I had thought the database should be created first, before the instance. But after I read this post Creating a Database with the CREATE DATABASE Statement I think I am.

Because the manual shows theses instructions:

Step 5: (Windows Only) Create an Instance
Step 9: Issue the CREATE DATABASE Statement

Please help me to clarify it.

3

Introduction to the Oracle Database Instance

A database instance is a set of memory structures that manage database files. A database is a set of physical files on disk created by the CREATE DATABASE statement. The instance manages its associated data and serves the users of the database.

Every running Oracle database is associated with at least one Oracle database instance. Because an instance exists in memory and a database exists on disk, an instance can exist without a database and a database can exist without an instance.

A database can exist without an instance, but to use that database, you need to start an instance, then mount and open the database in it.

You can "create" a database by simply copying the files of an existing database. You do not need an instance for that. But to use that database, you need an instance.

If you want to create a database from scratch, you need a running instance first.

0

In simple words, Instance is created first. Because when you create database manually, you start the instance first in no mount state and run the script for creating database. Another point to support my answer, access to Oracle database or creation of it is impossible without an instance.

0

Instance can not be created, it can "only" be started. Instance is something which is running.

oradim is something Windows specific. It creates a record in Windows SERVICE registry, to start the instance during the boot. So in fact oradim does not create an instance, it creates a Windows service associated with the database (instance).

  • Sorry, Is that true? As the help document said. Every running Oracle database is associated with at least one Oracle database instance. . So the instance must be created. and of course. after it was created. it can be started. If I am wrong. Please help to correct me. Thanks. – Joe.wang Jun 22 '16 at 9:04
  • and in the link which I posted in my question. we can use oradim -NEW -SID sid -STARTMODE MANUAL -PFILE pfile to create instance. Right?Thanks. – Joe.wang Jun 22 '16 at 9:07
  • 1st you start the instance using startup nomount statement. At this moment you have plain instance (processes and shared memory segments), but no constrolfiles, no datafiles, no catalog (internal metadata). Then you execute CREATE DATABASE statement and a new database is created. – ibre5041 Jun 22 '16 at 9:12
  • yes. Before we can startup nomount to start an instance, we have to use oradim utility to create the instance. Right? Thanks. – Joe.wang Jun 22 '16 at 9:20
  • 1
    oradim is something Windows specific. It creates a record in Windows SERVICE registry, to start the instance during the boot. So in fact oradim does not create an instance, it creates a Windows service associated with the database (instance). – ibre5041 Jun 22 '16 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.