Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to create the seed database?

Re: How to create the seed database?

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Mon, 06 Oct 2003 20:49:57 +1000
Message-ID: <3f81496f$0$32142$afc38c87@news.optusnet.com.au>


Peter wrote:

> On Mon, 06 Oct 2003 10:00:23 GMT, Peter <peter_at_nomorenewspamin.ca>
> wrote:
>
> I couldn't find my starter database.
> From within Oracle Universal Installer, the Oracle starter database is
> listed as an "installed product" which is supposed to be in the folder
> oracle_home\ora92_rdbms_seeddb
> But I cannot find the folder. Can I reinstall only the oracle starter
> database with reinstalling the whole Oracle?
>

>>How do you  create the seed HR database after the installation of
>>Oracle9i on Windows platform?
>>Is there a way of using DBCA to create the HR seed database?
>>
>>Thanks

OK, backup a bit. You're on Windows, you've just installed Oracle, and you're wondering where your 'seed database' is.

First, check you've got one (because you might conceivably have taken the 'software only' installation option, in which case you won't have one). Open the Control Panel, find the Services applet, and check what services you've got listed starting with the word 'Oracle'. You should have ones such as OracleTNSListener, OracleIntelligentAgent and so on... none of which mean anything in this context. But hopefully, and more to the point, you should have one called OracleServiceXXXX. If you've got one of those, you've got yourself a seed database.

The 'XXXX' there will be the name of your database. Depends what you specified, if you did. But make a note of it, because you'll need to know it. Assume for the rest of this post that it's 'ORCL'. Oh, and make sure that service is running ("Started").

Open up a DOS window, and type:

sqlplus "/ as sysdba"

You should get a message saying simply 'Connected'. So now type:

select * from v$database;

...and in the middle of all the junk that you then see, you should see a column called DBNAME (from memory)... and that should be displaying 'ORCL' (or whatever you got for your earlier XXXX. And that's how you connect (and find) your seed database.

So then you can see whether you have the HR sample data or not (if you created a database from one of Oracle's own templates, then you should do).

First thing: still in SQL*Plus, type:

select username from dba_users;

Hopefully, you'll see one listed there, called 'HR'.

Now try:

select * from dba_tables where owner='HR';

That should list you things like 'EMPLOYEES': what you're seeing is a complete list of HR's schema, and EMPLOYEES is one table within that schema.

Next, you might try:

select * from hr.employees;

And that should prove the table is full of data.

When Oracle creates databases for you these days, ssample accounts like HR are locked and have no password. So if you want to log on as HR, you'll have to sort that out:

alter user HR identified by <new_password> account unlock;

All of which assumes you have a database of course. If you don't then yes, you use DBCA to create one (and no, that doesn't mean re-installing Oracle). Just open a DOS window and type 'dbca' (without the quotes) and follow the wizard through. When you get to the bit about naming a database, remember to specify a fully-qualified name. Instead of just typing 'ORCL' as the database name, supply 'ORCL.domain.local' (or supply a proper domain if you have one; or make one up if you don't). The SID on the same screen is just the domain-less part of that full name, so that really would be just ORCL (or whatever other name you fancy, up to 8 characters long).

Hope that's enough to get you started, anyway.

Regards
HJR Received on Mon Oct 06 2003 - 05:49:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US