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