Resolution: Place your .sql extension file with the script at a particular folder in your system.
Now go to run and open sqlplus. Connect as a user with SYSDBA or DBA privileges since it is highly likely that this scripts will contain DDL statements like create, alter, or drop.
After connecting to SQLPlus as SYSDBA user, Enter the following in the command line
SQL > @PATH/FILENAME.sql
where PATH specifies the path where the sql file resides and FILENAME the name of the sql file script to be executed. We created a sql script named test.sql with content as shown below.
Sample SQL Script |
SQL Script output after execution |
No comments:
Post a Comment