Skip to main content
0 online

Just starting Oracle 10g LOCKED

theremin by thereminOG 2002 · Nov 2, 2006 · 159 views · ·

Locked Thread

This thread is locked. New replies are not allowed.

I'm just starting Oracle (So don't laugh).

I need to run a script. It's a prewritten script. Well, I'm gonna run this from SQL Plus.

Okay, I launched SQL Plus, and logged in.

At the SQL> prompt ..

I type "start C:\Documents and Settings\blah\Desktop\CISxxxx\CISxxxx\Data\Ch02\prech02.sql"

The script doesn't run, just tells me SP2-0310: unable to open file "C:\Documents.sql"

What am I doing wrong?

23 Comments

theremin thereminOG 2002 ·

How to use storage...

I'm using the following command:

CREATE TABLE CH07NEW_ADDRESSES
OF CUSTOMER_ADDRESS_TYPE

because I'm creating an object table, but next I want the table to have 10MB of storage and room for rows to double in size when they are update

so I know it should like this so far..
CREATE TABLE CH07NEW_ADDRESSES
OF CUSTOMER_ADDRESS_TYPE
TABLESPACE USER_DTAB
STORAGE

but how should the code after "STORAGE" read?

G
gizmoEst. 2006 ·

From the docs the syntax of the storage clause is:

STORAGE
({ INITIAL size_clause
| NEXT size_clause
| MINEXTENTS integer
| MAXEXTENTS { integer | UNLIMITED }
| PCTINCREASE integer
| FREELISTS integer
| FREELIST GROUPS integer
| OPTIMAL [ size_clause
| NULL
]
| BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
}
[ INITIAL size_clause
| NEXT size_clause
| MINEXTENTS integer
| MAXEXTENTS { integer | UNLIMITED }
| PCTINCREASE integer
| FREELISTS integer
| FREELIST GROUPS integer
| OPTIMAL [ size_clause
| NULL
]
| BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
]...
)

I'm not sure exactly what you meant by your statement "room for rows to double in size when they are update", but I assume you at least want something like:

STORAGE (INITIAL 10240K NEXT 10240K PCTINCREASE 0)

theremin thereminOG 2002 ·

Thanks. You know what you're talking about more than me, but it wouldn't read as:

CREATE TABLE CH07NEW_ADDRESSES
OF CUSTOMER_ADDRESS_TYPE
TABLESPACE USER_DTAB
STORAGE (INITIAL 10M NEXT 10M PCTINCREASE 200);

G
gizmoEst. 2006 ·

PCTINCREASE determines how fast the size of the next extent to be added gets increased. So in your example, the initial extent would be 10M, the second would be 10M, the third would be 30M, the fourth 90M, etc...

Again, I'm not sure what your looking for, but that's how what you wrote would be interpreted.

theremin thereminOG 2002 ·

Oh gotcha. So if I do:

STORAGE (INITIAL 10M NEXT 10M PCTINCREASE 0)

The initial extent is 10M, second 20M, third 40M, fourth 80M ??

I want to double each time.

G
gizmoEst. 2006 ·

For that you would want

STORAGE (INITIAL 10M NEXT 20M PCTINCREASE 100)

theremin thereminOG 2002 ·

Ahhh so confusing. Thanks a lot.

theremin thereminOG 2002 ·

Where can "Schema Manager" be found in 10g? Being the EM is browser based and not a console window. Is there a Schema Mgr in 10g?

What I want to do is find a table in a schema called blah. I have to display the DDL command that created the table using this schema gr method.

But, if there is not a schema manager in 10g (the book seems to have been written for a previous version of Oracle) then can this same task be done a different way, like within SQL Plus?

iwz iwz ·

have you looked into using Toad?
http://www.toadsoft.com/toad_oracle.htm

theremin thereminOG 2002 ·

Haven't.

theremin thereminOG 2002 ·

I tried doing via command in SQL Plus window this way but doesn't work:

SQL> SELECT DBMS_METADATA.GET_DDL('TABLE', WANT_AD) FROM CLASSMATES;
SELECT DBMS_METADATA.GET_DDL('TABLE', WANT_AD) FROM CLASSMATES
*
ERROR at line 1:
ORA-00942: table or view does not exist

theremin thereminOG 2002 ·

WANT_AD is the table and CLASSMATE is the schema. How do I display the DLL command that created the table?

iwz iwz ·

no idea

iwz iwz ·

all i know is in SQL Navigator, you can right click on a table and say Extract DDL

theremin thereminOG 2002 ·

Where's SQL Navigator? Is that even in 10g?

iwz iwz ·

it's a 3rd party app that we purchased years and years ago

theremin thereminOG 2002 ·

hrm. I was looking for a free solution. A free, simple solution.

iwz iwz · theremin

that's why i recommended Toad.

theremin thereminOG 2002 ·

okay, I'm in Enterprise Manager browser window. Clicked "Tables" link under "Schema," when the search field came up on the next page, I typed in the Schema box, the appropiate schema name, Click on "Go", clicked the radio button for the table I want.

Now, how do display the DDL command that created the table?

G
gizmoEst. 2006 ·

Why do you need the exact DDL command? What information are you trying to extract?

theremin thereminOG 2002 ·

I don't know. Whatever's there.

theremin thereminOG 2002 ·

Okay thanks. I couldn't understand why on Earth it wouldn't run, when I knew I had the path right. What I ended up doing was just moving the script so that the new path would allow me to simply just do start c:\filename

Found out on a web site that SQL PLUS also doesn't need the period and extenstion typed. Strange.

Thanks Ian.

I'll most likely have other questions today. I'll post as the obstacles happen.

iwz iwz ·

It doesn't like the spaces in your path, so all it sees is C:\Documents, and it's adding the .sql on the end, thinking that you probably are trying to run start C:\Documents.sql.

You can try this:
start "C:\Documents and Settings\blah\Desktop\CISxxxx\CISxxxx\Data\Ch02\prech02.sql"

or just move the CISxxxx folder into a directory path with no spaces, like C:\CISxxxx and then run it from there.

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.

💎

Gems

Spot something you love — a legendary comment, a classic thread, a great photo? Log in and click the diamond icon to mark it as a Gem. Add a note about why it's special. The best stuff surfaces on the Gems page.