Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to create a table in a script?

Re: How to create a table in a script?

From: Vitaliy Mogilevskiy <vit100gain_at_earthlink.net>
Date: Tue, 04 May 1999 12:07:48 -0700
Message-ID: <372F4584.EF63CDBE@earthlink.net>


If you already have all objects created in the Oracle Database you can use Oracle's export/import utlity. If you have scripts that you need to run to load your objects in Oracle Database then you have to place them in one file called load.sql for example, go to SQLPLUS log on to the database as a new user which will own all the new objects, and run load.sql by entering: SQL>@<path_to_your_file>\load.sql

It should work, if not make sure your file is just pure text.

+--------------------------------------------------------------------------+

| Vitaliy Mogilevskiy
| Senior Consultant
| CORE Technology Group, Inc.
| E-mail:    vit100gain_at_earthlink.net
| Fax :      (707) 516-2163
| Web Page:  http://home.earthlink.net/~vit100gain/index.html

|            *** Free DBA Script Library at my Web Page ***
|

| "Never wrestle a pig - you both get dirty and the pig likes it..." | "If the only tool you have is a hammer, everything looks like a nail..."
+--------------------------------------------------------------------------+




Arno van Rossum wrote:

> Hello all,
>
> This may be an easy question (I hope so :-) but I can't find the answer.
> We used to use MS SQL server and a script to recreate all our tables in
> a the database.
>
> Now we've switched to oracle and I've converted all ms-sql to oracle
> understandable sql-statements. All works fine when i run the create
> statements one by one, but I would like to use a script or batch file to
> create all tables, stored procedures and constraints.
>
> I've put them all in one file, separated by ; but then sql*plus doesn't
> create all tables saying "input to long" or something alike. (All buffer
> settings in the enviremont of sql*plus are at the max.) Then I tried
> pl/sql, but that doesn't work either. Documentation says you can't use
> create and alter within pl/sql.
>
> Does anyone know an simple (easy :-) way how to do this?
>
> Thanks
>
> Arno van Rossum
> a.van.rossum_at_mmp-obec.nl
Received on Tue May 04 1999 - 14:07:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US