Jagan
Jagan

Reputation: 4897

How to run PL/SQL program in Oracle10g for Linux

BEGIN
  dbms_output.put_line('Welcome to PL/SQL');
END;
/

I have this code in sample.sql file.
How to run sample.sql?

Upvotes: 1

Views: 11190

Answers (1)

Peter Lang
Peter Lang

Reputation: 55624

You can run it using SQL*Plus (using your username/password and the name of your instance):

sqlplus username/password@instance @ sample.sql

Another way would be to download free SQL Developer from Oracle, open and execute the file there.


Note that the text will not be displayed per default, you need to enable the output before.

Put the following line into your file as first line:

SET SERVEROUTPUT ON

Upvotes: 9

Related Questions