Just starting Oracle 10g LOCKED
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?
AI Summary
23 Comments
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?
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)
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);
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.
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.
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?
have you looked into using Toad?
http://www.toadsoft.com/toad_oracle.htm
Haven't.
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
WANT_AD is the table and CLASSMATE is the schema. How do I display the DLL command that created the table?
no idea
all i know is in SQL Navigator, you can right click on a table and say Extract DDL
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?
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.
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.
by