Link to home
Start Free TrialLog in
Avatar of Alaska Cowboy
Alaska CowboyFlag for United States of America

asked on

How to install sample Oracle schemas (and tablespace) on Windows 7 ?

I'm trying to understand what I have in my Windows installation vs. this "Sample Schemas" link, plus I want to create my own custom schema and not sure about tablespace setup.

Here's what is in my "demo\schema" folder:
User generated image
The documentation refers to a master script (mksample.sql) which I don't seem to have.

Plus the documentation refers to the following schemas, which are slightly different than what's in my "demo\schema" folder (I don't have PM or IX schema). And I have the Business_Intelligence schema that's not in the documentation.
User generated image
Plus, I don't have "hr_main.sql" as referenced in the documentation. I only have one HR file, "hr_code.sql", attached. So where are the HR tables ? data ?

So I need a little help in understanding this. Also, if I got the schema's set up, where's the data ? I don't see where is the data.

---------
In regard to setting up a custom schema, I see this command:
CREATE USER smithj
  IDENTIFIED BY pwd4smithj
  DEFAULT TABLESPACE tbs_perm_01
  TEMPORARY TABLESPACE tbs_temp_01
  QUOTA 20M on tbs_perm_01;

but I assume I first have to set up the tablespace(s) ? I've never done this . . .
hr-code.sql
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Look in the folders themselves.

For example: HR_MAIN shouldbe under human_resources
SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alaska Cowboy

ASKER

>>Look in the folders themselves. For example: HR_MAIN should be under human_resources
-- that's what I thought, but I only have one file, "hr_code.sql", in the human_resources folder

>>You might need to download them separately
-- ok, I'll download and review

>> You get [the tablespaces that] you need out of the box when a database is created.  You only need to create new ones if you want specific objects in specific tablespaces.
-- So then this is all I need to do: "CREATE USER smithj IDENTIFIED BY pwd4smithj" ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops!  I intended that first sentence to read: "Yes, if what you want to do is create a custom [not customer] user account named ..."
markgeer,

ok, sounds good, thanks for the insight. At my day job I do development and the DBA keeps everything straight :-) But now I'll expand my knowledge base with my home Windows installation.
>>-- So then this is all I need to do: "CREATE USER smithj IDENTIFIED BY pwd4smithj" ?

Not for the sample schemas.  They create their own specific schemas.

You only need to create a new one if you want to create your own objects.

After you create the user you need to grant permission for them to do things.

For users that need to create objects this is typically the resource role so for smithj:
grant create session, resource to smithj;
slightwv,

>>You might need to download them separately --> Oracle Database 11g Release 2 Examples, Download       win32_11gR2_examples.zip (565,154,740 bytes)
-- I downloaded this but it still says "Before you can use the Oracle Database Examples, you must install the Sample Schemas in an Oracle Database", and then it refers me back to the original link that you posted in an earlier post, and from which I got my 2nd screen shot above
-- So I'm still stuck with not having the proper script to create the sample schemas. for example, I don't see mksample.sql as the main script, nor do I see any of these HR scripts anywhere:

User generated image
So I'm kind of back to square one - I need the scripts for the sample d.b.
The file hr_main.sql wasn't contained in that zip file anywhere?  For 500 Meg, it had to contain something...
hr_main.sql nowhere to be found . . . :-(

not in my installed "demo\schema" folder nor in the zip file you posted . . .
This seems to be common, here. None of them had a resolution without a companion CD.
I don't know what to tell you other than to rerun the installer and see if the samples are in the list of things to install.

I have an out-of-the-box Enterprise Edition install and all the sample schema installs are there.
slightwv, ok, I'll look at re-running the installer. I also found this link that seems to have all the files, but I can't figure out how to open / download them.

Will have to pick this up tomorrow afternoon, thanks.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, thanks for posting. But I think that's the "examples" and not the actual schemas.

I did find this link and it looks like it's what I need . . . all the hr files as well as the mksample.sql . . .

it has BI, HR, IX, OE, PM, and Shipping. The documentation has
               HR, IX, OE, PM, SH,

I'll review in more depth before running, won't get back to this until tomorrow afternoon.

Thanks !
>>But I think that's the "examples" and not the actual schemas.

My guess right now is that installs the scripts to allow you to create the sample schemas.

>>I did find this link and it looks like it's what I need

I again warn you against dowloading things from generic sites on the web.  They might contain 'bad' things.  You will run them at your own risk!!!
>>I again warn you against dowloading things from generic sites on the web.
-- yes, proceeding with known risk !

I am working through the scripts now, I have a number of questions on them, but I'll post the questions separately. I set up a new account, so I'll be at "Gadsden Consulting".
>> I set up a new account, so I'll be at "Gadsden Consulting".

Did you work with Experts-Exchange on this?  They frown on duplicate accounts.