When a profile or scorecard is executed, the results are stored in a Profile WareHouse (PWH) Connection which is a Database Connection that is associated with the DIS.
Even though the Source being profiled is a Flat File, the results will be stored in the Profile Warehouse connection which in this case looks to be an Oracle Connection based on the error message.
Based on the error: "ORA-12154: TNS:could not resolve the connect identifier specified", it looks like the PWH connection Data Access Connection String has some issues.
For Oracle Connections, the Data Access Connection string should match the TNS entry name specified in the tnsnames.ora file. Please change the Connection string to the tns entry and rerun the profile.
The test connection only verifies the Metadata Access Connection String.
If the TNS entry is as follows:
(ADDRESS = (PROTOCOL = TCP)(HOST = mydnshostname)(PORT = 1521))
(SERVICE_NAME = MYSID)
The Data Access Connection String should be "MYSID" which is the tns entry name in the tnsnames.ora file.The change needs to be at the Connection level not the tnsnames.ora file.