Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sample Schemas - sh.costs table rows not inserted

Apoorva S-OracleJan 29 2018 — edited Jan 31 2018

Hi All,

I am trying to install all the sample schemas provided by Oracle.

Everything gets installed fine but only the rows in sh.costs table is not getting inserted.

The error in the log file says:

Snap43.png

Edit 2: I got the above error when I ran the @mksample script while keeping teh sh connection open in SQL Developer. When I closed all connections and ran the script again, I got the following error:

Snap45.png

Please help! I need this table for usage.

Thanks in advance

-Apoorva

This post has been answered by Apoorva S-Oracle on Jan 30 2018
Jump to Answer

Comments

SeánMacGC

Hello, have you tried to rebuild the SH.TIMES_PK index?

Apoorva S-Oracle

HI,

It turns out that the error is different.

I got the above error when I ran the @mksample script while keeping the sh connection open in SQL Developer.

When I closed all connections and ran the script again, I got the following error:

Snap45.png

SeánMacGC

So is this a SQL Developer issue? I.e., is the $ORACLE_HOME environment variable set?

MsJ

Bug 21179055 - EXTERNAL TABLE PREPROCESSOR DOESN'T WORK IN WINDOWS

JohnWatson2

Are you running the correct scripts? The ones in your OH/demo/schema won't work, you have to download them from github.com. This is in the docs.

Incidentally, I;m always surprised when I see Oracle staff asking for help on the public forum. When I worked for Larry, I would have died of embarrassment before doing that 

Apoorva S-Oracle

Hi,

Of course! I have downloaded the latest files from GitHub.

Also, I don't see why one should be embarrassed to seek help and learn. I am not I hope you grow out of such psuedo-prestige.

Thanks

-Apoorva

Apoorva S-Oracle

Hi,

I am using Linux. Also, I have given rwx permissions to all folders in the sample schema.

Apoorva S-Oracle

No, I am running the script from SQL*Plus.

Yes, $ORACLE_HOME is set.

Apoorva S-Oracle
Answer

The problem is resolved!

I dropped all the schemas, set oraenv again and then ran @mksample script.

This created all the schemas without any error.

Thanks for all the help

Marked as Answer by Apoorva S-Oracle · Sep 27 2020
JohnWatson2

If you look at the scripts, you'll see that it drops all the schemas. That is why your first attempt failed: you had a session logged on as SH, so the DROP didn't happen.

Possibly second time it was a permissions problem that was fixed at some point.

Apoorva S-Oracle

Hi,

Yes, you are right. The @mksample script actually drops and creates the schema again. Hence I was not dropping all schemas separately. But when I ran the @drop_sch script before running @mksample, it worked fine.

1 - 12
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 28 2018
Added on Jan 29 2018
12 comments
545 views