Home » RDBMS Server » Server Utilities » Executing DDL in SQL Plus
Executing DDL in SQL Plus [message #70565] Mon, 01 July 2002 00:18 Go to next message
Raj
Messages: 411
Registered: November 1998
Senior Member
I start SQL Plus and set the sql terminator to "~".

I then use the file->load menu to load the <file>.ddl file. The file gets loaded.,

When I type in the "~" character to execute the DDL, I get:

681 ~
);
*
ERROR at line 6;
ORA-00911: invalid character

Line 6 being:
);

When I copy paste the DDL into SQL Plus, I can seem to be able to paste more than 20 lines at a time.

Obviously, SQL*Plus is capable of running big DDL's.

So any pointers to what I am doing wrong would be much appreciated.

Cheers
-raj
Re: Executing DDL in SQL Plus [message #70566 is a reply to message #70565] Mon, 01 July 2002 07:54 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
semicolon ';' is the default sqlterminator mostwidely
used. if you change sqlterminator to tilde '~'  you
must use '~' to terminate the sql. This has nothing to
do with DDL statemnts or DML staments.
SQL> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORKS
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL> set sqlterminator '~'
SQL> select * from dept;
  2  /
select * from dept;
                  *
ERROR at line 1:
ORA-00911: invalid character

SQL> select * from dept~

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORKS
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
Re: Executing DDL in SQL Plus [message #70621 is a reply to message #70565] Mon, 08 July 2002 06:54 Go to previous message
Raj
Messages: 411
Registered: November 1998
Senior Member
I am still unable to run a DDL file (by loading it in) even when I replace all my ";" with "~" in the DDL file.

Does one need to put in something between two

create Table (
)~
create Table (
)~

blocks. I have blank lines between these blocks in my DDL but they seem to disappear when loaded into SQL*Plus. However it works if I copy/paste individual blocks in (rather annoying).

Cheers
-raj
Previous Topic: DBA Studio - UNIX - Internal Password
Next Topic: Data Definition Script
Goto Forum:
  


Current Time: Tue May 07 05:24:55 CDT 2024