I'm trying to use bat file/CLI to run SQL script against certain Oracle database with following syntax:
sqlplus -L user_name/database_name@Password @d:\my_bat_file\sql_script.sql
If I run this following error is returned:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SP2-0751: Unable to connect to Oracle. Exitig SQL*Plus
At the same time tnsping database_name works fine & corresponding connection configuration strings are present in tnsnames.ora
Moreover if I type commands manually in a following way:
sqlplus /nolog
connect user_name@databasename
Passowrd
I can connect to the database too. Any idea why I'm getting error when trying to use command I mentioned in beginning & how to fix it?
P.S. I'm doing this from Windows Server 2003 SP2 box with Oracle client v10 installed.