You've not mentioned the connect string.

connect user/pw@db

Similarly for your tnsnames -

db=(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1521))
)
(CONNECT_DATA=
(SERVICE_NAME= db)
)
)
This should solve your problem.