Solved

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

Posted on 2014-07-30
19
1,989 Views
Last Modified: 2014-08-01
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:
demo\schema folder
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.
sample schemas per documentation
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
0
Comment
Question by:Alaska Cowboy
  • 9
  • 8
  • 2
19 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
Look in the folders themselves.

For example: HR_MAIN shouldbe under human_resources
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 150 total points
Comment Utility
You might need to download them separately depending on what database product you downloaded and installed.

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html

Oracle Database 11g Release 2 Examples
        Download       win32_11gR2_examples.zip (565,154,740 bytes)

Contains examples of how to use the Oracle Database. Download if you are new to Oracle and want to try some of the examples presented in the Documentation
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 150 total points
Comment Utility
forgot this:

>>but I assume I first have to set up the tablespace(s) ? I've never done this . . .

No.  You get what 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 tablesapces.

for example: separating tables from indexes, large tables from small tables, etc...
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
>>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" ?
0
 
LVL 34

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 100 total points
Comment Utility
>>So then this is all I need to do: "CREATE USER smithj IDENTIFIED BY pwd4smithj" ?

Yes, if what you want to do is create a customer user account named "smithj".  The "create user..." command in Oracle (like the "create table..." command and many other SQL commands) would allow you to specify additional options for this user.  But, if you don't specify these other options, Oracle will simply use default values for them.

This user account can become a schema, if you create one or more tables or other objects as this user, or for this user.

Be aware that one of the advantages of Oracle is that it is very tunable and configurable.  This allows Oracle databases to perform very efficiently on a huge range of: servers, storage systems, applications, number of users, etc.  A disavantage of Oracle is that unless you spend time configuring and tuning the database for your server and storage hardware, type of application, number of users, number of records, etc., the performance you get from Oracle may be disappointing, as you start to add data, especially if you depend on mostly default values.
0
 
LVL 34

Expert Comment

by:Mark Geerlings
Comment Utility
Oops!  I intended that first sentence to read: "Yes, if what you want to do is create a custom [not customer] user account named ..."
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
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.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>>-- 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;
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
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:

HR schema from documentation
So I'm kind of back to square one - I need the scripts for the sample d.b.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
The file hr_main.sql wasn't contained in that zip file anywhere?  For 500 Meg, it had to contain something...
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
hr_main.sql nowhere to be found . . . :-(

not in my installed "demo\schema" folder nor in the zip file you posted . . .
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
This seems to be common, here. None of them had a resolution without a companion CD.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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.
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
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.
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 150 total points
Comment Utility
I would not download and install anything for Oracle that did not come from Oracle.  You have no idea of their validity.  They may exploit vulnerabilities and compromise your system.

I re-ran my installer.  Take a look at the pic below.  This is what I have installed.

maybe this?
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
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 !
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>>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!!!
0
 
LVL 1

Author Comment

by:Alaska Cowboy
Comment Utility
>>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".
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>> 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.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now