"Connect user/pass" is a SQL*Plus command, not a SQL or PL/SQL command, you cannot use it outside SQL*Plus.