troubleshooting Question

questions on running sample schema scripts for Oracle on Windows 7

Avatar of Wm Peck 1958
Wm Peck 1958Flag for United States of America asked on
Oracle DatabaseWindows 7
12 Comments3 Solutions1426 ViewsLast Modified:
I want to run the sample schemas but have some questions. (Note: I have a good install of Oracle on Windows 7 [OraDB11g_home1, 11.2.0.1.0, but I didn't have all the scripts for the schema, I eventually found them here, so that's what I'm using. They look legit and it was the only place I could find them, despite some help here and on OTN Forums).

So I'm reviewing mksample.sql (attached), which should run everything else (hr_main and oe_main also attached). But some questions:

- the mksample.sql's last comment was 11 years ago . . . so that seems kind of ancient in computer terms . . .
- do I need to specify the default and temp tablespace ? If so, how do I find these ? They are submitted as a parameter for the main scripts (e.g., hr_main.sql)
PROMPT specify default tablespace as parameter 9:
DEFINE default_ts          = &9
PROMPT
PROMPT specify temporary tablespace as parameter 10:
DEFINE temp_ts             = &10

- for logfile directory, do I just need (something like) this: c:\oracle\schemas\demo\
- In the sql command below, how is the "?" used ?
- can this be run in Windows with the forward slashes (Unix) as opposed to backward slashes (Windows) ? If not, there's too many to change in the called scripts
@?/demo/schema/human_resources/hr_main.sql &&password_hr &&default_ts &&temp_ts &&password_sys &&logfile_dir

In this sql command, the "&&[variable_name]" makes sense, but then it only has one "&" for "&vrs" (at the end), why is that ?
- also, the parameter "%s_oePath% - how is that translated ?
PROMPT 
PROMPT specify password for SYSTEM as parameter 1:
DEFINE password_system     = &1
...
PROMPT
DEFINE vrs = v3
...
@?/demo/schema/order_entry/oe_main.sql &&password_oe &&default_ts &&temp_ts &&password_hr &&password_sys %s_oePath% &&logfile_dir &vrs

Finally, in Sql Developer, it doesn't look like a "command line" interface is available (as it is in Pl*Sql Developer), so then must I run this in Sql Plus (instead of Sql Developer) ?
mksample.sql
hr-main.sql
oe-main.sql
ASKER CERTIFIED SOLUTION
Steve Wales
Senior Database Administrator

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros