Arran
Arran

Reputation: 157

SQL Plus SP2-0306 from CONNECT line in SQL file, same credentials work in batch file

SQLPLUS userID/Password@DATABASE @filename.sql

works fine,

SQLPLUS @filename.sql

with the first line of filename.sql being:

CONN userID/Password@DATABASE

even having copy/pasted over the working line of credentials produces SP2-0306: Invalid Option. I cannot find anything related to this that isn't simply incorrect credentials. Any advise would be greatly appreciated.

EDIT: Solved, I needed SQLPLUS /nolog @filename.sql instead of SQLPLUS @filename.sql

Upvotes: 1

Views: 1639

Answers (1)

Arran
Arran

Reputation: 157

SQLPLUS /nolog @filename.sql instead of SQLPLUS @filename.sql

Upvotes: 1

Related Questions