PL/SQL (MOSC)

MOSC Banner

SP2-1506: START, @ or @@ command has no arguments

Oracle 19c on AIX ncruxdb353 


I`m creating a bash script, within that script I use a sqlplus command to verify that I`m in the correct PDB before running a script.

SET SERVEROUTPUT ON SIZE 1000000;

DECLARE

l_script varchar2(150);

  pdb_name varchar2(20);

BEGIN

l_script := '/home/oracle/scripts/auto_scripts/OCI/PROSA/cr_tbs_script.sql';

  SELECT name into pdb_name FROM v$pdbs;


case pdb_name

WHEN 'PROSA' THEN


    l_script := '/test/cr_tbs_script.sql';

END CASE;

DBMS_OUTPUT.PUT_LINE( l_script );


END;

/


@&l_script


When I run it, the DBMS_OUTPUT show the proper path for the script. But when it tries to run it, it request for the value of l_script and then error SP2-1506: START, @ or @@ command has no arguments

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center