THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

Creating a test database in 5 minutes

What is the most boring part of being a DBA? Many of us reply with “installing and creating a database”. Really, that is not true, at least not creating a database. If you think create database is a boring ad-hoc work and takes a whole day to do, that is because you used wrong tool or you misunderstood what is going on.

DBCA is what you need to create a test database in only 5 mins.

You don’t need X windows
You don’t need VNC
All you need is DBCA

The next time you are in the following familiar scenario:

Boss: I want a database to test the new application, do it ASAP!

You can reply 5 minutes later:

DBA: Boss, here’s your database!

Sounds cool? Here it is:

Syntax:

dbca -Silent -CreateDatabase -gdbName $you_oracle_db_name -templateName $template_name [-characterSet] [-nationalCharacterSet] [-datafileDestination] [-databaseType] ....

Tip:

dbca -h

will show you how to explore the power of DBCA!

Example: 5 minute database creation



C:\>%oracle_home%\bin\dbca -Silent -createDatabase -gdbName myoracle -templateName %oracle_home%\assistants\dbca\templates\General_Purpose.dbc -characterSet WE8MSWIN1252 -nationalCharacterSet ALU32UTF16 -datafileDestination c:\temp -databaseType MULTIPURPOSE
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "c:\oracle\product\1020\cfgtoollogs\dbca\myoracle\myoracle0.log" for further details.


4 Responses

  1. Surachart says:

    thank you. that’s fun…;)

  2. Toni says:

    Awsome… thanks !

  3. Dan says:

    Have you tried to create your own seed db along with the customzied template? Yes, we can always use rman to clone a db, but just feel using dbca has more fun.

    Thanks.

  4. Shakir Sadikali says:

    For more silent install fun, i urge everyone to look at Gregory Guillou’s series on RAC install, de-install, and everything in between using DBCA almost exclusively.

Leave a Reply

Start NowWith Pythian - database design, management and emergency handling capabilities...

Live Updates

pythian: RT @sheeri: #confoo talk "Bending Queries to your Will with EXPLAIN" slides http://bit.ly/explainslides & handout
more



Testimonials

  • Serge Racine

    DBA, Brookfield Energy

    We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more